<?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: How to get data from database? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-database/m-p/1080689#M97758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi albara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 Creating a new program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  As per the protocol followed in various companies,&lt;/P&gt;&lt;P&gt;  it is the Functional Consultants job &lt;/P&gt;&lt;P&gt;  to provide the required information about&lt;/P&gt;&lt;P&gt;  tables. The provide details &lt;/P&gt;&lt;P&gt;  about selection screen parameters,tables,&lt;/P&gt;&lt;P&gt;  logic etc in the format of SPECIFICATIONS.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;  As an abaper, we can use our knowledge&lt;/P&gt;&lt;P&gt; and experience, but still the ball is always&lt;/P&gt;&lt;P&gt;   in their court. Becuase we are not the process&lt;/P&gt;&lt;P&gt;   owners of the module/business process.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;2. Modifying an old one.&lt;/P&gt;&lt;P&gt;  Modifying SAP standard program is absolytely not recommended.&lt;/P&gt;&lt;P&gt;  Copying and modifying is still advisable.&lt;/P&gt;&lt;P&gt;  But in such cases nobody knows the&lt;/P&gt;&lt;P&gt;  LOGIC ( neither the consultant nor us)&lt;/P&gt;&lt;P&gt;  hence, at the most we can use our experience/knowledge&lt;/P&gt;&lt;P&gt;  or debug the program to gather required information.&lt;/P&gt;&lt;P&gt;  But such practice is very time consuming .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. I mean to say, that there has to be &lt;/P&gt;&lt;P&gt;     some THIN LINE between our work as a abaper&lt;/P&gt;&lt;P&gt;    and the work of functional consultants.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Nov 2005 06:19:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-26T06:19:47Z</dc:date>
    <item>
      <title>How to get data from database?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-database/m-p/1080687#M97756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In most cases, I get requirments from module consultant to creat a new program or modify an old one without knowing how to get to the source of data. I mean what are the database tables to be used in the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to get this information?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Module consultant claims that they didn't study that in their courses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks alot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2005 06:08:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-database/m-p/1080687#M97756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-26T06:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from database?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-database/m-p/1080688#M97757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Albara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well the question is not clear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to find out which are the database tables that you need to access, what you can do go to specific transaction put the curson on a field press F1 and click on the technical details. You should be able to see the table in which that field exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you identify the tables, it will be simple SELECT statements using which you can fetch the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please reward points if this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2005 06:14:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-database/m-p/1080688#M97757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-26T06:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from database?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-database/m-p/1080689#M97758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi albara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 Creating a new program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  As per the protocol followed in various companies,&lt;/P&gt;&lt;P&gt;  it is the Functional Consultants job &lt;/P&gt;&lt;P&gt;  to provide the required information about&lt;/P&gt;&lt;P&gt;  tables. The provide details &lt;/P&gt;&lt;P&gt;  about selection screen parameters,tables,&lt;/P&gt;&lt;P&gt;  logic etc in the format of SPECIFICATIONS.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;  As an abaper, we can use our knowledge&lt;/P&gt;&lt;P&gt; and experience, but still the ball is always&lt;/P&gt;&lt;P&gt;   in their court. Becuase we are not the process&lt;/P&gt;&lt;P&gt;   owners of the module/business process.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;2. Modifying an old one.&lt;/P&gt;&lt;P&gt;  Modifying SAP standard program is absolytely not recommended.&lt;/P&gt;&lt;P&gt;  Copying and modifying is still advisable.&lt;/P&gt;&lt;P&gt;  But in such cases nobody knows the&lt;/P&gt;&lt;P&gt;  LOGIC ( neither the consultant nor us)&lt;/P&gt;&lt;P&gt;  hence, at the most we can use our experience/knowledge&lt;/P&gt;&lt;P&gt;  or debug the program to gather required information.&lt;/P&gt;&lt;P&gt;  But such practice is very time consuming .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. I mean to say, that there has to be &lt;/P&gt;&lt;P&gt;     some THIN LINE between our work as a abaper&lt;/P&gt;&lt;P&gt;    and the work of functional consultants.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2005 06:19:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-database/m-p/1080689#M97758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-26T06:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from database?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-database/m-p/1080690#M97759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Albara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; When your creating new programs in the top of your &lt;/P&gt;&lt;P&gt; program TABLES statement is used to declare tables.&lt;/P&gt;&lt;P&gt; Also you can use transaction code SQVI to see relation&lt;/P&gt;&lt;P&gt; between two tables i mean joins. Also SE11 is the &lt;/P&gt;&lt;P&gt; transaction of Data Dictionary where you can see all &lt;/P&gt;&lt;P&gt; database tables. I have attached small code with this.&lt;/P&gt;&lt;P&gt; So that you will understand joins and table declaratin &lt;/P&gt;&lt;P&gt; in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I hope this will slove your problem. If you get any &lt;/P&gt;&lt;P&gt; addtional info from this please reward the points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZVENDOR_CHECK_REPORT&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZVENDOR_CHECK_REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Tables&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables:  PAYR,&lt;/P&gt;&lt;P&gt;         BKPF,&lt;/P&gt;&lt;P&gt;         BSEG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Structure&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF WA_RECORD,&lt;/P&gt;&lt;P&gt;        LIFNR LIKE PAYR-LIFNR,&lt;/P&gt;&lt;P&gt;        ZNME1 LIKE PAYR-ZNME1,&lt;/P&gt;&lt;P&gt;        CHECT LIKE PAYR-CHECT,&lt;/P&gt;&lt;P&gt;        ZALDT LIKE PAYR-ZALDT,&lt;/P&gt;&lt;P&gt;        BELNR LIKE BSEG-BELNR,&lt;/P&gt;&lt;P&gt;        WRBTR LIKE BSEG-WRBTR,&lt;/P&gt;&lt;P&gt;        BLART LIKE BKPF-BLART,&lt;/P&gt;&lt;P&gt;        BLDAT LIKE BKPF-BLDAT,&lt;/P&gt;&lt;P&gt;        XBLNR LIKE BKPF-XBLNR,&lt;/P&gt;&lt;P&gt;      END OF WA_RECORD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Internal Table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: IT_RECORD LIKE WA_RECORD OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Selection Screen&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block i_data with frame title text-002.&lt;/P&gt;&lt;P&gt;select-options: s_gjahr FOR payr-GJAHR,&lt;/P&gt;&lt;P&gt;                s_lifnr for payr-Lifnr,&lt;/P&gt;&lt;P&gt;                s_chect for payr-Chect,&lt;/P&gt;&lt;P&gt;                s_belnr for bkpf-Belnr,&lt;/P&gt;&lt;P&gt;                s_bldat for bkpf-Bldat.&lt;/P&gt;&lt;P&gt;selection-screen end of block i_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Start of selection&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&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;PERFORM BASIC_DATA USING S_GJAHR S_LIFNR S_CHECT S_BELNR S_BLDAT.&lt;/P&gt;&lt;P&gt;PERFORM BSEG_DATA USING IT_RECORD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  BASIC_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BASIC_DATA USING P1 P2 P3 P4 P5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT A&lt;SUB&gt;ZBUKR A&lt;/SUB&gt;CHECT A&lt;SUB&gt;LIFNR A&lt;/SUB&gt;VBLNR A&lt;SUB&gt;GJAHR A&lt;/SUB&gt;ZALDT&lt;/P&gt;&lt;P&gt;       B&lt;SUB&gt;BLDAT B&lt;/SUB&gt;BLART B&lt;SUB&gt;XBLNR B&lt;/SUB&gt;BELNR&lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE IT_RECORD&lt;/P&gt;&lt;P&gt;       FROM PAYR AS A INNER JOIN BKPF AS B&lt;/P&gt;&lt;P&gt;       ON     A&lt;SUB&gt;ZBUKR = B&lt;/SUB&gt;BUKRS&lt;/P&gt;&lt;P&gt;       AND    A&lt;SUB&gt;VBLNR = B&lt;/SUB&gt;BELNR&lt;/P&gt;&lt;P&gt;       AND    A&lt;SUB&gt;GJAHR = B&lt;/SUB&gt;GJAHR&lt;/P&gt;&lt;P&gt;       WHERE  A~GJAHR IN S_GJAHR&lt;/P&gt;&lt;P&gt;       AND    A~LIFNR IN S_LIFNR&lt;/P&gt;&lt;P&gt;       AND    A~CHECT IN S_CHECT&lt;/P&gt;&lt;P&gt;       AND    A~VBLNR IN S_BELNR&lt;/P&gt;&lt;P&gt;       AND    B~BLDAT IN S_BLDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT IT_RECORD BY ZALDT LIFNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " BASIC_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  BSEG_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_IT_RECORD  text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BSEG_DATA  USING    P_IT_RECORD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE&lt;/P&gt;&lt;P&gt;ENDFORM.                    " BSEG_DATA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2005 06:20:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-database/m-p/1080690#M97759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-26T06:20:53Z</dc:date>
    </item>
  </channel>
</rss>

