02-24-2009 4:52 AM
Hi Friends,
I have 2 screen fields EQKTX & EQUNR.I have implemented custom search help for EQKTX.
whenever I press F4 on EQKTX then i get multiple EQUNR for single EQKTX.when I select particular record from search help.then selected value of EQUNR should get populated in the the EQUNR screen field.
I have used ' F4IF_FIELD_VALUE_REQUEST ' FM.But it populating only EQKTX not EQUNR.
what is to be done in this case.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'EQKT'
fieldname = 'EQKTX'
searchhelp = 'ZI_EQKTX'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'GW_SCREEN-WPTXT'
TABLES
return_tab = lt_return_tab1
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
OTHERS = 5.
Thanks in advance.
02-24-2009 5:05 AM
Check the RECORDPOS in the return table, if you get the EQUNR field value also then after reading the FM you have to populate the screen Field using the value EQUNR by moving the value from return table.
02-24-2009 5:05 AM
Check the RECORDPOS in the return table, if you get the EQUNR field value also then after reading the FM you have to populate the screen Field using the value EQUNR by moving the value from return table.
02-24-2009 10:03 AM
But I am not getting RECORDPOS value.its always 001.
so whats to be done.
02-24-2009 12:59 PM
Hi,
After calling that function module need write some code which i have give below. Try This code..
if It_RETURN_TAB1 is not initial.
READ TABLE It_RETURN_TAB1 INDEX 1.
Fieldname = It_RETURN_TAB1 -FIELDVAL.
endif.
Thanks
Srilatha