<?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: Constructing ABAP statement dynamically... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237104#M1381587</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see documentation on &lt;STRONG&gt;PERFORM ... IF FOUND&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may solve your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 03 Oct 2009 21:55:13 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2009-10-03T21:55:13Z</dc:date>
    <item>
      <title>Constructing ABAP statement dynamically...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237096#M1381579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gurus,&lt;/P&gt;&lt;P&gt;I have a custom report (ZREPTA) which calls another generic custom program (ZGENERIC) inside. This program is&lt;/P&gt;&lt;P&gt;used by many other custom reports. Now this generic custom program has as a perform routine. The form-endform for this perform is written in the custom report which is calling the generic custom program. Now its not necessary that  all custom reports needs the peform routine of generic custom program (ZGENERIC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is how do I build the following ABAP lines of dynamically so that even if other program&lt;/P&gt;&lt;P&gt;say ZREPTC calls ZGENERIC, it won't be a problem even if it does not have form routine defined&lt;/P&gt;&lt;P&gt;since the perform statement in ZGENERIC is build dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;perform post_process tables doc_connect.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jainam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jainam Shah on Oct 2, 2009 9:08 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jainam Shah on Oct 2, 2009 9:08 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2009 19:08:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237096#M1381579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-02T19:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing ABAP statement dynamically...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237097#M1381580</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;if you are sure that only ZREPTA will be using that perform routine, then in the ZGENERIC report you may add the condition   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 if sy-cprog = 'ZREPTA'.
post_process tables doc_connect.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By this only if the calling program is ZREPTA, the perform will be executed and for others it will be skipped&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2009 19:21:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237097#M1381580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-02T19:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing ABAP statement dynamically...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237098#M1381581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No I don't want to do like that. Because I am working on module development in whcih there can be 100's of reports from which some will and some won't use that.    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is soemthing called 'GENERATE SUBROUTINE POOL tab name prog', which I guess I can use with append statements to build ABAP code.&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;Jainam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jainam Shah on Oct 2, 2009 9:26 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jainam Shah on Oct 2, 2009 9:28 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2009 19:26:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237098#M1381581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-02T19:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing ABAP statement dynamically...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237099#M1381582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Avoiding the temptation to use generic subroutines is the best option in my opinion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Because I am working on module development in whcih there can be 100's of reports from which some will and some won't use that. &lt;/P&gt;&lt;P&gt;Why dont you create a function mode then which only uses this form if requested to do so). But it also might involve exposing the parameter to it's interface so you need to be carefull if it is remote enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is what FM's are for  -&amp;gt; modularization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Oct 2, 2009 10:01 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2009 19:55:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237099#M1381582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-02T19:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing ABAP statement dynamically...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237100#M1381583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many generic SAP applications implement a callback mechanism (ALV, etc.). You can do the same way, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zrepta :&lt;/P&gt;&lt;P&gt;PERFORM routine IN PROGRAM zgeneric USING 'ZREPTA' '&amp;lt;callback_routine&amp;gt;' ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zgeneric :&lt;/P&gt;&lt;P&gt;PERFORM (callback_routine) IN PROGRAM (callback_report) TABLES doc_connect IF FOUND.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2009 23:41:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237100#M1381583</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-10-02T23:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing ABAP statement dynamically...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237101#M1381584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi julius,&lt;/P&gt;&lt;P&gt;Any cons of using generic subroutines?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="16" __jive_macro_name="size"&gt;кu03B1ятu03B9к&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2009 03:52:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237101#M1381584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-03T03:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing ABAP statement dynamically...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237102#M1381585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;- bad performance if used repeatedly&lt;/P&gt;&lt;P&gt;- not easy to maintain : you must maintain the generator instead of the code itself&lt;/P&gt;&lt;P&gt;- source disappears when the internal session ends, it's VERY disturbing in case of bug. And there is no cross-ref (where-used list).&lt;/P&gt;&lt;P&gt;- 36 calls maximum by internal session&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2009 09:21:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237102#M1381585</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-10-03T09:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing ABAP statement dynamically...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237103#M1381586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jainam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;be careful, better stay away from GENERATE SUBROUTINE POOL because it causes an implicit database commit. All database modifications done before are not rolled back in cause of subsequent error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2009 21:48:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237103#M1381586</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2009-10-03T21:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing ABAP statement dynamically...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237104#M1381587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see documentation on &lt;STRONG&gt;PERFORM ... IF FOUND&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may solve your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2009 21:55:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237104#M1381587</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2009-10-03T21:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Constructing ABAP statement dynamically...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237105#M1381588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;repeat_of_already_provided_answer_removed_by_moderator&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Oct 4, 2009 7:35 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Oct 2009 05:03:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructing-abap-statement-dynamically/m-p/6237105#M1381588</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-10-04T05:03:37Z</dc:date>
    </item>
  </channel>
</rss>

