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

Alv Report issue

former_member251546
Participant
0 Likes
604

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
576

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

5 REPLIES 5
Read only

Former Member
0 Likes
577

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.

Read only

Former Member
0 Likes
576

Hi

I suppose you want to display braanch wise total quantity.

For this,

AT NEW <field>

SUM.

Read only

0 Likes
576

Yes, ur right.. i used it but below i need to get the all item details.. how to do it

REgards

Read only

0 Likes
576

Dear Bala,

Not to worry, you an have one internal table for total's and can link it with the frist line. Branch.

Read only

0 Likes
576

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