2015 Jul 27 11:24 AM
Dear Guru's
An SD invoice generates an Output, which generates an IDOC.
If we afterwards go to see the output, mark it and hit button "processing log" we get message:
Object 7180000459
Output type: Invoice ALE
Processing log for program RSNASTED routine EDI_PROCESSING
IDoc '0000000001739014' was created and forwarded for transmission
IDoc '0000000001739014' sent to SAP system
Question:
which function module reads the generated idoc number?
Requirement:
I need to read the generated IDOC number starting from the invoice.
If I access EDIDC and EDID4 table, this will require many system resources.
Appreciate help in advance!
2015 Jul 27 11:30 AM
Hello Felix Parache Morales,
Did you check Configuration transaction is NACE. There you will find associated program name.
Regards,
Pravin
2015 Jul 27 11:41 AM
Thanks, this is not what I mean, apologies.
NACE transaction is working correctly.
IDOCS are being generated correctly.
My requirement is to read the generated IDOC number out from an SD Document (in this case, SD Invoice).
Any suggestion?
2015 Jul 27 11:44 AM
Hi Friend,
Please find herein the function module: IDOC_OUTPUT_INVOIC,
Regards,
Kundan
2015 Jul 27 11:45 AM
Hi Felix,
The link is :
Table NAST-KAPPL = 'V3' ( For Billing ) NAST-OBJKEY = <Invoice Number> get CMFPNR
Go to table CMFP input NR = NAST-CMFPNR and you will understand. The Idoc number is is field MSGV1 for ARBGB = 'E0'. You can set APLID = 'WFMC' to have better performance if you write a small FM /routine by you.
R
2015 Jul 27 12:11 PM
Put a breakpoint in FM WFMC_PROTOCOL_LOAD and hit the "processing log" button.
After some debugging, it can be deduced that table CMFP has the idoc number.
NAST-CMFPNR would have the object id.
So, select MSGV1 from CMFP where APLID eq 'WFMC' and NR eq <object id, like 000012345678> and ARBGB eq 'E0' and MSGNR eq '045'.
Message e0(045) is IDoc '&' was created and forwarded for transmission.
Idoc number is present in message parameter MSGV1.
2015 Jul 27 12:50 PM
Thanks Rudra Roy and Manish Kumar,
I will implement solution!
BR