on 12-04-2006 7:00 AM
Hi all,
I would like to add multiple drop down boxes to my model, say f.e.:
- division
- country
- sales manager
- customer
These drop down boxes should be linked, such that when I select a value for division, the second drop down box only contains values that are applicable for division A. In our example, division A only sells products in Germany and Spain. When I select Germany, I would like the third drop down box to only show the names of sales manager from division A that sold products in Germany.
How to build this?
Best regards,
Ralph
Hi
You can create dynamic entry lists each list takes the previous one as an input and returns only the relevant data, you may have to create bapis, rfc's or stored procedures to do this.
Jarrod Williams
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Marcel,
I am using BI info objects:
- ZDIVISION (values = A, B, C, D)
- ZPRODUCT (values = AA, AB, AC, BA, BB, BC, CA, DA, DB)
Division A only sells products beginning with A (thus, AA, AB and AC), etc.
In my VC model I would like the value insert in dropdown box ZDIVISION to determine which values can be chosen in dropdown box ZPRODUCT.
I took a look at dynamic entry list. I saw that I can fill in a formula for the assigned input values. Ís it possible to solve this problem over here?
Thanks in advance,
Ralph
Hi Ralph,
therefore you can write a simple ABAP RFC. Start the transaction SE80 and create a RFC function module.
If you use text in your infoobject ZDIVISION you can use a simple ABAP:
FUNCTION ZZ_GET_MD_ZDIVISION .
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" TABLES
*" T_TABLE_VIEW STRUCTURE /BIC/TZDVISION OPTIONAL
* For reading the data from the textable
SELECT * FROM /BIC/TZDVISION INTO CORRESPONDING FIELDS OF TABLE T_TABLE_VIEW.
ENDFUNCTION.
Then you can use a dynamic entry list and choose for the key F_BIC_DIVISION and TXTSH or TXTMD for your text.
Then you have to create your RFC function module for ZPRODUCT, this could look like:
FUNCTION ZZ_GET_MD_PRODUCT .
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_SEARCH) TYPE STRING OPTIONAL
*" TABLES
*" T_TABLE_VIEW STRUCTURE /BIC/TZPROCUDT OPTIONAL
data: l_condition type string.
* Preparing String for SQL Statement e.g. A% for Division A
CONCATENATE '''' I_SEARCH '%' '''' INTO I_SEARCH.
CONCATENATE 'ZPRODUCT LIKE' I_SEARCH INTO l_condition SEPARATED BY SPACE.
* For reading the data from the textable
SELECT * FROM /BIC/TZPROCUDT INTO CORRESPONDING FIELDS OF TABLE T_TABLE_VIEW WHERE (l_condition).
ENDFUNCTION.
Then you create a dynamic entry list for ZPRODUCT and choose for input (I_SEARCH) the value of the divsion and for output again ZPRODUCT for the key and if you use text TXTMD or TXTSH for the texts.
Hope that helps,
Best Regards,
Marcel
I took the liberty to transfer our great example to the WIKI:
https://wiki.sdn.sap.com/wiki/display/VC/LinkingDrop-DownLists
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.