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

report help

Former Member
0 Likes
467

hello everybody.

I need help regarding one of my report for delivery.

in selection screen i have ranges for

1.date of delivery

2.delivery no

3.customer no

result what i am getting

MERCHANDISE CATEGORY 002

M-01 STORE CODE 3 STOCK NET VALUE

M-01 STORE CODE 5 STOCK NET VALUE

M-01 STORE CODE STOCK NET VALUE

here in out put i need not required to repeat this material no again and again rather i need to add the quantity that comes against a particular material no.

i cannot use collect since collect can be used only with key fields

that tables i am refering are likp and lips.

thanks in advance.

4 REPLIES 4
Read only

Former Member
0 Likes
454

use query ike this ...

select matnr sum(menge) from dbtab into itab

where cond...

group by matnr.

append itab.

endselect.

Message was edited by: kishan negi

Message was edited by: kishan negi

Read only

Former Member
0 Likes
454

Hi,

SORT itab BY matnr.
LOOP AT itab INTO wa.
MOVE wa TO wa2.
AT NEW matnr.
 APPEND wa2 TO itab2.
 CONTINUE.
ENDAT.
LOOP AT itab2 WHERE matnr = wa-matnr.
itab2-quantity = itab2-quantity + itab-quantity.
MODIFY itab2 TRANSPORTING quantity.
ENDLOOP.
ENDLOOP.

Regards,

Wenceslaus.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
454

loop at itab.

AT NEW MATNR.

SUM. (THIS STATEMENTS SUMS THE NUMERIC)

ENDAT.

ENDLOOP.

Read only

Former Member
0 Likes
454

Hi,

In your select querry,

take SUM(QTY)and use GROUP BY clause for MATNR .

Hope this helps.

Regards,

Shashank