Skip to Content

control break functionality for ALV

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Dec 05, 2007 at 05:14 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 05:15 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 05:16 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 05:27 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.