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

help

Former Member
0 Likes
322

hi all

the below given pseudocode is a little confusing.

could u help how to code for the following.

1. “Ship-to Number”: Get KUNNR (ship to) from VBPA-KUNNR when VBPA-PARVW (partner function) =”SH” where VBPA-VBELN(order number) =VBAP-VBELN and if VBPA-POSNR (item number) ne ‘00000’ (item level exist) then get KUNNR when VBPA-PARVW=”SH” (partner function) where VBPA-VBELN &VBPA-POSNR =VBAP-VBELN &VBAP-POSNR .

2. “Order Quantity”: Select EBELN (order number) from VBAK where VBAK- ERDAT(creation date) = SY-DATUM. Get KWMENG (order quantity) from VBAP where VBAP-EBELN=VBAK-EBELN.

3. “MTD Qty Ordered”: Get the value based on formula= sum “pseudo no. 2” and do grouping based on “ship-to number-pseudo no. 1” and MATNR (material number).

thanks,

venkatesh.

1 REPLY 1
Read only

Former Member
0 Likes
283

SELECT PKUNNR BMATNR SUM(B~KWMENG)

INTO TABLE ITAB

From VBAP as B inner join VBPA as P on BVBELN = PVBELN

and BPOSNR = PPOSNR

inner join VBAK as A on BVBELN = AVBELN

Where P~parvw = 'SH' and

B~POSNR NE '0000' and

A~ERDAT = sy-datum

GROUP BY PKUNNR BMATNR.