If we use F4 help on one field and want to transfer values for another field on the screen with values based the input field.
data loto TYPE TABLE OF dselc.
data ls_loto TYPE dselc.
Fill DYNPFLD_MAPPING with fieldname and screen-name
ls_loto-fldname = 'CARRID'.
ls_loto-dyfldname = 'ABC'.
APPEND ls_loto to loto.
CLEAR ls_loto.
ls_loto-fldname = 'CONNID'.
ls_loto-dyfldname = 'ABCD'.
APPEND ls_loto to loto.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = 'SFLIGHT'
retfield = 'CARRID'
DYNPPROG = sy-repid
DYNPNR = sy-dynnr
DYNPROFIELD = 'ABC'
VALUE_ORG = 'S'
tables
value_tab = it_sflight
FIELD_TAB = lot
RETURN_TAB = ret
DYNPFLD_MAPPING = loto.
This will automatically fill the other field as well (here CONNID).
data loto TYPE TABLE OF dselc.
data ls_loto TYPE dselc.
Fill DYNPFLD_MAPPING with fieldname and screen-name
ls_loto-fldname = 'CARRID'.
ls_loto-dyfldname = 'ABC'.
APPEND ls_loto to loto.
CLEAR ls_loto.
ls_loto-fldname = 'CONNID'.
ls_loto-dyfldname = 'ABCD'.
APPEND ls_loto to loto.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = 'SFLIGHT'
retfield = 'CARRID'
DYNPPROG = sy-repid
DYNPNR = sy-dynnr
DYNPROFIELD = 'ABC'
VALUE_ORG = 'S'
tables
value_tab = it_sflight
FIELD_TAB = lot
RETURN_TAB = ret
DYNPFLD_MAPPING = loto.
This will automatically fill the other field as well (here CONNID).