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

control break functionality for ALV

Former Member
0 Likes
676

HI experts,

i want to know how to use control break functionality in ALV's

i 've an int table , which i am processing for AT NEW lgtyp (storage type)

for every set of same lgtyp records , iam making some calculations on itab,

and getting my final int table.

so, for every set of new lgtyp values , i've a new final int table ,

which i need to pass to ALV.

my requirement is for every new storage type

get a block of output.

how to do this in ALV, waiting for response.

5 REPLIES 5
Read only

former_member386202
Active Contributor
0 Likes
651

Hi,

DOnt use AT NEW , use ON CHAGE

Refer this code

FORM sub_claculate_plug .

*--Local Variables

DATA : lv_index LIKE sy-tabix,

lv_total TYPE kzwi2.

LOOP AT it_final INTO wa_final.

lv_index = sy-tabix.

v_month = wa_final-erdat+4(2).

v_year = wa_final-erdat+0(4).

IF NOT p_bud IS INITIAL.

*--Collect all the plug numbers

PERFORM sub_collect_plug.

ENDIF.

ON CHANGE OF v_month.

v_ship = v_ship + v_wdays.

ENDON.

CLEAR : wa_nday.

READ TABLE it_nday INTO wa_nday WITH KEY erdat = wa_final-erdat

BINARY SEARCH.

IF sy-subrc EQ 0.

IF wa_nday-flag NE 'X'.

IF v_wdays NE 0.

wa_final-totbud = p_bud / v_wdays.

ENDIF.

ENDIF.

ENDIF.

wa_final-totrev = wa_final-corebus +

wa_final-onbulk +

wa_final-premier +

wa_final-shipit +

wa_final-onpromo +

wa_final-netrev +

wa_final-storev +

wa_final-connet +

wa_final-sporder.

lv_total = wa_final-corebus +

wa_final-onpromo +

wa_final-netrev.

IF NOT wa_final-oltot IS INITIAL.

wa_final-ordsize = lv_total / wa_final-oltot.

ENDIF.

MODIFY it_final FROM wa_final INDEX lv_index TRANSPORTING

totbud totrev ordsize.

*--Clear

CLEAR : wa_final,

v_days,

v_jan,

v_wdays,

v_ndays,

v_count.

ENDLOOP.

ENDFORM. " sub_claculate_plug

Regards,

Prashant

Read only

Former Member
0 Likes
651

Hi,

You can display your report using FM REUSE_ALV_BLOCK_LIST_DISPLAY. For this first you need to append your internal table(which is having set of lgtyp's) using FM 'REUSE_ALV_BLOCK_LIST_APPEND'. Then after you need to call FM 'REUSE_ALV_BLOCK_LIST_DISPLAY'.

Cheers,

Bujji

Read only

Former Member
0 Likes
651

U can append the field LGTYP into the it_sort table of REUSE_ALV_GRID_DISPLAY function module and export it to the ALV.

Reward points if useful.

Read only

0 Likes
651

hi ,

i am using ALV GRID Objects(Methods)

Read only

Former Member
0 Likes
651

HI,

Then you have a chance to display your report by sorting field LGTYP. or you have a chance to display different tables in different tabs.

Cheers,

Bujji