cancel
Showing results for 
Search instead for 
Did you mean: 

Setting data in a node with child node

Former Member
0 Kudos

Dear Experts,

I have a Value node with a child node and a Attribute.

The child node also have one attribute.

MyNode

+-------MyChildNode

+------MyChildNodeAttribute

+ -


MyAttribute

My requirement is to set the MyNode with single record.

Please suggest.

Warm Regards

Upendra Agrawal

Accepted Solutions (1)

Accepted Solutions (1)

sahai
Contributor
0 Kudos

hi upendra,

generally we use supply functions when dealing with parent and child nodes....on expanding the parent node the child nodes get automatically populated.

i am sharing a sample of supply function here......

SELECT objid stext FROM hrp1000

INTO TABLE lt_suborg_units

FOR ALL ENTRIES IN it_suborgs

WHERE objid = it_suborgs-objid

AND begda <= sy-datum

AND endda >= sy-datum

AND langu = sy-langu.

ENDIF.

sort lt_suborg_units by ORGEH.

DELETE ADJACENT DUPLICATES FROM lt_suborg_units COMPARING ORGEH.

node->bind_table( lt_suborg_units ).

endif.

you will have to populate the value in the internal table and then you will have to bind the table with the node doing this will populate value to the child node.

hope this may solve the problem of yours.

thanks and regards,

sahai.s

Former Member
0 Kudos

Dear Sahai,

Thank you so much!

I really appreciate your invaluable help.

Problem resolved, full marks to you.

Warm regards,

Upendra Agrawal

Answers (2)

Answers (2)

gill367
Active Contributor
0 Kudos

set the my node seperately and then set the attribute of the child node depending on whether sigleton property is set or not.

thanks

sarb

Former Member
0 Kudos

>

> Dear Experts,

>

> I have a Value node with a child node and a Attribute.

> The child node also have one attribute.

>

> MyNode

> +-------MyChildNode

> +------MyChildNodeAttribute

> + -


MyAttribute

>

> My requirement is to set the MyNode with single record.

>

> Please suggest.

>

> Warm Regards

>

> Upendra Agrawal

hi,

in wda there is a code generator use ctrl + f7.

use the first tab context and select your node , set radio buttons. This will generate necessary code for you to set the node or attribute.

Former Member
0 Kudos

Dear Baskaran,

Thanks for your quick reply.

It would be very kind of you if you can help me please in understanding the code.

Warm regards,

Upendra Agrawal

Former Member
0 Kudos

Hallo Upendra,

Let me know what you want me to explain regarding the code .

Are you able to generate the code ?

You want me to explain the code what it does ? please post the code then i shall explain to you.