cancel
Showing results for 
Search instead for 
Did you mean: 

Pre fill Dropdown in adobe form using WD ABAP

Former Member
0 Kudos

Hi Experts,

I am creating an adobe form and I want to prefill the dropdown in the form with data while downloading it from web dynpro abap component. Once the form is downloaded I also want these selected values from dropdown to map in database in offline scenario.

Please suggest.

Warm Regards,

Sushant Singh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sushant,

Have a single text file in WD context.

using the below code approach set multiple key value pairs to the node


    LOOP <>.
      _key_value-key = 'IND'.
      ls_key_value-value  =  'INDIA'.
      APPEND ls_key_value TO ls_state_info-value_set.
    ENDLOOP.
    lv_path  = 'address'. " top node
    lv_name = 'country'. " the drop down field

    lr_generic_node       = wd_context->path_get_node( path = lv_path ).
    lr_generic_node_info  = lr_generic_node->get_node_info( ).
    lr_generic_node_info->set_attribute_value_set( name = lv_name value_set = ls_state_info-value_set ).

have this context node in your adobe form context.

Hope this helps, let me know if you need any more help.

Cheers,

Sai

Former Member
0 Kudos

Hi Sai,

I have similar kind of issue here for dropdown list . I have tried to populate the values in drop down list by binding the field-text and value properties witht he internal table where the internal table has all the values required for the dd list . I have concatenated the value and the text in one field of the internal table so that both of them would be displayed when the user cliclk the dropdown field on the PDF form . but whent he user selects a value , I need to take only the value but not the text . for ex: drop down list for company code -shows 1000 company 1

2000 company2 , then if the user selects 2nd vaue , the value in the company code field should display 2000 only similar to the SAP standard F4 help. Please tell me how to achieve this . I have searched for this kind of issue in the forum but couldn't find any.

Iam using Standrd Drop down list and I have intergrated the form with Webdynpro ABAP . is there a way for the issue or if there is any possibility at the first instance to populate the drop down with both ID and text ( like EN English )as per SAP standard for language so that I could avoid the use of internal table for concatenating both value and text . otherwise it only dislays either value or the text on drop down.

Appreciate your help asap.

Regards,

Soha