SAP PCP



Get Example source ABAP code based on a different SAP table
  



Push Channel Protocol (PCP)
The Push Channel Protocol (PCP) is a communications format specified by SAP for exchanging messages between ABAP programs and between ABAP programs and external interfaces. A message in Push Channel Protocol is similar to a simple HTTP message. It basically consists of header fields for metadata and a message body.
A header field is a name-value pair separated by a colon (:) and followed by a line feed.
The message body can be either character-like or byte-like.
The encoding of a character-like message body is UTF-8. It can contain line feeds ( n).
The encoding of a byte-like message body is Base64. The escape character for the special characters :, n, and is a prefixed .
The following APIs are available for handling the Push Channel Protocol:
On AS ABAP, the class CL_AC_MESSAGE_TYPE_PCP and the interface IF_AC_MESSAGE_TYPE_PCP form an API that handles PCP messages.
In SAPUI5, the class sap.ui.core.ws.SapPcpWebSocket provides the necessary methods.
The JavaScript file sap-pcp-websocket.js can be loaded from the MIME repository as an API for other clients.
Currently, the Push Channel Protocol is used by the following ABAP frameworks:
ABAP Channels
PCP messages are an optional message type for AMC messages
PCP messages are a possible subprotocol of the WebSocket protocol for APC messages.
ABAP daemons PCP messages are the only way of communicating between ABAP programs and ABAP daemons. ABAP daemons also have access to data in PCP format in the ABAP daemon memory.



Latest notes:

The Push Channel Protocol is recommended for AMC messages and APC messages. They provide a unified format and make it possible to send and evaluate context information as meta data in the header fields in addition to the message itself.
The methods of the SAPUI5 class sap.ui.core.ws.SapPcpWebSocket and the JavaScript file sap-pcp-websocket.js use an optional parameter to support multiplexing of virtual connections using a real WebSocket connection when PCP is used. For Web applications, it is advisable to use virtual connections, since many Web browsers only support a limited number of WebSocket connections. For APC applications that use the Push Channel Protocol, the use of multiplexing is transparent, which means that virtual connections can be constructed for existing APC applications without changes.
For detailed information about PCP, see the ABAP Channels documentation in the SAP Help Portal.
ABAP_HINT_END