✒️ABAP Los IDocs de salida
ABAP Los IDocs de salida
IDoc Outbound: An Introduction to Outbound Interfaces
Understanding Outbound Interfaces
Outbound IDocs can be generated through two main methods:
- Output Types: These are employed when sending business documents, also known as transactional documents, such as orders or invoices. The generating application must be EDI/ALE enabled. They are created via the NACE transaction, which automatically generates records in the NAST and TNAPR tables. Typically, Output Types are created by SAP Basis personnel.
- Modification Pointers and Extraction Programs: These are used to replicate master data or modifications to it.
- Standard Extraction Program
- Custom Extraction Program (Z Program)
Output Types
Output Types serve as the method for generating outbound IDocs for transactional data. Functionally, the process is akin to printing forms:
- Define an Output Message configured as ALE/EDI output.
- Associate this message with the document to be sent.
- Configure the logistics message in the ALE tool (in Partner Agreement).
The configuration steps include:
- Identifying the IDoc message type to send. Standard message types are usually used for business documents, with extensions generated if required data isn't contained within.
- Define the output process code. For standard message types, a standard process code is used. If extensions have been made to the standard message type, the code must be updated via User Exits or enhancements.
- Define the output point and method.
- Specify if the ABAP port function is required.
Output Process Code
This code specifies how the outbound IDoc should be processed. Each message type (IDoc Type) has its own process codes, each associated with a function module responsible for execution.
For most output processes, standard process codes are used since the information to be sent is usually found in business documents. However, all standard function modules associated with process codes have enhancements where Z code can be added if the Base Type is associated with an extension.
If Z process codes are required, transaction WE41 is available.
Modification Pointers
These are used to send or duplicate master data in external systems when this data is created or modified. The steps include:
- Activating modification pointers globally using transaction BD61, marking the "General Modification Pointer Activated" flag.
- Activating modification pointers by Message Type with transaction BD50. The "New Entries" button allows adding the relevant message types. Besides the message type name, mark the "Active" flag.
- Adding relevant tables and fields for modification pointer generation with transaction BD52.
- Firstly, inform the Message Type.
- Then, create a new entry and inform the modification object, table, and field.
- Establishing a relationship between Message Type and function module via BD60 by adding new entries.
- Ensure the function module is created beforehand.
To create a Z function module, take the header of a standard module and add your code. The module's logic includes:
- Reading modification pointers using the CHANGE_POINTERS_READ function.
- Analyzing modification pointers to determine valid documents.
- Determining the application document key from the previous step.
- Selecting application data from the database using the identified object key.
- Completing the IDoc control record information.
- Populating the internal table of EDIDD structure with data records for all segments.
- Calling MASTER_IDOC_DISTRIBUTE to create database data.
- Updating modification pointer status.
- Executing a COMMIT WORK.
Finally, execute the RBDMIDOC program to process the IDoc, message type. This program not only creates IDocs through modification pointers for a specific message type but also sends them to the receiver and marks the modification pointers as processed in the corresponding message type.
Additional standard transactions useful when using modification pointers:
- BD21: Select modification pointers.
- BD22: Delete modification pointers.
- BD40: Read modification pointers for groups.
Standard Extraction Programs
These programs are used to send master data to receiving systems in bulk, for initial loads where a significant portion of master data from the central system needs to be replicated to client subsystems.
Some examples of standard extractors include:
- BD10: Material Master.
- BD12: Customer Master.
- BD14: Vendor Master.
Additionally, custom extractor programs generating IDocs can be developed. These programs utilize the MASTER_IDOC_DISTRIBUTE function module to send generated information to receivers. Remember to update the Partner Agreement and Distribution Model to define the receiving systems.
Custom Extraction Programs
To create these programs, follow these steps:
- Select database information based on the provided parameters.
- Complete the IDoc control record information.
- Populate the internal table of type EDIDD with data records of corresponding segments.
- Call the ALE service MASTER_IDOC_DISTRIBUTE to create IDocs in the database.
- Execute COMMIT-WORK.
- Send the IDoc to the receiver by calling the RSEOUT00 program.
With these steps, the IDoc has been created and stored in the EDIDC and EDID4 tables. You can validate it using transaction WE05.
 
 
 
Sobre el autor
Publicación académica de Jaime Eduardo Gomez Arango, en su ámbito de estudios para la Carrera Consultor ABAP.
Jaime Eduardo Gomez Arango
Profesión: Ingeniero de Sistemas y Computación - España - Legajo: SW34C
✒️Autor de: 109 Publicaciones Académicas
🎓Cursando Actualmente: Consultor ABAP Nivel Avanzado
🎓Egresado del módulo:
Disponibilidad Laboral: FullTime
Presentación:
Ingeniero de sistemas y computación con 8 años de experiencia el desarrollo frontend & backend (react/node) y en cloud (aws), actualmente desarrollando habilidades en sap btp, ui5, abap y fiori.
Certificación Académica de Jaime Gomez