Skip to Content

Output more than once ALV on screen

Hi,

We want to display data from 3 different internal tables on 3 different ALVs on output subscreen. i dont want to call a new screen but display all 3 ALVs one after other on single subscreen.

Kindly send any code blocks. I would prefer to do this using "Docking container" or with use of similar containers. Also suggest how i can insert some text lines between ALVs on output screen.

Kindly assist asap.

Best Regards,

Abbasi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 09:25 AM

    HI

    here 2 alv output in one screen

    &----


    *& Report ZAMIT_ALVOOPS

    *&

    &----


    *&

    *&

    &----


    REPORT ZNNR_ALVOOPS_SCREEN.

    tables: mara,spfli.

    types: begin of ty_tab,

    matnr type mara-matnr,

    ernam type mara-ernam,

    ersda type mara-ersda,

    end of ty_tab.

    DATA ITAB1 TYPE TABLE OF SPFLI.

    DATA WA1 LIKE LINE OF ITAB1.

    DATA IO1 TYPE SPFLI-CARRID VALUE 'AA'.

    data itab type table of ty_tab.

    data wa like line of itab.

    DATA OK_CODE TYPE SY-UCOMM.

    DATA: GRID TYPE REF TO CL_GUI_ALV_GRID,

    CONT TYPE REF TO CL_GUI_CUSTOM_CONTAINER.

    DATA: GRID1 TYPE REF TO CL_GUI_ALV_GRID,

    CONTA TYPE REF TO CL_GUI_CUSTOM_CONTAINER.

    CREATE OBJECT CONT EXPORTING CONTAINER_NAME = 'CONT1' .

    CREATE OBJECT GRID EXPORTING I_PARENT = CONT .

    CREATE OBJECT CONTA EXPORTING CONTAINER_NAME = 'CONT2' .

    CREATE OBJECT GRID1 EXPORTING I_PARENT = CONTA .

    selection-screen begin of block b1 with frame title text-100.

    select-options: s_matnr for mara-matnr.

    selection-screen end of block b1.

    select matnr ernam ersda from mara into corresponding fields of table itab up to 15 rows

    where matnr in s_matnr .

    call selection-screen 100.

    &----


    *& Module USER_COMMAND_0100 INPUT

    &----


    • text

    ----


    MODULE USER_COMMAND_0100 INPUT.

    if ok_code = 'PB1'.

    leave to screen 0.

    else.

    leave to screen 100.

    endif.

    ENDMODULE. " USER_COMMAND_0100 INPUT

    &----


    *& Module STATUS_0100 OUTPUT

    &----


    • text

    ----


    MODULE STATUS_0100 OUTPUT.

    • SET PF-STATUS 'xxxxxxxx'.

    • SET TITLEBAR 'xxx'.

    SELECT * FROM SPFLI INTO

    CORRESPONDING FIELDS OF TABLE ITAB1 WHERE CARRID = IO1.

    CALL METHOD grid->SET_TABLE_FOR_FIRST_DISPLAY

    EXPORTING

    • I_BUFFER_ACTIVE =

    • I_BYPASSING_BUFFER =

    • I_CONSISTENCY_CHECK =

    I_STRUCTURE_NAME = 'MARA'

    • IS_VARIANT =

    • I_SAVE =

    • I_DEFAULT = 'X'

    • IS_LAYOUT =

    • IS_PRINT =

    • IT_SPECIAL_GROUPS =

    • IT_TOOLBAR_EXCLUDING =

    • IT_HYPERLINK =

    • IT_ALV_GRAPHICS =

    • IT_EXCEPT_QINFO =

    • IR_SALV_ADAPTER =

    CHANGING

    IT_OUTTAB = itab.

    • IT_FIELDCATALOG =

    • IT_SORT =

    • IT_FILTER =

    • EXCEPTIONS

    • INVALID_PARAMETER_COMBINATION = 1

    • PROGRAM_ERROR = 2

    • TOO_MANY_LINES = 3

    • others = 4

    .

    IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY

    EXPORTING

    I_STRUCTURE_NAME = 'SPFLI'

    CHANGING

    IT_OUTTAB = ITAB1.

    ENDMODULE. " STATUS_0100 OUTPUT

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2007 at 09:59 AM

    Hi Naresh,

    This is not working for me. The output screen does not show anything. M i doing something wrong?

    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.