cancel
Showing results for 
Search instead for 
Did you mean: 

Drop Down By index in Table using webdynpro abap

Former Member
0 Kudos

Hi Experts,

I need Drop down by index in the table.

Requriment.

Before lunching the screen i need to fill the drop down index with some values in a table.if the table as 5 records editable then drop down index should be editable with all the values for 5 records.

Waiting for Reply.

Thanks & Regards.

Krishna.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Krishna,

The context node you are using to bind the table can be designed in the following way:

Parent node(Table is bound to it)

     Attribute 1

     Attribute 2 (Hold the selected value of the dropdown)

     Subnode

          SubAttribute 1(To be bound to the dropdown)

Have a supply function for Subnode which will be used to populate the subnode.

Now, use the event onSelected of the dropdown to set the attribute 2 with the data selected in the corresponding row. Use the following code:

  DATA lv_index TYPE i.
  DATA lr_child TYPE REF TO if_wd_context_node.
  DATA lv_value TYPE i.
  DATA lv_a2 TYPE string.
  CALL METHOD context_element->get_child_node
    EXPORTING
      name       = 'N'

*** N is the name of the subnode
    RECEIVING
      child_node = lr_child.
  CALL METHOD wdevent->get_data
    EXPORTING
      name  = 'INDEX'
    IMPORTING
      value = lv_value.

CALL METHOD lr_child->get_attribute
  EXPORTING
    index  = lv_value
    name   = 'A2'

*** Here A2 is the attribute of the subnode
  IMPORTING
    value  = lv_a2
    .
CALL METHOD context_element->set_attribute
  EXPORTING
    value  = lv_a2
    name   = 'A_2'.

*** Here A_2 is the name of the Attribute 2 mentioned in the above design.

Let me know if the design helps or if you need any further inputs.

Regards,

Sayan

mangesh_sonawane
Participant
0 Kudos

Hi Krishna,

Please find the below link,

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c03227f9-e48f-2c10-4bad-8ebdec704...

Thanks & regards,

Mangesh Sonawane

Former Member
0 Kudos

Hi Mangesh,

i need to upload a XLSX (EXCEL) to webdynpro abap table.

please provide me the information.

Thanks & Regards.

Krishna.

Former Member
0 Kudos

Hi krishna,

You can write the code in WDINIT method. Open the wizard give set property and check the check box for table

you will get the LT_<nodename> table . give values for that table.

Regards,

Ramya Ramasamy

Former Member
0 Kudos

Hi Ramya ,

i need to upload a XLSX (EXCEL) to webdynpro abap table.

please provide me the information.

Thanks & Regards.

Krishna.

former_member213957
Participant
0 Kudos

Hi Krishna,

Follow the below steps:

1. Create a separate node for the drop down with attributes key and value and bind the value attribute with texts property of the drop down. commonly another node for remaining columns.

2.Create a supply function method for above drop-down node to fill above attributes for filling the values in the drop down at initial time.

3.check the read-only property of each columns of a table and drop-down column also.

4.fill the data

Regards,

Kishorekumar