cancel
Showing results for 
Search instead for 
Did you mean: 

How to set data to the dropdownlist in the interacive form ?....urgent

Former Member
0 Kudos

Hi Experts,

Now, I meet a intractable problem. I hope to get your suggestion.

I need to set some data to the dropdownlist in the interacive form.

But the data isn't displayed in the dropdownlist after open the saved the interacive form.

I don't know how to do it?

Action:

1. using sfp, create a interface (ZZ_INTERFACE_001)in the R/3 with a attribute("TEST1") that type is string and a attribute("table") that type is internal table.

2. Create a form(ZZ_FORM_001) in the R/3 using sfp with the interface "ZZ_INTERFACE_001".

3. In the layout of the ZZ_FORM_001, insert a dropdownlist("dropdown") and bind the "dropdown" to the "TEST1" and bind list Item properties to the "table".

4. Create a adobe interactive form (A_interactive_form) in the view(display_view) of the WDA for abap.

5. Bind the ZZ_FORM_001 to the A_interactive_form, so that the data can be transfered to the ZZ_FORM_001.

6. Type the code in the wddoinit method in the display_view for transfer the data to the dropdownlist in the form(ZZ_FORM_001)

method WDDOINIT .

DATA form_001_node TYPE REF TO if_wd_context_node.

DATA table TYPE REF TO if_wd_context_node.

DATA form_001_info TYPE REF TO if_wd_context_node_info.

DATA lt_table TYPE table of ZWDR_CONTEX.

DATA lt_value_set TYPE table of wdr_context_attr_value.

DATA lw_value_set like line of lt_value_set.

DATA lw_table like line of lt_table.

lw_table-value = '1'.

lw_table-text = 'DRAG'.

  • append lw_value_set to lt_table.

append lw_table to lt_table.

lw_table-value = '2'.

lw_table-text = ' ddddddddd '.

  • append lw_value_set to lt_table.

append lw_table to lt_table.

lw_table-value = '3'.

lw_table-text = 'COW'.

  • append lw_value_set to lt_table.

append lw_table to lt_table.

lw_table-value = '4'.

lw_table-text = 'cow'.

  • append lw_value_set to lt_table.

append lw_table to lt_table.

form_001_node = wd_context->get_child_node( name = 'ZZ_FORM_001' ).

  • navigate from <ZZ_00_TEST_FORM_001> to <TABLE> via lead selection

table = form_001_node->get_child_node( 'TABLE' ).

table->bind_table( lt_table ).

endmethod.

7. Type the code in the wddomodifyview method in the display_view for making the interactive enable.

method WDDOMODIFYVIEW .

data:

lr_interactive_form type ref to cl_wd_interactive_form,

lr_method_handler type ref to if_wd_iactive_form_method_hndl.

lr_interactive_form ?= view->get_element( 'INTERACTIVE_FORM' ).

lr_method_handler ?= lr_interactive_form->_method_handler.

lr_method_handler->set_legacy_editing_enabled( abap_true ).

lr_interactive_form->SET_READ_ONLY( abap_false ).

endmethod.

8. Active the WDA and run the WDA.

9. In the IE, the interactive form is displayed with the dropdownlist. Select the value("dddddddddd") in the dropdownlist. Save the interactiveform as test.pdf. close the pdf.

10. Open the pdf, but there aren't data in the dropdownlist.

I hope to look the data in the dropdownlist in the A_interactive_form after I open the test.pdf next.

I don't know how to change my code or configuration?

Do you give some example or some hint for this problem ? my email: tao.wang@besuretech.com

Thanks & Regards,

Tao

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can u able to see the data in PDF. First check with that, if it is ok then bind in webdynpro.

To get the values in pdf, select that field and change the property to User entered - Optional (This is done in Palette - object ) window.

Answers (0)