Using IDoc / Output Type special processing options

Before delving into the Using IDoc / Output Type special processing options. We had a particular necessity for making Deals Request from Buy Requests inside a similar SAP framework. This was to occur in situations where we had a between organization Buy Request – a Plant in say Country X raises a PO for a Material which can be delivered by one more Plant in Nation Y. Presently the two plants have a place with a similar Organization however will have different Organization Codes.

📺 Recommended Video: SAP ABAP Full Course Roadmap 2026 | Basic to Advanced (HANA, CDS & OData)

Watch our comprehensive video guide below for step-by-step SAP ABAP concepts and practical demonstrations:

Ordinarily for a PO we have an ordinary outbound EDI 850 (IDoc Type: ORDERS05) going to an outside framework (say EDI) utilizing a middleware like SAP PI.

Also Read | IDOC Output Type

Then, at that point, we likewise have the inbound EDI 850 (same IDoc Type) which makes a deals request (Exchange VA01) in SAP ECC.

Using IDoc/Output Type special processing options. For this situation for Buy Request (Application ‘EF’), rather than setting off the typical EDI 850 outbound to XI (Medium – ‘6’ for EDI) for our exceptionally yield type, we can utilize medium ‘8’ (Unique Capability). Then we want to determine a program and subroutine name. The subroutine ought to be this way:

SET EXTENDED CHECK OFF.
INCLUDE rvadtabl. "Messages
INCLUDE rv56acom. "I/O-Structure
SET EXTENDED CHECK ON.


FORM sub_trigger_code_for_po USING returncode TYPE sy-subrc
                                   us_screen  TYPE c.
* Code Logic

ENDFORM. " sub_trigger_code_for_po

The worldwide construction nast is accessible in this subroutine. Here you can get the article key (objky) which will contain the PO number for this situation.

The custom rationale can be composed according to our prerequisite. The setting off of the result conditions can be characterized by the entrance successions and schedules related with it. Just when the given circumstances are fulfilled, then, at that point, the result condition is set off which then, at that point, calls the custom rationale carried out in the subroutine.

For our situation, in this construction we can get the PO information from concerned tables utilizing the PO number accessible in nast.

This information can be populated into the IDoc structures and Inbound IDoc made utilizing capability module IDOC_INBOUND_WRITE_TO_DB. Assuming you maintain that this IDoc should be posted, you can do a similar utilizing IDOC_START_INBOUND.

A decent methodology for doing this is do the IDoc populace and setting off rationale in foundation or a different undertaking.

One more very valuable stunt for populating standard outbound IDocs for express PO’s in any custom program is by calling the standard SAP capability module related with that result type/outbound cycle code. Like model for PO to populate the standard ORDERS05 outbound IDoc in your custom program, you can do the equivalent by simply calling IDOC_OUTPUT_ORDERS.

* Call the Function Module to Generate EDIDD Structure
CALL FUNCTION 'IDOC_OUTPUT_ORDERS'
EXPORTING
object = wa_nast
control_record_in = wa_edidc
TABLES
int_edidd = i_edidd
EXCEPTIONS
error_message_received = 1
data_not_relevant_for_sending = 2
OTHERS = 3.

Note that for this situation we would have to send the control information in wa_edidc and a sham (yet legitimate) PO number and different subtleties in wa_nast. The client exits related with this EDI/IDoc will likewise get set off for this case. Any further customization during populace should be possible there.

The populated IDoc can then effectively be made and sent utilizing MASTER_IDOC_DISTRIBUTE.

YOU MAY BE INTERESTED IN

SAP ABAP Material

What is EDI,ALE & IDOC ? How does it work?

SAP Launches Partner Innovation Program to Deliver Microvertical Capabilities with SAP S/4HANA Cloud

  • Related Posts

    AI-Code Creates More Testing Work: Adapting to Increased Demand |

    Learn about the impact of AI-generated code on QA teams and strategies for adapting to increased testing demands. | Bright-Minds Training Institute, Pune

    Bridging the Gap: How Automation Addresses Understaffing in QA Teams |

    Learn how automation is helping to address the understaffing crisis in quality assurance teams, improving efficiency and enhancing software products. Discover best practices for implementing automation and explore the future of QA automation at Bright-Minds.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You Missed

    AI-Code Creates More Testing Work: Adapting to Increased Demand |

    • By Varad
    • October 24, 2026
    • 4 views
    AI-Code Creates More Testing Work: Adapting to Increased Demand |

    Bridging the Gap: How Automation Addresses Understaffing in QA Teams |

    • By Varad
    • October 23, 2026
    • 10 views
    Bridging the Gap: How Automation Addresses Understaffing in QA Teams |

    Selenium BiDi: A Game Changer for Browser Automation |

    • By Varad
    • October 22, 2026
    • 14 views
    Selenium BiDi: A Game Changer for Browser Automation |

    Catch Regressions First: The Power of Continuous Performance Baselines

    • By Varad
    • October 21, 2026
    • 25 views
    Catch Regressions First: The Power of Continuous Performance Baselines

    uman Oversight in AI Testing

    • By Varad
    • October 19, 2026
    • 18 views
    uman Oversight in AI Testing

    Harnessing Observability for Automated Regression Tests

    • By Varad
    • October 18, 2026
    • 27 views
    Harnessing Observability for Automated Regression Tests