cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Dropdownbox and following problems

Former Member
0 Kudos

Hello BWler.

I think my post is rather a crazy idea, but I hope you can bring me on the right track!

My question: Is that generally feasible with HTML and Javascript or with other tools.

I hope you understand my English.

I would like to create a document (not the web item) in Web Application Designer which contains values from different Queries. It has three parts, Header, Body and Rest. The Header of the document can contain three different data (either material or customer or vendor), for which individual queries was defined. The Body gets data from an other query. The Rest is only text.

This is my idea, but I don’t know, if it’s a good solution.

In the first step I would like to fill a Dropdownbox with the three options of the Header (not on a characteristic in a query). The user selects a value and press the "submit" button.. Depending on which value was selected, the suitable Query and a defined characteristic should be used in the next Dropdownbox.

That’s my attempt to fill my own dropdonbox an display the selected value. The URL looks right, but not the result ;-). The choice suitable dropdownbox was not implemented yet.






customer

material

vendor

Question: How can this be solved to join own and WAD dropdownboxes?

Now if the right dropdownbox is displayd, the values should be filtered. But e.g. for customer I have many values, therefore I’d like to create a nested dropdown menu. The first column should contain the letters “a” to “z”. After selection the values begins with this letter (e.g. all customers with letter “t”) should be read from the Query and then shown in the dropdownbox.

Question: Is that generally possible and if so, what one must define in addition in query designer?

Finally the result of the filtering should be displayed as text…

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

i am not sure about webtemplate, but you can give it a try with BSP .

for e.g the header can be a frame within BSP page where you will have logic for the dropdown boxes.

body can be another frame where you will place the query results based on the selection from the dropdown.

Regards

Raja

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Jens,

1) Why cant you create custom DDB with your own characterstic values rather than using BW-DDB? If you want to replace the characterstic values which are loaded into the cube for example "USA = America" then you need to write a javascript read the values in a array and replace them with new values(custom values). If you do this, the problem is perfomance and maintence.

2) change the DP for DDB, i think you got it right with your url command, but try using RELEASE_DATAPROVIDER Command as well, but remember when you are "reseting or releasing dataprovider", you are resting all the values which means, you are not passing "FILTER values", So maybe some javascript which pass the filter value to the new DPs this should fix your problem.

please let me know if it works.

thanks,

Deepak Kunavarapu

Former Member
0 Kudos

Hi Deepak!

Thank you for the fast answer.

At the moment I have got a new mission, so I will try it later to code Javascript. Also my knowledge with Javascript isn't good, therefore I need enough/more time to solve my problem.

Some short notes:

1.) The solution with custom DDB is perfect, my question was only for interest. I don't replace any characteristic, but thank you for the good tip.

2.) Ok i will test it.

3.) During the last days i try to keep the selected values in the differnet DDB.

My attempt for the custom DDB was:

function selectedIndex(){

var index=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex];

index.selected=true;

window.location=index.value;

}

INPUT type="button" name="go" value="Go!" onClick="selectedIndex()"

But I had no success with this solution. What is wrong? What I must consider?

4.) My problem with nested DDB.

I try this for the first step - letters "a" to "z"

again in a custom DDB.

function letter(){

var c=65;

document.write("<form name=letter>");

document.write("<select name=letter size=1>");

while (c<=90) {

var T = String.fromCharCode(c);

document.write("<option>"+T +"</option>");

c++;

}

document.write("</select></form>");

}

<INPUT TYPE="BUTTON" NAME="T" VALUE="Test" ONCLICK="letter()">

Now i want use the filter parameter "FILTER_OPERATOR" with value 'GE' and the selected value e.g. letter z (Filter_Value = 'z').

Can I join this paramters to filter all matarials that begins with 'z' from my Infocube? Is there an other solution?

Sorry If my new questions are easy/silly, but as mentioned I have not the time for test it.

I hope you can give me some tips for my new questions again.

I will give you the full points (also points for Raja) for your help and I reactivate (or new) the topic later again.

Regards, Jens

Former Member
0 Kudos

Hi Jens,

Here is a sample code which show a dropdown box and hides the drop down box. You need construct proper URL Commands, by joining one with Hide and other with passing filter value.

Look at this example, You may enhance future..

hope this helps you..

regards,

Deepak Kunavarapu.

<p>

<FORM name="guideform">

<SELECT name="guidelinks" size="1" >

<optgroup label="category">

<option value="<SAP_BW_URL ITEM='DROPDOWNBOX_1' HIDDEN='X'>" > customer - Hide</option>

<option value="<SAP_BW_URL ITEM='DROPDOWNBOX_1' HIDDEN=''>" >customer - Show</option>

<option value="3" > vendor</option>

</select>

<INPUT type="button" name="go" value="Go!" onClick="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value"> </FORM>

</p>

<p><object>

<param name="OWNER" value="SAP_BW"/>

<param name="CMD" value="GET_ITEM"/>

<param name="NAME" value="DROPDOWNBOX_1"/>

<param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>

<param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>

<param name="HIDDEN" value="X"/>

<param name="IOBJNM" value="9IGSORS2QT2G19IUP1I56QIKR"/>

ITEM: DROPDOWNBOX_1

</object>

</p>

Former Member
0 Kudos

@ Raja

Thx for your reply. I will try it maybe later with BSP. Maybe I can also use java.

@ Deepak

Thx for your example. Now my first problem is solved. However, I have some more questions.

DDB=Dropdownbox

DP=DataProvider

First:

1) Is it possible to fill my own values in a BW-DDB without characteristic from query?

Second:

2) Is it possible to change only the DP for the same DDB.

I would like to use the same DDB, either with the values of product or customer or vendor, if I change the value of my own DDB.

My current solution is to change one DP with the right values.

<option value="<SAP_BW_URL ITEM='DDB_ITEM_1' HIDDEN='' CMD_1="DATA_PROVIDER=DATAPROVIDER_2&CMD=RESET_DATA_PROVIDER&INFOCUBE=ZPRODUCT&QUERY=ZPR" IOBJNM='PRODUCT'>"> product</option>

But my hope is to change only the DP(DATAPOVIDER1=customer, DATAPOVIDER2=vendor, DATAPOVIDER3=product) for the same DDB.

So I test it ... but I receive only the DDB with a value (" All"):

<object>

<param name="OWNER" value="SAP_BW"/>

<param name="CMD" value="SET_DATA_PROVIDER"/>

<param name="NAME" value="DATAPROVIDER_2"/>

<param name="QUERY" value="ZVEND"/>

<param name="INFOCUBE" value="ZVENDOR"/>

DATA_PROVIDER: DATAPROVIDER_2

</object>

<object>

<param name="OWNER" value="SAP_BW"/>

<param name="CMD" value="SET_DATA_PROVIDER"/>

<param name="NAME" value="DATAPROVIDER_3"/>

<param name="QUERY" value="ZPR"/>

<param name="INFOCUBE" value="ZPRODUCT"/>

DATA_PROVIDER: DATAPROVIDER_3

</object>

<option value="<SAP_BW_URL ITEM='DDB_ITEM_1' HIDDEN='' IOBJNM='PRODUCT' CMD_1="DATA_PROVIDER=DATAPROVIDER_2& CMD=RESET_DATA_PROVIDER&DATA_PROVIDER=DATAPROVIDER_3"> "> product</option>

Finally I still have my old question with the nested dropdwonbox in WAD...can somebody tell me, if its possible to create this.

Message was edited by: Jens Harder