<?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 Passing INLCUDE name dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-inlcude-name-dynamically/m-p/6084584#M1357532</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;Is there any way of passing the INCLUDE name dynamically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scenario is as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement is to consolidate approx 6 enhancements (user exits) of the same name from 6 different systems into 1system . Objective is to put each of the code in an INCLUDE and then call the relevant INCLUDE based on some data maintained in a z-table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Z-table would have entries like this&lt;/P&gt;&lt;P&gt;Scenario      Include&lt;/P&gt;&lt;P&gt;S1                I1&lt;/P&gt;&lt;P&gt;S2                I2&lt;/P&gt;&lt;P&gt;S3                I3&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence final enhancement code should read the entry from z-table and accordingly pass the relevant INCLUDE name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE &amp;lt;include name from z-table&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Valuable suggestions are needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Poonam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Sep 2009 06:51:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-11T06:51:54Z</dc:date>
    <item>
      <title>Passing INLCUDE name dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-inlcude-name-dynamically/m-p/6084584#M1357532</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;Is there any way of passing the INCLUDE name dynamically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scenario is as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement is to consolidate approx 6 enhancements (user exits) of the same name from 6 different systems into 1system . Objective is to put each of the code in an INCLUDE and then call the relevant INCLUDE based on some data maintained in a z-table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Z-table would have entries like this&lt;/P&gt;&lt;P&gt;Scenario      Include&lt;/P&gt;&lt;P&gt;S1                I1&lt;/P&gt;&lt;P&gt;S2                I2&lt;/P&gt;&lt;P&gt;S3                I3&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence final enhancement code should read the entry from z-table and accordingly pass the relevant INCLUDE name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE &amp;lt;include name from z-table&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Valuable suggestions are needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Poonam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 06:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-inlcude-name-dynamically/m-p/6084584#M1357532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-11T06:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Passing INLCUDE name dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-inlcude-name-dynamically/m-p/6084585#M1357533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Poonam, 
&amp;lt;li&amp;gt; Create one function group.
&amp;lt;li&amp;gt; Write your 6 includes code in 6 function modules. function module is nothing but include in Function group.
&amp;lt;li&amp;gt;Try to give importing and exporting parameters are same.
&amp;lt;li&amp;gt;Try the below way.
&lt;PRE&gt;&lt;CODE&gt;
REPORT ZTEST_NOTEPAD.

DATA: BEGIN OF IT_FUNC OCCURS 0,
        NAME TYPE RS38L-NAME,
      END OF IT_FUNC.

"Build your it_func with function modules.
LOOP AT IT_FUNC.
  CALL FUNCTION IT_FUNC-NAME "You can call fm dynamically
    EXPORTING
      DAY_IN            = IMPORTING
      LAST_DAY_OF_MONTH = EXCEPTIONS
      DAY_IN_NO_DATE    = 1
      OTHERS            = 2.
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;
Thanks
venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 07:02:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-inlcude-name-dynamically/m-p/6084585#M1357533</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-09-11T07:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Passing INLCUDE name dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-inlcude-name-dynamically/m-p/6084586#M1357534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Poonam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your project we use this concept as well &amp;amp; we named it a sweet "User Exit Strategy" &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Z-Table instead of maintaining the INCLUDE names, maintain FM names as suggested by Venkat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scenario FMName&lt;/P&gt;&lt;P&gt;S1 FM1&lt;/P&gt;&lt;P&gt;S2 FM2&lt;/P&gt;&lt;P&gt;S3 FM3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select the FM name based on the scenario &amp;amp; call the FM in your user-exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tip: The FM params have to be same as the SAP provided Exit Module.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 07:50:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-inlcude-name-dynamically/m-p/6084586#M1357534</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-09-11T07:50:50Z</dc:date>
    </item>
  </channel>
</rss>

