Code: Alles auswählen.
CONSTANTS: gc_save TYPE c VALUE 'A'.
:
:
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-b02.
PARAMETERS: p_vari TYPE slis_vari DEFAULT '/GLOBAL'.
SELECTION-SCREEN END OF BLOCK b2.
:
:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f_alv_variant_f4 CHANGING p_vari.
:
:
*&---------------------------------------------------------------------*
*& Form ALV_VARIANT_F4
*&---------------------------------------------------------------------*
* Layout variant search help
*----------------------------------------------------------------------*
FORM f_alv_variant_f4 CHANGING p_vari.
DATA: lwa_variant TYPE disvariant.
lwa_variant-report = sy-repid.
lwa_variant-username = sy-uname.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = lwa_variant
i_save = gc_save
IMPORTING
es_variant = lwa_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 0.
p_vari = lwa_variant-variant.
ENDIF.
ENDFORM. " ALV_VARIANT_F4
:
:
is_variant-report = sy-repid.
is_variant-variant = p_vari.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
is_variant = is_variant
i_save = gv_save
is_layout = gs_layout
it_toolbar_excluding = lt_exclude
CHANGING
it_outtab = it_data[]
it_fieldcatalog = gt_fieldcat[].
Code: Alles auswählen.
INITIALIZATION.
DATA:gwa_variant TYPE disvariant.
gwa_variant-report = sy-repid.
* gwa_variant-username = sy-uname.
IF NOT rb_ovrvw IS INITIAL.
gwa_variant-handle = 'A001'.
ELSEIF NOT rb_prcr IS INITIAL.
gwa_variant-handle = 'A002'.
ELSEIF NOT rb_otlg IS INITIAL.
gwa_variant-handle = 'A003'.
ENDIF.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = gc_save
CHANGING
cs_variant = gwa_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
p_vari = gwa_variant-variant.
Folgende Benutzer bedankten sich beim Autor black_adept für den Beitrag (Insgesamt 3):
a-dead-trousers • ewx • Tron