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

data fetching problem blpk table

Former Member
0 Likes
671

Hi Guri ji,

I am fetching the data from blpk table bssed on input screen date.

i want to sum of all the quantity which is on a input screen date and the material start with HY letter . for this i have written one query but through this we are not getting output. plz teel me what is the problem in my query.

DATA: BEGIN OF T_ITAB1 OCCURS 0,

BUDAT LIKE BLPK-BUDAT,

MENGE LIKE BLPK-MENGE,

END OF T_ITAB1.

SELECT BUDAT sum( MENGE )

FROM BLPK INTO CORRESPONDING FIELDS OF TABLE T_ITAB1

WHERE WERKS = 'KMLS' AND BUDAT IN DATE and matnr = 'HY*'

group by Budat .

thanks.

3 REPLIES 3
Read only

Former Member
0 Likes
613

Hi Sachin,

DATA: BEGIN OF T_ITAB1 OCCURS 0,
BUDAT LIKE BLPK-BUDAT,
MENGE LIKE BLPK-MENGE,
END OF T_ITAB1.

SELECT BUDAT sum( MENGE )
FROM BLPK INTO CORRESPONDING FIELDS OF TABLE T_ITAB1
WHERE WERKS = 'KMLS' 
AND BUDAT IN DATE
and matnr like 'HY%'  " IF you Say Equal (=) Then system checks for HY* only
group by Budat .

Check now and Njoy

Cheerz

Ram

Read only

0 Likes
613

hi .

what u suggest to me through this we are not getting quantity.

plz tell me..how it is possible.

Read only

Former Member
0 Likes
613

Hi

DATA: BEGIN OF T_ITAB1 OCCURS 0,

BUDAT LIKE BLPK-BUDAT,

MENGE LIKE BLPK-MENGE,

END OF T_ITAB1.

SELECT BUDAT sum( MENGE ) AS MENGE

FROM BLPK INTO CORRESPONDING FIELDS OF TABLE T_ITAB1

WHERE WERKS = 'KMLS'

AND BUDAT IN DATE

and matnr like 'HY%' " IF you Say Equal (=) Then system checks for HY* only

group by Budat .

Regards

Srilaxmi