Application Development and Automation 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: 
Read only

Dependent fields in search help

illya_konakov
Explorer
0 Likes
3,695

Hi,

I need to develop a search help where one field depends on another one.

There is a customer table with a list of partners. The table consists of four fields:

CAT - partner category

SUBCAT - partner sub-category

PARTNER - code of the partner

DESCR - partner's name

The values for the field CAT are kept as a list of fixed values in the correspondent data domain.

The values for the field SUBCAT are kept in the customer table Z_SUBCAT with the structure:

CAT

SUBCAT

An elementary search help Z_SH_SUBCAT exist for the subcategory and it's based on the table Z_SUBCAT.

So, in the new search help I need to have three fields: CAT, SUBCAT and PARTNER. The field PARTNER is returned as a resulted.

Here is the question. If user selects a specific category and proceeds to a sub-category selection then a values list for SUBCAT should be restricted with that selected category. How I can pass a selected category to the search help of the sub-category?

Another possible case is when user does not select a category. But he goes directly with the selection of sub-category. In this case the sub-category's search help should return to the partner's search help both fields: CAT and SUBCAT. Can it be done?

Thanks in advance!

Regards,

Illya

6 REPLIES 6
Read only

Former Member
0 Likes
2,876

Hi Illya,

in my opinion it should work, if your Z_SH_SUBCAT has an importparameter CAT and is defined as Searchhelp in your table-, or structure-Definition. In the second case CAT should be import- and export-parameter of your Z_SH_SUBCAT. I didn't try it, but i guess it should work.

regards

Jan Martin

Read only

0 Likes
2,876

Hi Jan Martin,

My thoughts were the same. But it does not work. Unless I'm doing something wrong.

I tried different combinations of Import/Export setup. But neither PARTNER search help passes Category to Z_SH_SUBCAT, nor  Z_SH_SUBCAT returns Category to PARNTER search help.

Regards,

Illya

Read only

0 Likes
2,876

Hi Illya,

it has to work...

maybe you can post picture of your table definition? In the screen-painter you have to get your fields from the dictionary.

regards

Jan Martin

Read only

0 Likes
2,876

Hi Jan Martin,

Here are the tables and the search helps.

And yes, in the screen painter the input field for PARTNER is marked as "From dict."

Regards,

Illya

Read only

0 Likes
2,876

Hi Illya,

this all looks fine to me...

Does it work in SE11 when you test it? Is it a problem with the Transport of data in field category?

If the answer is yes, you can try to use a searchhelp-exit FM and try to get data of the category field via FM DYNP_VALUES_READ.

I hope you find a better solution!

Regards

Jan Martin

Read only

former_member219762
Contributor
0 Likes
2,876

Hi,

Try with search help exit.

Regards,

Sreenivas.