ALV grid in a Subscreen

    Hi,

    I have a problem with the display of a ALV grid in a subscreen. I am going to try to explain my problem and maybe somebody knows any solution.

    In a regular screen I have a subscreen that should show the ALV, I am following all the steps like callling the subscreen, creating the container for the ALV grid, … but it doesn’ show anything.

    I have tried some things to check if the calling of the subscreen works, so I just call any other subscreen and it works. Also I have tried to call two alv in the same screen using the custom control and it works.

    I have changed the subscreen into screen and I have added the status and so on and by itself it also works.

    Does anybody know what can be missing??

    Thanks very much

    Hi,I have a problem with the display of a ALV grid in a subscreen. I am going to try to explain my problem and maybe somebody knows any solution.In a regular screen I have a subscreen that should show the ALV, I am following all the steps like callling the subscreen, creating the container for the ALV grid, ... but it doesn' show anything.I have tried some things to check if the calling of the subscreen works, so I just call any other subscreen and it works. Also I have tried to call two alv in the same screen using…

    ALV grid in a Subscreen

    Very Helpfull

    User Rating: Be the first one !
    Vice Professor Asked on November 2, 2016 in user interface-development.
    Add Comment
    1 Answer(s)

      Hi Alejandro,

       

      Ensure if it is done according to below logic:

      1. “————————————–
      2. “Main screen
      3.  
      4. “call subscreen in PBO of main screen
      5. PROCESS BEFORE OUTPUT.
      6. CALL SUBSCREEN sub_area INCLUDING sy-repid ‘0200’. “assuming subscreen number is 200
      7.  
      8. PROCESS AFTER INPUT.
      9. CALL SUBSCREEN sub_area.
      10.  
      11. “————————————–
      12. “Subscreen
      13. PROCESS BEFORE OUTPUT.
      14. MODULE pbo_0200.
      15.  
      16. “————————————–
      17. “ABAP program
      18. data: g_custom_container type ref to cl_gui_custom_container,
      19. g_alv_grid_ref type ref to cl_gui_alv_grid.
      20.  
      21. MODULE PBO_0200.
      22. if g_custom_container is initial.
      23. “create custom container
      24. CREATE OBJECT g_custom_container
      25. EXPORTING
      26. container_name = ‘CUSTOM_AREA’ “name of container name on screen layout (must be set in SUBSCREEN, not in MAIN SCREEN)
      27.  
      28. CREATE OBJECT g_alv_grid_ref
      29. EXPORTING
      30. i_parent = g_cutom_container.
      31.  
      32. CALL METHOD g_alv_grid_ref->set_table_for_first_display
      33. ….
      34. else.
      35. CALL METHOD g_alv_grid_ref->refresh.
      36. endif.
      37. ENDMODULE.

      Regards

      Marcin

      Add Comment

        Hi Alejandro,

         

        Ensure if it is done according to below logic:

        1. “————————————–
        2. “Main screen
        3.  
        4. “call subscreen in PBO of main screen
        5. PROCESS BEFORE OUTPUT.
        6. CALL SUBSCREEN sub_area INCLUDING sy-repid ‘0200’. “assuming subscreen number is 200
        7.  
        8. PROCESS AFTER INPUT.
        9. CALL SUBSCREEN sub_area.
        10.  
        11. “————————————–
        12. “Subscreen
        13. PROCESS BEFORE OUTPUT.
        14. MODULE pbo_0200.
        15.  
        16. “————————————–
        17. “ABAP program
        18. data: g_custom_container type ref to cl_gui_custom_container,
        19. g_alv_grid_ref type ref to cl_gui_alv_grid.
        20.  
        21. MODULE PBO_0200.
        22. if g_custom_container is initial.
        23. “create custom container
        24. CREATE OBJECT g_custom_container
        25. EXPORTING
        26. container_name = ‘CUSTOM_AREA’ “name of container name on screen layout (must be set in SUBSCREEN, not in MAIN SCREEN)
        27.  
        28. CREATE OBJECT g_alv_grid_ref
        29. EXPORTING
        30. i_parent = g_cutom_container.
        31.  
        32. CALL METHOD g_alv_grid_ref->set_table_for_first_display
        33. ….
        34. else.
        35. CALL METHOD g_alv_grid_ref->refresh.
        36. endif.
        37. ENDMODULE.

        Regards

        Marcin

        Add Comment

        Your Answer

        By posting your answer, you agree to the privacy policy and terms of service.