Skip to Content
author's profile photo Former Member
Former Member

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

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 when 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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2008 at 10:06 AM

    Hi Tao.

    One way to do this is to set the values of the drop down list in the form itself.

    Then in the web dynpro, just pass the default value you want to appear first.

    So in SFP, in your form Drop Down list UI, in the Field tab, enter the values you want. (you can also have a javascript to populate the values). Then in web dynpro, default the value.

    Eg: values in SFP: test1, test2, test3.

    In web dynpro, default your attribute TEST1 to "test3" and then test3 should be selected by default.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.