Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent - Search help

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks i wrote a search help exit and solved the issue