<?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: SMARTFORMS,REPORTS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-reports/m-p/2394324#M532716</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) what is the difference in using JOINS and FOR ALL ENTRIES.Where to use them specifically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all entries&lt;/P&gt;&lt;P&gt;The for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number of entries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are executed to limit the length of the WHERE clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The plus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Large amount of data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mixing processing and reading of data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fast internal reprocessing of data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fast&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Minus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Difficult to program/understand&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Memory could be critical (use FREE or PACKAGE size)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some steps that might make FOR ALL ENTRIES more efficient:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Removing duplicates from the the driver table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorting the driver table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible, convert the data in the driver table to ranges so a BETWEEN statement is used instead of and OR statement:&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_tab&lt;/P&gt;&lt;P&gt;WHERE mykey &amp;gt;= i_tab-low and&lt;/P&gt;&lt;P&gt;mykey &amp;lt;= i_tab-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select using JOINS&lt;/P&gt;&lt;P&gt;The plus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very large amount of data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar to Nested selects - when the accesses are planned by the programmer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some cases the fastest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not so memory critical&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The minus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very difficult to program/understand&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mixing processing and reading of data not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Reward If Helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2007 08:25:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-18T08:25:15Z</dc:date>
    <item>
      <title>SMARTFORMS,REPORTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-reports/m-p/2394322#M532714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all i have a couple of questions:&lt;/P&gt;&lt;P&gt;1) what is the difference in using JOINS and FOR ALL ENTRIES.Where to use them specifically?&lt;/P&gt;&lt;P&gt;2)How and where can i specify the no of copies to be output (suppose invoices ) in my print program.Is it in the FM SSF_FUNCTION_MODULE _NAME.&lt;/P&gt;&lt;P&gt;3)Wat all condituions  r necessary for using For All Entries.I know two of them&lt;/P&gt;&lt;P&gt;  a)the internal table should not be empty.&lt;/P&gt;&lt;P&gt;  b)The matcinhg fields in the where clause should be of same type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 08:15:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-reports/m-p/2394322#M532714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T08:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: SMARTFORMS,REPORTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-reports/m-p/2394323#M532715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhi, &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly avoid using join statement.&lt;/P&gt;&lt;P&gt;It may seem simple while you are joining two tables but when it comes to joining multiple tables it becomes an uphill task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the following alternaties.&lt;/P&gt;&lt;P&gt;They are simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To select single entries use this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select single field1 field2 fieldn &lt;/P&gt;&lt;P&gt;from table &lt;/P&gt;&lt;P&gt;into x_tab&lt;/P&gt;&lt;P&gt;where tab_field = table_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To select multiple entries use this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select field1 field2 fieldn &lt;/P&gt;&lt;P&gt;from table &lt;/P&gt;&lt;P&gt;into it_tab&lt;/P&gt;&lt;P&gt;for all entries in table&lt;/P&gt;&lt;P&gt;where tab_field = table_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In for all entries clause it takes into account all the lines of code that exists in the internal table and checks for all the entries available. The where condition is checked for the matching fields and to fetch the data as per the two tables common fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should solve all your joining problems with select queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tej..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 08:25:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-reports/m-p/2394323#M532715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T08:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: SMARTFORMS,REPORTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-reports/m-p/2394324#M532716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) what is the difference in using JOINS and FOR ALL ENTRIES.Where to use them specifically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all entries&lt;/P&gt;&lt;P&gt;The for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number of entries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are executed to limit the length of the WHERE clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The plus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Large amount of data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mixing processing and reading of data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fast internal reprocessing of data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fast&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Minus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Difficult to program/understand&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Memory could be critical (use FREE or PACKAGE size)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some steps that might make FOR ALL ENTRIES more efficient:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Removing duplicates from the the driver table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorting the driver table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible, convert the data in the driver table to ranges so a BETWEEN statement is used instead of and OR statement:&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_tab&lt;/P&gt;&lt;P&gt;WHERE mykey &amp;gt;= i_tab-low and&lt;/P&gt;&lt;P&gt;mykey &amp;lt;= i_tab-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select using JOINS&lt;/P&gt;&lt;P&gt;The plus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very large amount of data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar to Nested selects - when the accesses are planned by the programmer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some cases the fastest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not so memory critical&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The minus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very difficult to program/understand&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mixing processing and reading of data not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Reward If Helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 08:25:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-reports/m-p/2394324#M532716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T08:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: SMARTFORMS,REPORTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-reports/m-p/2394325#M532717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to fetch data by combining more than 2 tables we use  joins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to fetch data from a table based on a selection made we go for for all entries .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES is an effective way of doing away with using JOIN on two tables.&lt;/P&gt;&lt;P&gt;You can check the below code -&lt;/P&gt;&lt;P&gt;SELECT BUKRS BELNR GJAHR AUGDT&lt;/P&gt;&lt;P&gt;FROM BSEG&lt;/P&gt;&lt;P&gt;INTO TABLE I_BSEG&lt;/P&gt;&lt;P&gt;WHERE BUKRS = ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT BUKRS BELNR BLART BLDAT&lt;/P&gt;&lt;P&gt;FROM BKPF&lt;/P&gt;&lt;P&gt;INTO TABLE I_BKPF&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN I_BSEG&lt;/P&gt;&lt;P&gt;WHERE BUKRS = I_BSEG-BUKRS&lt;/P&gt;&lt;P&gt;AND BELNR = I_BSEG-BELNR&lt;/P&gt;&lt;P&gt;AND BLDAT IN SO_BLDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look another example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the use of FOR ALL ENTRIES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. INNER JOIN&lt;/P&gt;&lt;P&gt;DBTAB1 &amp;lt;----&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;&amp;gt; DBTAB2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is used to JOIN two DATABASE tables&lt;/P&gt;&lt;P&gt;having some COMMON fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Whereas &lt;/P&gt;&lt;P&gt;For All Entries,&lt;/P&gt;&lt;P&gt;DBTAB1 &amp;lt;----&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;&amp;gt; ITAB1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is not at all related to two DATABASE tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is related to INTERNAL table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. If we want to fetch data &lt;/P&gt;&lt;P&gt;from some DBTABLE1&lt;/P&gt;&lt;P&gt;but we want to fetch&lt;/P&gt;&lt;P&gt;for only some records&lt;/P&gt;&lt;P&gt;which are contained in some internal table,&lt;/P&gt;&lt;P&gt;then we use for alll entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------" /&gt;&lt;P&gt;1. simple example of for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. NOTE THAT &lt;/P&gt;&lt;P&gt;In for all entries,&lt;/P&gt;&lt;P&gt;it is NOT necessary to use TWO DBTABLES.&lt;/P&gt;&lt;P&gt;(as against JOIN)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. use this program (just copy paste)&lt;/P&gt;&lt;P&gt;it will fetch data&lt;/P&gt;&lt;P&gt;from T001&lt;/P&gt;&lt;P&gt;FOR ONLY TWO COMPANIES (as mentioned in itab)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;bukrs LIKE t001-bukrs,&lt;/P&gt;&lt;P&gt;END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-bukrs = '1000'.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;itab-bukrs = '1100'.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM t001&lt;/P&gt;&lt;P&gt;INTO TABLE t001&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN itab&lt;/P&gt;&lt;P&gt;WHERE bukrs = itab-bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------" /&gt;&lt;P&gt;LOOP AT t001.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; t001-bukrs.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************&lt;STRONG&gt;inner join&lt;/STRONG&gt;**********&lt;/P&gt;&lt;P&gt;table emp &lt;/P&gt;&lt;P&gt;empno name&lt;/P&gt;&lt;P&gt;a sasi&lt;/P&gt;&lt;P&gt;b xxx &lt;/P&gt;&lt;P&gt;c yyy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table sal&lt;/P&gt;&lt;P&gt;empno salary&lt;/P&gt;&lt;P&gt;a 1000&lt;/P&gt;&lt;P&gt;b 2000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner join&lt;/P&gt;&lt;P&gt;****************&lt;/P&gt;&lt;P&gt;select e&lt;SUB&gt;empno e&lt;/SUB&gt;name &lt;/P&gt;&lt;P&gt;s~sal &lt;/P&gt;&lt;P&gt;into table int_table&lt;/P&gt;&lt;P&gt;from emp as e&lt;/P&gt;&lt;P&gt;inner join sal&lt;/P&gt;&lt;P&gt;on &lt;/P&gt;&lt;P&gt;e&lt;SUB&gt;empno = s&lt;/SUB&gt;empno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you made inner join between table a and b by emp no &lt;/P&gt;&lt;P&gt;the selection retrives only if the condition satisfy the output will be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a sasi 1000&lt;/P&gt;&lt;P&gt;b xxx 2000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outer join&lt;/P&gt;&lt;P&gt;*************************&lt;/P&gt;&lt;P&gt;select e&lt;SUB&gt;empno e&lt;/SUB&gt;name &lt;/P&gt;&lt;P&gt;s~sal into table int_table&lt;/P&gt;&lt;P&gt;from emp as e&lt;/P&gt;&lt;P&gt;LEFT OUTER JOIN sal&lt;/P&gt;&lt;P&gt;on &lt;/P&gt;&lt;P&gt;e&lt;SUB&gt;empno = s&lt;/SUB&gt;empno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you made outer join (left /right ) the left table kept as it is the &lt;/P&gt;&lt;P&gt;if the condition satisfy the right table entries will fetch else leave it blank&lt;/P&gt;&lt;P&gt;the output will be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a sasi a 1000&lt;/P&gt;&lt;P&gt;b xxx b 2000&lt;/P&gt;&lt;P&gt;c yyy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Mon, 18 Jun 2007 08:26:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-reports/m-p/2394325#M532717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T08:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: SMARTFORMS,REPORTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-reports/m-p/2394326#M532718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Inner Join :- to retrive the data from 2 or more database table into ur 1 internal table.&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;  SELECT SINGLE A&lt;SUB&gt;LFBNR B&lt;/SUB&gt;BLDAT INTO (IT_DATA-GRNO,IT_DATA-GRDATE) FROM&lt;/P&gt;&lt;P&gt;                          RSEG AS A INNER JOIN MKPF AS B ON A&lt;SUB&gt;LFBNR = B&lt;/SUB&gt;MBLNR " AND A&lt;SUB&gt;GJAHR = B&lt;/SUB&gt;MJAHR&lt;/P&gt;&lt;P&gt;                                    WHERE  A~BELNR = IT_DATA-BELNR&lt;/P&gt;&lt;P&gt;                                      AND  A~GJAHR = IT_DATA-GJAHR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all entries :- Fetching the data from database as per the entries already exist in another internal table.&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;select matnr maktx&lt;/P&gt;&lt;P&gt;                into corresponding fields of table it_makt&lt;/P&gt;&lt;P&gt;                from makt&lt;/P&gt;&lt;P&gt;                for all entries in it_item&lt;/P&gt;&lt;P&gt;                where matnr = it_item-matnr&lt;/P&gt;&lt;P&gt;                and spras = 'EN'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.  That depends on the transcation for ex me23n for Purchase order print out &lt;/P&gt;&lt;P&gt;In ME22n it will set by functional consultant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. that depends on ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 08:37:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-reports/m-p/2394326#M532718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T08:37:50Z</dc:date>
    </item>
  </channel>
</rss>

