<?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: regarding macros in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495591#M840696</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Macros are statements which are converted into code snippets at the time of Program Execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These codes are general functions which are used in many programs in HR ABAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples of Macros are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RP-PROVIDE-FROM-LAST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	This macro is used to retrieve the last data record which is valid in the data selection period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RP-PROVIDE-FROM-FRST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This macro is used to retrieve the first data record which is valid in the data selection period.&lt;/P&gt;&lt;P&gt;Provide and Endprovide are used as Looping Constructs while using LDB.&lt;/P&gt;&lt;P&gt;PROVIDE / ENDPROVIDE&lt;/P&gt;&lt;P&gt;All the data which satisfies the conditions associated with the Provide and Endprovide  statements is picked for each Employee between the given Intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refer this example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;infotypes: 0000,0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rp_provide_from_last p0001 space sy-datum sy-datum.&lt;/P&gt;&lt;P&gt;write: / pernr-pernr , p0001-begda, p0001-endda.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sreelakshmi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Mar 2008 05:49:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-04T05:49:55Z</dc:date>
    <item>
      <title>regarding macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495586#M840691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i just want to know about macros.how it works.specially i &lt;/P&gt;&lt;P&gt;want to know about placeholders.&lt;/P&gt;&lt;P&gt;can anybody please give example of more than 1 placeholders used in macros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2008 04:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495586#M840691</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-04T04:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: regarding macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495587#M840692</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;The following statement block defines a macro macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE makro.&lt;/P&gt;&lt;P&gt;   statements&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_mod_tech_macros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: result TYPE i,&lt;/P&gt;&lt;P&gt;      n1     TYPE i VALUE 5,&lt;/P&gt;&lt;P&gt;      n2     TYPE i VALUE 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE operation.&lt;/P&gt;&lt;P&gt;  result = &amp;amp;1 &amp;amp;2 &amp;amp;3.&lt;/P&gt;&lt;P&gt;  output   &amp;amp;1 &amp;amp;2 &amp;amp;3 result.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE output.&lt;/P&gt;&lt;P&gt;  write: / 'The result of &amp;amp;1 &amp;amp;2 &amp;amp;3 is', &amp;amp;4.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;operation 4 + 3.&lt;/P&gt;&lt;P&gt;operation 2 ** 7.&lt;/P&gt;&lt;P&gt;operation n2 - n1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This produces the following output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of 4 + 3 is          7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of 2 ** 7 is        128&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of N2 - N1 is          1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vasudha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2008 04:23:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495587#M840692</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-04T04:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: regarding macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495588#M840693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Macros&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to reuse the same set of statements more than once in a program, you can include them in a macro. For example, this can be useful for long calculations or complex WRITE statements. You can only use a macro within the program in which it is defined, and it can only be called in lines of the program following its definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following statement block defines a macro macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DEFINE makro.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;statements&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;END-OF-DEFINITION.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must specify complete statements between DEFINE and END&amp;amp;#8209;OF&amp;amp;#8209;DEFINITION. These statements can contain up to nine placeholders &amp;amp;1, &amp;amp;2,...., &amp;amp;9). You must define the macro before the point in the program at which you want to use it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macros do not belong to the definition part of the program. This means that the DEFINE statement block is not interpreted before the processing blocks in the program. At the same time, however, macros are not operational statements that are executed within a processing block at runtime. When the program is generated, macro definitions are not taken into account at the point at which they are defined. For this reason, they do not appear in the overview of the structure of processing logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A macro definition inserts a form of shortcut at any point in a program and can be used at any subsequent point in the program. As the programmer, you must ensure that the macro definition occurs in the program before the macro itself is used. Particular care is required if you use both macros and include programs, since not all include programs are included in the syntax check (exception: TOP include).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use a macro, use the following form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;makro [p1 p2... p9].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the program is generated, the system replaces the macro by the appropriate statements and the placeholders &amp;amp;1, &amp;amp;2, &amp;#133;, &amp;amp;9 by the parameter p1, p2, &amp;#133;, p9. You can use macros within macros. However, a macro cannot call itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************************************&lt;/P&gt;&lt;P&gt;REPORT ZMACRO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: RESULT TYPE I,&lt;/P&gt;&lt;P&gt;      N1     TYPE I VALUE 5,&lt;/P&gt;&lt;P&gt;      N2     TYPE I VALUE 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE OPERATION.&lt;/P&gt;&lt;P&gt;   RESULT = &amp;amp;1 &amp;amp;2 &amp;amp;3.&lt;/P&gt;&lt;P&gt;   OUTPUT   &amp;amp;1 &amp;amp;2 &amp;amp;3 RESULT.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE OUTPUT.&lt;/P&gt;&lt;P&gt;   WRITE: / 'The result of &amp;amp;1 &amp;amp;2 &amp;amp;3 is', &amp;amp;4.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPERATION 4 + 3.&lt;/P&gt;&lt;P&gt;OPERATION 2 ** 7.&lt;/P&gt;&lt;P&gt;OPERATION N2 - N1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This produces the following output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of 4 + 3 is          7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of 2 ** 7 is        128&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of N2 - N1 is          1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the two macros operation and output are defined. output is nested in operation. operation is called three times with different parameters. Note how the placeholders &amp;amp;1, &amp;amp;2,... are replaced in the macros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2008 04:23:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495588#M840693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-04T04:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: regarding macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495589#M840694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check this.&lt;/P&gt;&lt;P&gt;[help.sap.com/saphelp_nw70/helpdata/en/9f/db972835c111d1829f0000e829fbfe/content.htm - 22k ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2008 04:25:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495589#M840694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-04T04:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: regarding macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495590#M840695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;ABAP, SAP's programming language, is no exception. It leverages various modularization options, each having its own strengths and weaknesses. These options may have local access from a particular program&amp;#151;such as form routines and macros&amp;#151;or they may have global access, such as function modules or include programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although a comprehensive discussion of all the modularization techniques available in ABAP is beyond the scope of this article, we can look at one option&amp;#151;macros&amp;#151;and consider some situations where they work better than other options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Getting a feel of macros&lt;/P&gt;&lt;P&gt;The basic syntax of macros is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE  macro_name.                           "Macro Definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#133;&amp;#133;&amp;#133;&amp;#133;&amp;#133;. Statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#133;&amp;#133;&amp;#133;&amp;#133;&amp;#133;. Statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#133;&amp;#133;&amp;#133;&amp;#133;&amp;#133;&amp;#133;&amp;#133;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.                            "Macro Definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         macro_name  par1 par2 &amp;#133;par9.        "Macro call -parameters separated by spaces&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the DEFINE... and END-OF-DEFINITION lies the body of the macro&amp;#151;the statements that you wish to be executed each time the macro is called. These statements may be any valid ABAP statements, such as WRITE, CLEAR, FORM calls, or database statements such as SELECT or UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To familiarize yourself with the working of macros, it's necessary to take a close look at exactly what happens when an ABAP program containing a macro call is generated. Consider Listing A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All ABAP programs must be generated before they can be executed. At the time of program generation, the system supplants each macro call, as shown in Listing A, with the statement(s) placed between the macro definition. Furthermore, the parameters passed at the time of macro calling are copied in place of the any placeholders (numbered &amp;amp;1, &amp;amp;2 &amp;#133;&amp;amp;9) found in the body of the macro definition. The system simply ignores the presence of the macros during the execution of the program&amp;#151;that is, all statements are executed as a single block of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        write :  int1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        write :  int2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        write :  int3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other than readability and meaningfulness, macros also offer performance advantages. For testing purposes, I wrote a macro that incremented the value of a variable by 1 and called the macro N times via a DO loop, as shown here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE INCREMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ADD 1 TO &amp;amp;1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DO N TIMES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INCREMENT VAR1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The runtime was measured using an SAP tool known as the Runtime Analyzer (SE30) for different values of N. To check performance, I copied the same program but replaced the macro call and definition with those of form routines. Table A shows a comparison of the performance of both macros and form routines(all times in microseconds). Macros, in this case, were nine times faster than forms routines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N  1000  10000  100000  &lt;/P&gt;&lt;P&gt;Form  731  6974  71236  &lt;/P&gt;&lt;P&gt;Macros  74  708  7134  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Applying macros to suit business needs&lt;/P&gt;&lt;P&gt;Apart from their readability and efficiency, macros can be more effective than other modularization techniques because of their versatility in replacing different ABAP statements in solving business problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP provides only the syntax for creating macros. It's up to the programmer to devise ways that best suit the requirements. The power of macro programming lies in mastering the ways macros can be used in ABAP programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macros can be used for different purposes within the SAP terrain. I have tried to compile the variety of ways I've seen macros adding elegance to ABAP applications. Here's a closer look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data declaration&lt;/P&gt;&lt;P&gt;You can use macros to define variables. A simple example is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: &amp;amp;1 like &amp;amp;2 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table itab1 lfa1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table itab2 pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of writing the same data declaration statement each time a new variable is declared, you can simply reuse the code via macros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;vasavi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2008 04:30:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495590#M840695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-04T04:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: regarding macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495591#M840696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Macros are statements which are converted into code snippets at the time of Program Execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These codes are general functions which are used in many programs in HR ABAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples of Macros are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RP-PROVIDE-FROM-LAST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	This macro is used to retrieve the last data record which is valid in the data selection period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RP-PROVIDE-FROM-FRST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This macro is used to retrieve the first data record which is valid in the data selection period.&lt;/P&gt;&lt;P&gt;Provide and Endprovide are used as Looping Constructs while using LDB.&lt;/P&gt;&lt;P&gt;PROVIDE / ENDPROVIDE&lt;/P&gt;&lt;P&gt;All the data which satisfies the conditions associated with the Provide and Endprovide  statements is picked for each Employee between the given Intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refer this example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;infotypes: 0000,0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rp_provide_from_last p0001 space sy-datum sy-datum.&lt;/P&gt;&lt;P&gt;write: / pernr-pernr , p0001-begda, p0001-endda.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sreelakshmi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2008 05:49:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495591#M840696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-04T05:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: regarding macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495592#M840697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;DEFINE operation.&lt;/P&gt;&lt;P&gt;result = &amp;amp;1 &amp;amp;2 &amp;amp;3.&lt;/P&gt;&lt;P&gt;output &amp;amp;1 &amp;amp;2 &amp;amp;3 result.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE output.&lt;/P&gt;&lt;P&gt;write: / 'The result of &amp;amp;1 &amp;amp;2 &amp;amp;3 is', &amp;amp;4.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;operation 4 + 3.&lt;/P&gt;&lt;P&gt;operation 2 ** 7.&lt;/P&gt;&lt;P&gt;operation n2 - n1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i am not able to understand placeholders used here.&lt;/P&gt;&lt;P&gt;plz tell under define operation u have written&lt;/P&gt;&lt;P&gt; output &amp;amp;1 &amp;amp;2 &amp;amp;3 result.&lt;/P&gt;&lt;P&gt;then in second macro u have defined output as a macro.&lt;/P&gt;&lt;P&gt;what is that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 04:18:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495592#M840697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T04:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: regarding macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495593#M840698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vasuddha,&lt;/P&gt;&lt;P&gt; goodmorning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am not able to understand placeholders used here.&lt;/P&gt;&lt;P&gt;plz tell under define operation u have written&lt;/P&gt;&lt;P&gt; output &amp;amp;1 &amp;amp;2 &amp;amp;3 result.&lt;/P&gt;&lt;P&gt;then in second macro u have defined output as a macro.&lt;/P&gt;&lt;P&gt;what is that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 04:20:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495593#M840698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T04:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: regarding macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495594#M840699</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;they are placeholders.at runtime they are replaced by values pass in the implementation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output macro is being called from operation macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must specify complete statements between DEFINE and END-OF-DEFINITION. These statements can contain up to nine placeholders (&amp;amp;1, &amp;amp;2, ..., &amp;amp;9). You must define the macro before the point in the program at which you want to use it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 04:29:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-macros/m-p/3495594#M840699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T04:29:06Z</dc:date>
    </item>
  </channel>
</rss>

