<?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: Looking for help with new Open SQL Features in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481219#M15835</link>
    <description>&lt;P&gt;Yes, a better use case would probably be if you had more than 2 languages to search for and a defined priority.&lt;/P&gt;
  &lt;P&gt;Btw: Is there a generic function module for getting localized texts from text tables with a defined priority regarding languages? I'd assume there is because dynpros need to get their localized labels somehow but I didn't find it yet.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jul 2017 07:33:44 GMT</pubDate>
    <dc:creator>fabianlupa</dc:creator>
    <dc:date>2017-07-14T07:33:44Z</dc:date>
    <item>
      <title>Looking for help with new Open SQL Features</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481215#M15831</link>
      <description>&lt;P&gt;I want to return the material description in the user's logon language. If it doesn't exist return the English version. The following works, it seems with the new features available (we are on 7.5) there should be a more elegant solution. Any ideas ?&lt;/P&gt;
  &lt;P&gt;SELECT mara~matnr,&lt;BR /&gt; CASE WHEN lng~maktx IS NOT NULL THEN lng~maktx&lt;BR /&gt; ELSE eng~maktx&lt;BR /&gt; END AS desc&lt;BR /&gt; FROM mara&lt;BR /&gt; LEFT OUTER JOIN makt AS eng&lt;BR /&gt; ON eng~matnr = mara~matnr&lt;BR /&gt; AND eng~spras = 'E'&lt;BR /&gt; LEFT OUTER JOIN makt AS lng&lt;BR /&gt; ON lng~matnr = mara~matnr&lt;BR /&gt; AND lng~spras = @sy-langu&lt;BR /&gt; WHERE mara~matnr IN @s_matnr&lt;BR /&gt; INTO TABLE @DATA(m).&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 16:17:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481215#M15831</guid>
      <dc:creator>ron_mitton</dc:creator>
      <dc:date>2017-07-13T16:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for help with new Open SQL Features</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481216#M15832</link>
      <description>&lt;P&gt;Not sure if there's something on 7.50. On 7.51 CTEs might be useful for this:&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://blogs.sap.com/2016/10/18/abap-news-release-7.51-common-table-expressions-cte-open-sql/" target="test_blank"&gt;https://blogs.sap.com/2016/10/18/abap-news-release-7.51-common-table-expressions-cte-open-sql/&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;I don't have access to a 7.51 system but I assume something along those lines should work?&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;WITH
  +texts AS (
    SELECT ktext, CASE WHEN langu = 'E' THEN 2 ELSE 1 END AS order
      FROM tcurt
      UP TO 1 ROWS
      WHERE spras IN ('E', @sy-langu )
      ORDER BY order ASCENDING
  )
  SELECT tcurc~waers, t~ktext
    FROM tcurc
    LEFT OUTER JOIN +texts AS t ON tcurc~waers = t~waers
    INTO TABLE @DATA(gt_waers).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jul 2017 19:41:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481216#M15832</guid>
      <dc:creator>fabianlupa</dc:creator>
      <dc:date>2017-07-13T19:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for help with new Open SQL Features</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481217#M15833</link>
      <description>&lt;P&gt;More elegant? Hello, in SQL? &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 20:07:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481217#M15833</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-07-13T20:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for help with new Open SQL Features</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481218#M15834</link>
      <description>&lt;P&gt;Yep, but is it more elegant if you can express it in joins anyway? Maybe a bit more readable. I guess the value of CTEs comes in, when you do things that are not possible with joins alone, e.g. unions in the subqueries.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 20:10:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481218#M15834</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-07-13T20:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for help with new Open SQL Features</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481219#M15835</link>
      <description>&lt;P&gt;Yes, a better use case would probably be if you had more than 2 languages to search for and a defined priority.&lt;/P&gt;
  &lt;P&gt;Btw: Is there a generic function module for getting localized texts from text tables with a defined priority regarding languages? I'd assume there is because dynpros need to get their localized labels somehow but I didn't find it yet.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 07:33:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481219#M15835</guid>
      <dc:creator>fabianlupa</dc:creator>
      <dc:date>2017-07-14T07:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for help with new Open SQL Features</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481220#M15836</link>
      <description>&lt;P&gt;I don't know of any. I assume that for dynpros and ABAP it is implemented in the kernel.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 07:44:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481220#M15836</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-07-14T07:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for help with new Open SQL Features</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481221#M15837</link>
      <description>&lt;P&gt;The only thing that I can think of is replacing case/when with coalesce.&lt;/P&gt;
  &lt;P&gt; Something like&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/54261-xu7bj.png" /&gt;&lt;/P&gt;
  &lt;P&gt; Sathya&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 09:26:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481221#M15837</guid>
      <dc:creator>Sathya_Gunasekaran</dc:creator>
      <dc:date>2017-07-14T09:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for help with new Open SQL Features</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481222#M15838</link>
      <description>&lt;P&gt;I've the same question.&lt;BR /&gt;&lt;BR /&gt;And also, in step 2, I want to read some description, and exactly one.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 14:08:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-help-with-new-open-sql-features/m-p/481222#M15838</guid>
      <dc:creator>jrgen_bauer</dc:creator>
      <dc:date>2022-04-08T14:08:02Z</dc:date>
    </item>
  </channel>
</rss>

