Application Development 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: 

How to get know the Sales Order IDOC#, if I know the created Sales Order#?

Former Member
0 Kudos

Hi Experts,

Let me know that, How to get know the IODC #, if I know the Sales Order#?

Scenario is that, sales order(say 12345678) was created from Inbound EDI. I also Know the MATERIAL too.

So, How to pull the associated Inbound ORDERS idoc, which is created this Sales order-12345678?

Is it from EDID4 table? or EDIDC? or any thing else?

reples r appreciated.

thanq

Edited by: SAP ABAPer on Sep 8, 2008 5:29 AM

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello

This can be done much easier using fm SREL_GET_NEXT_NEIGHBORS:

Input:

OBJECT-OBJKEY = <number of sales order>  " with leading zeros!!!
OBJECT-OBJTYPE = 'BUS2032'

MAX_HOPS = '01'

Result:

NEIGHBORS-OBJKEY = <IDoc number with leading zeros>
NEIGHBORS-OBJTYPE = 'IDOC'
NEIGHBORS-ROLETYPE = 'INIDOC'.

Regards

Uwe

5 REPLIES 5

aris_hidalgo
Contributor
0 Kudos

Hi,

Please check WE05/WE02.

Hope it helps...

<removed_by_moderator>

Edited by: Julius Bussche on Sep 8, 2008 7:42 AM

0 Kudos

thanq.

in we05, i can hv list of idocs with the message type of OERDRS on that period.........so, how can i know that, which idoc created the order 12345678?

thanq

uwe_schieferstein
Active Contributor
0 Kudos

Hello

This can be done much easier using fm SREL_GET_NEXT_NEIGHBORS:

Input:

OBJECT-OBJKEY = <number of sales order>  " with leading zeros!!!
OBJECT-OBJTYPE = 'BUS2032'

MAX_HOPS = '01'

Result:

NEIGHBORS-OBJKEY = <IDoc number with leading zeros>
NEIGHBORS-OBJTYPE = 'IDOC'
NEIGHBORS-ROLETYPE = 'INIDOC'.

Regards

Uwe

Former Member
0 Kudos

Hi

If you are requirement is to find out the list of sales order for the given Material .

You can get the list from VBAP table.

Regards

MD

Former Member
0 Kudos

Hello,

If you know the Sales Order Number, then Query EDID4 table with Pattern for the Sales Order Number "12345678". You should be able to get the IDoc Number. The only thing is that if there are multiple IDocs generated for the same Sales Order by Changing the Sales Order Number, you'll get multiple Entries for the same Sales Order.

Hope that was helpful.

Thanks and Regards,

Venkat Phani Prasad Konduri