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

selection for sales docs from billing doc header

Former Member
0 Likes
553

Hello All,

I have billing document header data i.e. vbrk

now i have to select all the sale order documents(vbap) . the billing docs are must be posted against deliveray docs(lips).

is there any view that is available ? or i need to query directly ?

if i have to query is for all entries faster or nested query faster?

please suggest

Amarender Reddy B

Hello All,

I have billing document header data i.e. vbrk

now i have to select all the sale order documents(vbap) . the billing docs are must be posted against deliveray docs(lips).

is there any view that is available ? or i need to query directly ?

if i have to query is for all entries faster or nested query faster?

please suggest

Amarender Reddy B

3 REPLIES 3
Read only

naimesh_patel
Active Contributor
0 Likes
522

You can get the Sales Order number from the VBRP. Fields are:

AUBEL Sales Document

AUPOS Sales Document Item

Or you can use the VBFA table to look for the doucment flow to find out the Sales Order attached to that billing document.

But, I would suggest to use the VBRP table.

Regards,

Naimesh Patel

Read only

0 Likes
522

Hello Nimesh,

Thanks for fast reply...

i have a doubt here ....'there can be several sales documents per delivery document (OR a delivery docuemnt can be created from several sales docuements)' in this case, vbrp cant contain all the sales orders...

am i right? please correct me

Read only

0 Likes
522

Write a select statement on VBFA, select vbelv posnv from vbfa where vbeln = vbrp-vbeln and posnn = vbrp-posnr and vbtyp_v = 'C'.