cancel
Showing results for 
Search instead for 
Did you mean: 

How to find a dependent document through sales order number?

Former Member
0 Kudos

Hi,

Ours is MTO scenario... in this scenario, for total subcontracting parts....we are creating Purch. Req/Purch Ord with reference to Sales orders. One PO/PR is referenced to one Sales order only.

In this scenario, for one enhancement... I need to find the PR and PO numbers based on given sales order number. Is there any function module or any simple route to get all the PR and POs for a given sales order? instead of checking all PR/PO/planned order tables.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

andrea_brusarestelletti
Active Contributor
0 Kudos

Hello,

with transaction ME2K you can get the list of Purchase Order by Sales Document/Item.

Best regards,

Andrea

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Surya,

There is no such direct way to get the data but you can follow the below process.

You can get this details by defining/designing a new Query.

To develop a new query

1. use SQ01 through infoset create query

2. Use SQVI direct query by giving table.

Purchase Requision :-

Use Table EBKN  for the same and give field VBELN as selection field. Input your sales order it will give you the purchase requisitions exist against the sales order at output level.

Purchase Order :-

Use Table EKKN  for the same and give field VBELN as selection field. Input your sales order it will give you the purchase orders exist against the sales order at output level.

Hope it will help.

Regards

AG.

Former Member
0 Kudos

Thank you very much AG. Yes...I can use EBKN & EKKN tables. In this case I am expecting performance issues due to huge data..as sales order is not prime field. Is there any sales order tables consists Purchase document details? In our case VBFA-BANFN field is blank.

andrea_brusarestelletti
Active Contributor
0 Kudos

Hello,

read table VBFA, entering with:

VBELV = Sales Order number

POSNV = Sales Order item

VBTYP_N = 'V' for Purchase Order

Field 'VBELN' should give you the Purchase Order number. Bear in mind that if the assignment of the Sales Order to the Purchase Order is made manually during the creation of the Purchase order, and doesn't come from the document flow, so this solution wont' work.

Best regards,

Andrea

Former Member
0 Kudos

Hi Andrea,

In my case PO is not manually created. MRP created PR is converted as PO. Still there is no entry in VBFA table. What could be the reason?

Former Member
0 Kudos

You can find PO  through  document flow Table -VBFA for a specified sales order number and PR can be found in sales document schedule line tab find  PR number stored table VBEP-BANFN.

Former Member
0 Kudos

In our case this field VBFA-BANFN is blank. It is not getting populated with PR number.