TYPE-POOLS: VRM.
PARAMETERS P_BUSAB LIKE T001S-BUSAB AS LISTBOX
VISIBLE LENGTH 20 OBLIGATORY USER-COMMAND COM MODIF ID MOD.
DATA: L_NAME TYPE VRM_ID,
LI_LIST TYPE VRM_VALUES,
L_VALUE LIKE LINE OF LI_LIST.
SELECTION-SCREEN BEGIN OF BLOCK SECIM2 WITH FRAME TITLE TEXT-001.
PARAMETERS: FILENAME LIKE RLGRAP-FILENAME DEFAULT 'C:\' MODIF ID MD1
OBLIGATORY.
SELECTION-SCREEN END OF BLOCK SECIM2.
AT SELECTION-SCREEN OUTPUT.
PERFORM F4_VALUE_REQUEST_P_BUSAB.
LOOP AT SCREEN.
IF P_BUSAB NE '06' AND SCREEN-GROUP1 = 'MD1'.
SCREEN-INVISIBLE = 1.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
*&---------------------------------------------------------------------*
*& Form f4_value_request_pa
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM F4_VALUE_REQUEST_P_BUSAB.
DATA: L_NAME TYPE VRM_ID,
LI_LIST TYPE VRM_VALUES,
L_VALUE LIKE LINE OF LI_LIST.
SELECT BUSAB SNAME
FROM T001S
INTO (L_VALUE-KEY, L_VALUE-TEXT).
APPEND L_VALUE TO LI_LIST.
CLEAR l_value.
ENDSELECT.
L_NAME = 'P_BUSAB'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = L_NAME
VALUES = LI_LIST
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " f4_value_request_tabname
Hiç yorum yok:
Yorum Gönder