<?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: Problem with a Query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-a-query/m-p/12738456#M2020913</link>
    <description>&lt;P&gt;Can you replace&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AND   t~zmwsk &amp;lt;&amp;gt; '' &lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;by&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AND   t~zmwsk IS NOT INITIAL&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or try to comment out the line and see if it works then.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2023 12:59:10 GMT</pubDate>
    <dc:creator>thkolz</dc:creator>
    <dc:date>2023-08-11T12:59:10Z</dc:date>
    <item>
      <title>Problem with a Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-a-query/m-p/12738455#M2020912</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;
  &lt;P&gt;I have a task and a Query that I've made to it but somehow it doesn't fill requirements, can you spot the mistake here? All what i need to do is filter the tax codes from those tables and based on that, fetch the data from BSEG/BSET table (which works fine) so my guess is, that my query for identyfing particular tax codes doesn't work.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;       SELECT t~mwskz,tk~konts&lt;BR /&gt;&lt;BR /&gt;      FROM t007a AS t&lt;BR /&gt;      INNER JOIN a003 AS a ON&lt;BR /&gt;      t~mwskz = a~mwskz&lt;BR /&gt;&lt;BR /&gt;      INNER JOIN t683s AS ts ON&lt;BR /&gt;      a~kschl = ts~kschl&lt;BR /&gt;&lt;BR /&gt;      INNER JOIN t030k AS tk ON&lt;BR /&gt;      ts~kvsl1 = tk~ktosl AND&lt;BR /&gt;      t~mwskz  = tk~mwskz&lt;BR /&gt;&lt;BR /&gt;       WHERE t~kalsm = 'TAXUS'&lt;BR /&gt;       AND   t~mwart = 'V'&lt;BR /&gt;       AND   t~zmwsk &amp;lt;&amp;gt; '' &lt;BR /&gt;       AND   a~kappl = 'TX' AND a~aland = 'US'&lt;BR /&gt;       AND    ts~kappl = 'TX' AND ts~kalsm = 'TAXUS'&lt;BR /&gt;       AND   tk~ktopl = 'CXDE'&lt;BR /&gt;      INTO CORRESPONDING FIELDS OF TABLE @it_tax_codes.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;requirements:&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;STEP I – identification of CAM tax codes (T007A-MWSKZ):&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;• T007A-KALSM = TAXRO&lt;/P&gt;
  &lt;P&gt;• T007-MWART = V&lt;/P&gt;
  &lt;P&gt;• T007A-ZMWSK &amp;lt;&amp;gt; empty&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;STEP II – identification of G/L accounts&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;o &lt;STRONG&gt;Table A003-KSCHL – to obtain condition types (more than one for one tax code possible!)&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt; Application (KAPPL) = TX&lt;/P&gt;
  &lt;P&gt; Country (ALAND) = US&lt;/P&gt;
  &lt;P&gt; Tax code (MWSKZ) = T007A-MWSKZ&lt;/P&gt;
  &lt;P&gt; &lt;STRONG&gt;Table T683S-KVSL1 – to obtain account key.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt; Application (KAPPL) = TX&lt;/P&gt;
  &lt;P&gt; Procedure (KALSM) = TAXUS&lt;/P&gt;
  &lt;P&gt; Condition type (KSCHL) = A003-KSCHL&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt; Table T030K-KONTS – to obtain G/L accounts.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt; Processing key (KTOSL) = T683S-KVSL1&lt;/P&gt;
  &lt;P&gt; Chart of accounts (KTOPL) = CXDE&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 12:07:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-a-query/m-p/12738455#M2020912</guid>
      <dc:creator>sadasgreg</dc:creator>
      <dc:date>2023-08-11T12:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-a-query/m-p/12738456#M2020913</link>
      <description>&lt;P&gt;Can you replace&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AND   t~zmwsk &amp;lt;&amp;gt; '' &lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;by&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AND   t~zmwsk IS NOT INITIAL&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or try to comment out the line and see if it works then.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 12:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-a-query/m-p/12738456#M2020913</guid>
      <dc:creator>thkolz</dc:creator>
      <dc:date>2023-08-11T12:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-a-query/m-p/12738457#M2020914</link>
      <description>&lt;P&gt;Thanks for Your comment, actually i tried both and i've got same result. Initially, before i wrote this post i had :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AND   t~zmwsk IS NOT INITIAL&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I was thinking to split this query and start with: fetching only mwskz field from t007a table and after that fetch gl accounts from t030k table but as far as i know, the result should be the same as this query anyway. Another part of the program that fetch the data based on Query i've wrote initially looks like this: &lt;/P&gt;&lt;P&gt;so_bukrs, p_monat are parameters taken from selection screen (works fine and show correct values):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    SELECT  bs~gjahr, bs~bukrs,bs~belnr,bs~h_bldat,&lt;BR /&gt;            bs~h_budat, bt~mwskz,bt~hwbas, bt~hwste,&lt;BR /&gt;            bt~fwste, bt~fwbas, bs~hkont&lt;BR /&gt;&lt;BR /&gt;    FROM bseg AS bs&lt;BR /&gt;&lt;BR /&gt;    INNER JOIN bset AS bt ON&lt;BR /&gt;    bs~bukrs = bt~bukrs AND&lt;BR /&gt;    bs~belnr = bt~belnr AND&lt;BR /&gt;    bs~gjahr = bt~gjahr&lt;BR /&gt;&lt;BR /&gt;    INNER JOIN @it_tax_codes AS i ON&lt;BR /&gt;    bs~mwskz = i~mwskz  AND&lt;BR /&gt;    bs~hkont = i~konts&lt;BR /&gt;&lt;BR /&gt;   WHERE bs~bukrs IN @so_bukrs&lt;BR /&gt;   AND   bt~bukrs IN @so_bukrs&lt;BR /&gt;   AND h_monat EQ @p_monat&lt;BR /&gt;   AND bs~gjahr EQ @p_gjahr&lt;BR /&gt;   AND ( bs~augdt IS INITIAL  OR  bs~augdt &amp;gt; @ld_newdate )
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Aug 2023 13:53:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-a-query/m-p/12738457#M2020914</guid>
      <dc:creator>sadasgreg</dc:creator>
      <dc:date>2023-08-11T13:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-a-query/m-p/12738458#M2020915</link>
      <description>&lt;P&gt;If X is a character column, X IS NOT INITIAL (which exists since 7.53) is equivalent to X &amp;lt;&amp;gt; ''.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2023 11:27:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-a-query/m-p/12738458#M2020915</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-08-12T11:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-a-query/m-p/12738459#M2020916</link>
      <description>&lt;P&gt;Your "query doesn't work", sorry but what "doesn't work" exactly? (provide actual data versus expected data)&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2023 15:55:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-a-query/m-p/12738459#M2020916</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-08-12T15:55:04Z</dc:date>
    </item>
  </channel>
</rss>

