Ansicht
Dokumentation

ABENAMC_SEND_ABEXA - AMC SEND ABEXA

ABENAMC_SEND_ABEXA - AMC SEND ABEXA

RFUMSV00 - Advance Return for Tax on Sales/Purchases   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

- Sending Messages

This example demonstrates how messages are sent using AMC.

Source Code

Execute

Description

The factory method CREATE_MESSAGE_PRODUCER of the system class CL_AMC_CHANNEL_MANAGER is used to create sender objects for the messaging channels /demo_text, /demo_binary, and /demo_pcp of the application DEMO_AMC from the package SABAPDEMOS and to perform a casting for these objects to the appropriate interfaces.

"X" can be passed to the optional parameter I_SUPPRESS_ECHO to define that the messages sent using a sender object are not sent to the current ABAP session. The effect of this is shown in the executable example Suppressing Standalone Messages.

The SEND methods of the interfaces are used to send a text string, JSON data as a byte string and two name/value pairs, as well as a body in SAP's own Push Channel Protocol (PCP) using the messaging channels. The data of the PCP message is passed to an object of the class CL_AC_MESSAGE_TYPE_PCP and serialized there.

The executable example Receiving AMC Messages demonstrates how these messages can be received in ABAP programs. The executable example APC, WebSocket Communication shows how the messaging channels are linked with ABAP Push Channels (APC) and that the messages sent using DEMO_SEND_AMC are received by Web pages connected to an APC like this.

The ID of a receiver session can be entered in the input window of the program, as shown in the executable example for receiving AMC messages. If an ID of this type is entered, the program attempts to send the messages synchronously to this receiver session only.






ROGBILLS - Synchronize billing plans   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 2730 Date: 20240427 Time: 002305     sap01-206 ( 46 ms )