Skip to Content
avatar image
Former Member

ALV container problem in pop up screen

Hell all,

I have a program which have several screens and pop ups.

For example : I start with 100 screen and call 200 screen than 300 scren and then  return to 100 screen but container just disappear in 100 screen.

I cant see alv or container at all.

This is the code that i use at the PBO of 100 screen.

I use custom container and some input fields in this screen.

  gs_layout100-no_toolbar = 'X'.

   gs_layout100-cwidth_opt = 'X'.

   CREATE OBJECT go_cont100

     EXPORTING

       parent         = cl_gui_container=>screen2

       container_name = 'CC100'.

   CREATE OBJECT go_grid100

     EXPORTING

       i_parent = go_cont100.

   CALL METHOD go_grid100->set_table_for_first_display

     EXPORTING

       is_layout       = gs_layout100

     CHANGING

       it_fieldcatalog = gt_fcat100[]

       it_outtab       = gt100[].

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Dec 25, 2014 at 03:32 PM

    Hi,

    Assuming that in the screen you have custom control "CC100".

    try to remove

           parent         = cl_gui_container=>screen2

    Get the book An Easy Reference for ALV Grid Control

    from  http://scn.sap.com/docs/DOC-10353

    Chapter: General Scheme

    regards.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 25, 2014 at 03:34 PM

    Hi ,

    Maybe you should just refresh not to create again.

    in pbo_100

    if go_grid100 is not initial.

         call method go_grid100->refresh_table_display.

    else.

    gs_layout100-no_toolbar = 'X'.

       gs_layout100-cwidth_opt = 'X'.

       CREATE OBJECT go_cont100

         EXPORTING

           parent         = cl_gui_container=>screen2

           container_name = 'CC100'.

       CREATE OBJECT go_grid100

         EXPORTING

           i_parent = go_cont100.

       CALL METHOD go_grid100->set_table_for_first_display

         EXPORTING

           is_layout       = gs_layout100

         CHANGING

           it_fieldcatalog = gt_fcat100[]

           it_outtab       = gt100[].

    endif.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 25, 2014 at 04:18 PM

    1.To create container, just need to sure that  container_name of container control is same to the name in the screen painter, no need to point the screen in the constructor of container control

    delete the  code    parent         = cl_gui_container=>screen2

    2. Make sure the creation of alv grid do only once

    if go_cont100 is initial.

      create container

      create alv

      alv->set_table_for_first_display

    endif.

    3.when you change the data of the itab , using refresh_table_display method to refresh alv data

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 27, 2014 at 03:08 AM

    Did you tried to move the variable declaration for the container object and the ALV object to the TOP include? Ive experienced problems with popup screens while creating those objects more than once, even though they are local variables. So I changed it to global, used refresh and it worked just fine.

    Hope it helps.

    Add comment
    10|10000 characters needed characters exceeded