<?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: ABAP code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659910#M881546</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first u need to find no of records in internal table using DESCRIBE statment, and store in one variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can loop using this variable, then u can solve ur prb&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Apr 2008 10:23:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-15T10:23:30Z</dc:date>
    <item>
      <title>ABAP code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659908#M881544</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;We have program in R/3 wherin we have the Records which gets stored in the internal table &amp;amp; this internal table is further sent to BW as an IDOC.The internal table is defined to its maximum size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem i think is the number of records are exceeding the internal table's maximum size &amp;amp; becoz of that it gets stuck up &amp;amp; goes in definite loop or something....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to ABAP can anyone give a thougt on it ..like how to fix the problem when the internal table size is exceeding the &lt;/P&gt;&lt;P&gt;maximum size.Do we need to add some kind of code..code would be  a great help!!&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;Pallavi Pande&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2008 10:17:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659908#M881544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-15T10:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659909#M881545</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;can you paste your code here so that we can analyze what is wrong on the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2008 10:19:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659909#M881545</guid>
      <dc:creator>peter_ruiz2</dc:creator>
      <dc:date>2008-04-15T10:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659910#M881546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first u need to find no of records in internal table using DESCRIBE statment, and store in one variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can loop using this variable, then u can solve ur prb&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2008 10:23:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659910#M881546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-15T10:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659911#M881547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are you sure it is the table size?Internal tables can hold a lot of entries. Maybe the problem lies within the internal table LOOP pass. Any select statements, LOOP within LOOP or....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post your coding and people can have a look.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2008 10:24:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659911#M881547</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-04-15T10:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659912#M881548</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;there is no definite size to an internal table. if you are exceeding the memory size of an internal table the code will result in a dump and not go into any indefinite loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please paste your code so that we could analyse the exact error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward points if this info seems to help,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Kiran&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2008 10:25:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659912#M881548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-15T10:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659913#M881549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check DataSource validity&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CASE i_dsource.&lt;/P&gt;&lt;P&gt;      WHEN 'ZBW_EXTRACT_FORECAST_DATA'.&lt;/P&gt;&lt;P&gt;      WHEN OTHERS.&lt;/P&gt;&lt;P&gt;        IF 1 = 2. MESSAGE e009(r3). ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;this is a typical log call. Please write every error message like this&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        log_write 'E'                  "message type&lt;/P&gt;&lt;P&gt;                  'R3'                 "message class&lt;/P&gt;&lt;P&gt;                  '009'                "message number&lt;/P&gt;&lt;P&gt;                  i_dsource   "message variable 1&lt;/P&gt;&lt;P&gt;                  ' '.                 "message variable 2&lt;/P&gt;&lt;P&gt;        RAISE error_passed_to_mess_handler.&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND LINES OF i_t_select TO s_s_if-t_select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill parameter buffer for data extraction calls&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    s_s_if-requnr    = i_requnr.&lt;/P&gt;&lt;P&gt;    s_s_if-dsource = i_dsource.&lt;/P&gt;&lt;P&gt;    s_s_if-maxsize   = i_maxsize.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   s_s_if-maxsize   = 50.  "select only 50 work centers at a time&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill field list table for an optimized select statement&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;(in case that there is no 1:1 relation between InfoSource fields&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and database table fields this may be far from beeing trivial)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    APPEND LINES OF i_t_fields TO s_s_if-t_fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.                 "Initialization mode or data extraction ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data transfer: First Call      OPEN CURSOR + FETCH&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               Following Calls FETCH only&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;First data package -&amp;gt; OPEN CURSOR&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF s_counter_datapakid = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill range tables BW will only pass down simple selection criteria&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'ARBPL'.&lt;/P&gt;&lt;P&gt;        MOVE-CORRESPONDING l_s_select TO l_r_arbpl.&lt;/P&gt;&lt;P&gt;        APPEND l_r_arbpl.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'WERKS'.&lt;/P&gt;&lt;P&gt;        MOVE-CORRESPONDING l_s_select TO l_r_werks.&lt;/P&gt;&lt;P&gt;        APPEND l_r_werks.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      g_cursor_counter = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Determine number of database records to be read per FETCH statement&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;from input parameter I_MAXSIZE. If there is a one to one relation&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;between DataSource table lines and database entries, this is trivial.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;In other cases, it may be impossible and some estimated value has to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;be determined.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      OPEN CURSOR WITH HOLD s_cursor FOR&lt;/P&gt;&lt;P&gt;      SELECT objid arbpl verwe werks kapid veran FROM crhd&lt;/P&gt;&lt;P&gt;                               WHERE objty = 'A' AND&lt;/P&gt;&lt;P&gt;                                     werks IN l_r_werks AND&lt;/P&gt;&lt;P&gt;                                     arbpl IN l_r_arbpl.&lt;/P&gt;&lt;P&gt;    ENDIF.                             "First data package ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fetch records into interface table.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  named E_T_'Name of extract structure'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;P&gt;      IF g_cursor_counter = 1.&lt;/P&gt;&lt;P&gt;        CLOSE CURSOR s_cursor.&lt;/P&gt;&lt;P&gt;        RAISE no_more_data.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      FETCH NEXT CURSOR s_cursor&lt;/P&gt;&lt;P&gt;                 INTO CORRESPONDING FIELDS&lt;/P&gt;&lt;P&gt;                 OF TABLE it_crhd&lt;/P&gt;&lt;P&gt;                 PACKAGE SIZE 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        g_cursor_counter = 1.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      PERFORM get_forecast_data.&lt;/P&gt;&lt;P&gt;      DESCRIBE TABLE it_output_req_cap LINES s_line_counter.&lt;/P&gt;&lt;P&gt;      s_line_counter = s_line_counter + 1000.  "buffer value of 1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      REFRESH: it_crhd, it_kbed_plscn, it_kbed, it_plaf, it_tc24,&lt;/P&gt;&lt;P&gt;               it_kako, it_crcapacity_exact, it_crcapacity_exact_old.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF s_line_counter &amp;gt;= s_s_if-maxsize.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF it_output_req_cap[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      LOOP AT it_output_req_cap INTO wa_output_req_cap.&lt;/P&gt;&lt;P&gt;        CLEAR e_t_data.&lt;/P&gt;&lt;P&gt;        MOVE-CORRESPONDING wa_output_req_cap TO e_t_data.&lt;/P&gt;&lt;P&gt;        APPEND e_t_data.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    REFRESH: it_output_req_cap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    s_counter_datapakid = s_counter_datapakid + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.              "Initialization mode or data extraction ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2008 10:59:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/3659913#M881549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-15T10:59:40Z</dc:date>
    </item>
  </channel>
</rss>

