Skip to Content
author's profile photo Former Member
Former Member

explaination about REUSE_ALV_BLOCK_LIST_DISPLAY

hi

What is ALV blocked list? can anyone give me pointers to REUSE_ALV_BLOCK_LIST_DISPLAY detailed explanation?

cheers

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 02:15 PM

    Hi,

    Usually in an ALV report, the data present in one internal table will be displayed. If we want to display more than ALV LIST in the same report when we execute our program, then U can use this REUSE_ALV_BLOCK_LIST_DISPLAY.

    If u want to display 2 ALV LIST when u execute ur report, then u need to populate 2 internal tables and build fieldcatalog's for these 2 internal table. Then pass this fieldcat and internal table to 2 separate REUSE_ALV_BLOCK_LIST_APPEND function modules.

    U have to use the following 2 other FM before using this FM.

    1) 'REUSE_ALV_BLOCK_LIST_INIT'

    2) 'REUSE_ALV_BLOCK_LIST_APPEND'

    and then

    3) 'REUSE_ALV_BLOCK_LIST_DISPLAY'

    See the complete code given below...

    Building ALV Block:

    report zalv_block.

    type-pools: slis.

    types: begin of g_ty_s_test,

    layo_no_vert_lines type char1,

    end of g_ty_s_test.

    data: int_tab type table of zprod,

    fs type zprod,

    int_tab1 type table of zprod,

    fs1 type zprod.

    data : alvfc type slis_t_fieldcat_alv,

    alvwc type slis_fieldcat_alv.

    data : alvly type slis_layout_alv.

    data : alvev type slis_t_event.

    *data: gt_outtab type g_ty_t_outtab with header line,

    data: gs_test type g_ty_s_test.

    select * from zprod into table int_tab.

    select * from zprod into table int_tab1 up to 5 rows.

    gs_test-layo_no_vert_lines = 'X'.

    alvly-no_vline = gs_test-layo_no_vert_lines.

    call function 'REUSE_ALV_BLOCK_LIST_INIT'

    exporting

    i_callback_program = sy-repid.

    clear alvwc.

    alvwc-fieldname = 'PNO'.

    append alvwc to alvfc.

    clear alvwc.

    alvwc-fieldname = 'PNAME'.

    append alvwc to alvfc.

    clear alvwc.

    alvwc-fieldname = 'QTY'.

    append alvwc to alvfc.

    clear alvwc.

    alvwc-fieldname = 'RATE1'.

    append alvwc to alvfc.

    call function 'REUSE_ALV_BLOCK_LIST_APPEND'

    exporting

    is_layout = alvly

    it_fieldcat = alvfc

    i_tabname = 'INT_TAB'

    it_events = alvev

    tables

    t_outtab = int_tab

    exceptions

    program_error = 1

    maximum_of_appends_reached = 2

    others = 3.

    clear alvfc.

    clear alvfc[].

    clear alvwc.

    alvwc-fieldname = 'PNO'.

    append alvwc to alvfc.

    clear alvwc.

    alvwc-fieldname = 'PNAME'.

    append alvwc to alvfc.

    clear alvwc.

    alvwc-fieldname = 'QTY'.

    append alvwc to alvfc.

    clear alvwc.

    alvwc-fieldname = 'RATE1'.

    append alvwc to alvfc.

    call function 'REUSE_ALV_BLOCK_LIST_APPEND'

    exporting

    is_layout = alvly

    it_fieldcat = alvfc

    i_tabname = 'INT_TAB1'

    it_events = alvev

    tables

    t_outtab = int_tab1

    exceptions

    program_error = 1

    maximum_of_appends_reached = 2

    others = 3.

    DISPLAY

    call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'

    exceptions

    program_error = 1

    others = 2.

    Reward points if its useful

    Cheers,

    Shanthi

    Edited by: shanthi ps on Jan 29, 2008 3:16 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 02:22 PM

    Hi,

    Check the following link for ALV Block List

    http://www.sap-basis-abap.com/abap/sample-program-on-block-lists.htm

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 02:36 PM

    Hi guys --Don't use these old fashioned function modules any more.

    Use OO -- you can for very simple grids use the classes in SALV or for editable grids use class CL_GUI_ALV_GRID.

    To get 2 grids on the same screen define on your screen 2 different custom controls.

    There's info all over these forums on writing OO alv grid programs.

    Cheers

    Jimbo

    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.