Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Display of 2 ALV List

Hi,

I am trying to display 2 ALV List at a time...Can anyone please tellme what is wrong in the following code..Its not displaying any output after the selection-screen.

Should I pass anything else in addition..Or can anyone tell me what exactly I am missing out...

Thanks..

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.

TYPES: BEGIN OF TYPT.

INCLUDE STRUCTURE MARA.

TYPES: END OF TYPT.

TYPES: BEGIN OF TYPT1.

INCLUDE STRUCTURE SPFLI.

TYPES: END OF TYPT1.

DATA IO1 TYPE SPFLI-CARRID VALUE 'AA'.

DATA ITAB TYPE TABLE OF TYPT.

DATA WA LIKE LINE OF ITAB.

DATA ITAB1 TYPE TABLE OF TYPT1.

DATA WA1 LIKE LINE OF ITAB1.

*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 * FROM MARA INTO TABLE

ITAB

WHERE MATNR IN S_MATNR .

SELECT * FROM SPFLI INTO

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.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question