<?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 abap statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/2321763#M509782</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i have to write a statement in abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where i need to extract data from REGUH and PAYR table comparing company code, housebank and few more conditions.&lt;/P&gt;&lt;P&gt; even if there are no records in PAYR we have to extract the records from REGUH.&lt;/P&gt;&lt;P&gt;PAYR entries will be empty then.&lt;/P&gt;&lt;P&gt;that means if there are 10 records in REGUH and 5 records in PAYR.&lt;/P&gt;&lt;P&gt;all 5 records in payr have key field in REGUH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10 entries should be extracted. 5 wiht combination of REGUh and PAYR other 5 wihtout cmbination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the query i wrote pls check it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT   a&lt;SUB&gt;zbukr  a&lt;/SUB&gt;hbkid a&lt;SUB&gt;hktid a&lt;/SUB&gt;vblnr&lt;/P&gt;&lt;P&gt;           a&lt;SUB&gt;zaldt  a&lt;/SUB&gt;znme1 a&lt;SUB&gt;rwbtr a&lt;/SUB&gt;ubhkt&lt;/P&gt;&lt;P&gt;           a&lt;SUB&gt;waers  a&lt;/SUB&gt;zbnkl a~rzawe&lt;/P&gt;&lt;P&gt;           b&lt;SUB&gt;chect  b&lt;/SUB&gt;checf b~gjahr&lt;/P&gt;&lt;P&gt;     INTO  CORRESPONDING FIELDS OF TABLE itreguh&lt;/P&gt;&lt;P&gt;     FROM reguh AS a&lt;/P&gt;&lt;P&gt;     LEFT OUTER JOIN payr AS b&lt;/P&gt;&lt;P&gt;     ON a&lt;SUB&gt;vblnr = b&lt;/SUB&gt;vblnr&lt;/P&gt;&lt;P&gt;     AND   a&lt;SUB&gt;zbukr = b&lt;/SUB&gt;zbukr&lt;/P&gt;&lt;P&gt;     AND   a&lt;SUB&gt;hbkid = b&lt;/SUB&gt;hbkid&lt;/P&gt;&lt;P&gt;     AND   a&lt;SUB&gt;hktid = b&lt;/SUB&gt;hktid&lt;/P&gt;&lt;P&gt;     WHERE a~zbukr = cmp_code&lt;/P&gt;&lt;P&gt;     AND   a~hbkid = hse_bank&lt;/P&gt;&lt;P&gt;     AND   a~hktid = acc_id&lt;/P&gt;&lt;P&gt;     AND   a~vblnr &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;  DELETE ADJACENT DUPLICATES FROM itreguh COMPARING chect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jun 2007 01:54:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-08T01:54:10Z</dc:date>
    <item>
      <title>abap statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/2321763#M509782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i have to write a statement in abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where i need to extract data from REGUH and PAYR table comparing company code, housebank and few more conditions.&lt;/P&gt;&lt;P&gt; even if there are no records in PAYR we have to extract the records from REGUH.&lt;/P&gt;&lt;P&gt;PAYR entries will be empty then.&lt;/P&gt;&lt;P&gt;that means if there are 10 records in REGUH and 5 records in PAYR.&lt;/P&gt;&lt;P&gt;all 5 records in payr have key field in REGUH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10 entries should be extracted. 5 wiht combination of REGUh and PAYR other 5 wihtout cmbination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the query i wrote pls check it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT   a&lt;SUB&gt;zbukr  a&lt;/SUB&gt;hbkid a&lt;SUB&gt;hktid a&lt;/SUB&gt;vblnr&lt;/P&gt;&lt;P&gt;           a&lt;SUB&gt;zaldt  a&lt;/SUB&gt;znme1 a&lt;SUB&gt;rwbtr a&lt;/SUB&gt;ubhkt&lt;/P&gt;&lt;P&gt;           a&lt;SUB&gt;waers  a&lt;/SUB&gt;zbnkl a~rzawe&lt;/P&gt;&lt;P&gt;           b&lt;SUB&gt;chect  b&lt;/SUB&gt;checf b~gjahr&lt;/P&gt;&lt;P&gt;     INTO  CORRESPONDING FIELDS OF TABLE itreguh&lt;/P&gt;&lt;P&gt;     FROM reguh AS a&lt;/P&gt;&lt;P&gt;     LEFT OUTER JOIN payr AS b&lt;/P&gt;&lt;P&gt;     ON a&lt;SUB&gt;vblnr = b&lt;/SUB&gt;vblnr&lt;/P&gt;&lt;P&gt;     AND   a&lt;SUB&gt;zbukr = b&lt;/SUB&gt;zbukr&lt;/P&gt;&lt;P&gt;     AND   a&lt;SUB&gt;hbkid = b&lt;/SUB&gt;hbkid&lt;/P&gt;&lt;P&gt;     AND   a&lt;SUB&gt;hktid = b&lt;/SUB&gt;hktid&lt;/P&gt;&lt;P&gt;     WHERE a~zbukr = cmp_code&lt;/P&gt;&lt;P&gt;     AND   a~hbkid = hse_bank&lt;/P&gt;&lt;P&gt;     AND   a~hktid = acc_id&lt;/P&gt;&lt;P&gt;     AND   a~vblnr &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;  DELETE ADJACENT DUPLICATES FROM itreguh COMPARING chect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 01:54:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/2321763#M509782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T01:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: abap statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/2321764#M509783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi jeff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of &amp;lt;b&amp;gt;inner join&amp;lt;/b&amp;gt; u can use &amp;lt;b&amp;gt;for all enries&amp;lt;/b&amp;gt; here,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;select * from REGUH into &amp;lt;itab&amp;gt; where bukrs in s_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not &amp;lt;itab&amp;gt; is initial.&lt;/P&gt;&lt;P&gt;select * from PAYR into &amp;lt;itab1&amp;gt; for all entries in &amp;lt;itab&amp;gt; where bukrs = &amp;lt;itab&amp;gt;-bukrs and other coditions.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in loop u can move all these field into global &amp;lt;itab&amp;gt; and disply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;seshu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 05:36:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/2321764#M509783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T05:36:09Z</dc:date>
    </item>
  </channel>
</rss>

