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

IDOC Number

Former Member
0 Likes
1,115

Hi All,

Using a z program,does anyone know how to get the IDOC number generated using the sales order number. We have automatic output determination for this which generates the IDOC.

This there a function module for this...

Thanks in advance,

Finbarr

Hi All,

Using a z program,does anyone know how to get the IDOC number generated using the sales order number. We have automatic output determination for this which generates the IDOC.

This there a function module for this...

Thanks in advance,

Finbarr

7 REPLIES 7
Read only

Former Member
0 Likes
1,065

Hi Finbarr,

Please check this FM.

RV_MESSAGES_GET

RV_MESSAGE_SELECT_SINGLE

RV_MESSAGE_PREVIEW

Hope this will help.

Regards,

Ferry Lianto

Please reward points if helpful.

Read only

0 Likes
1,065

Hi Ferry,

None of these do the trick.

Any other suggestions?

Thanks,

Finbarr

Read only

0 Likes
1,065

If you look at transaction WE09, you'll find a program that allows you to search IDocs based on data within segments. Unfortunately, there is no direct link between order num and IDoc num. If you are processing the ALE output immediately, you can use the order create date to help narrow down the selection from EDIDC. If you are running RSNAST00 to process the ALE output, then you can select from NAST to determine approx date and time of IDoc creation.

Once you pull EDIDC records by message type, date/time, you can run through EDID2(or EDID3, EDID4 depending on version) to find your order number.

Read only

Former Member
0 Likes
1,065

Hi,

Try this..

Use the output type and the sales order in the table NAST and get the CMFPNR.

Use the CMFPNR value in the table CMFP (FIELD NR) and get the IDOC Number from MSGV1, MSGV2..

This might work..

Thanks,

Naren

Read only

0 Likes
1,065

Hi Naren,

needs some testing but looks very good.

Thanks,

Finbarr

Read only

Former Member
0 Likes
1,065

Hi,

Please award the points if it working..

Thanks,

Naren

Read only

0 Likes
1,065

Awarded