Ansicht
Dokumentation

ABENAMC_RECEIVE_ABEXA - AMC RECEIVE ABEXA

ABENAMC_RECEIVE_ABEXA - AMC RECEIVE ABEXA

rdisp/max_wprun_time - Maximum work process run time   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

- Receiving Messages

This example demonstrates how messages are received using AMC.

Source Code

Execute

Description

The local class message_receiver implements the interfaces IF_AMC_MESSAGE_RECEIVER_TEXT, IF_AMC_MESSAGE_RECEIVER_BINARY, and IF_AMC_MESSAGE_RECEIVER_PCP. AMC consumers (created using the factory method CREATE_MESSAGE_CONSUMER of the system class CL_AMC_CHANNEL_MANAGER) are used to register instances of this local class for the messaging channels /demo_text, /demo_binary, and /demo_pcp of the application DEMO_AMC from the package SABAPDEMOS.

It is possible to select which messages are waited for. In accordance with this selection, the WAIT statement creates a wait state that lasts until all corresponding fields text_message, binary_message, and pcp_message have been filled in the callback routines RECEIVE triggered by messages. The wait time is limited to a definable number of seconds. The transaction SMAMC displays the registered AMC consumer during the wait time.

The required messages can be sent by the program DEMO_SEND_AMC (see the executable example Sending AMC Messages) from any current AS ABAP user session. The content of the messages is displayed once they have been received. The executable example APC, WebSocket Communication shows how the messaging channels are linked with ABAP push channels (APC). The program DEMO_RECEIVE_AMC also receives messages sent from Web pages connected to an APC like this.

The ID of the receiver session is displayed in the input window on the program. If this ID is entered in the executable example for sending AMC messages, point-to-point communication is used and only this receiver session is sent.






RFUMSV00 - Advance Return for Tax on Sales/Purchases   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 2888 Date: 20240419 Time: 200514     sap01-206 ( 54 ms )