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

XML Transformation - Dynamic tags?

JasonLante
Explorer
0 Likes
1,059

Hi All,

I am trying to dynamically generate an xml tag based on a parameter.

I.e. <tt:root name="V_TYPE"/> where V_TYPE = MyTag

I am trying to generate the following from the transformation.

<MyTag>.... </MyTag>

Any help would be much appreciated.

Regards,

Jason

Hi All,

I am trying to dynamically generate an xml tag based on a parameter.

I.e. <tt:root name="V_TYPE"/> where V_TYPE = MyTag

I am trying to generate the following from the transformation.

<MyTag>.... </MyTag>

Any help would be much appreciated.

Regards,

Jason

4 REPLIES 4
Read only

Former Member
0 Likes
908

Hi Jason.

Please explain what is the process you follow to obtain your XML string.

Do you use an ABAP program?

Regards.

Rafael Rojas.

Read only

0 Likes
908

Hi Rafael,

Well its actually a call transformation from an event within table maintenance.

The table is generic such that the tag names and values are specified by fields in the table. Ie. 3 fields.

1) Block

2) Tag

3) Value

I want to generate XML that looks like.


<Block>
  <Tag>Value</Tag>
</Block>

Regards,

Jason

Read only

0 Likes
908

This is only an idea.

What happend if you create a dynamic internal table, with fields you want and then you use CALL TRANSFORMATION command to create the the XML string you need. Note that name fields returned by this command are all upper case.

Just an idea.

Regards.

Rafael Rojas.

Read only

Former Member
0 Likes
908

Hi Jason,

You can try this to generate xml.

CALL TRANSFORMATION ID

SOURCE DATA = i_tab[]

RESULT XML es_export.

Thanks,

Somi Reddy