Google Search - Blog...........

ABAP - Restrict Values For The F4 (Value On Request) Help.

report ztest .

PARAMETERS:p_matnr(18) TYPE c MODIF ID mid.

DATA:BEGIN OF itab OCCURS 0,
matnr TYPE matnr,
END OF itab.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN .
IF screen-group1 EQ 'MID'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.

LOOP AT SCREEN .
IF screen-group1 EQ 'MID'.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

IF itab IS INITIAL.

itab-matnr = 'ABC123456788'.
APPEND itab.

itab-matnr = 'BCS123456788'.
APPEND itab.

itab-matnr = 'DFC123456788'.
APPEND itab.

itab-matnr = 'ASW123456788'.
APPEND itab.

ENDIF.


CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_MATNR'
value_org = 'S'
TABLES
value_tab = itab.

LOOP AT SCREEN .
IF screen-group1 EQ 'MID'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
endloop.


ALSO READ:

- Screen Field Validation Using Chain Endchain.

- Drop Down List Box In The Selection Screen.

- Creating Dynamic F4 (Value On Request) Help.

- Express Select-Options Values In SY-LANGU.

- F4 (Value On Request) For Files On Presentation Or Application Server.

No comments:

Post a Comment