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: 

quantity order

Former Member
0 Kudos

hi,

how to find out the quantity ordered for a particular customer on material wise.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Kiran,

Execute a join between VBAK and VBAP.

VBAK will have the customer data and VBAP will have the Material and Qty data.

Regards,

Ravi

11 REPLIES 11

Former Member
0 Kudos

Kiran,

Execute a join between VBAK and VBAP.

VBAK will have the customer data and VBAP will have the Material and Qty data.

Regards,

Ravi

0 Kudos

hi ravi,

can u explain a little more what r the fields and conditions on joins

0 Kudos

Kiran

SELECT VBAKKUNNR VBAPMATNR VBAP~KWMENG

INTO CORRESPONDING FIELDS OF TABLE T_DATA

FROM VBAK INNER JOIN VBAP ON VBAKVBELN = VBAPVBELN.

Regards,

Ravi

0 Kudos

hi ravi,

but i want if the customer is ordered more than 1 material but i want the material wise quantity...

0 Kudos

Kiran,

In that case you will have to select the order number as well and process the data by looping at the internal table figure out how you want to seggregate the data.

Regards,

Ravi

Note :Please mark the helpful anwers

0 Kudos

hi ravi,

my actual requirement is----


Interactive report which displays all the sales orders for one particular customer, the materials ordered, quantity ordered

0 Kudos

Kiran,

SELECT VBELN KUNNR FROM VBAK.

SELECT VBELN MATNR KWMENG FROM VBAP FOR ALL ENTRIES OF T_VBAK WHERE VBELN - T_VBAK-VBELN.

LOOP T_VBAK.

LOOP AT T_VBAP WHERE VBELN = VBAK-VBELN.

Now calculate the total for the same material and dump into a third table.

ENDLOOP.

ENDLOOP.

Regards,

Ravi

Note :Please mark all the helpful answers

0 Kudos

hi ravi thank u very much,

how to get the goods issue date of that particular order and contact information about that particular customer

0 Kudos

Kiran,

You can look at VBFA table for gettingthe subsquent documents of a Sales order using VBELN.

Contact information, you should be able to get from KNA1 (Customer Master) using KUNNR as the key and also you can look at KNVK table for Contact partners information.

Please mark all the helpful answers

regards,

Ravi

Former Member
0 Kudos

Kiran,

Are you talking about the Sales Order line time level table(<b>VBAP</b>) wherein you will get quantity of each line item.

Cheers,

Thomas

0 Kudos

go to transaction ...

MCGL and check for field f1 for field discription....