Sending Inbound IDocs from SAP Program
Prior to delving deeply into the SAP program’s inbound IDocs sending process. Typically, an external framework (let’s say XI) creates the incoming IDoc and sends it to Drain. The cycle code/relating capability module is then used to handle the incoming IDoc. In certain situations, however, due to client requirements, the connection point program should be designed so that the incoming IDoc begins within a comparable SAP framework; for instance, the sending and receiving are identical to the receive 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.
PC_control_record receives the control record data for the incoming IDoc (similar to EDIDC-IDoc control record). All important information, such as status (53), shipper port, collector accomplice number, recipient port, source accomplice number, and so on, is filled in the control records. The inbound table t_data_records receives all of the IDoc data (such as EDIDD, or IDoc control record). The incoming record’s IDoc information is read, processed, and then entered into the inbound table itab_data_records_db along with the section name and other details.
Demystifying EDI IDocs: The Bridge Between Your Business and the World
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
SAP ALE IDoc Configuration Steps: Streamlining Communication


