Question:
I use FM EDI_DATA_INCOMING in my program to start IDoc processing.
Is there a way to check if IDoc processing was successfuly after the call of this FM?
It doesn't have any exception parameter
I'm not 100% sure if sy-subrc = 0, it means that the processing was fine.
However IDOC0FRM uses it the same way:
...
The way you can check the execution of this FM is to check the IDOCs that are created after the execution of this FM.
Thanks Guest1975!
This is the way I check manually...just run my program and check the result in WE02.
I would like to do the same in my program....
However I cannot find the way to link the file and the generated doc.
The Idoc doesn't store the source filename....and the mentioned FM doesn't give me the Idoc number back...
Any idea?
Thanks,
Incho
Answer:
Hi Incho,
In the scenario that i have worked on the FM EDI_DATA_INCOMING was trigerred using the startrfc.exe.
This FM triggers the posting program for the relevant partner profile and the processing is handed to the Posting Program.
If you need a link between the posted IDOC and the file that created this then i think you will need to copy this FM and add code to export the filename and in the posting programs (In the exits if the posting program is a standard one ) import the filename and update a Z-table along with the IDOC number .
If you could tell me why you are running this FM explicitely then it might be useful.
Cheers
Seriously i havent tried to do this.
Answer:
Hi Guest1975,
Thanks for your help!
Based on OSS note 106216 SAP recommends startrfc.exe trigger ... I tested it and worked fine.
Unfortunately the scenario is that SAP and the external system has to work independently each other, so if SAP is down the external system cannot trigger the processing...then the external system has to store somewhere which Idoc was processed and which not.....and we don't want this....
There is inbound and outbound Idoc processing.
In the external system there is a monitoring service, which checks the directory and if there is a change, it starts the processing.
So the two system is independent from each other.
The requirement is implement something similar in SAP. So the custom program checks the directory with FM EPS_GET_DIRECTORY_LISTING and starts the processing with FM EDI_DATA_INCOMING.
This program runs as a periodical background job.
Since inbound Idoc processing is part of the workflow there will be a notification if the inbound processing failed...but I would prefer some kind of control/return value from FM EDI_DATA_INCOMING in order to able to write in the log that the processing was successful in my program.
Create a new Z function module would be too complex...
Incho
Answer:
DIG A BIT DEEPER IN THE FM'S OF THE ORIGINAL FM AND YOU'LL FIND FIELDS AS L_IDOC_NUMBER AND FUNCTION MODULES AS IDOC_INBOUND_WRITE_TO_DB. PUT IN A BREAK-POINT AND RUN THE FM. IF NECESSARY DO A STANDARD CHANGE IN ONE OF THE FM AND INSERT A ROUTINE.
GOOD LUCK!
Answer:
Please don't post entirely in capitals. It contravenes the basic rules of the forum (sorry about this Incho) Topic Locked
_________________
Kind Regards
Rosie Brent
Please remember to search the forum and check the FAQ before posting questions, thank you.
Tuly Idiot most of the time, part-time Guru