Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Tag XML su ABAP

0 Likes
2,292

I am generating an XML from abap transaction "XSLT_TOOL". How do I edit a tag that refers to the xml name space? I have to create a tag that contains the ":" and that through the simple transformation I cannot insert (the specific tag is cbc: ID). Thanks

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
2,161

If you use a namespace, referred by "cbc" prefix in your case, you must declare the prefix and namespace once, where it's needed, for instance:

<cbc:ID xmlns:cbc="anything" tt:value-ref="CUSTOMER.CBCID"/>

or at the very top of the XML document so that it can be referred by all XML nodes (elements and attributes) in the document, or any place between:

<tt:transform ... xmlns:cbc="anything">

or

<CUSTOMER xmlns:cbc="anything">
  <cbc:ID tt:value-ref="CUSTOMER.CBCID"/>

etc.

6 REPLIES 6
Read only

Sandra_Rossi
Active Contributor
0 Likes
2,161

I don't understand the issue. Why can't you?

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,161

I'm not sure to understand the exact problem. In XML, generally speaking you must use xmlns:

<cbc:mytag xmlns:cbc="anything">
  <cbc:myothertag/>
</cbc:mytag>
Read only

Sandra_Rossi
Active Contributor
0 Likes
2,161

Please use the COMMENT button for comments, questions, adding details, replying to a comment or a proposed solution or to the OP question, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.

Read only

0 Likes
2,161

in thise image there is the error (simple trasformation)



In thise image there is a new program with XSLT language that i made. Also in this case the result is negative



Tanks

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,162

If you use a namespace, referred by "cbc" prefix in your case, you must declare the prefix and namespace once, where it's needed, for instance:

<cbc:ID xmlns:cbc="anything" tt:value-ref="CUSTOMER.CBCID"/>

or at the very top of the XML document so that it can be referred by all XML nodes (elements and attributes) in the document, or any place between:

<tt:transform ... xmlns:cbc="anything">

or

<CUSTOMER xmlns:cbc="anything">
  <cbc:ID tt:value-ref="CUSTOMER.CBCID"/>

etc.

Read only

0 Likes
2,161

Grazie mille!