Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

help in abap object

Former Member
0 Likes
278

HALLOW

i have this metod and when i set just CARRID its work o.k. but when i wont to set

also CONNID i have eroor i new with this topic (oo)

regards

METHOD wddoinit .

DATA:

node_flightinfo TYPE REF TO if_wd_context_node,

elem_flightinfo TYPE REF TO if_wd_context_element,

stru_flightinfo TYPE if_componentcontroller=>element_flightinfo .

  • navigate from <CONTEXT> to <FLIGHTINFO> via lead selection

node_flightinfo = wd_context->get_child_node( name = if_componentcontroller=>wdctx_flightinfo ).

  • get element via lead selection

elem_flightinfo = node_flightinfo->get_element( ).

  • get all declared attributes

elem_flightinfo->set_static_attribute(

EXPORTING

name = 'CARRID'

value = 'AA'

<b> name = 'CONNID'

value = '1231').</b>

ENDMETOD.

HALLOW

i have this metod and when i set just CARRID its work o.k. but when i wont to set

also CONNID i have eroor i new with this topic (oo)

regards

METHOD wddoinit .

DATA:

node_flightinfo TYPE REF TO if_wd_context_node,

elem_flightinfo TYPE REF TO if_wd_context_element,

stru_flightinfo TYPE if_componentcontroller=>element_flightinfo .

  • navigate from <CONTEXT> to <FLIGHTINFO> via lead selection

node_flightinfo = wd_context->get_child_node( name = if_componentcontroller=>wdctx_flightinfo ).

  • get element via lead selection

elem_flightinfo = node_flightinfo->get_element( ).

  • get all declared attributes

elem_flightinfo->set_static_attribute(

EXPORTING

name = 'CARRID'

value = 'AA'

<b> name = 'CONNID'

value = '1231').</b>

ENDMETOD.

1 REPLY 1
Read only

Former Member
0 Likes
263

Hi Shnya,

when u are using the method set static attribute for setting thur context element u jhave to pass a structure to the method set static attribute like

stru_flightinfo-carrid ='AA'.

stru_flightinfo-connid = '17'.

elem_flightinfo->set_static_attributes(

exporting

static_attributes = stru_flightinfo ).

Regards

Sarath

Reward Points if it helps you