<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dynamic element specification in call transformation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-element-specification-in-call-transformation/m-p/715721#M33164</link>
    <description>&lt;P&gt;Excellent. Thanks a lot. Exactly what I was looking for.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;data(result_tab) = value abap_trans_resbind_tab( ( name = root value = ref #( abap_out ) ) ).

        call transformation demo_id_upper_lower "id
        parameters mode = 'UP'
        source xml asxml_str
        result (result_tab).

        if result_tab is not initial.
          read table result_tab into data(result_wa) index 1.
          if sy-subrc = 0.
            assign result_wa-value-&amp;gt;* to field-symbol(&amp;lt;abap_out&amp;gt;).
            if &amp;lt;abap_out&amp;gt; is assigned.
              abap_out = &amp;lt;abap_out&amp;gt;.
            endif.
          endif.
        endif.
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 09 Jul 2018 03:55:51 GMT</pubDate>
    <dc:creator>former_member311422</dc:creator>
    <dc:date>2018-07-09T03:55:51Z</dc:date>
    <item>
      <title>Dynamic element specification in call transformation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-element-specification-in-call-transformation/m-p/715719#M33162</link>
      <description>&lt;P&gt;Hello, I'm using call transformation to convert xml to abap structure.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;call transformation demo_id_upper_lower "id 
parameters mode = 'UP' 
source xml asxml_str 
result paymentrequest = abap_out. &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;This works as expected and the data is mapped to abap structure successfully. 'paymentrequest' being the root tag here. Is there a way to specify a variable containing the tag name instead of the tag directly in the result. &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;Eg. data(my_var) = 'paymentrequest'. &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;PRE&gt;&lt;CODE&gt;call transformation demo_id_upper_lower "id 
parameters mode = 'UP' 
source xml asxml_str 
result my_var = abap_out. &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;In this case there's no exception as such but then there's no conversion(I think it tries to find 'my_var'). I'm trying to encapsulate the conversion in a method/fm, hence the requirement. &lt;/P&gt;
  &lt;P&gt; Note: I have also tried assigning the element name to a field symbol. But that too didn't work.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jul 2018 06:10:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-element-specification-in-call-transformation/m-p/715719#M33162</guid>
      <dc:creator>former_member311422</dc:creator>
      <dc:date>2018-07-06T06:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic element specification in call transformation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-element-specification-in-call-transformation/m-p/715720#M33163</link>
      <description>&lt;P&gt;Lets try this:&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;DATA MAPP TYPE ABAP_TRANS_RESBIND_TAB.

MAPP = VALUE #( ( NAME = 'PAYMENTREQUEST' VALUE = REF #( abap_out ) ) ).

CALL TRANSFORMATION ID SOURCE XML l_xml
 RESULT (MAPP) .&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 06 Jul 2018 08:43:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-element-specification-in-call-transformation/m-p/715720#M33163</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2018-07-06T08:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic element specification in call transformation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-element-specification-in-call-transformation/m-p/715721#M33164</link>
      <description>&lt;P&gt;Excellent. Thanks a lot. Exactly what I was looking for.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;data(result_tab) = value abap_trans_resbind_tab( ( name = root value = ref #( abap_out ) ) ).

        call transformation demo_id_upper_lower "id
        parameters mode = 'UP'
        source xml asxml_str
        result (result_tab).

        if result_tab is not initial.
          read table result_tab into data(result_wa) index 1.
          if sy-subrc = 0.
            assign result_wa-value-&amp;gt;* to field-symbol(&amp;lt;abap_out&amp;gt;).
            if &amp;lt;abap_out&amp;gt; is assigned.
              abap_out = &amp;lt;abap_out&amp;gt;.
            endif.
          endif.
        endif.
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Jul 2018 03:55:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-element-specification-in-call-transformation/m-p/715721#M33164</guid>
      <dc:creator>former_member311422</dc:creator>
      <dc:date>2018-07-09T03:55:51Z</dc:date>
    </item>
  </channel>
</rss>

