12-11-2006 1:01 PM
Hi Experts,
I have 2 fields namely country, city . If i need to restrict the values of city based on the country. How to handle it in a search help. Can you please help me on this .
Thanks in advance.
Vikram
12-11-2006 1:20 PM
Hi Raja,
After creating custom search help. We need to write an search help exit to implement the scenario.
After opening the search help, you will find search hellp exit. there you have to give the function module which will restrict the search help results based on the country.
Regards,
Sunil Y
12-11-2006 1:06 PM
Use the FM dynpro_string_read to get the country
based ont the country to select city,
then
call FM F4IF_INT_TABLE_VALUE_REQUEST.
12-11-2006 1:19 PM
Hi Raja,
Use fm <b>F4IF_INT_TABLE_VALUE_REQUEST</b> for your requirement.
try with this code.
REPORT ZTESTF4 .
DATA: progname TYPE sy-repid,
dynnum TYPE sy-dynnr,
dynpro_values TYPE TABLE OF dynpread,
field_value LIKE LINE OF dynpro_values.
data: begin of t_t001l occurs 0,
werks type werks_d,
lgort type lgort_d,
end of t_t001l.
data: v_werks type werks_d,
V_lgort type lgort_d.
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS: P_PLANT LIKE MSEG-WERKS,
P_STOLOC LIKE MSEG-LGORT.
SELECTION-SCREEN END OF BLOCK B1.
INITIALIZATION.
PROGNAME = SY-REPID.
DYNNUM = SY-DYNNR.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_STOLOC.
CLEAR: field_value, dynpro_values. REFRESH dynpro_values.
field_value-fieldname = 'P_PLANT'.
APPEND field_value TO dynpro_values.
CALL FUNCTION <b>'DYNP_VALUES_READ'</b>
EXPORTING
dyname = progname
dynumb = dynnum
translate_to_upper = 'X'
TABLES
dynpfields = dynpro_values.
READ TABLE dynpro_values INDEX 1 INTO field_value.
select werks lgort into TABLE t_T001L from T001L where werks = field_value-fieldvalue.
CALL FUNCTION <b>'F4IF_INT_TABLE_VALUE_REQUEST'</b>
EXPORTING
retfield = 'P_STOLOC'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'P_STOLOC'
value_org = 'S'
TABLES
value_tab = t_T001L.
Thanks,
Vinay
12-11-2006 1:20 PM
Hi Raja,
After creating custom search help. We need to write an search help exit to implement the scenario.
After opening the search help, you will find search hellp exit. there you have to give the function module which will restrict the search help results based on the country.
Regards,
Sunil Y
08-03-2008 12:04 PM