<?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: SQL Function while fetching data from SAP in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331719#M1230588</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two suggestions.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;You can create a View at SQL level, where you apply the RIGHT function.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. Use the RIGHT function within your Load script, and save it to a QVD. Then perform the sub query on the&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QVD. This option is probably the simplest and by far the most recommended.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 May 2017 11:13:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-12T11:13:18Z</dc:date>
    <item>
      <title>SQL Function while fetching data from SAP</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331714#M1230582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it Possible to use sql function or Open SQL function while fetching data from SAP.&lt;/P&gt;&lt;P&gt;I want to load 6 digits from right side of a particular columns in SAP while fetching the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: Suppose a row in &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;TABKEY &lt;/STRONG&gt;&lt;/SPAN&gt;field&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;have a value &lt;STRONG&gt;1010100000123456&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OUTPUT : &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;123456&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want achieve this in SQL Select statement as i have to write sub query based on this select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[CDPOS]:&amp;nbsp; // Change document items&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; [TABNAME] as [Table_TABNAME],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [MANDANT] as [Client_MANDANT],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [OBJECTCLAS] as [Object_OBJECTCLAS],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [CHANGENR] as [Doc. no._CHANGENR],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [VALUE_OLD] as [Old value_VALUE_OLD],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [VALUE_NEW] as [New value_VALUE_NEW],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [CHNGIND] as [ChangeInd._CHNGIND],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [TEXT_CASE] as [Text flag_TEXT_CASE],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [UNIT_OLD] as [Unit_UNIT_OLD],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [UNIT_NEW] as [Unit_UNIT_NEW],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [CUKY_OLD] as [CUKY_CUKY_OLD],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [CUKY_NEW] as [CUKY_CUKY_NEW],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [_DATAAGING] as [__DATAAGING],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FNAME] as [Field_FNAME],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [OBJECTID] as [Obj. value_OBJECTID],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [OBJECTID] as [Sales Doc._VBELN],&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; [TABKEY] as [Table Key_TABKEY],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp; POSNR&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;SQL Select FNAME TABNAME MANDANT OBJECTID OBJECTCLAS CHANGENR VALUE_OLD VALUE_NEW CHNGIND TEXT_CASE UNIT_OLD UNIT_NEW CUKY_OLD CUKY_NEW _DATAAGING TABKEY &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;substr(TABKEY,6,6) AS POSNR&lt;/STRONG&gt;&lt;/SPAN&gt; from CDPOS&lt;/P&gt;&lt;P&gt;WHERE&amp;nbsp; TABNAME = 'VBAP' AND CHNGIND = 'D';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried with SAPSQL connector still not getting the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/15334" target="_blank"&gt;yfe&lt;/A&gt;‌ &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/57667"&gt;@Thomas&lt;/a&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 21:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331714#M1230582</guid>
      <dc:creator>mohsinqlik</dc:creator>
      <dc:date>2026-01-26T21:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Function while fetching data from SAP</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331715#M1230584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you could do it within the preceeding-part, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[CDPOS]:&amp;nbsp; // Change document items&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; [TABNAME] as [Table_TABNAME],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [MANDANT] as [Client_MANDANT],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [OBJECTCLAS] as [Object_OBJECTCLAS],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [CHANGENR] as [Doc. no._CHANGENR],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [VALUE_OLD] as [Old value_VALUE_OLD],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [VALUE_NEW] as [New value_VALUE_NEW],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [CHNGIND] as [ChangeInd._CHNGIND],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [TEXT_CASE] as [Text flag_TEXT_CASE],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [UNIT_OLD] as [Unit_UNIT_OLD],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [UNIT_NEW] as [Unit_UNIT_NEW],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [CUKY_OLD] as [CUKY_CUKY_OLD],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [CUKY_NEW] as [CUKY_CUKY_NEW],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [_DATAAGING] as [__DATAAGING],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [FNAME] as [Field_FNAME],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [OBJECTID] as [Obj. value_OBJECTID],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [OBJECTID] as [Sales Doc._VBELN],&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; [TABKEY] as [Table Key_TABKEY],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp; right(&lt;SPAN style="font-size: 10pt;"&gt;[TABKEY], 6) as &lt;/SPAN&gt;POSNR&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;SQL Select FNAME TABNAME MANDANT OBJECTID OBJECTCLAS CHANGENR VALUE_OLD VALUE_NEW CHNGIND TEXT_CASE UNIT_OLD UNIT_NEW CUKY_OLD CUKY_NEW _DATAAGING TABKEY &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG style="text-decoration: line-through;"&gt;substr(TABKEY,6,6) AS POSNR&lt;/STRONG&gt;&lt;/SPAN&gt; from CDPOS&lt;/P&gt;&lt;P&gt;WHERE&amp;nbsp; TABNAME = 'VBAP' AND CHNGIND = 'D';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 08:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331715#M1230584</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-05-12T08:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Function while fetching data from SAP</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331716#M1230585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For fetching the a specific number of characters from any field, directly from the left or right there are two functions.&lt;/P&gt;&lt;P&gt;LEFT(fieldName, numCharacters)&lt;/P&gt;&lt;P&gt;RIGHT(fieldName, numCharacters)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case it would be:&lt;BR /&gt;RIGHT([TABKEY],6)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FieldName is TABKEY and numcharacters in from the right is 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 08:48:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331716#M1230585</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-12T08:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Function while fetching data from SAP</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331717#M1230586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your swift response.&lt;/P&gt;&lt;P&gt;I am aware that right function can be used in Preceding load.&lt;/P&gt;&lt;P&gt;What i am trying to know is whether we can achieve it with SQL or open SQL function while parsing query to SAP server, as i need to write a sub query based on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 09:34:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331717#M1230586</guid>
      <dc:creator>mohsinqlik</dc:creator>
      <dc:date>2017-05-12T09:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Function while fetching data from SAP</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331718#M1230587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have no SAP backend-knowledge but I think there are like in other SQL system various string-functions to do this job. Beside searching here in the various SAP groups or more global per google you could also build a small dummy-load of one or two fields with a where-clause and/or a First /Top statement and trying which functions of left/right/mid ... are known.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 10:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331718#M1230587</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-05-12T10:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Function while fetching data from SAP</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331719#M1230588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two suggestions.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;You can create a View at SQL level, where you apply the RIGHT function.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. Use the RIGHT function within your Load script, and save it to a QVD. Then perform the sub query on the&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QVD. This option is probably the simplest and by far the most recommended.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 11:13:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331719#M1230588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-12T11:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Function while fetching data from SAP</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331720#M1230589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks markus and matthew for giving your inputs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 11:25:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Function-while-fetching-data-from-SAP/m-p/1331720#M1230589</guid>
      <dc:creator>mohsinqlik</dc:creator>
      <dc:date>2017-05-12T11:25:58Z</dc:date>
    </item>
  </channel>
</rss>

