on 05-09-2009 6:29 AM
Dear Experts,
In a view, in the context i have a node(flightdetails) with 3 variables(connid,fldate,price) and an additional attribute car(without any node).
Now i am displaying car in the view with a button.So if some one clicks the button it gets the value of car and selects the flightdetails with car value.i have mapped car with rootelement correctly.Now following is my code during click of button.
DATA lo_el_context TYPE REF TO if_wd_context_element.
lo_el_context = wd_context->get_element( ).
lo_el_context->get_attribute( EXPORTING name = 'CAR'
IMPORTING value = lv_carrid ).
Problem: i am unable to get the value of car (entered by user) into lv_carrid
i tried to use if_view1=>wdctx_car and also wd_this->wdctx_car but was not successful.
Can anyone pls help me out
Regards
Sajid
Check if you have binded the value property of the Inputfield with the attribute 'CAR' correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DATA lo_el_sflight TYPE REF TO if_wd_context_element.
lo_el_context = wd_context->get_element( ).
lo_el_context->get_attribute( EXPORTING name = 'CAR' IMPORTING value = lv_carrid ).
Note: No need to get reference of node(or child node)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sajid,
The only reason could be that the CAR attribute dosen't contain any value.
Now i am displaying car in the view with a button
With which UI element have to binded the CAR attribute? Is user entering the value for the Car or is it getting set on some action?
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What is the datatype/DE you have given for CAR.
You can directly use the context element.
lv_carrid = wd_context->get_element( exporting....).
Have you bound the Input field(value property) correctly to thhis CAR attribute.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.