Q
Problem solve Get help with specific problems with your technologies, process and projects.

Can SAP create IDocs triggered by posted SAP documents?

Has SAP got the functionality to have outbound IDocs automatically be created when specific SAP documents are being posted? Example: when an incoming payment to customer account, which has document type DZ and posting key 15, is posted, SAP automatically prepares an outgoing IDoc with the relevant information.

Has SAP got the functionality to have outbound IDocs automatically be created when specific SAP documents are being...

posted? Example: when an incoming payment to customer account, which has document type DZ and posting key 15, is posted, SAP automatically prepares an outgoing IDoc with the relevant information.


Receiving plus processing an inbound IDoc and creation of an outbound IDoc are two completely asynchronous steps. Please keep in mind how the general IDoc process flow is:

* IDoc is received
* IDoc is processed by the application and the resulting documents are posted
* The application decides whether it is going to send out an outbound IDoc after posting the document

There are three common ways to automatically create an outbound IDoc:

* Creation through NAST message control
If the application supports messaging, it is the preferred solution. In this case the application stores a message to table NAST and triggers the message processing [entry point is RSNAST(einzel_nachricht) and the called routine is RSNASTED(ALE_PROCESSING) or RSNASTED(EDI_PROCESSING)]. The same message is created when you post the message manually through its appropriate transaction. If you want the IDoc to be sent only when the document has been created through an inbound IDoc, you need to implement a condition in message control, that decides when to disable the creation of the NAST entry. A detailed description on this is found in "The R/3 Guide to EDI, ALE, Workflow and Interfaces"

* Creation through workflow
If the application does not support messaging nor change pointers, some more work is required. A possible and proven solution is to create the IDoc through the workflow mechanism. Workflow is supported by all SAP transaction either explicitly or via the workflow exit from the change document (function CHANGEDOCUMENT_CLOSE). Here you have to send out the IDoc when needed. How? One way is to fake the NAST processing by calling a program that does the following steps:

TABLES: NAST.
fill NAST with suitable parameters
PERFORM edi_processing IN PROGRAM rsnasted.
If you are dealing with a master data application like transaction MM01 and IDocs MATMAS, there are ready-to-use functions like MASTERIDOC_CREATE_MATMAS that can be called directly without referring back to message control.

* Creation through change pointers
In the case of master data you could also use the ALE mechanism that is triggered through change pointers. See transaction SALE and change pointers for more. However, this solutions has not proven to be very flexible in practice. I suggest avoiding change pointers and to use workflow instead.
 

This was last published in May 2003

Dig Deeper on SAP trends, strategy and ERP market share

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close