Skip to Content
0
Former Member
Jun 25, 2008 at 12:38 PM

Reg. F4 help without pressing Enter.

61 Views

Hi ,

In the below program there r 2 input fields. Material No. and Plant. when ever I enter a particular Material No. In the selection screen and If i press F4 on palnt field I am getting relevent plants for that material. But This is happening when ever I press enter button after giving input in material No field. But my requirement is i should get relevent plant when I press F4 on plant field even though I dont press enter button .

REPORT ZBC_BC1 .

TABLES: MARA, MARC.

PARAMETERS: MATNR TYPE MARA-MATNR.

PARAMETERS: WERKS TYPE MARC-WERKS.

TYPES : BEGIN OF TY_MARC ,

WERKS TYPE MARC-WERKS ,

END OF TY_MARC.

DATA : IT_MARC TYPE STANDARD TABLE OF TY_MARC.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR WERKS.

SELECT WERKS FROM MARC INTO TABLE IT_MARC WHERE MATNR EQ MATNR.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'WERKS'

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'P_WERKS'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = IT_MARC.

START-OF-SELECTION.

WRITE: / ' this is for testing'.