2010 May 19 6:46 AM
Hi,
I have created a dialog program with four input values, My requirment is if i enter select employee number from f4, then next input field should automatically filled with the desired employee name that is in the table. How can we achieve this ?
Regards
2010 May 19 7:05 AM
Try this :
If we use F4 help on one field and want to transfer values for another field on the screen with values from this
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'
* PVALKEY = ' '
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).
Try this :
If we use F4 help on one field and want to transfer values for another field on the screen with values from this
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'
* PVALKEY = ' '
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).
2010 May 19 6:50 AM
Hi Renjith,
If you have created your own process on value request event and added the code for F4 help in that event - then you can (in the same module) retrieve the employee name (when user selects an employee number e.g.) and populate the screen field. Hence when PBO is recalled, then both employee nr. and employee name will be filled.
Cheers,
Aditya
2010 May 19 7:05 AM
Try this :
If we use F4 help on one field and want to transfer values for another field on the screen with values from this
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'
* PVALKEY = ' '
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).
2010 May 19 8:25 AM
Hi,
I tried like this
delclared like this
data loto TYPE TABLE OF dselc.
data ls_loto TYPE dselc.
IN POV
======
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = it_dynpfields.
code suggesed in SDN
ls_loto-fldname = 'ZEMPID'.
ls_loto-dyfldname = '/BIC/PZEMPLOYEE-ZEMPID'.
APPEND ls_loto to loto.
CLEAR ls_loto.
ls_loto-fldname = '/BIC/ZCNAME'.
ls_loto-dyfldname = '/BIC/PZEMPLOYEE-/BIC/ZCNAME'.
APPEND ls_loto to loto.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'EMPID'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'ZEMPTEAM-ZEMPID'
value_org = 'S'
TABLES
value_tab = values_tab1
FIELD_TAB = loto <<<<<<<<Short dump on this
RETURN_TAB = ret
DYNPFLD_MAPPING = loto.
I have included a screen field for displaying text, is any other thing missing.
2010 May 19 7:54 AM
You can easily achieve that using [search help|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee5f446011d189700000e8322d00/frameset.htm]. Also by other means like mentioned above.
Refer standard programs:
DEMO_DYNPRO_F4_HELP_DICTIONARY
DEMO_DYNPRO_F4_HELP_DYNPRO
DEMO_DYNPRO_F4_HELP_MODULE
Regards
Marcin
2010 May 19 8:27 AM
Hi,
To achieve this use the FM F4IF_INT_TABLE_VALUE_REQUEST there in the TABLES parameter , check the Long text documentation given for the DYNPFLD_MAPPING . This will give you the idea to achieve your requirement.
Regards,
Smart.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |