Skip to Content
0
May 17, 2010 at 12:38 PM

ALV in subscreen that was defined inside of report (not SE51)

310 Views

Hello Gurus,

I've one problem and I'm out of ideas. I've defined in code tapstrips like below

 
SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
  .....
SELECTION-SCREEN END OF SCREEN 102.

SELECTION-SCREEN BEGIN OF SCREEN 0103 AS SUBSCREEN.
SELECTION-SCREEN END OF SCREEN 0103.
*----------------------------------------------------------------------*

SELECTION-SCREEN BEGIN OF TABBED BLOCK one FOR 25 LINES.
  SELECTION-SCREEN TAB (15) bl_corr USER-COMMAND ucomm1 DEFAULT SCREEN 102.
  SELECTION-SCREEN TAB (15) bl_addit USER-COMMAND ucomm2 DEFAULT SCREEN 103.
SELECTION-SCREEN END OF BLOCK one.

In screen 103 I would like to show ALV. How can I achive this? When I'm using code below nothing is being displayed. I think that problem lies in container. When I execute method IS_VALID of container I'm getting 0. When I'm passing empty parameter during creation of grid object (no conatiner) then I'm getting results on whole screen.

 
INITIALIZATION.
DATA: go_container1 TYPE REF TO cl_gui_docking_container,
       go_grid1 TYPE REF TO cl_gui_alv_grid,
       gs_fieldcatalog TYPE LVC_T_FCAT.

CREATE OBJECT go_container1
  EXPORTING
    REPID                       = sy-repid
    DYNNR                       = '0103'
    NAME                        = 'CUSTOM_AREA'.

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
 EXPORTING
    I_STRUCTURE_NAME             = '/VFE/JTO_SCI_RPL'
  CHANGING
    CT_FIELDCAT                  = gs_fieldcatalog.

CREATE OBJECT go_grid1
    EXPORTING i_parent =  go_container1.

  CALL METHOD GO_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
    CHANGING
      IT_OUTTAB                     = gt_replacment_lines
      IT_FIELDCATALOG               = gs_fieldcatalog.

BR

Marcin Cholewczuk