on 12-29-2012 8:57 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krishna,
Please find the below link,
Thanks & regards,
Mangesh Sonawane
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.