2024 Jan 12 2:06 PM
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( ).
2024 Jan 12 4:10 PM
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( ).
2024 Jan 12 4:12 PM
Please explain what code is executed when you debug. We can't do it.
2024 Jan 15 2:32 PM
You
(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