Mostrar un campo en la pantalla de selección para seleccionar una variante previamente guardada.
1) Crear variables:
DATA: ls_variant TYPE disvariant.
PARAMETERS p_dispo LIKE disvariant-variant.
2) Mostrar matchcode variantes
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_dispo.
MOVE: p_dispo TO ls_variant-variant,
sy-repid TO ls_variant-report.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = ls_variant
IMPORTING
es_variant = ls_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
MOVE ls_variant-variant TO p_dispo.
3)Indicar variante al mostrar ALV
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_variant = ls_variant