Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Objects not shown on a a dialog screen

shmilo666
Explorer
0 Kudos

Hello.

I have a dialog screen that has a container in it for the ALV screen.

Above the container, I put some text and input/output objects but when I call this screen these objects are not shown. Any idea?

in the PBO I put the following code:

 CREATE OBJECT g_custom_container
EXPORTING
extension = 2000.
* Creating Split Object
IF g_split IS INITIAL.
CREATE OBJECT g_split
EXPORTING
parent = g_custom_container
rows = 1
columns = 1.
CALL METHOD g_split->set_border
EXPORTING
border = cl_gui_cfw=>true.
ENDIF.
CALL METHOD g_split->set_column_mode
EXPORTING
mode = g_split->mode_relative.
IF cl_salv_table=>is_offline( ) EQ if_salv_c_bool_sap=>false.
g_split_left = g_split->get_container( row = 1 column = 1 ).
* g_split_right = g_split->get_container( row = 1 column = 2 ).
CREATE OBJECT g_split_left_con
EXPORTING
parent = g_split_left
rows = 2 "SPLIT INTO Three ROW
columns = 1. "AND ONE COLUMNS
g_split_left2 = g_split_left_con->get_container( row = 1 column = 1 ).
g_split_left3 = g_split_left_con->get_container( row = 2 column = 1 ).
g_split_left_con->set_row_height( id = 2 height = 20 ).
g_split_left_con->set_row_height( id = 3 height = 20 ).
ENDIF.
cl_salv_table=>factory(
EXPORTING
r_container = g_split_left2
IMPORTING
r_salv_table = gcl_table2
CHANGING
t_table = gt_mlst ).
cl_salv_table=>factory(
EXPORTING
r_container = g_split_left3
IMPORTING
r_salv_table = gcl_table3
CHANGING
t_table = gt_ppord ).
PERFORM field_catalog02.
PERFORM field_catalog03.
gcl_table2->display( ).
gcl_table3->display( ).
3 REPLIES 3

Sandra_Rossi
Active Contributor

Please edit your question (Actions>Edit), select your code and press the button [CODE], which makes the code appear colored/indented, it'll be easier for people to look at it. Thanks!

e.g.

    g_custom_container = NEW #( extension = 2000 ).

    " Creating Split Object

    IF g_split IS INITIAL.
      g_split = NEW #( parent  = g_custom_container
                       rows    = 1
                       columns = 1 ).
      g_split->set_border( border = cl_gui_cfw=>true ).
    ENDIF.

    g_split->set_column_mode( mode = g_split->mode_relative ).

    IF cl_salv_table=>is_offline( ) EQ if_salv_c_bool_sap=>false.
      g_split_left = g_split->get_container( row    = 1
                                             column = 1 ).

* g_split_right = g_split->get_container( row = 1 column = 2 ).
      g_split_left_con = NEW #( parent  = g_split_left
                                rows    = 2 "SPLIT INTO Three ROW
                                columns = 1 ). "AND ONE COLUMNS
      g_split_left2 = g_split_left_con->get_container( row    = 1
                                                       column = 1 ).
      g_split_left3 = g_split_left_con->get_container( row    = 2
                                                       column = 1 ).
      g_split_left_con->set_row_height( id     = 2
                                        height = 20 ).
      g_split_left_con->set_row_height( id     = 3
                                        height = 20 ).
    ENDIF.

    cl_salv_table=>factory( EXPORTING r_container  = g_split_left2
                            IMPORTING r_salv_table = gcl_table2
                            CHANGING  t_table      = gt_mlst ).

    cl_salv_table=>factory( EXPORTING r_container  = g_split_left3
                            IMPORTING r_salv_table = gcl_table3
                            CHANGING  t_table      = gt_ppord ).

    PERFORM field_catalog02.
    PERFORM field_catalog03.

    gcl_table2->display( ).
    gcl_table3->display( ).

Sandra_Rossi
Active Contributor

Please explain what code is executed when you debug. We can't do it.

raymond_giuseppi
Active Contributor
0 Kudos

You

  • Created a splitted container with 1 row and 1 column.
  • Get the unique container created, to later display an ALV in it
  • Require this same first container to contain also a splitted container with 2 rows
  • Get those two containers to display 2 other ALVs

(hardly any, chance of success, seems you previous version was better, just create first splitted container with 2 columns left/right)

You should handle error returned by the call of methods in your code /and/ debug