cancel
Showing results for 
Search instead for 
Did you mean: 

Simple value help... No values ?!?!?

Former Member
0 Kudos

Hello,

I'd like to use simple value help (or extended, or whatever fits the best to my problem) in dropdown.

This dropdown is mapped to an attribute in my view context (itself contextually mapped to a model retrieved via SAP). It then should display a list of possible selections (let say car, plane etc).

However, while using DropDownByKey, the dropdown list is empty...

So, the question is: how can I retrieve the data set from SAP knowing this field is declared as having search help enabled ?

What I don't understand is that I already have a DD in my view that is correctly displaying the list of currencies retrieved from SAP.

Is there something that I miss ?

Thnaks for any help

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

You would have bound the model node directly to a DropDownbyIndex ui Element. So you would have received all the values.

For using a DropDownbyKey you will have create a context attribute and bind it to selectedKey property.

You could follow a similar coding as mentioned by Kishore.

But when you say "So, the question is: how can I retrieve the data set from SAP knowing this field is declared as having search help enabled ?"

What is it that you want to acheive. Are you trying to retreive the values for checktables in SAP directly.

moreover the DD that you have used for Currency. Is it mapped to Dictionary type com.sap.dictionary.predefined.currency. If it is then these values are already stored in the enumeration of the simple type.

If you could write down your exact scenario then we would be able to help you out.

regards

ravi

Former Member
0 Kudos

Indeed you're right... That's how I've done previously and it worked...

Calling hasSVService() returns false, maybe the reason why mapping does not work as well.

Could it be because this field's set of data is stored in a control table ?

Thanks for any help

Former Member
0 Kudos

Hi

Let me know if it worked. If not i will be able to help you out.

regards

ravi

Former Member
0 Kudos

Hi Ravi,

Well, I'll try to explain what I'm doing... But my SAP background is not that straight, so I might have some problems. Sorry...

I'm developping a Web Dynpro application based on existing SAP bapis (some are standards, others are specifics, but I think this is not a matter).

When executing those bapis on SAP, I have kind-of dropdowns to help filling some fields: where I have to choose the activity, for example, I can click on an icon that displays a list of allowed values.

-> Here what I'd like to have.

Now, in my web dynpro application, I have drop downs working, and others not: currency dropdown is filled with values, but activity dropdown is not. However I used the same for both: dropdownbykey mapped to context element.

-> Here is where I am today.

As far as I understand, those two dropdowns are in fact different, as one is taking values from a control table (meaning some parameters needed, such as langage etc), while the other, the currency one, is not (well, I don't know where it is getting its values ).

Can you explain a little bit more when you say Are you trying to retreive the values for checktables in SAP directly ? Are checktables the same as control tables ?

Thanks for your help

Former Member
0 Kudos

Hi,

I think for currency dropdowon u might have mapped the value attribute of simple type currency If it is that case u might be getting the values from the currency enumeration.

If it is of type currency make it as string and then after executing the BAPI set the enumeration of the value attributes from the output of the RFC as suggested by Kishore.After executing the RFC u try to print the size of the node using message manger and check whether u r getting the values or not.

Regards,

Sowjanya.

Former Member
0 Kudos

Actually, dropdown currency is working properly: retrieving the correct set of data, displaying value selected from current element... No problem with this one (and actually, just binding to the attribute from the model is enough... there is no need to populate dropdown)

The problem is for the other one: everything is the same, but dropdown is not been populated, for some reason that I can't catch...

Anyway, when trying to output value attributes from BAPI, it gives me the value of my model element, and only this one (not the data set corresponding to this simple type).

Former Member
0 Kudos

Hi,

U mean to say u r directly binding the model attribute to the DropDown right.Then r u using DropDownByIndex.

If u r using dropdown by index then did u check after executing the BAPI the size of the node to which u r mapping???

Former Member
0 Kudos

Everything in the node is OK: I can even display the value of the attribute I'm mapping my dropdown to, and it contains correct value...

Former Member
0 Kudos

I printed out information about the attribute for which I have problems to display dropdown, and the result is that there is SVService (at least as far as Developer Studio can see).

However, this field is defined in SAP as having input help implemented with check table

In such a case, is there anything that have to be done to get a dropdown populated with appropriate data set ?

Any help would be really appreciated

Former Member
0 Kudos

Hi

Use this code to populate the dropdown

IModifiableSimpleValueSet finValues =finInfo.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();

<fininfo = attribute info of the context variable)

for (int finIndex = 0; finIndex < wdContext.nodeE_Company_List().size(); finIndex++)

{

finValues.put(wdContext.<node ref where dataexists >ElementAt(finIndex).getCompany(),

wdContext.<node ref where dataexists >ElementAt(finIndex).getName1());

}

Kishore