Ansicht
Dokumentation

ABENAPC_DETACHED_CLIENT_ABEXA - APC DETACHED CLIENT ABEXA

ABENAPC_DETACHED_CLIENT_ABEXA - APC DETACHED CLIENT ABEXA

CL_GUI_FRONTEND_SERVICES - Frontend Services   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

- Creating a Detached Client

This example demonstrates how a detached client is created for the WebSocket protocol.

Source Code

Execute

Description

This example demonstrates how an ABAP program can create a detached APC client for the WebSocket protocol.

  • The local class apc_handler, which implements the interface IF_APC_WSP_EVENT_HANDLER_PCP, is used as the handler class. The method on_open gets a connection handle for the connection. The other methods are not needed.
  • CL_APC_WSP_CLIENT_CONN_MANAGER is used to create a detached client object as an APC server for the current AS ABAP. It is possible to select which of the two ABAP push channels, DEMO_APC_PCP or DEMO_APC_PCP_STATEFUL, from the executable example AS ABAP as WebSocket Server is used. The server can also be instructed to send its messages using ABAP messaging channels. The method CONNECT_AND_DETACH is used to create a detached client for the ABAP push channel.
  • The connection handle obtained in the method on_open of the handler class can either be displayed or used immediately in the program to create an attached client for the detached client.
  • A connection handle in the output can be copied and used in the program of the executable attached client example.

  • If not, the method ATTACH of the class CL_APC_WSP_CLIENT_CONN_MANAGER is used to create an attached client object for the connection handle. Its message manager is then used to create a message in PCP format and send it.

A breakpoint in the method ON_MESSAGE of the APC handler class CL_APC_WSP_EXT_DEMO_APC_PCP can be used to monitor the arrival and processing of the message. The reaction to custom messages is prevented here. If the message is sent using AMC, the response from the server is received by all associated AMC receivers. The attached client cannot itself wait for the response.






RFUMSV00 - Advance Return for Tax on Sales/Purchases   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 2946 Date: 20240420 Time: 122656     sap01-206 ( 50 ms )