<?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: Calling a Function Module within a loop in Report Program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611763#M870131</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, i have putten it inside loop only...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before calling function module, i'm clearing and refreshing all internal tables, workareas related to it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the code:-&lt;/P&gt;&lt;P&gt;I have fetched set of transactions from transaction table, and im looping on it to get its assessment details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I have checked that each time input to FM is different..&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_ztfso_bp_tn into wa_ztfso_bp_tn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     refresh it_assessment.&lt;/P&gt;&lt;P&gt;     clear wa_assessment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     call function 'Z_ZRFC_GETDET_FS_OPPORTUNITY'&lt;/P&gt;&lt;P&gt;          exporting&lt;/P&gt;&lt;P&gt;            process_type  = l_process_type&lt;/P&gt;&lt;P&gt;            transactionid   = wa_ztfso_bp_tn-object_id&lt;/P&gt;&lt;P&gt;            istatus            = l_status&lt;/P&gt;&lt;P&gt;          tables&lt;/P&gt;&lt;P&gt;            assessment    = it_assessment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if it_assessment is not initial.            &lt;/P&gt;&lt;P&gt;         &lt;/P&gt;&lt;P&gt;         loop at it_assessment into wa_assessment.       &lt;/P&gt;&lt;P&gt;            *Some processing&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; endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls suggest &lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Mar 2008 05:07:59 GMT</pubDate>
    <dc:creator>Amey-Mogare</dc:creator>
    <dc:date>2008-03-24T05:07:59Z</dc:date>
    <item>
      <title>Calling a Function Module within a loop in Report Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611761#M870129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiii,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm calling one function module "Z_get_transaction_details" which returns details of transaction id passed to it. &lt;/P&gt;&lt;P&gt;It returns them by means of some structures... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am calling this function module within loop statement in a report program. Now what is happening is when i call it in first loop, results returned are correct, but from 2nd loop onwards, output data frm rfc is same even if input parameters are different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im clearing worareas, internal tables after each loop, but still problem persists...&lt;/P&gt;&lt;P&gt;And i tested rfc for inputs that are getting passed in report program.. but it is working perfect when i execute RFC !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So where is the problem? pls guide me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 04:02:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611761#M870129</guid>
      <dc:creator>Amey-Mogare</dc:creator>
      <dc:date>2008-03-24T04:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Function Module within a loop in Report Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611762#M870130</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; It wd be better if you could give a shot of ur exact code...&lt;/P&gt;&lt;P&gt;Well, first check the position you r clearing ur variables. I mean you said that u r clearing ur variables after the loop. If it is outside the loop then avoid it and place it whithin the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jayadeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 04:35:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611762#M870130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T04:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Function Module within a loop in Report Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611763#M870131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, i have putten it inside loop only...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before calling function module, i'm clearing and refreshing all internal tables, workareas related to it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the code:-&lt;/P&gt;&lt;P&gt;I have fetched set of transactions from transaction table, and im looping on it to get its assessment details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I have checked that each time input to FM is different..&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_ztfso_bp_tn into wa_ztfso_bp_tn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     refresh it_assessment.&lt;/P&gt;&lt;P&gt;     clear wa_assessment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     call function 'Z_ZRFC_GETDET_FS_OPPORTUNITY'&lt;/P&gt;&lt;P&gt;          exporting&lt;/P&gt;&lt;P&gt;            process_type  = l_process_type&lt;/P&gt;&lt;P&gt;            transactionid   = wa_ztfso_bp_tn-object_id&lt;/P&gt;&lt;P&gt;            istatus            = l_status&lt;/P&gt;&lt;P&gt;          tables&lt;/P&gt;&lt;P&gt;            assessment    = it_assessment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if it_assessment is not initial.            &lt;/P&gt;&lt;P&gt;         &lt;/P&gt;&lt;P&gt;         loop at it_assessment into wa_assessment.       &lt;/P&gt;&lt;P&gt;            *Some processing&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; endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls suggest &lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 05:07:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611763#M870131</guid>
      <dc:creator>Amey-Mogare</dc:creator>
      <dc:date>2008-03-24T05:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Function Module within a loop in Report Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611764#M870132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the parameters i_status and i_process. How they are being populated and the documentation of the FM if any. Are u sure that these two parameters have the same values for all the run of the loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can try putting the clear stmnts after processing the i_assesment table whithin the loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 06:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611764#M870132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T06:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Function Module within a loop in Report Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611765#M870133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_status is transaction status and l_process is transaction type.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And throughout the loop i'm retrieving details for list of transaction ids..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the FM call, inputs status and processtype are constant. but only thing changing is transaction-id and i have checked that each transaction id is different. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i'm clearing workareas, internal table it_assessment at start of each loop (look at the code)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm debugging code for many days but not gettin any idea abt it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 04:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611765#M870133</guid>
      <dc:creator>Amey-Mogare</dc:creator>
      <dc:date>2008-03-25T04:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Function Module within a loop in Report Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611766#M870134</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;&lt;/P&gt;&lt;P&gt;You are moving the internal table lines into a work area for each loop pass. You need to clear it every loop pass.&lt;/P&gt;&lt;P&gt;Please try this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_ztfso_bp_tn into wa_ztfso_bp_tn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh it_assessment.&lt;/P&gt;&lt;P&gt;clear wa_assessment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'Z_ZRFC_GETDET_FS_OPPORTUNITY'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;process_type = l_process_type&lt;/P&gt;&lt;P&gt;transactionid = wa_ztfso_bp_tn-object_id&lt;/P&gt;&lt;P&gt;istatus = l_status&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;assessment = it_assessment[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it_assessment[] is not initial. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_assessment into wa_assessment. &lt;/P&gt;&lt;P&gt;*Some processing&lt;/P&gt;&lt;P&gt;clear : it_assessment,wa_assessment. &lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear : it_ztfso_bp_tn,wa_ztfso_bp_tn.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 05:02:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611766#M870134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T05:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Function Module within a loop in Report Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611767#M870135</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;clear the work area. i think it will work if you clear the work area after every loop pass&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 05:18:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611767#M870135</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T05:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Function Module within a loop in Report Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611768#M870136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiiiiii,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for dragging my attention to clearing workarea...&lt;/P&gt;&lt;P&gt;My problem has been resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much to you all...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 12:15:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-function-module-within-a-loop-in-report-program/m-p/3611768#M870136</guid>
      <dc:creator>Amey-Mogare</dc:creator>
      <dc:date>2008-03-25T12:15:35Z</dc:date>
    </item>
  </channel>
</rss>

