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: 

For BSID- Accounting Document Number corresponding PO Number is required

Former Member
0 Kudos
668

Hi Gurus,

I have got a requirement to develop a report similiar to 'FBL5N' . I am getting the details of open and cleared items of a customer from BSID and BSAD tables respectively. My requirement is also to fetch the corresponding PO number of the LINE items displayed in the report.

Can any one suggest how can I fetch PO number with Accounting document number(BSID-BELNR) or (BSAD-BELNR).

Your efforts in this matter are deeply appreciated and <<removed_by_moderator>>.

Thanking You,

ZIa.

Edited by: Vijay Babu Dudla on Jan 28, 2009 11:07 PM

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos
125

If you have fields BSID-VBEL2 and BSID-VPOS2 are populated with the sales order, than access VBKD with the Sales Order to get the Customer PO (VBKD-BSTKD)

Or

First, You need to get the Billing document. Access BKPF with the BSID-BELNR to get the AWKEY where AWTYP = 'VBRK'

Now, you can go to SD document flow with the billing document to find out the Sales Document. Access VBKD with the Sales document to get the Customer PO

Regards,

Naimesh Patel

3 REPLIES 3

Former Member
0 Kudos
125

From BSID and BSAD, use BUKRS, BELNR GJAHR and BUZEI to go to BSEG and get EBELN.

Rob

0 Kudos
125

Hello Rob,

I would like to add an observation of mine:

The field BSEG-VORGN(G/L Transaction Type) = 'RMRP' and the field BSEG-EBELN is populated for BSEG-BUZID = 'S'.

I hope these are not config-dependent.

BR,

Suhas

naimesh_patel
Active Contributor
0 Kudos
126

If you have fields BSID-VBEL2 and BSID-VPOS2 are populated with the sales order, than access VBKD with the Sales Order to get the Customer PO (VBKD-BSTKD)

Or

First, You need to get the Billing document. Access BKPF with the BSID-BELNR to get the AWKEY where AWTYP = 'VBRK'

Now, you can go to SD document flow with the billing document to find out the Sales Document. Access VBKD with the Sales document to get the Customer PO

Regards,

Naimesh Patel