Sending Inbound IDocs from SAP Program

Sending Inbound IDocs from SAP Program
Idoc from SAP to SAP

 

Before go into the depth of Sending Inbound IDocs from SAP Program. As a rule, the inbound IDoc to Drain is created by an outer framework (say XI) and gave to Drain. The inbound IDoc is then handled utilizing the cycle code/relating capability module. However, in specific cases, because of the client necessities, the connection point program should be planned so that the Inbound IDoc starts from inside a similar SAP framework for example both the sending and it are something similar to get framework.

Presently for the most part in such necessities, we by and large create the IDoc subsequent to perusing information from a level record. The document is passed to the application server by a middleware (say XI). The SAP interface program peruses the record from the application server and afterward begins handling the information. To make the inbound IDoc, we want to utilize the Capability Module ‘IDOC_INBOUND_WRITE_TO_DB’. This makes and saves the IDoc to the information base. Sending Inbound IDocs from SAP Program.

The control record data for the inbound IDoc is passed to pc_control_record (Like EDIDC – IDoc control record). In the control records, all significant data like status (53); recipient port, collector accomplice no.; shipper port; source accomplice no and so forth are populated. All the IDoc information is passed to inward table t_data_records (Like EDIDD – IDoc control record). The IDoc information is perused from the approaching record and handled and afterward populated to inward table itab_data_records_db with section name and so forth.

The inbound cycle information is passed to the capability module.

CALL FUNCTION 'IDOC_INBOUND_WRITE_TO_DB'
exporting
pi_do_handle_error = 'X'
pi_return_data_flag = ' '
importing
pe_idoc_number = control_record_db_in-docnum
pe_inbound_process_data = wa_inbound_process_data_in
tables
t_data_records = itab_data_records_db
changing
pc_control_record = control_record_db_in
exceptions
idoc_not_saved = 1
others = 2.

Presently if the inbound IDoc has been effectively made and we need to deal with something very similar, the capability module ‘IDOC_START_INBOUND’ can be utilized. Here we pass the inbound interaction information containing the IDoc cycle code and occasion code to wa_inbound_process_data_in. The status and delivery are added to the control records inside table i_control_records.

CALL FUNCTION 'IDOC_START_INBOUND'
exporting
pi_inbound_process_data = wa_inbound_process_data_in
pi_called_online = 'X'
succ_show_flag = 'X'
tables
t_control_records = i_control_records
exceptions
others = 1.

In the event that we have no special case, the IDoc will be effectively handled and have status ’53’.

 

YOU MAY LIKE THIS

O Data In Sap

Best Career Option After BSc

SAP ALE IDoc Configuration Steps: Streamlining Communication

 

X
WhatsApp WhatsApp us