Posted on Mar. 15, 2010 at 03.20 PM - Kuala Lumpur, Malaysia
Sometime there is a requirement whereby we don't want to do any mapping at all, so as to avoid performance issue in PI system. We just want to use PI as a broker to transfer the message, and let the whole processing of the incoming message done in SAP back end system instead. Herewith is step by step guide on how to call IDOC from proxy.
1. Create partner profile at the SAP back end system (Receiver) using transaction WE20
2. Go to the proxy method using transaction SPROXY and:
2.1 Populate the IDOC control record as follows:
* populate control data
CLEAR: gv_control, gt_control.
CLEAR: gv_data, gt_data.
gv_control-tabnam = 'EDI_DC40'.
gv_control-direct = 2.
gv_control-idoctyp = 'ZKC_BUPA_CHANGE01'.
gv_control-mestyp = 'ZKC_BUPA_CHANGE'.
gv_control-sndpor = 'SAPCXC'.
gv_control-sndprt = 'LS'.
gv_control-sndprn = 'CXCCLNT001'.
gv_control-credat = sy-datum.
gv_control-cretim = sy-uzeit.
gv_control-rcvpor = 'SAPCHC'.
gv_control-rcvprt = 'LS'.
gv_control-rcvprn = 'CHCCLNT120'.
APPEND gv_control TO gt_control.
2.2 Populate the IDOC data record as follows:
* populate IDOC data
gs_bupa-pensionno = 'PS128888'.
gs_bupa-insuranceno = 'AS128888'.
gs_bupa-title = '0002'.
gs_bupa-first_name = 'NORMAND'.
gs_bupa-last_name = 'VARGASD'.
gs_bupa-home_street1 = 'JALAN EMPANG BAHAGIA'.
gs_bupa-home_street2 = 'GROGOL PETAMBURAN'.
gs_bupa-home_district = 'JAKARTA UTARA'.
gs_bupa-home_city = 'LONDON'.
gs_bupa-home_postcode = '542001'.
gs_bupa-home_contact = '016 567 9080'.
gs_bupa-date_birth = '19710101'.
gs_bupa-date_join = '20100201'.
gs_bupa-date_death = '20100312'.
gv_sdata = gs_bupa.
gv_data-segnam = 'Z1ZKC_S_BUPA'.
gv_data-sdata = gv_sdata.
APPEND gv_data TO gt_data.
2.3 Create IDOC as follows:
* create IDOC and post the IDOC (partner profile set to triggered immediately)
CALL FUNCTION 'IDOC_INBOUND_ASYNCHRONOUS'
TABLES
idoc_control_rec_40 = gt_control
idoc_data_rec_40 = gt_data.
* Commit the IDOC
COMMIT WORK AND WAIT.
2.4 Test the IDOC posting by executing the proxy using transaction SPROXY
3. Check the successful of the IDOC posting
3.1 Check the proxy processing status in the SAP back end system using transaction SXI_MONITOR
3.2 Check the IDOC processing status using transaction WE02 or WE05
Life is beautiful! Let's make it meaningful and colorful!