Skip to Content
avatar image
Former Member

Dropdown List Web dynpro Abap

Hi All

I am new to adobe forms. I am having a problem with populating drop down list box on an adobe interactive form. I have gone through this forum and I have tried a number of different things but nothing seems to work.

When I run my web dynpro application the drop down looks like an input box. There is no down arrow icon on the side.

I check note 981638. It states it can't be implemented.

I am on CRM 2007 NW7 platform.

I created an interface with an importing value called it_dropdown. this is a table.

I created a form that uses this interface.

i placed a drop down list on the form layout. In the dynamic options i click list items. I get a popup.

In the bindings I bind to the table... $record.IT_DROPDOWN.DATA[*]

The text and value are bound to corresponding fields on the internal table.

I created a webdynpro

I created a view.

I poped an interactive form ui elemnt on the view.

I generated the context.

I checked the cardinality of the node for the internal table and it is 0..n

In my doinit method I have the following code.

data: lr_form_node type REF TO if_wd_context_node.

data: lr_dd type REF TO if_wd_context_node.

data: lt_dropdown type WDR_CONTEXT_ATTR_VALUE_LIST,

wa like line of lt_dropdown.

do 20 times.

wa-value = sy-index.

concatenate 'Test' wa-value into wa-text SEPARATED BY space.

insert wa into table lt_dropdown.

enddo.

lr_form_node = wd_context->get_child_node( wd_this->wdctx_zfp_example_01 ).

lr_dd = lr_form_node->get_child_node( wd_this->wdctx_it_dropdown ).

lr_imp->bind_table( lt_dropdown ).

The adobe form displays but the drop down is not populated.

I have tried a normal drop down and webdynpro enumerated drop downs.

Can someone please point out what I am doing wrong.

Thanks

Darren

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 16, 2009 at 01:38 PM

    try this instead - i'm populating several dropdown boxes in my WDOINIT and passing them fine to the PDF.

    You need to read your context where the dropdowns are located - in my case, they are all located in IDEASHEET_DATA.

    By the way, my drop downs ARE NOT defined as tables in the Context - they are regular fields. The key is attaching the Value Set as seen below.

      DATA: lo_nd_ideasheet_data TYPE REF TO if_wd_context_node.      " <- Context being passed to the PDF
      DATA: node_info TYPE REF TO if_wd_context_node_info.
      DATA: it_table TYPE wdr_context_attr_value_list.              " <--- this holds your drop down Values and Texts
    
      lo_nd_ideasheet_data = wd_context->get_child_node( name = wd_this->wdctx_ideasheet_data ).
      node_info = lo_nd_ideasheet_data->get_node_info( ).
    
    *
    *  Select your values into internal table it_table here
    *
      node_info->set_attribute_value_set(
         name      = SERVICE_MANAGER'   " <- this is a field in my Context and Adobe Form
         value_set = it_table ).
    

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sachin Dhingra

      Hi Sachin

      Here is exactly what I did.

      1. Create a web dynpro application.

      2. Crate a view

      3. On the context create a node called data_source or whatever you want. The cardinality is 1.1.

      4. Create an attriubute on the data_source note. I called mine 'DDOWN' and created it as a string.

      5. Pop an interactive form element on your view.

      6. In the Template Source, give the name of your adobe form. This part was the vital bit for me as I was using a database interface originally and I think that this was my problem. If you already have a form created that does not use xml, I would advise you to create a new temporary adobe form by putting the name in the template source and double clicking it.

      7. You will get a popup stating asking you to create an interface. You will see a button called "context" click this and follow the steps.

      8. When you get to your form you will see the drop down context node in the data hierarchy. Drop a drop down list on your form and then drag and drop your context node onto it. Make sure your forms layout is ZCI. Save the form.

      9 Return to your web dynpro app. You will see that the datasource has been updated.

      10. I used the following code in the doinit method of the web dynpro.

      data: lr_context_node type ref to if_wd_context_node.

      data: lt_dd type wdr_context_attr_value_list.

      DATA: node_info TYPE REF TO if_wd_context_node_info.

      data: wa like line of lt_dd.

      do 20 times.

      wa-value = sy-index.

      concatenate 'Test' wa-value into wa-text SEPARATED BY space.

      insert wa into table lt_dd.

      enddo.

      lr_context_node = wd_context->get_child_node( name = 'ZDARREN1' ). "Template Source

      node_info = lr_context_node->get_node_info( ).

      node_info->set_attribute_value_set(

      name = 'DDOWN' "DDOWN is a node on the context

      value_set = lt_dd ).

      Activate and test.

      You should see a dropdown.

      I hope this helps as this is the approach that worked for me.

  • avatar image
    Former Member
    Sep 02, 2009 at 09:48 AM

    Hi,

    I have a problem with the dropdown list in the PDF. I can't click on the arrow...

    When I go in debug mode I see the context element is corectly filled with the internal table.

    But in the PDF, I'm not able to click to choose a value....

    regards,

    Said

    Add comment
    10|10000 characters needed characters exceeded