<?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>Question Re: Why sap:external-function is not allowed in the Cloud? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14024541#M4904586</link>
    <description>&lt;P&gt;The cloud environment restricts such direct ABAP calls for security and architectural reasons&lt;/P&gt;&lt;P&gt;Use ABAP Class-Based XSLT Transformation&lt;BR /&gt;If you must use XSLT, you can pass additional parameters to the transformation via ABAP.&lt;/P&gt;&lt;P&gt;Another alternative approach&lt;BR /&gt;Preprocess Data in ABAP before XSLT&lt;BR /&gt;Modify your code to process data before calling XSLT, so you don’t need sap:external-function.&lt;/P&gt;&lt;P&gt;ABAP Code:&lt;BR /&gt;DATA:&lt;BR /&gt;lt_xml_input TYPE string,&lt;BR /&gt;lt_xml_output TYPE string,&lt;BR /&gt;lo_transform TYPE REF TO cl_transformation.&lt;/P&gt;&lt;P&gt;DATA(lo_case) = NEW zif_abap_case( ). " your custok class instance&lt;BR /&gt;DATA(lv_transformed_value) = lo_case-&amp;gt;from_abap( 'OriginalValue' ).&lt;/P&gt;&lt;P&gt;lt_xml_input = `&amp;lt;root name="` &amp;amp;&amp;amp; lv_transformed_value &amp;amp;&amp;amp; `"&amp;gt;&amp;lt;/root&amp;gt;`.&lt;/P&gt;&lt;P&gt;" Apply XSLT transformation&lt;BR /&gt;CREATE OBJECT lo_transform TYPE ('ZMY_TRANSFORMATION').&lt;BR /&gt;lo_transform-&amp;gt;call_transformation(&lt;BR /&gt;EXPORTING input = lt_xml_input&lt;BR /&gt;IMPORTING output = lt_xml_output&lt;BR /&gt;).&lt;BR /&gt;Processes data before XSLT execution and this works in the Cloud&lt;BR /&gt;Hope this helps. &lt;EM&gt;Cheers!!&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Feb 2025 23:05:39 GMT</pubDate>
    <dc:creator>RemiKaimal</dc:creator>
    <dc:date>2025-02-22T23:05:39Z</dc:date>
    <item>
      <title>Why sap:external-function is not allowed in the Cloud?</title>
      <link>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaq-p/14023624</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Just screaming loud&amp;nbsp; - migrating working code to the Cloud and facing again a problem - function is not supported.&lt;/P&gt;&lt;P&gt;This time&amp;nbsp; it's&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://help.sap.com/docs/ABAP_PLATFORM_NEW/31bfc625c2674acdb9aa7547b62db9cc/ddae463c36a30319e10000000a114084.html" target="_blank"&gt;sap:external-function&lt;/A&gt; in XSLT.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;We have some transformations which were XSLT but with some custom hooks via classes. Now we need to rewrite it to sXML code to parse the file and implement the logic which we could just reach with trully simple code as this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="abap"&gt;  &amp;lt;xsl:param name="CASE" sap:type="ZIF_ABAP_CASE"/&amp;gt;

  &amp;lt;xsl:template match="@name"&amp;gt;
    &amp;lt;xsl:attribute name="name"&amp;gt;
      &amp;lt;xsl:value-of select="f:fromAbap($CASE,string(.))"/&amp;gt;
    &amp;lt;/xsl:attribute&amp;gt;
  &amp;lt;/xsl:template&amp;gt;

  &amp;lt;sap:external-function name="f:fromAbap" method="FROM_ABAP"  kind="instance" &amp;gt;
    &amp;lt;sap:argument param="VALUE" type="csequence"/&amp;gt;
    &amp;lt;sap:result param="RESULT" type="string"/&amp;gt;
  &amp;lt;/sap:external-function&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course this is just one of examples, but that's still not clear why.. I'd wish this functionality to be available back in the cloud too&lt;/P&gt;&lt;P&gt;Is there anybody from &lt;LI-PRODUCT title="ABAP Cloud" id="9ada5ac7-3f77-49de-b5c9-9019df1d1e09"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;team who can explain why it was revoked&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 12:45:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaq-p/14023624</guid>
      <dc:creator>Petr_Plenkov</dc:creator>
      <dc:date>2025-02-21T12:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why sap:external-function is not allowed in the Cloud?</title>
      <link>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14023761#M4904514</link>
      <description>&lt;P&gt;OK seems like&amp;nbsp;&lt;SPAN&gt;sap:call-external is still allowed. Small adjustment of the code helped to keep transformation almost same, but still required modification&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 13:26:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14023761#M4904514</guid>
      <dc:creator>Petr_Plenkov</dc:creator>
      <dc:date>2025-02-21T13:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why sap:external-function is not allowed in the Cloud?</title>
      <link>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14023927#M4904536</link>
      <description>Thanks for the feedback. Could you say more about the adjustment needed?</description>
      <pubDate>Fri, 21 Feb 2025 15:39:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14023927#M4904536</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2025-02-21T15:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why sap:external-function is not allowed in the Cloud?</title>
      <link>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14024450#M4904576</link>
      <description>I mean that mentioned above code doesn't work. It says class is not alllowed. But this works</description>
      <pubDate>Sat, 22 Feb 2025 16:55:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14024450#M4904576</guid>
      <dc:creator>Petr_Plenkov</dc:creator>
      <dc:date>2025-02-22T16:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why sap:external-function is not allowed in the Cloud?</title>
      <link>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14024451#M4904577</link>
      <description>&amp;lt;!-- Transform &lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1407015"&gt;@name&lt;/a&gt; attributes using sap:call-external --&amp;gt; &amp;lt;xsl:template match="@name"&amp;gt; &amp;lt;sap:call-external name="CASE" method="FROM_ABAP"&amp;gt; &amp;lt;sap:callvalue param="VALUE" select="string(.)"/&amp;gt; &amp;lt;sap:callvariable param="RESULT" name="convertedName"/&amp;gt; &amp;lt;/sap:call-external&amp;gt; &amp;lt;xsl:attribute name="name"&amp;gt; &amp;lt;xsl:value-of select="$convertedName"/&amp;gt; &amp;lt;/xsl:attribute&amp;gt; &amp;lt;/xsl:template&amp;gt;</description>
      <pubDate>Sat, 22 Feb 2025 16:56:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14024451#M4904577</guid>
      <dc:creator>Petr_Plenkov</dc:creator>
      <dc:date>2025-02-22T16:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why sap:external-function is not allowed in the Cloud?</title>
      <link>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14024541#M4904586</link>
      <description>&lt;P&gt;The cloud environment restricts such direct ABAP calls for security and architectural reasons&lt;/P&gt;&lt;P&gt;Use ABAP Class-Based XSLT Transformation&lt;BR /&gt;If you must use XSLT, you can pass additional parameters to the transformation via ABAP.&lt;/P&gt;&lt;P&gt;Another alternative approach&lt;BR /&gt;Preprocess Data in ABAP before XSLT&lt;BR /&gt;Modify your code to process data before calling XSLT, so you don’t need sap:external-function.&lt;/P&gt;&lt;P&gt;ABAP Code:&lt;BR /&gt;DATA:&lt;BR /&gt;lt_xml_input TYPE string,&lt;BR /&gt;lt_xml_output TYPE string,&lt;BR /&gt;lo_transform TYPE REF TO cl_transformation.&lt;/P&gt;&lt;P&gt;DATA(lo_case) = NEW zif_abap_case( ). " your custok class instance&lt;BR /&gt;DATA(lv_transformed_value) = lo_case-&amp;gt;from_abap( 'OriginalValue' ).&lt;/P&gt;&lt;P&gt;lt_xml_input = `&amp;lt;root name="` &amp;amp;&amp;amp; lv_transformed_value &amp;amp;&amp;amp; `"&amp;gt;&amp;lt;/root&amp;gt;`.&lt;/P&gt;&lt;P&gt;" Apply XSLT transformation&lt;BR /&gt;CREATE OBJECT lo_transform TYPE ('ZMY_TRANSFORMATION').&lt;BR /&gt;lo_transform-&amp;gt;call_transformation(&lt;BR /&gt;EXPORTING input = lt_xml_input&lt;BR /&gt;IMPORTING output = lt_xml_output&lt;BR /&gt;).&lt;BR /&gt;Processes data before XSLT execution and this works in the Cloud&lt;BR /&gt;Hope this helps. &lt;EM&gt;Cheers!!&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2025 23:05:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14024541#M4904586</guid>
      <dc:creator>RemiKaimal</dc:creator>
      <dc:date>2025-02-22T23:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why sap:external-function is not allowed in the Cloud?</title>
      <link>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14024819#M4904596</link>
      <description>&lt;P&gt;Or use&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;sap:call-external ...&amp;gt;
  ...
&amp;lt;/sap:call-external&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;as explained by the post author.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2025 10:20:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14024819#M4904596</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2025-02-23T10:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Why sap:external-function is not allowed in the Cloud?</title>
      <link>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14024932#M4904601</link>
      <description>well - the task behind this question - is to build an effective JSON serializer, parser ( may be even with XML too ). Of course - I can build JSON, load it to sXML model and transform - but that's something I want actually to avoid to do. performance wise transformations work much faster. So this question was not about how to do this - it was mainly a call - that again after hundreds of different reasons we cannot run in a cloud ABAP something which was working for decades.. Personally I do not see a difference between sap:call-external or sap:external-function and changing the code made it working exactly same way. But still - this is the manual action which has to be done to keep transformation working. Additionally as you can see in the shared link - i took it from the official documentation. &lt;A href="https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abenabap_xslt_abap_calls.html" target="_blank"&gt;https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abenabap_xslt_abap_calls.html&lt;/A&gt;. So it means that I want to use something which is documented - but ADT doesn't even allow to compile..</description>
      <pubDate>Sun, 23 Feb 2025 13:45:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/why-sap-external-function-is-not-allowed-in-the-cloud/qaa-p/14024932#M4904601</guid>
      <dc:creator>Petr_Plenkov</dc:creator>
      <dc:date>2025-02-23T13:45:05Z</dc:date>
    </item>
  </channel>
</rss>

