cancel
Showing results for 
Search instead for 
Did you mean: 

unable to get value.

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Check if you have binded the value property of the Inputfield with the attribute 'CAR' correctly.

Answers (3)

Answers (3)

shaik_sajid
Active Contributor
0 Kudos

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)

arjun_thakur
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.