‎2013 Dec 09 2:19 PM
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
‎2013 Dec 09 2:32 PM
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
‎2013 Dec 09 3:18 PM
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
‎2013 Dec 10 8:30 AM
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
‎2013 Dec 10 2:04 PM
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
‎2013 Dec 11 9:58 AM
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
‎2013 Dec 09 5:11 PM