1) First write process on value-request in flow
logic after process after input.
process on value-request.
field ztable-fieldname module rec_help.
2) Now double click on module rec_help for code.
3)
module rec_help input.
data : begin of it_tmp occurs 2,
fieldname like ztable-fieldname
fieldname2 like ztable-fieldname2
data : end of it_tmp.
data: progname like sy-repid,
dynnum like sy-dynnr.
data : t_return like ddshretval occurs 0 with header line.
refresh it_tmp.
select * from ztable client specified
where mandt = sy-mandt
and fieldname2= ztable1-fieldname2.
move-corresponding ztable to it_tmp.
append it_tmp.
endselect.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'fieldname1'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'fieldname1'
value_org = 'S'
tables
value_tab = it_tmp
return_tab = t_return
endif.
if sy-subrc = 0.
read table t_return index 1.
ztable-fieldname1 = t_return-fieldval.
endif.
Tips by: Ulhas Sonawane
Back to ABAP Menu:
ABAP Example Hints and Tips
Return to :-
SAP Hints and Tips on Configuration
and ABAP/4 Programming
(c) www.sap-basis-abap.com All material on this site is
Copyright.
Every effort is made to ensure the content integrity.
Information used on this site is at your own risk.
All product names are trademarks of their respective
companies. The site www.sap-basis-abap.com is in no way affiliated
with SAP AG.
Any unauthorised copying or mirroring is prohibited.