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

Relationship for query

Former Member
0 Likes
679

HI Experts,

In my requirement, I have input field as purchase#(VBMTV-BSTKD), shiptoparty, sales organization, dist. channel, and I want output that at iteam level from structure that is Tot ord. qty(VBAPVB-KWMENG).

For this I have to findout sales doc# (VBELN) for regarding purchase#.

Can anyone tell me what will be the flow for this query?

Also I know sturcture names, can I write query on structure?

Which table will involve for this query?

Thanks in advance.

HI Experts,

In my requirement, I have input field as purchase#(VBMTV-BSTKD), shiptoparty, sales organization, dist. channel, and I want output that at iteam level from structure that is Tot ord. qty(VBAPVB-KWMENG).

For this I have to findout sales doc# (VBELN) for regarding purchase#.

Can anyone tell me what will be the flow for this query?

Also I know sturcture names, can I write query on structure?

Which table will involve for this query?

Thanks in advance.

4 REPLIES 4
Read only

Former Member
0 Likes
628

Hi

use the tables <b>VBAK and VBAP</b> of sales order header and Item

Total order qty field is VBAP-KWMENG

purchase#(VBAK-BSTNK), shiptoparty(VBAK-KUNAG), sales organization(VBAK-VKORG), dist. channel(VBAK-VTWEG) all are in VBAK table.

so based on these parameters of VBAK you can fetch data by joining the two tables VBAk and VBAP with the field VBELN

Reward points if useful

Regards

Anji

Message was edited by:

Anji Reddy Vangala

Read only

Former Member
0 Likes
628

Thanks

Read only

Former Member
0 Likes
628

how to get VBELN, if you have value of KUNNR,

means which table has KUNNR as primary key & VBELN as secondary key?

Read only

0 Likes
628

You can check BSID.

Regards,

Amit