<?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: Function module problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/5578163#M1272253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Create one more internal table of type pa0002.&lt;/P&gt;&lt;P&gt;After fetching the record in it_result in fuction module, Append the record in the new internal table.&lt;/P&gt;&lt;P&gt;Then clear the internal table it_resultin the loop itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2009 10:12:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-04T10:12:33Z</dc:date>
    <item>
      <title>Function module problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/5578159#M1272249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guy's,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me presently i am working with this functionmodule : HR_RECOGNIZE_EMPLOYEE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to get the p0002-tab results i wrote the code like this &lt;/P&gt;&lt;P&gt;REPORT  ZEMPLOYEE_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : pa0002.&lt;/P&gt;&lt;P&gt;types : begin of ty_0002,&lt;/P&gt;&lt;P&gt;        pernr type PERSNO,&lt;/P&gt;&lt;P&gt;        NACHN type PAD_NACHN,&lt;/P&gt;&lt;P&gt;        vorna type PAD_VORNA,&lt;/P&gt;&lt;P&gt;        gbdat type GBDAT,&lt;/P&gt;&lt;P&gt;        PERID type PERID,&lt;/P&gt;&lt;P&gt;        end of ty_0002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_0002 type standard table of ty_0002,&lt;/P&gt;&lt;P&gt;       wa_0002 type ty_0002.&lt;/P&gt;&lt;P&gt;data : it_result type standard table of p0002.&lt;/P&gt;&lt;P&gt;select-options : s_pernr for pa0002-pernr.&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;select pernr&lt;/P&gt;&lt;P&gt;       nachn&lt;/P&gt;&lt;P&gt;       vorna&lt;/P&gt;&lt;P&gt;       gbdat&lt;/P&gt;&lt;P&gt;       perid&lt;/P&gt;&lt;P&gt;       from pa0002&lt;/P&gt;&lt;P&gt;       into table it_0002&lt;/P&gt;&lt;P&gt;       where pernr in s_pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort it_0002 by pernr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_0002 into wa_0002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_RECOGNIZE_EMPLOYEE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    vorna                = wa_0002-vorna&lt;/P&gt;&lt;P&gt;    nachn                = wa_0002-nachn&lt;/P&gt;&lt;P&gt;    gbdat                = wa_0002-gbdat&lt;/P&gt;&lt;P&gt;    perid                = wa_0002-perid&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  GESCH                =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   EXCLUDE_PERNR        =  wa_0002-pernr&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   P0002_TAB            = it_result&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   NO_PERNR_FOUND       = 1&lt;/P&gt;&lt;P&gt;   LACK_OF_INPUT        = 2&lt;/P&gt;&lt;P&gt;   OTHERS               = 3&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;*IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;*ENDIF.&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;But every time it giving single record.&lt;/P&gt;&lt;P&gt;Kindly hlep me friends, based on the selection entries i nedd it_results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sai.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:16:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/5578159#M1272249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Function module problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/5578160#M1272250</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;  Create one more internal table and append the records of it_result into the internal table after calling function module HR_RECOGNIZE_EMPLOYEE inside your loop statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:24:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/5578160#M1272250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Function module problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/5578161#M1272251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Inside loop check for sy-subrc for error and append it to an internal table to get final table with all entries.. then clear your table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_0002 into wa_0002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_RECOGNIZE_EMPLOYEE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;vorna = wa_0002-vorna&lt;/P&gt;&lt;P&gt;nachn = wa_0002-nachn&lt;/P&gt;&lt;P&gt;gbdat = wa_0002-gbdat&lt;/P&gt;&lt;P&gt;perid = wa_0002-perid&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;GESCH =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCLUDE_PERNR = wa_0002-pernr&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;P0002_TAB = it_result&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NO_PERNR_FOUND = 1&lt;/P&gt;&lt;P&gt;LACK_OF_INPUT = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc  EQ 0.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Append it_result to an Internal Table say ITAB&lt;/P&gt;&lt;/LI&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;clear it_result[]&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:24:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/5578161#M1272251</guid>
      <dc:creator>gautam_totekar</dc:creator>
      <dc:date>2009-05-21T13:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Function module problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/5578162#M1272252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Writing  a Function Module inside a loop slows down the program !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 09:58:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/5578162#M1272252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T09:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Function module problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/5578163#M1272253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Create one more internal table of type pa0002.&lt;/P&gt;&lt;P&gt;After fetching the record in it_result in fuction module, Append the record in the new internal table.&lt;/P&gt;&lt;P&gt;Then clear the internal table it_resultin the loop itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 10:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/5578163#M1272253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T10:12:33Z</dc:date>
    </item>
  </channel>
</rss>

