cancel
Showing results for 
Search instead for 
Did you mean: 

Abap mapping: copy substructures

Former Member
0 Kudos

Hi all,

I try to find a simple and quick way to fill some fields of a destination message getting values from an input message by tag name.

More exactly:

Input message.

S1.

f1

f2

f3

S2

f4

f5

f5

Output message,

D1.

d1

d2

d3

D3

d4

I need to copy S1 to D1 to have all field dx... filled and to fill d4 with f5, for exaple.

I can use idocument->get_elements_by_tag_name( 'BookingCode' ). to get a value of 'BookingCode' from

the input message. Is it the possibility to modify a specific field in a "odocument" after a copy of a structure from the idocument?

Is it possible?

Thanks in advance.

Regards,

Giovanni

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

correct

Former Member
0 Kudos

set_value

This method sets a node's value. This operation is not supported or defined on all node types.

interface

if_ixml_pi

parameters

value

The value to set for this node.

return value

Returns one of the following return codes:

ixml_mr_dom_ok = 0

The value has been set successfully.

ixml_mr_dom_invalid_arg = 0x00020003L

The given argument is invalid.

ixml_mr_dom_not_allowed = 0x00020008L

This node doesn't allow to set its value.

abap signature


method set_value

importing

value type string

returning

value(rval) type I.

Former Member
0 Kudos

Yes it is possible to set the value of a node