Documente Academic
Documente Profesional
Documente Cultură
Community WIKI SAP Community Welcome, Guest Login Register Search the Community
Step 1.
Step 2.
Step 3.
Now loop at the field catalog and make the required changes.
Step 4.
Example:
In this example ,SLFIGHT details will be displayed first and if you press
the push button on the screen(SWITCH) ,SFLIGHT details will be displayed
with changes like 1. OUTPUT LENGTH OF CONNID WILL BE CHANGED.
2. FIELD PLANETYPE WILL BE HIDDEN.
3. GRAND TOTAL OF FIELD PRICE WILL BE CALCULATED.
REPORT zalv_dynamic_fieldcatalog.
DATA:
t_sflight TYPE TABLE OF sflight,
fs_sflight TYPE sflight.
DATA:
r_container TYPE REF TO cl_gui_custom_container,
r_grid TYPE REF TO cl_gui_alv_grid.
DATA:
t_fcat TYPE lvc_t_fcat,
fs_fcat TYPE lvc_s_fcat.
SELECT * FROM sflight INTO TABLE t_sflight.
CALL SCREEN 100.
*&---------------------------------------------------------------------
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------
https://wiki.scn.sap.com/wiki/display/ABAP/Dynamic+Field+Catalog+In+ALV 1/2
4/19/2018 Dynamic Field Catalog In ALV - ABAP Development - SCN Wiki
EXPORTING
container_name = 'CONTAINER'.
CREATE OBJECT r_grid
EXPORTING
i_parent = r_container.
CALL METHOD r_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
it_outtab = t_sflight.
ENDMODULE. " HANDLER OUTPUT
Result:
No labels
https://wiki.scn.sap.com/wiki/display/ABAP/Dynamic+Field+Catalog+In+ALV 2/2