<?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 Reading texts based on logon language in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-texts-based-on-logon-language/m-p/11629648#M1942275</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I have a requirement where I need to get short text based on the logon language.&lt;/P&gt;&lt;P&gt;If the text is not maintained in logon language, then I need fetch it from English language.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider&amp;nbsp; a join between MARA and MAKT.&lt;/P&gt;&lt;P&gt;In Table MAKT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;MATNR&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;SPRAS&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;MAKTX&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;DE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Test1-DE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;EN&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Test1-EN&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;EN&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Test2-EN&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the logon language in DE,&lt;/P&gt;&lt;P&gt;For material 1 there is text in language DE, so the output should to be Test1-DE&lt;/P&gt;&lt;P&gt;For material 2 there is no text in language DE, so the output should be from EN language Test2-EN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use left outer join , but that gives few records with empty text or text in both languages, which we can later delete them.&lt;/P&gt;&lt;P&gt;And there are lot of other ways by which we can refine the internal table after the select is performed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am looking for, is there any way we can do it in select query itself, considering &lt;SPAN style="font-size: 10pt;"&gt;new advancements in ABAP open SQL and CDS views.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;Sandeep Akella&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 May 2016 05:40:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-05-17T05:40:46Z</dc:date>
    <item>
      <title>Reading texts based on logon language</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-texts-based-on-logon-language/m-p/11629648#M1942275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I have a requirement where I need to get short text based on the logon language.&lt;/P&gt;&lt;P&gt;If the text is not maintained in logon language, then I need fetch it from English language.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider&amp;nbsp; a join between MARA and MAKT.&lt;/P&gt;&lt;P&gt;In Table MAKT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;MATNR&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;SPRAS&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;MAKTX&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;DE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Test1-DE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;EN&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Test1-EN&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;EN&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Test2-EN&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the logon language in DE,&lt;/P&gt;&lt;P&gt;For material 1 there is text in language DE, so the output should to be Test1-DE&lt;/P&gt;&lt;P&gt;For material 2 there is no text in language DE, so the output should be from EN language Test2-EN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use left outer join , but that gives few records with empty text or text in both languages, which we can later delete them.&lt;/P&gt;&lt;P&gt;And there are lot of other ways by which we can refine the internal table after the select is performed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am looking for, is there any way we can do it in select query itself, considering &lt;SPAN style="font-size: 10pt;"&gt;new advancements in ABAP open SQL and CDS views.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;Sandeep Akella&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 05:40:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-texts-based-on-logon-language/m-p/11629648#M1942275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-17T05:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading texts based on logon language</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-texts-based-on-logon-language/m-p/11629649#M1942276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandeep Akella,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is a typical use case for the function COALESCE. &lt;/P&gt;&lt;P&gt;You do two left out outer joins (one per language) and combine the two results with COALESCE&lt;/P&gt;&lt;P&gt;e.g. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select from MARA &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left outer join MAKT as MAKT_EN&amp;nbsp; on MARA.MATNR = MAKT_EN.MATNR and MAKT_EN.SPRAS = 'E'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left outer join MAKT as MAKT_DE&amp;nbsp; on MARA.MATNR = MAKT_EN.MATNR and MAKT_EN.SPRAS = 'D'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key MATNR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coalesce( MAKT_DE.MAKTX, MAKT_EN.MAKTX ) as Text&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function is available both in CDS and OpenSQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition you can use a parameter instead of a literal for your logon language.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards, Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 08:11:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-texts-based-on-logon-language/m-p/11629649#M1942276</guid>
      <dc:creator>thomasgauweiler</dc:creator>
      <dc:date>2016-05-17T08:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Reading texts based on logon language</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-texts-based-on-logon-language/m-p/11629650#M1942277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Thomas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 09:45:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-texts-based-on-logon-language/m-p/11629650#M1942277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-17T09:45:14Z</dc:date>
    </item>
  </channel>
</rss>

