cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to set values in drop down for a table field

Bhaskar_Tripath
Participant
0 Kudos

Hi All,

I am not able to set values in drop down for a table field. Although I am able to set these values to a stand alone field but its not happening for a particular table field. I am using ABAP web dynpro for coding.

Pls help.

Regards,

Bhaskar

Accepted Solutions (0)

Answers (5)

Answers (5)

Bhaskar_Tripath
Participant
0 Kudos

Guys, I am dropping the idea of creating dropdown from SAP data instead I am creating it with hardcoded values (easy as there were few entries) 😛

But it was nice to have your suggestions.

Thanks,

Bhaskar

OttoGold
Active Contributor
0 Kudos

You can always send the values as a string or some "help" table and then use the scripting to parse/copy this source into your table dropdown. Since we have no (I have no) "quick" help for you, the scripting will be the fastest solution. Otto

Bhaskar_Tripath
Participant
0 Kudos

Hi Otto,

Is it possible to get values help which have provided through our ABAP code into the field in a table on the form. Is there any Java/Form Calc script for that. If yes, can you help on this track.

Thanks,

Bhaskar.

chintan_virani
Active Contributor
0 Kudos

I would suggest try these things without Adobe i.e. Create a Table in WD, create contexts and make the drop-down as one of its row element and verify that you get the data correctly.

Now make a switch to Adobe form and try to bind the context through Binding to Adobe drop-down and see if you get the desired result or not.

Chintan

OttoGold
Active Contributor
0 Kudos

Hello,

you can concatenate the values you have in the ABAP table into a string with some useful separator (like ;). Next pass string to the form context. Next parse the string using JS/FC code and manually add the values into your dropdown.

But this time I agree with Chintan, I would first try the dynamic binding option. Have you ever done this before? If not: In designer - options find enable dynamic binding and next in the dropdown attributes - binding tab click on Specify item values and bind your table source here.

Good luck, have a nice day, Otto

chintan_virani
Active Contributor
0 Kudos

Does that mean you do not agree other times to my answers @ SDN ?!! 😛

Chintan

OttoGold
Active Contributor
0 Kudos

😛 Well... Marry Christmas, Chintan

chintan_virani
Active Contributor
0 Kudos

Same to as well.... Keep posting

Chintan

OttoGold
Active Contributor
0 Kudos

Hello,

I thought the problem is with in-form scripting. Your problem is you cannot pass the data from ABAP? I don´t get the problem I guess. You have the data in this WD ABAP coding, but cannot see it in form? Have you tried set the trace on? So you can see the debug files attached in the form application? There you can find what data has been sent from backend.

Regards, Otto

Former Member
0 Kudos

it looks like he has a table in his adobe form and wants to make one of those cells a dropdown.

the code he has shown above works fine for an enumerated dropdown list but not inside a table...

i've never added a dropdown to a table before. i have a test form that i've spent about 30 minutes on, but cannot get a dynamic list of values to populate it.

I think the problem is that you're dealing with an element of the node rather than setting the Value Help at the Node Level itself.

Former Member
0 Kudos

it looks like he has a table in his adobe form and wants to make one of those cells a dropdown.

the code he has shown above works fine for an enumerated dropdown list but not inside a table...

i've never added a dropdown to a table before. i have a test form that i've spent about 30 minutes on, but cannot get a dynamic list of values to populate it.

I think the problem is that you're dealing with an element of the node rather than setting the Value Help at the Node Level itself.

Bhaskar_Tripath
Participant
0 Kudos

Yes Robert. You are right on the money. This is exactly what the problem is.

I hope SAP does provide this functionality in some way or the other.

Regards,

Bhaskar

OttoGold
Active Contributor
0 Kudos

Hello, please provide the script you´re using to do this. WE can debug this out here, Otto

Bhaskar_Tripath
Participant
0 Kudos

Hi Otto,

Here is the code I am using:

**********************************************************

* navigate from <CONTEXT> to <DATASOURCE> via lead selection
  lo_nd_datasource = wd_context->get_child_node( name = wd_this->wdctx_datasource ).

* navigate from <DATASOURCE> to <CHANGING_PARAM> via lead selection
  lo_nd_changing_param = lo_nd_datasource->get_child_node( name = wd_this->wdctx_changing_param ).

* navigate from <CHANGING_PARAM> to <EDUCATION_TAB> via lead selection
  lo_nd_education_tab = lo_nd_changing_param->get_child_node( name = wd_this->wdctx_education_tab ).

  node_info = lo_nd_education_tab->get_node_info( ).

  REFRESH ddlb_value_set.
  DATA: wa_edu_est TYPE t517t.
  SELECT * FROM t517t INTO wa_edu_est WHERE sprsL = 'EN'.
    s_element-text = wa_edu_est-stext.
    s_element-value = wa_edu_est-slart.
    APPEND s_element TO ddlb_value_set.
  ENDSELECT.

  SORT ddlb_value_set BY text.
*    Set Value_sets to node_info
  node_info->set_attribute_value_set(
     name      = 'EDU_EST'
     value_set = ddlb_value_set ).

**********************************************************

Regards,

Bhaskar

chintan_virani
Active Contributor
0 Kudos

If you are creating a form with ZCI layout then make sure you use the Enumerated Drop-down List from WebDynpro Native library in Adobe LiveCycle Designer.

Chintan

Bhaskar_Tripath
Participant
0 Kudos

Thnx Chintan.

I am already using that dropdown.

Regards,

Bhaskar