cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the node corresponding to an attribute

former_member205144
Active Participant
0 Kudos

Hi,

I have an element name.I want to know whether an attribute exist in that view.I want the node in which it exist.How?

Accepted Solutions (1)

Accepted Solutions (1)

former_member205144
Active Participant
0 Kudos

Found out the answer myself....

DATA LO_API_INTERFACECONTROLLER TYPE REF TO IF_WD_CONTROLLER.

   LO_API_INTERFACECONTROLLER = WD_THIS->WD_GET_API( ).

   DATA: LO_CONTEXT  TYPE REF TO IF_WD_CONTEXT,

         LO_ROOT_NODE  TYPE REF TO IF_WD_CONTEXT_NODE,

         LO_ND_DATA  TYPE REF TO IF_WD_CONTEXT_NODE_INFO.

   LO_CONTEXT = LO_API_INTERFACECONTROLLER->GET_CONTEXT( ).

   LO_ROOT_NODE = LO_CONTEXT->ROOT_NODE.

   LO_ND_DATA = LO_CONTEXT->ROOT_NODE_INFO.

   CALL METHOD LO_ND_DATA->GET_CHILD_NODES

     RECEIVING

       CHILD_NODES = LT_NODES.

This will give the available nodes in the root node..From there we can check...

Answers (0)