cancel
Showing results for 
Search instead for 
Did you mean: 

Reading the Subnode

Former Member
0 Kudos

Hi,

We have a context with Node and Subnode and Attributes to node.

Now my requirement is to Read all the Elements in Subnode (Not only Lead of Selection in Subnode).

When i am reading it from the subnode from Auto Code Generator i could able to read only entries in Subnode for the Lead of Selection of Parent Node.

Eg:

        Node1

           Subnode - A1  A2 

                             B1  B2

           Attr1    100     500

           Attr2     200    600

           Attr3     300    700

Now i want to read all the Elements of Subnode.

Thank You,

Shashikanth

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I am already using the same method but it is displaying only the Elements of Subnode with respect to the Lead of Selection of Parent Node.

I am adding the screen shot of the application and the Node(BN_VISA) and Subnode(SUB_TYPE)

for your reference

Thank You,

Shashikanth

ramakrishnappa
Active Contributor
0 Kudos

Hi Shashikanth,

It seems that,you are binding data back to the whole context node. Hence the sub node data also getting refreshed.

I suggest you to use REMOVE_ELEMENT method to delete only selected record. So that other rows remain un-touched.

Hope this helps you.

Regards,

Rama

former_member197475
Active Contributor
0 Kudos

Hi Shashi,

Have you used the method GET_STATIC_ATTRIBUTES_TABLE()???

http://help.sap.com/saphelp_nw04s/helpdata/en/fd/be5b4150b38147e10000000a1550b0/content.htm

BR,

RAM.

0 Kudos


Hello Shashikanth,

You can use the following snippet to read the subnode.

  CALL METHOD wd_context->path_get_node

    EXPORTING

      path   = 'PARENT_NODE.CHILD_NODE'

    RECEIVING

      result = lo_node.

  IF lo_node IS BOUND.

    CALL METHOD lo_node->get_static_attributes_table

      IMPORTING

        table = lt_table.

  ENDIF.