<?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 write a code without affecting database in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274698#M1019876</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it also crosses 100% in database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Aug 2008 13:12:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-07T13:12:21Z</dc:date>
    <item>
      <title>How to write a code without affecting database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274696#M1019874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;              Please tell me how to write ABAP coding which will hit database ..for ex..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZRUNTIME.&lt;/P&gt;&lt;P&gt;TABLES : BSEG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF FINAL OCCURS 0,&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;       AUGDT LIKE BSEG-AUGDT,&lt;/P&gt;&lt;P&gt;  END OF FINAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT-OPTIONS: DATE1 FOR BSEG-AUGDT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT BELNR WRBTR AUGDT FROM BSEG INTO CORRESPONDING FIELDS OF TABLE FINAL WHERE AUGDT IN DATE1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT FINAL.&lt;/P&gt;&lt;P&gt;  WRITE:/ FINAL-BELNR,FINAL-WRBTR,FINAL-AUGDT.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is a simple progarm which affects database 100% in runtime analysis.how shall i re write the code in another way ..???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;mani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 13:06:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274696#M1019874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T13:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code without affecting database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274697#M1019875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT ZRUNTIME.&lt;/P&gt;&lt;P&gt;TABLES : BSEG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : BEGIN OF ty_FINAL ,&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;AUGDT LIKE BSEG-AUGDT,&lt;/P&gt;&lt;P&gt;END OF ty_FINAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab type standard table of itab with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: DATE1 FOR BSEG-AUGDT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT BELNR WRBTR AUGDT&lt;/P&gt;&lt;P&gt; FROM BSEG &lt;/P&gt;&lt;P&gt;INTO  TABLE itab&lt;/P&gt;&lt;P&gt; WHERE AUGDT IN DATE1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;WRITE:/ FINAL-BELNR,FINAL-WRBTR,FINAL-AUGDT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 13:08:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274697#M1019875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T13:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code without affecting database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274698#M1019876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it also crosses 100% in database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 13:12:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274698#M1019876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T13:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code without affecting database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274699#M1019877</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;try to code like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF S_FINAL ,&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;AUGDT LIKE BSEG-AUGDT,&lt;/P&gt;&lt;P&gt;END OF S_FINAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: final type standard table of s_final,&lt;/P&gt;&lt;P&gt;          wa_final type s_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_date type 'data element of field Augdt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: DATE1 FOR l_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;try to avoid corresponding keyword by writing fields in internal table in the same order that the fields  in dtabase table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT BELNR WRBTR AUGDT FROM BSEG INTO CORRESPONDING FIELDS OF TABLE FINAL WHERE AUGDT IN l_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT FINAL into wa_final.&lt;/P&gt;&lt;P&gt;WRITE:/ wa_FINAL-BELNR,wa_FINAL-WRBTR,wa_FINAL-AUGDT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will help u.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 13:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274699#M1019877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T13:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code without affecting database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274700#M1019878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you don't want to affect the database, then don't select any data!  It doesn't matter what you do, if you write a program where most of the processing is involved in getting the data, it will spend most of its time getting the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you really want to get that 100% down, I suggest you add this at the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: l_x TYPE f,
      l_y TYPE f,
      l_z TYPE f.
l_x = '-0.5'.
l_y = '0.5'.
DO 10000000 TIMES.
  l_z = l_x.
  l_x = ( l_x * l_x ) - ( l_y * l_y ).
  l_y = 2 * l_z * l_y + l_z + l_y.
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program will take a lot longer, but you'll get the percentage of time in the database down.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 13:48:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274700#M1019878</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-08-07T13:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code without affecting database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274701#M1019879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this looks a little bit like a mandelbrot computation. Do you have a graphical output as well?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 14:11:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274701#M1019879</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-08-07T14:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code without affecting database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274702#M1019880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That would probably add to the ABAP percentage, so we'd have to introduce another huge SELECT to maintain the 50/50 balance.&lt;/P&gt;&lt;P&gt;In the end we should have a nice and fully emancipated little program.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 14:23:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274702#M1019880</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-08-07T14:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code without affecting database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274703#M1019881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA : BEGIN OF FINAL OCCURS 0,&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;AUGDT LIKE BSEG-AUGDT,&lt;/P&gt;&lt;P&gt;END OF FINAL.&lt;/P&gt;&lt;P&gt;field-symbols : &amp;lt;fs_final&amp;gt; like line of final.&lt;/P&gt;&lt;P&gt;data: final_1 like table of final with header line.&lt;/P&gt;&lt;P&gt;select BELNR&lt;/P&gt;&lt;P&gt;           WRBTR&lt;/P&gt;&lt;P&gt;           AUGDT&lt;/P&gt;&lt;P&gt;into final from &amp;lt;tablename&amp;gt;&lt;/P&gt;&lt;P&gt;where  AUGDT IN DATE1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at final assigning &amp;lt;fs_final&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;final_1-belnr = &amp;lt;fs_final&amp;gt;-belnr.&lt;/P&gt;&lt;P&gt;final_1-wrbtr = &amp;lt;fs_final&amp;gt;-wrbtr.&lt;/P&gt;&lt;P&gt;final_1-augdt = &amp;lt;fs_final&amp;gt;-augdt.&lt;/P&gt;&lt;P&gt;append &amp;lt;fs_final&amp;gt; to final_1.&lt;/P&gt;&lt;P&gt;endloop.&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>Thu, 07 Aug 2008 15:11:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-a-code-without-affecting-database/m-p/4274703#M1019881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T15:11:22Z</dc:date>
    </item>
  </channel>
</rss>

