<?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: How can i create a function in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888251#M1790809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before I forget, you can also create global macro's within table TRMAC. But this is very very very dangerous, since it's able to mess up existing code which might change in how it works when regenerate (variables which contain parts of the global macros when activating them etc. etc.) If you have a real good idea for such a function, you better contact SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;H4&gt;&lt;SPAN style="color: #000080; font-size: 10pt;"&gt;As well as in the source code of a program, you can also store macros in the database table TRMAC, where they can be used by any program. The system first searches in the current program for a macro, and then in the table TRMAC. Do not define your own macros in TRMAC. One example of a macro in TRMAC is &lt;STRONG style="font-size: 10pt; font-family: 'Courier New';"&gt;break&lt;/STRONG&gt;, which sets a breakpoint in the system field &lt;STRONG style="font-size: 10pt; font-family: 'Courier New';"&gt;sy-uname&lt;/STRONG&gt;, depending on the current user name.&amp;nbsp; &lt;/SPAN&gt;&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Oct 2013 19:12:33 GMT</pubDate>
    <dc:creator>former_member192854</dc:creator>
    <dc:date>2013-10-30T19:12:33Z</dc:date>
    <item>
      <title>How can i create a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888249#M1790807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i know my question seems weird but what i am asking about is NOT how to create function modules i know how to do that, the functions i mean are the ones like STRLEN() and TRUNC() functions that can be called directly without "CALL FUNCTION EXPORTING&amp;nbsp; something" can somebody tell me how to create functions like that in SAP?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2013 18:53:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888249#M1790807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-30T18:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888250#M1790808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might consider using macro's?&lt;/P&gt;&lt;P&gt;But if things fail, you might add up with lot's of code which you can't debug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So next best thing is to make a class with methods containing the commong functions you need. Or you might apply to SAP Labs to develop some new functionality :-).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2013 19:08:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888250#M1790808</guid>
      <dc:creator>former_member192854</dc:creator>
      <dc:date>2013-10-30T19:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888251#M1790809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before I forget, you can also create global macro's within table TRMAC. But this is very very very dangerous, since it's able to mess up existing code which might change in how it works when regenerate (variables which contain parts of the global macros when activating them etc. etc.) If you have a real good idea for such a function, you better contact SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;H4&gt;&lt;SPAN style="color: #000080; font-size: 10pt;"&gt;As well as in the source code of a program, you can also store macros in the database table TRMAC, where they can be used by any program. The system first searches in the current program for a macro, and then in the table TRMAC. Do not define your own macros in TRMAC. One example of a macro in TRMAC is &lt;STRONG style="font-size: 10pt; font-family: 'Courier New';"&gt;break&lt;/STRONG&gt;, which sets a breakpoint in the system field &lt;STRONG style="font-size: 10pt; font-family: 'Courier New';"&gt;sy-uname&lt;/STRONG&gt;, depending on the current user name.&amp;nbsp; &lt;/SPAN&gt;&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2013 19:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888251#M1790809</guid>
      <dc:creator>former_member192854</dc:creator>
      <dc:date>2013-10-30T19:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888252#M1790810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An alternative could be to create static functional methods in a class, like z=&amp;gt;strlen( ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 13:05:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888252#M1790810</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-31T13:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888253#M1790811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you perhaps provide an example link?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 13:12:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888253#M1790811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-31T13:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888254#M1790812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what I meant to say:&lt;/P&gt;&lt;P&gt;Create global class with a short name, like Z.&lt;/P&gt;&lt;P&gt;Create functional method, that has receiving parameter. Something like cl_abap_typedescr=&amp;gt;describe_by_data( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your class named Z has static function method named strlen( ) that accepts string and returns length, it can be invoked using &lt;EM&gt;lv_len = z=&amp;gt;strlen( lv_str )&lt;/EM&gt;. This is close to &lt;/P&gt;&lt;P&gt;&lt;EM&gt;lv_len = strlen( lv_str ).&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 13:28:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888254#M1790812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-31T13:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888255#M1790813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its not exactly what i was looking for but it is as close as it gets and its much more code friendly than full function module calls specially if it is being used multiple times throughout the code, Thanks. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1925/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Nov 2013 08:28:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-create-a-function/m-p/9888255#M1790813</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-03T08:28:47Z</dc:date>
    </item>
  </channel>
</rss>

