<?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 XSLT processing - parameters? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468742#M1252571</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how did you handled this dynamic filed names of internal table..i have the same requirement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease reply..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Dec 2009 14:28:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-21T14:28:40Z</dc:date>
    <item>
      <title>Dynamic XSLT processing - parameters?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468740#M1252569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goal: I want my XSLT mapping to be dynamic, because I expect a certain number of fields with values in my XML, but these &lt;STRONG&gt;field names may change over time&lt;/STRONG&gt;, so I have to make it dynamic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1: I made my output dynamic by using dynamic internal tables (field-symbols). So that I can change my internal tables easily with a custom-table. &lt;STRONG&gt;Done!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Step 2: My XSLT transformation should be handled dynamically. &lt;STRONG&gt;Not done!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Is this step 2 even possible?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking of passing PARAMETERS to my CALL TRANSFORMATION statement so that I can let know what fieldnames my XSLT can expect, but then the question remains if the ZTEST transformation can read this out for my purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL TRANSFORMATION ztest
PARAMETERS (gt_param)
SOURCE XML gt_itab
RESULT (gt_result_xml).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;...knowing that gt_param can only by of type &lt;/P&gt;&lt;P&gt;&lt;EM&gt;ABAP_TRANS_PARMBIND_TAB&lt;/EM&gt; (for specifying strings) or &lt;/P&gt;&lt;P&gt;&lt;EM&gt;ABAP_TRANS_OBJBIND_TAB&lt;/EM&gt; (for specifying object references) or&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ABAP_TRANS_PARM_OBJ_BIND_TAB&lt;/EM&gt; (for specifying data references).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, is it possible to make my TRANSFORMATION handling dynamic (by using PARAMETERS or something else)? If yes, does anybody know how. Examples are appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mehmet Metin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2009 08:41:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468740#M1252569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-23T08:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic XSLT processing - parameters?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468741#M1252570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved (differently).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2009 09:42:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468741#M1252570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-01T09:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic XSLT processing - parameters?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468742#M1252571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how did you handled this dynamic filed names of internal table..i have the same requirement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease reply..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2009 14:28:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468742#M1252571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-21T14:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic XSLT processing - parameters?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468743#M1252572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mehmet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How did u solved this problem?  I have a customizing table to how the system read xml document. But i havent known how to write a xslt document yet..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 11:37:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468743#M1252572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-12T11:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic XSLT processing - parameters?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468744#M1252573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mehmet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck with a similar requirement. Could you kindly let me know how you were able to resolve the issue at your end? Please respond back.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 18:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468744#M1252573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-15T18:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic XSLT processing - parameters?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468745#M1252574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This can be done with basic XSLT. Use the XPath expression '*' to apply a template to each child of a given node (for example, if a node represents an ABAP structure, its children represent its components). In the template, use the XPath-function 'local-name()' to retrieve the name of the current element without namespace. Now you should have everything you need for creating the result tree. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a working example in our XI system, see the following template: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&amp;lt;xsl:template match=&lt;SPAN class="L1S33"&gt;"ZMEDI_MELDUNG_DET"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;xsl:element name=&lt;SPAN class="L1S33"&gt;"{SEGID_N}"&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:element name=&lt;SPAN class="L1S33"&gt;'SEGID_N'&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select=&lt;SPAN class="L1S33"&gt;"*[position()=1]"&lt;/SPAN&gt;/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:element&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:for-each select=&lt;SPAN class="L1S33"&gt;"*[position()&amp;gt;1 and text() != '']"&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:element name=&lt;SPAN class="L1S33"&gt;"{local-name()}"&lt;/SPAN&gt;&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select=&lt;SPAN class="L1S33"&gt;"."&lt;/SPAN&gt;/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:element&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:for-each&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/xsl:element&amp;gt;&lt;BR /&gt;&amp;lt;/xsl:template&lt;/SPAN&gt;&lt;SPAN class="L1S33"&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here, I copy the components of the ABAP source structure ZMEDI_MELDUNG_DET (the structure name was fixed in my case, but it's easy to identify it without specifying its name, if it should be given at runtime only) into a result tree fragment with parent node name = the content of the ABAP component SEGID_N, the first child having the fixed name SEGID_N with (redundant) its value again, and after that all the components of the source structure, whatever they may be, if their content is non-empty (this was a format required by another non-SAP-development team).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rüdiger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 19:10:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-xslt-processing-parameters/m-p/5468745#M1252574</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2012-08-15T19:10:00Z</dc:date>
    </item>
  </channel>
</rss>

