<?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: access different database tables using single select statemetnt in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-different-database-tables-using-single-select-statemetnt/m-p/2262970#M490736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use joins for selecting fields frommultiple tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward with points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Vinutha YV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 May 2007 06:20:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-18T06:20:37Z</dc:date>
    <item>
      <title>access different database tables using single select statemetnt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-different-database-tables-using-single-select-statemetnt/m-p/2262967#M490733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how can i access different database tables in single select statemetn where the two tables do not have a primary key.&lt;/P&gt;&lt;P&gt;please give me a sample code for it. Actually i want to access different tables through the fields specified in the selection screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 04:18:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-different-database-tables-using-single-select-statemetnt/m-p/2262967#M490733</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T04:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: access different database tables using single select statemetnt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-different-database-tables-using-single-select-statemetnt/m-p/2262968#M490734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;By using Joins between the tables we can access  more number of tables in a single select&lt;/P&gt;&lt;P&gt;But the tables should have some linked/connecting fields between them, not exactly the primary key fields&lt;/P&gt;&lt;P&gt;see the sample code using joins&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;        a~vbeln                   " Billing Doc Number&lt;/P&gt;&lt;P&gt;        a~fktyp                   " Billing Category&lt;/P&gt;&lt;P&gt;        a~vbtyp                   " Sales Doc category&lt;/P&gt;&lt;P&gt;        a~fkdat                   " Billing doc date&lt;/P&gt;&lt;P&gt;        a~fkart                   " Billing doc type&lt;/P&gt;&lt;P&gt;        a~bukrs                   " Company code&lt;/P&gt;&lt;P&gt;        a~kurrf                   " Exchange rate&lt;/P&gt;&lt;P&gt;        a~knumv                   " Condition record Number&lt;/P&gt;&lt;P&gt;        a~waerk                   " Currency&lt;/P&gt;&lt;P&gt;        a~kunag                   " Sold to Party&lt;/P&gt;&lt;P&gt;        b~vrkme                   " Sales Unit&lt;/P&gt;&lt;P&gt;        b~posnr                   " Item Number&lt;/P&gt;&lt;P&gt;        b~charg                   " Batch Number&lt;/P&gt;&lt;P&gt;        b~fkimg                   " Billed quantity&lt;/P&gt;&lt;P&gt;        b~werks                   " Plant&lt;/P&gt;&lt;P&gt;        b~matnr                   " Material Number&lt;/P&gt;&lt;P&gt;        b~netwr                   " Net Value of Bill Doc&lt;/P&gt;&lt;P&gt;        b~wavwr                   " Cost in Doc Currency&lt;/P&gt;&lt;P&gt;        c~kdmat                   " Customer Material&lt;/P&gt;&lt;P&gt;                 into table itab_bill&lt;/P&gt;&lt;P&gt;                 from vbrk as a join vbrp as b&lt;/P&gt;&lt;P&gt;                        on b&lt;SUB&gt;vbeln = a&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;                        join vbap as c&lt;/P&gt;&lt;P&gt;                        on b&lt;SUB&gt;aubel = c&lt;/SUB&gt;vbeln and&lt;/P&gt;&lt;P&gt;                           b&lt;SUB&gt;aupos = c&lt;/SUB&gt;posnr&lt;/P&gt;&lt;P&gt;                  where a~vbeln in s_vbeln and&lt;/P&gt;&lt;P&gt;                        a~fkdat in s_fkdat and&lt;/P&gt;&lt;P&gt;                        a~bukrs in s_bukrs and&lt;/P&gt;&lt;P&gt;                        a~vtweg in s_vtweg and&lt;/P&gt;&lt;P&gt;                        a~vkorg in s_vkorg and&lt;/P&gt;&lt;P&gt;                        a~spart in s_spart and&lt;/P&gt;&lt;P&gt;                        a~fkart in s_fkart and&lt;/P&gt;&lt;P&gt;                        b~werks in s_werks and&lt;/P&gt;&lt;P&gt;                        a~kunag in s_kunag and&lt;/P&gt;&lt;P&gt;                        a~sfakn eq ' ' and&lt;/P&gt;&lt;P&gt;                        a~fksto eq ' ' .&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 04:22:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-different-database-tables-using-single-select-statemetnt/m-p/2262968#M490734</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T04:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: access different database tables using single select statemetnt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-different-database-tables-using-single-select-statemetnt/m-p/2262969#M490735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Check this,&lt;/P&gt;&lt;P&gt; SELECT-OPTIONS:&lt;/P&gt;&lt;P&gt;      s_matnr FOR mara-matnr,&lt;/P&gt;&lt;P&gt;      s_werks FOR ekpo-werks,&lt;/P&gt;&lt;P&gt;      s_lifnr FOR ekko-lifnr OBLIGATORY,&lt;/P&gt;&lt;P&gt;      s_ekorg FOR ekko-ekorg OBLIGATORY,&lt;/P&gt;&lt;P&gt;      s_ekgrp FOR ekko-ekgrp OBLIGATORY,&lt;/P&gt;&lt;P&gt;      s_bedat FOR ekko-bedat OBLIGATORY,&lt;/P&gt;&lt;P&gt;      s_ebeeln FOR ekko-ebeln ,&lt;/P&gt;&lt;P&gt;      s_ebelp FOR ekpo-ebelp .&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;&amp;gt;START OF SELECTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT  ekko&lt;SUB&gt;ebeln  ekpo&lt;/SUB&gt;ebelp  ekpo&lt;SUB&gt;matnr  makt&lt;/SUB&gt;maktx  ekpo~werks&lt;/P&gt;&lt;P&gt;          ekpo&lt;SUB&gt;menge  ekpo&lt;/SUB&gt;netpr  ekko~lifnr&lt;/P&gt;&lt;P&gt;          INTO CORRESPONDING FIELDS OF TABLE t_itab&lt;/P&gt;&lt;P&gt;          FROM ( ekko INNER JOIN ekpo ON ekko&lt;SUB&gt;ebeln = ekpo&lt;/SUB&gt;ebeln ) INNER&lt;/P&gt;&lt;P&gt;          JOIN makt ON makt&lt;SUB&gt;matnr = ekpo&lt;/SUB&gt;matnr  WHERE&lt;/P&gt;&lt;P&gt;   ekpo~matnr IN s_matnr AND&lt;/P&gt;&lt;P&gt;   ekpo~werks IN s_werks AND&lt;/P&gt;&lt;P&gt;   ekko~lifnr IN s_lifnr AND&lt;/P&gt;&lt;P&gt;   ekko~ekorg IN s_ekorg AND&lt;/P&gt;&lt;P&gt;   ekko~ekgrp IN s_ekgrp AND&lt;/P&gt;&lt;P&gt;   ekko~bedat IN s_bedat AND&lt;/P&gt;&lt;P&gt;   ekko~ebeln IN s_ebeeln AND&lt;/P&gt;&lt;P&gt;   ekpo~ebelp IN s_ebelp .&lt;/P&gt;&lt;P&gt;  "selects the output data from ekko,ekpo and makt tables and stores in&lt;/P&gt;&lt;P&gt;  "t_itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  "&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 04:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-different-database-tables-using-single-select-statemetnt/m-p/2262969#M490735</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T04:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: access different database tables using single select statemetnt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-different-database-tables-using-single-select-statemetnt/m-p/2262970#M490736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use joins for selecting fields frommultiple tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward with points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Vinutha YV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 06:20:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-different-database-tables-using-single-select-statemetnt/m-p/2262970#M490736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T06:20:37Z</dc:date>
    </item>
  </channel>
</rss>

