Skip to Content
0
Former Member
Feb 03, 2006 at 06:42 AM

ABAP MAPPING Querry - How to create Different Target NODE NAME as of Source

17 Views

Hi,

In abap Mapping

  • <b>DATA READ FROM SOURCE XML NODE into <u>incode</u></b> ******

data: incode type ref to if_ixml_node_collection.

incode = idocument->get_elements_by_tag_name( 'BUSINESS_DAY' ).

  • <b>CREATE OUTPUT XML NODE WITH SAME NAME AS <u>'BUSINESS_DAY'</u></b> **

data: outcode type ref to if_ixml_node.

outcode = incode->get_item( index = 0 ).

data irc type i.

irc = msgtype->append_child( outcode ).

*<b>BUT TO CREATE OUTPUT XML NODE WITH <u>DIFFERENT NAME AS 'BUSS_DAY'</u></b>*

data: ws_val type string VALUE 'xyz'.

data: elementsender type ref to if_ixml_element.

elementsender = odocument->create_simple_element(

name = 'BUSS_DAY'

value = ws_val

parent = msgtype ).

<b>Please guide me how I can assign <u>incode</u> value to ws_val.

So that I can generate <u>OUTPUT XML NODE with different name as of SOURCE XML NODE</u></b>

i.e. How to create Different Target NODE NAME as of

Source with same Data

<Note>: I am using "How to... Use ABAP Mapping in XI 3.0 ver.1.00" and to create different NODE name as of source

is not given in it.

Thanks & Regards.