cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI ALL,

HELP ME ON MY QUERRY.

BEST REGARDS

former_member187339
Active Contributor
0 Kudos

Hi Umesh,

I think your query will be answered more quickly in ABAP forum...Try posting this question there.. Meanwhile i will give it a try .

Regards

Suraj

Former Member
0 Kudos

Hi XI/ABAPers,

Any help please

Former Member
0 Kudos

Hi Umesh,

Get a reference to IF_IXML_NODE for your xml node...call the method get_value to get the value of the node...

For instance if you are following the ABAP mapping tutorial....there is a place where they say the below...

<b>* get message content of tag <BookingCode>

data: incode type ref to if_ixml_node_collection.

incode = idocument->get_elements_by_tag_name( 'BookingCode' ).</b>

do the following to get the value of the "BookingCode" tag...

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

  DATA : wa_test TYPE string.
  wa_test = incode_ele->get_value( ).

Thanks,

Renjith

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Umesh,

I hope these links can help you solve your problem:

/people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping

/people/r.eijpe/blog

http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm

Regards,

abhy

PS: AWARD POINTS FOR HELPFUL ANSWERS.