Use
Before a program can connect with a target program, the target program must already be active and the call CMACCP must have been made. This also sets initial values. However, beforehand the logical name SAPCPICSYMDEST has to be defined that corresponds to the symbolic address for CMINIT. A unique value (conversation ID) is returned to the program. This value must be specified in all subsequent calls.
Activities
Syntax
CMACCP ( conv_id, rc)
Parameters
conv_id
This unique value is returned by the routine.
rc
Return code (output value)
CM_OK: Routine was executed without errors.
The return code contains the same value as rc.
Registering Programs at the SAP Gateway Without Changing the Source Code
If you specify relevant parameters when calling the target program, the program is registered at the gateway with the CMACCP call.
The CMACCP call analyzes the arguments passed. CMACCP then performs the calls SAP_CMREGTP and SAP_CMACCTP (see
SAP_CMREGTP, SAP_CMACCPTP, SAP_CMUNACCPTP, SAP_CMUNREGTP und SAP_CMNOREGTP).This means you can use registered programs without makting changes to the source code. You must link such programs with the most recent library.
Transfer parameters:
TP: |
Transaction program name |
GWHOST |
Gateway platform |
GWSERV |
Gateway service |
TIMEOUT |
Time limit in seconds (optional) If you do not specify this parameter, no timeout occurs and the program waits until the next request. |

Calling the program:
cpict2 TP=cpict2 GWHOST=hs0011 GWSERV=sapgw00