on 08-01-2008 10:35 PM
Hi guys! Here is my problem:
I create a sample WebDynpro application with 2 windows: (like a maintenance screen with 2 windows)
My first window display a list of employees with the ALV component usage, I also add some buttons in the ALV toolbar, like New, Edit..
The second window is to display the selected line in a popup window, where the user can create or edit employee information.
In my popup window, I have somes fields that used dropdownlist by index.
My component controller context looks like this:
EMPLOYEES (Cardinality 0:N)
EMPLOYEE (Cardinality 1:1)
These 2 context nodes have the same data type, I also have an attribute called status.
My attribute status needs to be display on a dropdown list. For that, I create another context (status) with a supply function to display the default value, I uncheck the init. lead selection, cardinality (1:N), selection (1:1).
When the user select an employee and click on edit by example, I am retrieving the lead selection item from my context node employees and bind it to the other context employee. Finally, the problem is that when I pass back my data, my dropdown list is empty. Let say the selected employee have status = 2, in the popup window the status field is empty by default, I the value are populated in the dropdown, but I was expected to see the value 2. I hope it's clear.
My code for the edit button looks like this
DATA: lr_nd_employees TYPE REF TO if_wd_context_node,
lr_nd_employee TYPE REF TO if_wd_context_node.
DATA: ls_employees TYPE ig_componentcontroller=>element_employees,
ls_employee TYPE ig_componentcontroller=>element_employee.
lr_nd_employees = wd_context->get_child_node( 'EMPLOYEES' ).
lr_nd_employee = wd_context->get_child_node( 'EMPLOYEE' ).
lr_nd_employees->get_static_attributes( IMPORTING static_attributes = ls_employees ).
MOVE-CORRESPONDING ls_employees TO ls_employee.
lr_nd_employee->set_static_attributes( ls_employee ).
popup_window( ).
thanks
Alex
is the status field is in both the nodes Employees and Employee as well?
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
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.