Code: Alles auswählen.
MODULE status_0130 OUTPUT.
SET PF-STATUS 'STATUS_ALL'.
IF c_custom_container IS INITIAL.
CREATE OBJECT c_custom_container
EXPORTING
container_name = c_containername.
CREATE OBJECT alvgrid
EXPORTING
i_parent = c_custom_container.
ls_construction-cwidth_opt = 'X'. "Spaltenoptimierung
CALL METHOD alvgrid->set_table_for_first_display
EXPORTING
i_structure_name = 'ZBC_NOT_TRANS'
i_save = 'X'
is_layout = ls_construction
it_special_groups = v_lt_sgrp
CHANGING
it_outtab = zbc_not_trans_tab
it_fieldcatalog = v_fcat.
ENDIF.
ENDMODULE.
Code: Alles auswählen.
ZBC ERSDA
ZBC ERNAM
ZBC LVORM
ZBC MTART
ZBC MATKL
Code: Alles auswählen.
CLASS lcl_restrict_field IMPLEMENTATION.
METHOD get_fieldinfo.
FIELD-SYMBOLS: <fs_t_fcat> TYPE lvc_s_fcat.
"Eigenschaft von Struktur holen und dfies_tab schreiben
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = a_tabname
group_names = a_includest
IMPORTING
lines_descr = a_tx_ldescr
TABLES
dfies_tab = a_dfies
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc EQ 0.
DELETE a_dfies WHERE fieldname EQ 'MANDT'.
ENDIF.
"Feldkatalog ct_fieldcat zu i_structure_name konvertieren
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = a_tabname
CHANGING
ct_fieldcat = a_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
WRITE a_tabname(3) TO pr_groupname.
pr_grouptext = 'ALV Liste beschränkt anzeigen'.
MOVE pr_groupname TO ls_sgrp-sp_group.
MOVE pr_grouptext TO ls_sgrp-text.
APPEND ls_sgrp TO a_lt_sgrp.
"Felder in Gruppe zuteilen.
LOOP AT a_fcat ASSIGNING <fs_t_fcat> WHERE fieldname EQ 'MATNR'.
<fs_t_fcat>-sp_group = ls_sgrp-sp_group.
ENDLOOP.
ENDMETHOD. "get_fieldinfo
ENDCLASS.
Code: Alles auswählen.
MODULE status_0130 OUTPUT.
SET PF-STATUS 'STATUS_ALL'.
IF c_custom_container IS INITIAL.
CREATE OBJECT c_custom_container
EXPORTING
container_name = c_containername.
CREATE OBJECT alvgrid
EXPORTING
i_parent = c_custom_container.
ls_construction-cwidth_opt = 'X'. "Spaltenoptimierung
CALL METHOD alvgrid->set_table_for_first_display
EXPORTING
i_structure_name = 'ZBC_NOT_TRANS'
i_save = 'X'
is_layout = ls_construction
it_special_groups = v_lt_sgrp
CHANGING
it_outtab = zbc_not_trans_tab
it_fieldcatalog = v_fcat.
ENDIF.
ENDMODULE. " STATUS_0130 OUTPUT