cancel
Showing results for 
Search instead for 
Did you mean: 

F4 values in dropdown

Former Member
0 Kudos

Hi Experts,

I have a search help attached to an input field. The search help returns me a list of all possibel values. Can i get these values as a drop down in a DD by Key UI without any coding ? In other words, i want the F4 values as a dropdown in a dropdown UI.

Thanks,

Pris.

Accepted Solutions (0)

Answers (1)

Answers (1)

amy_king
Active Contributor
0 Kudos

Hi Pris,

When using a DropDownByKey or DropDownByIndex element, the set of possible values is available automatically only for context attributes having a data type with fixed values defined in the underlying domain. So you could create a custom domain with fixed values and a related data element, and use that data element to define your context attribute.

Cheers,

Amy

Former Member
0 Kudos

Hi Amy,

Thanks for your reply. But these help values are not fixed values. The search help uses other other attributes to get the f4 values, so i cannot use the fixed values.

Thanks,

Pris.

amy_king
Active Contributor
0 Kudos

Hi Pris,

If creating a custom domain to store fixed values isn't an option, you'll need to write code to populate the dropdown's value set. Take a look at .

Cheers,

Amy

Former Member
0 Kudos

This is exactly what i wanted to avoid since i already have the values in my search help and didnt want to write code the populate the dropdown values in context. But i guess there is no other option.

Thanks,

Pris.

sreenu_b2
Explorer
0 Kudos

Hi Pris,

The values are available in search help for input field only at runtime.

If you need the same set of entries then you can identify the selection table of search help & populate the same data to DDBK as suggested by Amy King .

Former Member
0 Kudos

Hi

Thanks for sharing the document.  If data extraction is required for populating values to dropdown field, will it be better to map a supply function with the context (related to dropdown field) rather than writing the code in WDDOINIT method ? 

If we are using the supply function, current context node information is already available in the importing parameter "NODE".  Only activity to be done is, data extraction & mapping the data to context node with NODE->BIND_ELEMENTS method.

Regards, Vinod

amy_king
Active Contributor
0 Kudos

Hi Vinod,

You can have a supply function as well for the node, but I've found that setting the attribute value set from the supply function doesn't work.

Cheers,

Amy

Former Member
0 Kudos

Hi Amy,

WDDOINIT works nice for populating the values, I tried to populate the "DropDownByIndex" element using a supply function as below, which worked perfectly.

DATA : lt_input TYPE wd_this->elements_input.

   SELECT vkorg FROM tvko

     INTO TABLE lt_input.

   node->bind_elements( lt_input ).

Regards, Vinod

amy_king
Active Contributor
0 Kudos

Hi Vinod,

Yes, you're correct, DropDownByIndex takes its values from a 0..n or 1..n node, so in the case of a DropDownByIndex, you can populate the node with a supply function as usual. Above, I was referring to DropDownByKey, whose data binding model differs from DropDownByIndex in that its value set is taken from a context node's context_node_info object.

Since Pris' question was about DropDownByKey, I thought you were asking about DropDownByKey too, but you're right that the text node behind a DropDownByIndex can be populated with a supply function-- in fact using a supply function in this scenario is probably a good practice.

Cheers,

Amy

Former Member
0 Kudos

Hi,

My bad,  I misread it as "DropDownByIndex".  Even your document describes about "DropDownByKey"

Regards, Vinod