‎2006 Dec 02 8:08 AM
Hi ,
I have three Parameters say
Parameters : A type x
B , C .
and i have assigned a search help to A .Based on the value of A i have to diplay search help for B .and Based on A & B i have to display search help for C.
How to do this.
I have done the code in the event AT selection-screen on value request . it is not working . what i entered in A is not comming to AT selection-screen on value request For B .
Thanks
vijay
‎2006 Dec 02 8:13 AM
try this
at selection-screen on value-request for <parameter name>.
regards
shiba dutta
‎2006 Dec 02 8:21 AM
Vijay,
It should work with on value request .
In example
select-options : p_regio for t001w-regio
no intervals, "Region
p_werks for t001w-werks
no intervals. "Plants
at selection-screen on value-request for p_werks-low.
perform f_f4_help_for_plant.
when action in selection screen is performed the region value will be stored in p_regio and hence available for query for plant .
Check that and let us know
Regards
Ramvelu
‎2006 Dec 02 8:39 AM
hi vijay,
chk this sample.
REPORT ZXYZ_0002 .
data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
selection-screen begin of block b1 with frame title text-001 .
selection-screen begin of line.
PARAMETERS: P_BUKRS type T001-BUKRS.
selection-screen comment 30(20) BUTXT for field p_bukrs.
selection-screen end of line.
selection-screen end of block b1.
at selection-screen output.
if butxt is initial.
select single butxt into butxt
from t001
where bukrs = p_bukrs.
endif.
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.
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 = 'BUTXT'.
dynfields-fieldvalue = xt001-butxt.
append dynfields.
* Update the dynpro values.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 8.
start-of-selection.Regards
Anver
‎2006 Dec 15 10:13 AM
‎2006 Dec 02 9:18 AM
Hi Vijay,
The best option is to create a search help for these three fields, but the pre-requisite being they should come from the same table. If they are not from same table create a view for them, preferably a Help view and create a search help.
Attach the search help created at the field level, and do not use VALUE-REQUEST event in the program as it takes precedence over search help.
Please let me know if it works or further details are required from my side.
Regards,
Goutham.