Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module to show generated idoc

Former Member
0 Kudos
1,626

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!

6 REPLIES 6
Read only

Former Member
0 Kudos
701

Hello Felix Parache Morales,

Did you check Configuration transaction is NACE. There you will find associated program name.

Regards,

Pravin

Read only

0 Kudos
701

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?

Read only

0 Kudos
701

Hi Friend,

Please find herein the function module: IDOC_OUTPUT_INVOIC,

Regards,

Kundan

Read only

Former Member
0 Kudos
701

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

Read only

Former Member
701

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.

Read only

Former Member
0 Kudos
701

Thanks Rudra Roy and Manish Kumar,

I will implement solution!

BR