on 02-28-2007 11:27 AM
Hi,
I have a node 'CONF' with attribute ATNAM01. I used a ZSTRUC to create this node. Here my requirement is that based on user inputs I will execute a FM, I will get no of entries in my itab. I need to assign attributes based on itab entries to 'CONF' node dynamically ....
Ex: ATNAM01, ATNAM02....ATNAMNN.
Is it possible? How? Any code/link!
Regards,
Sateesh...
Hi sateesh,
Is your problem statement is some thing like this .Based on data in attribute ATNM01 you need to perform correpsonding treatment .
********************************************************************************************
DATA:
node_check TYPE REF TO if_wd_context_node,
elem_check TYPE REF TO if_wd_context_element,
stru_check TYPE if_start_ior=>element_check ,
item_check_attribute LIKE stru_check-check_attribute.
element = wd_context->get_lead_selection( ).
index = wdevent->get_string( 'INDEX' ).
navigate from <CONTEXT> to <CHECK> via lead selection
node_check = wd_context->get_child_node( name = if_start_ior=>wdctx_check ).
get element via lead selection
elem_check = node_check->get_element( ).
get single attribute
elem_check->get_attribute(
EXPORTING
name = `CHECK_ATTRIBUTE`
IMPORTING
value = item_check_attribute ).
if index EQ 2.
elem_check->set_attribute( name = 'CHECK_ATTRIBUTE' value = Abap_true ).
endif.
if index EQ 1.
elem_check->set_attribute( name = 'CHECK_ATTRIBUTE' value = Abap_false ).
endif.
endmethod.
*********************************************************************************************
Point I want make is based on data populated in attribute <b>check_attribute</b>
.I have identified index of attribute and accordingly performed treatment.
Hope this will help you .
If yes give points.
Cheers!
..............
Parag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sateesh.
Have a look at the class <b>cl_wd_dynamic_tool</b>. You can use methods of this
class to dynamically at nodes to your context.
lr_rootnode_info type ref to if_wd_context_node_info
lr_rootnode_info = wd_context->get_node_info( ).
cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
parent_info = lr_rootnode_info
node_name = 'NAME'
structure_name = 'ZSTRUCT'
is_multiple = abap_true ).
Hope this helps.
Cheers,
Sascha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sasch..
Im not getting the values....
im getting an error message saying..'NO input help found.Component Usage OVS does not exist'..
This is wht im doing..
node_info->set_attribute_value_help(
exporting name = attribute name
value_help_mode = '131'
value_help = 'OVS' ).
OVS is the method name...
But its not getting called ...
jagruti
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.