2010 Feb 05 7:33 AM
Hi,
good morning guys
I need a requirement
First Record----> Branch Name -
> total Qty
like India -
> 100
Second Record..> xyx 50
Abc 50
If Branch name has changed again.. i need the first record Branch name and total Qty and below item details..
Plz let me know.. how to do it
REgards
2010 Feb 05 7:35 AM
Dear Bala,
Please go through the sample code
REPORT ysw_test.
DATA: BEGIN OF it OCCURS 0,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
END OF it,
wa LIKE it.
SELECT ebeln ebelp FROM ekpo INTO TABLE it.
check it[] is not initial.
LOOP AT it INTO wa.
ON CHANGE OF wa-ebeln.
CLEAR:wa-ebelp.
insert wa into it.
ENDON.
ENDLOOP.
break shreew.
Hi,
good morning guys
I need a requirement
First Record----> Branch Name -
> total Qty
like India -
> 100
Second Record..> xyx 50
Abc 50
If Branch name has changed again.. i need the first record Branch name and total Qty and below item details..
Plz let me know.. how to do it
REgards
2010 Feb 05 7:35 AM
Dear Bala,
Please go through the sample code
REPORT ysw_test.
DATA: BEGIN OF it OCCURS 0,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
END OF it,
wa LIKE it.
SELECT ebeln ebelp FROM ekpo INTO TABLE it.
check it[] is not initial.
LOOP AT it INTO wa.
ON CHANGE OF wa-ebeln.
CLEAR:wa-ebelp.
insert wa into it.
ENDON.
ENDLOOP.
break shreew.
2010 Feb 05 7:42 AM
Hi
I suppose you want to display braanch wise total quantity.
For this,
AT NEW <field>
SUM.
2010 Feb 05 7:46 AM
Yes, ur right.. i used it but below i need to get the all item details.. how to do it
REgards
2010 Feb 05 7:49 AM
Dear Bala,
Not to worry, you an have one internal table for total's and can link it with the frist line. Branch.
2010 Feb 05 7:50 AM
Hi,
If you dont mind, can you send sample code..
I wrote the code like below
SORT lt_machine_sales BY ktgrm_d.
clear: lwa_out5.
LOOP AT lt_machine_sales INTO lwa_out5.
ON CHANGE OF lwa_out5-ktgrm_d.
CONTINUE.
ENDON.
CLEAR lwa_out5-ktgrm_d.
insert lwa_out5 into lt_machine_sales.
MODIFY lt_machine_sales FROM lwa_out5.
ENDLOOP.
Regards