‎2008 Nov 04 9:48 AM
Hi all,
I am using the above FM .The return table returns only the selected field , how do i retrieve other fields in the selected row. ?
‎2008 Nov 04 10:04 AM
HI,
To map other field of selected row to corresponding field use dynpfld_mapping option of the Function module. for this first declare internal table of the same type and then fill fldname, dyfldname and then append to the internal table. In this, FM takes fields of the F4 table as 'F0001', "F0002',.... like that means if the f4 help containing four fields and you want to map two fields into twooo screen fields, function module treats those four fields as 'F0001'...'F0004'. To fill the dyfldname specify the screen field into which you want to map F4 table field. For example...
fs_dynpfld_mapping-fldname = 'F0002'. i.e., < Second filed of F4 Value table>
fs_dynpfld_mapping-dyfldname = <Screen filed name>.
APPEND fs_dynpfld_mapping TO t_dynpfld_mapping.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = c_retfield3 < Return field name>
dynpprog = sy-repid < Return program name>
dynpnr = sy-dynnr < Screen Number>
dynprofield = c_dynfield3 < Screen field name>
value_org = 'S'
TABLES
value_tab = t_license_depb < F4 Value table>
dynpfld_mapping = t_dynpfld_mapping. < Field mapping table>
Hope this will give you some idea,
Regards,
Aswini.
‎2008 Nov 04 9:51 AM
Hi,
Just use READ. to get all the other values from the table u passed to 'F4IF_INT_TABLE_VALUE_REQUEST'.
‎2008 Nov 04 9:52 AM
Hi...
with returned value ..just read the record from value tab we u have all fields
regards
vivek
‎2008 Nov 04 10:10 AM
hi
The selected value may not be a unique one , so i may end up
retrieving duplicate values .
so this solution is not possible .
‎2008 Nov 04 10:12 AM
hi aswini,
Thanks for the reply , but the catch in my code is that am going to place only one value on the screen . I want the other field in the selected row, only for some validation . So please suggest me if you have solution for that .
‎2008 Nov 04 10:04 AM
HI,
To map other field of selected row to corresponding field use dynpfld_mapping option of the Function module. for this first declare internal table of the same type and then fill fldname, dyfldname and then append to the internal table. In this, FM takes fields of the F4 table as 'F0001', "F0002',.... like that means if the f4 help containing four fields and you want to map two fields into twooo screen fields, function module treats those four fields as 'F0001'...'F0004'. To fill the dyfldname specify the screen field into which you want to map F4 table field. For example...
fs_dynpfld_mapping-fldname = 'F0002'. i.e., < Second filed of F4 Value table>
fs_dynpfld_mapping-dyfldname = <Screen filed name>.
APPEND fs_dynpfld_mapping TO t_dynpfld_mapping.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = c_retfield3 < Return field name>
dynpprog = sy-repid < Return program name>
dynpnr = sy-dynnr < Screen Number>
dynprofield = c_dynfield3 < Screen field name>
value_org = 'S'
TABLES
value_tab = t_license_depb < F4 Value table>
dynpfld_mapping = t_dynpfld_mapping. < Field mapping table>
Hope this will give you some idea,
Regards,
Aswini.