‎2007 Mar 30 5:36 AM
I am displaying two column help on pressing f4 but i don't know how to assign those to corresponding screen field in the table control.
‎2007 Mar 30 5:42 AM
Hi,
execute this program and check for process on value request.
REPORT ZKEERTHI_EX1.
tables:mara,makt,mseg.
parameters: p_bukrs type t001-bukrs,
p_butxt type t001-butxt,
p_ort01 type t001-ort01,
p_land1 type t001-land1.
data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
at selection-screen on value-request for p_bukrs.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'T001'
fieldname = 'BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
tables
return_tab = return
exceptions
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
others = 5.
refresh dynfields.
read table return with key fieldname = 'P_BUKRS'.
Add it back to the dynpro.
dynfields-fieldname = return-retfield.
dynfields-fieldvalue = return-fieldval.
append dynfields.
Get the company code from db and add to dynpro
data: xt001 type t001.
clear xt001.
select single * into xt001
from t001
where bukrs = return-fieldval.
dynfields-fieldname = 'P_BUTXT'.
dynfields-fieldvalue = xt001-butxt.
append dynfields.
dynfields-fieldname = 'P_ORT01'.
dynfields-fieldvalue = xt001-ort01.
append dynfields.
dynfields-fieldname = 'P_LAND1'.
dynfields-fieldvalue = xt001-land1.
append dynfields.
Update the dynpro values.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 8.
regards,
keerthi
‎2007 Mar 30 5:48 AM
in screen flow logic
PROCESS ON VALUE_REQUEST
FIELD <your fieldname> MODULE <M1 or any modulename>.
in abap
module m1 input.
<hereyou have to call the fn module like popup_with_table or any other>
endmodule.
regards
shiba dutta
Message was edited by:
SHIBA DUTTA
‎2007 Mar 30 5:51 AM
goto se51 and specify the program name...goto layout and click on the field inthe table control...u will have a field to assign search help where u specify this value and activate the same.
‎2007 Mar 30 5:53 AM
WHAT U DO IS PASS THE COLUMNS WHAT U WANT TO DISPLAY IN THE HELP TO AN INTERNAL TABLE THEN PASS THIS INTERNAL TABLE TO THE FM F4if_init_table_value_request u will get f4 help with those two fields
regards
navjot
rewatd all helpfull answers
‎2007 Mar 30 6:52 AM
i am able to display those two values but the thing is i can't use read based on the value selected because of database design constranint.What i want is if i select one value then the other value corresponding to that should be updated in the corresponding column on the screen
‎2007 Mar 30 6:57 AM
for that you have to code that ....
suppose you have two fields matnr and werks in your screen you want when matnr is selected in matnr field it will populate the werks field also..
for that you have to code at pai.
in abap
module m1 input.
select single werks from mard into werks where matnr = matnr.
endmodule.
so when you select the value for your matnr and press ENTER then werks field will automatically populated.
but you have to press ENTER.
regards
shiba dutta