on 01-16-2007 8:28 PM
Hi,
I am using abap mapping to translate xml source to xml target. Source and Target file remains same except for one particular text node.
Source Structure is
<SYNC_PROJINFO_004>
<CNTROLAREA>
<BSR>
<VERB value="SYNC">SYNC</VERB>
</BSR>
</CNTROLAREA>
<DATAAREA>
<PROJECT>ABC-01</PROJECT>
<DESCRIPTN>ABC - WBS Level 1</DESCRIPTN>
<SYNCIND>Z</SYNCIND>
<GLENTITYS>HED110</GLENTITYS>
</DATAAREA>
</SYNC_PROJINFO_004>
Target file should be
<SYNC_PROJINFO_004>
<CNTROLAREA>
<BSR>
<VERB value="SYNC">SYNC</VERB>
</BSR>
</CNTROLAREA>
<DATAAREA>
<PROJECT>ABC-01</PROJECT>
<DESCRIPTN>ABC - WBS Level 1</DESCRIPTN>
<SYNCIND>A</SYNCIND>
</DATAAREA>
</SYNC_PROJINFO_004>
The difference in this file is <GLENTITYS> tag is removed and <SYNCIND> tag content is changed to A.
How do i get the text content from the tag <GLENTITYS> ?
I am using following code
data: inglentitys type ref to if_ixml_node_collection.
inglentitys = idocument->get_elements_by_tag_name( 'GLENTITYS' ).
The above does not give me the String? How do i get that?
Thanks,
Gowri
Hi,
Continue......
I have to get the content of the <GLENTITYS> tag to calculate <SYNCIND> from the abap table.
Kindly help.
Thanks,
Gowri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
did you go thru this guide-
This may help u
Rgds,
moorthy
Hi,
I did add folllowing code
data: outcode3 type ref to if_ixml_node.
data: inglentitys type ref to if_ixml_node_collection.
data : sndprn_1 TYPE string.
inglentitys = idocument->get_elements_by_tag_name( 'GLENTITYS' ).
outcode3 = inprj_parent->get_item( index = 0 ).
if outcode3 is not initial.
sndprn_1 = outcode3->get_value( ).
else.
sndprn_1 = 'XXX'.
endif
create element SYNCIND
data: elem_SYNCIND type ref to if_ixml_element.
elem_SYNCIND = odocument->create_simple_element(
name = 'SYNCIND'
value = sndprn_1
parent = elem_PROJINFO ).
It creates a tag when i give sndprn_1 as value. The abap program works fine. Now, i need to get SYNCIND tag content by calling a function module, which inturns query the table.
sndprn_1 is the input parameter for the function mentioned below. The abap program errors out with the below mentioned code.
Kindly help.
CALL FUNCTION 'ZSET_PROJSTATUS'
EXPORTING
SNDPRN = sndprn_1
PSPID = 'GPATIL'
POSID = 'GP'
IMPORTING
ENTRY = i_entry.
Thanks,
Gowri
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.