<?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: Performance issue and help for an code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-and-help-for-an-code/m-p/4332760#M1032297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sai Sandeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use the comparion with offset option,Your report will run much faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think your mandatory fields are from FIELD7. to FIELD15 Consecutively..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Take the vaues from FIELD7 to FIELD15 values at a time in the FIELD-SYMBOL na dcomapre it at a time rather that with So many AND AND comparisions as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS:&lt;/P&gt;&lt;P&gt;   &amp;lt;one_time_comapre_string&amp;gt;  TYPE ANY.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;   From_offset TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Count the number of characters of each field from FILED1 to FIELD6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From_offset = Sum of lengths of all the foelds from FIELD 1 TO FILED6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TO_offset = Sum of lengths of all the foelds from FIELD 7 TO FILED15.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;ls_record&amp;gt; LIKE LINE OF DATA_PACKAGE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SORT DATA_PACKAGE BY FIELD7 FIELD8 ... FIELD15.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT DATA_PACKAGE ASSIGNING &amp;lt;ls_record&amp;gt;.&lt;/P&gt;&lt;P&gt;   &amp;lt;one_time_comapre_string&amp;gt; = &amp;lt;ls_record&amp;gt;+From_offset(TO_offset).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF &amp;lt;one_time_comapre_string&amp;gt; IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    MESAGE 'One of the mandatory field is empty' TYPE 'I'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;clear  &amp;lt;one_time_comapre_string&amp;gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&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;Rama.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Aug 2008 08:28:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-22T08:28:03Z</dc:date>
    <item>
      <title>Performance issue and help for an code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-and-help-for-an-code/m-p/4332758#M1032295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  ALL,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am and BW consultant.Here i want to check 9 fields in an internal table of more than 75000 records.Then if  our of 15 fields if mandatory fields is blank then i need to raise an error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had written an ABAP code with If Statements and is there any other alternative way to improve the performance to check those fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 07:47:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-and-help-for-an-code/m-p/4332758#M1032295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T07:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue and help for an code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-and-help-for-an-code/m-p/4332759#M1032296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would help if you publish what you've tried already.  I'll assume BW 3.5, and that you've got 15 fields, FIELD1 through to FIELD15 , and you want to raise an error if FIELD7 through to FIELD15 is blank.  I'll also assume that you want to report all fields that are blank that shouldn't be.  Also, that generally, you won't get that many errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;ls_record&amp;gt; LIKE LINE OF DATA_PACKAGE.

SORT DATA_PACKAGE BY FIELD7 FIELD8 ... FIELD15.
LOOP AT DATA_PACKAGE ASSIGNING &amp;lt;ls_record&amp;gt;.
  IF &amp;lt;ls_record&amp;gt;-field7 IS NOT INITIAL AND &amp;lt;ls_record&amp;gt;-field8 IS NOT INITIAL
                                       AND &amp;lt;ls_record&amp;gt;-field9 IS NOT INITIAL... " and so on
    EXIT.
  ENDIF.
  IF &amp;lt;ls_record&amp;gt;-field7 IS INITIAL.
    " raise error field 7.
  ELSEIF.
  IF &amp;lt;ls_record&amp;gt;-field8 IS INITIAL.
    " raise error field 8.
  ENDIF.
  ... etc.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2008 12:06:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-and-help-for-an-code/m-p/4332759#M1032296</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-08-15T12:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue and help for an code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-and-help-for-an-code/m-p/4332760#M1032297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sai Sandeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use the comparion with offset option,Your report will run much faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think your mandatory fields are from FIELD7. to FIELD15 Consecutively..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Take the vaues from FIELD7 to FIELD15 values at a time in the FIELD-SYMBOL na dcomapre it at a time rather that with So many AND AND comparisions as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS:&lt;/P&gt;&lt;P&gt;   &amp;lt;one_time_comapre_string&amp;gt;  TYPE ANY.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;   From_offset TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Count the number of characters of each field from FILED1 to FIELD6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From_offset = Sum of lengths of all the foelds from FIELD 1 TO FILED6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TO_offset = Sum of lengths of all the foelds from FIELD 7 TO FILED15.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;ls_record&amp;gt; LIKE LINE OF DATA_PACKAGE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SORT DATA_PACKAGE BY FIELD7 FIELD8 ... FIELD15.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT DATA_PACKAGE ASSIGNING &amp;lt;ls_record&amp;gt;.&lt;/P&gt;&lt;P&gt;   &amp;lt;one_time_comapre_string&amp;gt; = &amp;lt;ls_record&amp;gt;+From_offset(TO_offset).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF &amp;lt;one_time_comapre_string&amp;gt; IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    MESAGE 'One of the mandatory field is empty' TYPE 'I'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;clear  &amp;lt;one_time_comapre_string&amp;gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&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;Rama.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 08:28:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-and-help-for-an-code/m-p/4332760#M1032297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T08:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue and help for an code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-and-help-for-an-code/m-p/4332761#M1032298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Saisandeep, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know your code and therefore an improvement can only be a guess. &lt;/P&gt;&lt;P&gt;I would design it in this way: using the &lt;STRONG&gt;assign component&lt;/STRONG&gt; clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  z_field_check. 

TYPES: BEGIN OF ty_itab, 
         field1   TYPE c, 
         field2   TYPE c, 
         field3   TYPE c, 
       END OF ty_itab. 
DATA: itab TYPE STANDARD TABLE OF ty_itab, 
      wa_itab TYPE ty_itab. 

DATA: i_component LIKE sy-index, 
      i_record     LIKE sy-index. 
DATA:error_key TYPE c. 
FIELD-SYMBOLS: &amp;lt;record&amp;gt; TYPE ty_itab, 
               &amp;lt;field&amp;gt;  TYPE ANY. 

DO 5 TIMES. 
  CLEAR: wa_itab. 
  wa_itab-field1 = ''. 
  wa_itab-field2 = 'b'. 
  wa_itab-field3 = ''. 
  APPEND wa_itab TO itab. 
ENDDO. 

CLEAR: error_key. 
LOOP AT itab ASSIGNING &amp;lt;record&amp;gt;. 
  i_record = sy-tabix. 
  DO. 
    i_component = sy-index. 
    ASSIGN COMPONENT i_component OF STRUCTURE &amp;lt;record&amp;gt; TO &amp;lt;field&amp;gt;. 
    IF sy-subrc &amp;lt;&amp;gt; 0. CLEAR: sy-subrc. EXIT. ENDIF. 

    IF &amp;lt;field&amp;gt; IS INITIAL. 
*    raise error message for the i_component-th field in the record like: 
      WRITE: / 'The', i_component, 'th field in record', i_record, 'is INITIAL'. 
      error_key = 'X'. 
    ENDIF. 
  ENDDO. 

ENDLOOP. 

IF error_key IS INITIAL. 
  WRITE: 'Hurrah! No empty record found.'. 
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it and have success. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Heinz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Aug 2008 03:15:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-and-help-for-an-code/m-p/4332761#M1032298</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-24T03:15:40Z</dc:date>
    </item>
  </channel>
</rss>

