2013 Oct 21 3:15 PM
Hi Gurus,
In my requirement on CJ20N screen I have to add two fields and have provide f4 help for them.
I have used FM F4IF_INT_TABLE_VALUE_REQUEST for this help and its working fine.
Now I want that if user selects value on f4 search corresponding description should come in grey out area.
for ex - In CJ20N under basic data tab if you enter pers. resp. no. and then press enter description will come on right side.
Please help me on this.
2013 Oct 21 4:43 PM
Hi Abhinav
Try with below sample code you have to use FM parameter DYNPFLD_MAPPING
ls_dynpfld_mapping-fldname = 'F0001'.
ls_dynpfld_mapping-dyfldname = 'MATNR'.
APPEND ls_dynpfld_mapping TO lt_dynpfld_mapping.
ls_dynpfld_mapping-fldname = 'F0002'.
ls_dynpfld_mapping-dyfldname = 'MAKTX'.
APPEND ls_dynpfld_mapping TO lt_dynpfld_mapping.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'MATNR'
stepl = v_stepl
window_title = 'material number'
value_org = 'S'
TABLES
value_tab = lt_itm
return_tab = ret_tab
dynpfld_mapping = lt_dynpfld_mapping.
Regards,
Rajesh
Hi Abhinav
Try with below sample code you have to use FM parameter DYNPFLD_MAPPING
ls_dynpfld_mapping-fldname = 'F0001'.
ls_dynpfld_mapping-dyfldname = 'MATNR'.
APPEND ls_dynpfld_mapping TO lt_dynpfld_mapping.
ls_dynpfld_mapping-fldname = 'F0002'.
ls_dynpfld_mapping-dyfldname = 'MAKTX'.
APPEND ls_dynpfld_mapping TO lt_dynpfld_mapping.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'MATNR'
stepl = v_stepl
window_title = 'material number'
value_org = 'S'
TABLES
value_tab = lt_itm
return_tab = ret_tab
dynpfld_mapping = lt_dynpfld_mapping.
Regards,
Rajesh
2013 Oct 21 3:21 PM
Hello,
You can create an internal table and add the description to your type
And then attach that to your function module
the below example gives that you have structure and then you set the return field ..
one example:
DATA LT_RET TYPE TABLE OF DDSHRETVAL WITH HEADER LINE.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = 'ZVTR_BAR_S_CE_FIRMA'
RETFIELD = 'FIRNO'
VALUE_ORG = 'S'
DISPLAY = 'F'
TABLES
VALUE_TAB = LT_VAL
RETURN_TAB = LT_RET
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
CHECK SY-SUBRC = 0.
READ TABLE LT_RET INDEX 1.
2013 Oct 21 3:29 PM
Hi Solen,
Thanks for your quick reply.
I want to display this description on the screen(right side of the field in greyed area) , will it come automatically.
2013 Oct 21 4:30 PM
Please add a display only field like label next to the field. Then in your F4 help whatever v alue is returned by F4IF_INT_TABLE_VALUE_REQUEST update the label field. It may happen you may need to use DYNPRO_MODIFY_DATA cant remember the exact name of FM.
2013 Oct 23 12:20 PM
Hello
Yes it will display in the order you add to the list at value_tab
TABLES
value_tab = lt_itm
You can try the code at Rajeshs too, that should work
2013 Oct 21 4:43 PM
Hi Abhinav
Try with below sample code you have to use FM parameter DYNPFLD_MAPPING
ls_dynpfld_mapping-fldname = 'F0001'.
ls_dynpfld_mapping-dyfldname = 'MATNR'.
APPEND ls_dynpfld_mapping TO lt_dynpfld_mapping.
ls_dynpfld_mapping-fldname = 'F0002'.
ls_dynpfld_mapping-dyfldname = 'MAKTX'.
APPEND ls_dynpfld_mapping TO lt_dynpfld_mapping.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'MATNR'
stepl = v_stepl
window_title = 'material number'
value_org = 'S'
TABLES
value_tab = lt_itm
return_tab = ret_tab
dynpfld_mapping = lt_dynpfld_mapping.
Regards,
Rajesh
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |