03-01-2006 8:56 AM
Hallo,
I have to update my fieldcatalog on a ALV GRID in screen 200.
From screen 100 I click a button and I call screen 200.
Here, the first time I creat the filedcatalog and I use the metod:
CALL METHOD go_grid_inv->set_table_for_first_display
Then I click BACK and return to screen 100.
Now, I click th button and call screen 200 again. Now I use the method:
CALL METHOD go_grid_inv->refresh_table_display.
I don't know how I can change my fieldcatalog (deleting same columns).
help.
03-01-2006 9:01 AM
in the pbo of every screen u can use the fn module to display and pass field cat separately.
so whenever u use call screen , it will go to the exact screen.
if my answer is not related, pls explain ur question some what clearly
03-01-2006 9:06 AM
Sorry but I didn't understand:
this is the code:
MODULE status_0200 OUTPUT.
SET PF-STATUS 'GS_200'.
PERFORM modify_screen.
IF go_custom_container_inv IS INITIAL.
CREATE OBJECT go_custom_container_inv
EXPORTING container_name = 'CC_ALV_INVENTARIO'.
CREATE OBJECT go_grid_inv
EXPORTING
i_parent = go_custom_container_inv.
PERFORM build_fieldcatalog_i
CHANGING gt_fieldcat.
gs_layout-info_fname = 'COLOR_LINE'.
gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
CALL METHOD go_grid_inv->set_table_for_first_display
EXPORTING
i_structure_name = 'zcat_inv_ctrl'
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_fieldcat
it_outtab = it_record.
ELSE.
CALL METHOD go_grid_inv->refresh_table_display.
ENDIF.
ENDMODULE. " STATUS_0200 OUTPUT
when the go_custom_container_inv is not INITIAL, how I can change my fielcatalog?
03-01-2006 9:09 AM
if go_custom_container is not initial means, already there is some grid in that.
1. make sure to refresh custom container after display is complered.
refresh go_custom_container
2. again if u want to call the grid of screen 100, no need to delete fieldcat.
in PBO of screen 100 call anothet set_table_for_first_display.
so whenever u sau call screen 100. it automatically displays.
03-01-2006 9:25 AM
I've used
CALL METHOD go_grid_inv->set_frontend_fieldcatalog
EXPORTING it_fieldcatalog = gt_fieldcat.
before
CALL METHOD go_grid_inv->refresh_table_display.
..and all work well.
thx
10-25-2013 1:54 PM
I had to set the layout again as well. As the table refresh lost the layout settings after calling the set_frontend_fieldcatalog method.
CALL METHOD go_grid_inv->set_frontend_layout
EXPORTING
is_layout = gt_layout.
Works great now thanks!