Macro Doubt

Hi All,
Please anyone can explain me about these three MACROs of functions i mean to say what these macros into , and how it will work , for what we will use this macros.
these things i wanted to know
rp_set_data_interval 'P0014' pn-begda pn-endda.
rp_provide_from_last p0001 space pn-begda pn-endda.
rp-read-t001p p0001-werks p0001-btrtl space.
Thanks in Advance
Sheethal.

Some more info on Macros...
Macro contains some part of source code which will be useful for no.of applications. You can get the list of macros in the table TRMAC.
Whenever you are using the macros ,check whether you have included the relevant logical database in program attributes.
Macros can also be defined as TRMAC macros. The source code of these modules is stored in the function section of the control table TRMAC. This code is grouped under a specific name in the table key. According to conventions, the first two letters of the name must stand for the application. The rest of the name is freely definable.
Customer-specific macro modules should begin with a special character. The macros defined in the control table TRMAC can be used by all reports.

Similar Messages

  • Doubt in macros can any one plz..

    hai friends
    i knwo three macros in abap-hr..
    RP_PROVIDE_FROM_LAST P0000 SPACE PN-BEGDA PN-ENDDA. 
    RP_PROVIDE_FROM_frst P0000 SPACE PN-BEGDA PN-ENDDA. 
    rp_read_all_time_ity pn-begda pn-enda.
    can any one tell me any other FM'sa use in the hr abap-programming..?plz

    Hi satish,
    Funtion modules in HR start with RP* or HR* so you can search for them in the funtion builder SE37
    Most frequently used Fuction Modules in HR:
    HR_READ_INFOTYPE - To Read an Infotype
    RP_GET_HIRE_DATE
    HR_INFOTYPE_OPERATION
    Regards,
    Archana.
    Edited by: Archana Karukonda on Dec 17, 2007 2:25 PM

  • Running macro on Table using Report Generation Toolkit and Office 2003 Incompatible!!!!!!!

    Hi,
    I am using some functions under the Report Generation toolkit (LabView 7.1). We recently updated our test PCs from Office 2000 to 2003. The "WORD IMPORT MODULE.VI" returns error code -41113 when used with Word 2003. No problem on Word 2000.
    In fact even the example VI available under Find Examples - Run Macro on Word Table fails and returns error code -41113 when "WORD IMPORT MODULE.VI" is called on Word 2003. Word 2000 is OK.
    Any one faced this problem???? Any solution to this problem??
    I would greatly appreciate your feedback / suggestions.
    Thanks,
    Mim

    darren,
    thanks for your reply.
    After checking the the property "Trust access to Visual Basic Project" , I get the following error message:
    Exception occured in Microsoft Word, Unable to run the specified macro. Help Path is C:\Program Files\Microsoft Office\OFFICE11\1033\wdmain11.chm and context 37401 in Word Run Macro.vi->SetFirstRowAsTableHeaderforWord(Macro).vi->Generate Report.vi
    I can run the macro directly from Word.. no problem running macros in Excel dirently either. I get error message only when running macro from LabView. So, I doubt if it is an IT issue.
    You don't have a problem with Word 2003 and Word Import Module.vi???
    I am attaching my Vi-Report Generation.vi and the subvi. I would so much appreciate if you run ReportGenerate.vi on your PC and let me know if there is a problem.
    Many Thanks for your help.
    Mim
    Attachments:
    ReportGeneration.zip ‏75 KB

  • Create a Macro to Index a Word Document Line by Line

    Background
    I have collected a bunch of keywords and references to where I can find these words in a textbook.  I've put them into a Word document where each line is one Index beginning with the “Main Entry” followed by a colon and then the “Subentry”.  Note
    that in the "Subentry" I have included my reference in parenthesis (b1-m2).
    Example Original Text:
            Main Entry:Subentry (b1-m2)
    Example Marked for Index:
            Main Entry:Subentry (b1-m2){ XE "Main Entry:Subentry (b1-m2)" \t "" }
    When it was only a page of content it was no big deal to select the entire line and <Ctrl>+<Alt>+<x> then <Enter> down the line.  Now that I have about 500 lines of these word combinations, I need a more automated solution. 
    I have searched for KB articles that explain the various elements I need, though unsuccessfully since I don’t know what I need.  I doubt I am the first person to do this, so if anyone could point me to the right documents I would greatly appreciate
    it.
    As a noob, how difficult of a task is this to automate with a Macro or some other method and should I even attempt it? I have a very short window of time to figure this out.
    Nice to have: In the final index, I don't need the Word page numbering after the term.  My references are in the parenthesis.  I know how to remove it manually in Word, when I mark the index entry: Chose Options, Cross-reference
    and remove the pre-populated text of "see". That adds  \t "" to the index reference. 
    Illustrated as such:
            From: Main Entry:Subentry (b1-m2){ XE "Main Entry:Subentry (b1-m2)" }
            To:     Main Entry:Subentry (b1-m2){ XE "Main Entry:Subentry (b1-m2)" \t "" }
    My Attempt at Recording a Macro
    Having zero experience writing macro’s myself, I tried recorded a simple macro using the manual keystrokes below however the text reflected in the actual index reference does not change.  I also have to manually kick off the macro on every line of text.
    I walked through each of the steps outlined below as I was recording a macro, however when I replay the macro, the index itself contains the exact same text for every line and does not match the original text on the new line.
    I could not get the macro to repeat itself on every line.  I had to keep running it until I was done (technically, when I realized it was repeating the same text within the index reference itself) but I’d like the macro to run from beginning
    to end; line by line and then insert the Index itself at the end on a new page.
    I realize I need some kind of loop to keep the macro going line by line.
    I also need some way to mark the Main Entry within the loop (everything to the left of the colon) and then the Subentry (everything to the right of the colon to the end of the line). 
    Example “Index” Macro
    Sub Index()
    ' Index Macro
        Selection.EndKey Unit:=wdLine, Extend:=wdExtend
        ActiveWindow.ActivePane.View.ShowAll = True
        ActiveDocument.Indexes.MarkEntry Range:=Selection.Range, Entry:= _
            "TV\:The Good Wife (y2014-y2015)", EntryAutoText:= _
            "TV\:The Good Wife (y2014-y2015)", CrossReference:="", _
            CrossReferenceAutoText:="", BookmarkName:="", Bold:=False, Italic:=False
        Selection.MoveRight Unit:=wdCharacter, Count:=1
    End Sub
    Manually Marking Index Entries
    Manually, here are the keystrokes I use to iterate my way through the document.
    Manual Index Marking Keyboard Combinations:
    At the beginning of the first line, press <Shift> + <End>
    This selects the entire rows text
    Then press <Ctrl> + <Shift> + <x>
    This allows me to “Mark Index Entry”
    Then press <Enter>
    This confirms the Index entry
    Then press <Esc>
    This closes the “Mark Index Entry”
    Go to the next line and repeat.
    Replacing anchor
    Once the creation of each index is complete, I need to be able to iterate through the document and find all anchor + colons (IE: \: ) and replace with colon (IE: :). This way, the “Main entry” and “Subentry” are handled properly when the Index is inserted.
    Manual Anchor Replacement Keyboard Combinations:
    At the beginning of the Word document, press <Ctrl> + <h>
    Find what:      \:
    Replace with:   :
    Then <Alt> + <a>
    Press the "Ok" button (or make replace silent somehow)
    Then press <Esc>
    This should close the "Find and Replace" screen
    Inserting Index
    Ideally, I would like the macro to create and insert the newly marked content into an index at the end of the document.
    Manually Inserting Index Keyboard Combinations:
    Press <Ctrl> + <End>
    this takes us to the bottom of the document
    Then press <Alt> + <s>
    this chooses the "References" tab
    Next press <Alt> + <x>
    this chooses "Insert Index"
    Next press <Alt> + <t>
    This should allow you to choose a "Format" option for the index
    Next press <m>
    This should chose "Modern" from the "Formats" options
    Finally, press <Enter>
    End the macro
    Example before Indexing:
              TV:The Good Wife (y2014-y2015)
              TV:Phineas and Ferb (y2011)
              TV:Curb Your Enthusiasm (y2011-y2015)
              Game:Back to the Future (y2012)
              Made for TV Movie:The Magic 7(y2009)
              Main Entry:Subentry (b1-m2)
    Example after Indexing is completed:
    The marked up text/references did not transfer over properly from the Word document I copied my question from.  I had to manually type the text within the {} brackets for illustrative purposes here:
              TV:The Good Wife (y2014-y2015){ XE "TV:The Good Wife (y2014-y2015)" }
              TV:Phineas and Ferb (y2011){ XE "TV:Phineas and Ferb (y2011)" }
              TV:Curb Your Enthusiasm (y2011-y2015){ XE "TV:Curb Your Enthusiasm (y2011-y2015)" }
              Game:Back to the Future (y2012){ XE "Game:Back to the Future (y2012)" }
              Made for TV Movie:The Magic 7(y2009){ XE "Made for TV Movie:The Magic 7(y2009)" }
              Main Entry:Subentry (b1-m2){ XE "Main Entry:Subentry (b1-m2)" }
    Example Index 
    G
        Game
              Back to the Future (y2012) · 2
    M
        Made for TV Movie
              The Magic 7(y2009) · 2
        Main Entry
              Subentry (b1-m2) · 1,
    2
    T
         TV
              Curb Your Enthusiasm (y2011-y2015) · 2
              Phineas and Ferb (y2011) · 2
              The Good Wife (y2014-y2015) · 2
    Chris Schurman

    Once I combined my Excel knowledge and Word knowledge, this became a piece of cake.  Sharing my solution for anyone else who may have the need.  The point of this exercise is to prepare for an open book exam and I need a quick index of my books
    (there are 6 for this class).  Anyway, here is how i solved (though slightly clunky, it works in seconds!)"
    In Excel, I pieced the text together by concatenating the indexing markup and the contents of the pertinent cells as such:
        =CONCATENATE("XE """,A2,":",B2," (b",C2,"-p",D2,")"" \t """"")
    Content from Excel (with results of concantenate statement in last column:
    Heading    Slide Title    Book    Page    Copy this into notepad then into word
    Game    Back to the Future    1    12    XE "Game:Back to the Future (b1-p12)"
    Made for TV Movie    The Magic 7    2    7    XE "Made for TV Movie:The Magic 7 (b2-p7)"
    Main Entry    Subentry    3    48    XE "Main Entry:Subentry (b3-p48)"
    TV    Curb Your Enthusiasm    4    100    XE "TV:Curb Your Enthusiasm (b4-p100)"
    TV    Phineas and Ferb    5    20    XE "TV:Phineas and Ferb (b5-p20)"
    TV    The Good Wife    6    35    XE "TV:The Good Wife (b6-p35)"
    Then I paste special the "Values" of the last column into Word.
    I run the macro below (haven't figured out how to loop yet) a few doxen times an insert the index at the bottom.
        Sub Index()
        ' Index Macro
            Selection.HomeKey Unit:=wdLine
            Selection.EndKey Unit:=wdLine, Extend:=wdExtend
            Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
            Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
                PreserveFormatting:=False
            Selection.EndKey Unit:=wdLine
            Selection.MoveRight Unit:=wdCharacter, Count:=1
        End Sub
    Bam; instant Index!
    Chris Schurman

  • Macro calculation to change for one particular month of year.

    Hi All,
    I have a query for change in macro. WE have a macro to calculate Target inventory which has same calculation for all through future months for 18 months. Now my user wants to change this all future months calculation would be same except for September every year. Now What function do I use in condition for calculation to check if month is September than do a different calculation.
    Thanks
    siva

    Hi Verma,
    As u need to exclude the spetemner month you need to add the code in of clause.
    If
    new condition
    Month(row) = 9
    result row
    else
    result row.
    Inthe result row u can do ur calcualtions...
    You can do this in a new step  for the exception you want to maintain.Hope this will help you.
    Let me knw if u have further doubts.
    Thanks
    karthik

  • How can I click Acrobat Form button from VB (Excel Macro)?

    I may be asking in the wrong forum, but I'm at my wit's end and think just about anyone with VB experience would be able to tell me what I'm doing wrong. Is there a forum for interapplication/ VB/ forms questions?
    Suffice to say, I know very little about VB (or any of the other languages behind the software), but I've adapted code which has allowed me to get almost everything I need done, thus far.
    I'm trying, desperately, to finalize a Macro which enables me to export a lot of Excel info into individual Acrobat Forms and save them all independently. This all works fine, but there is one last thing I've not been able to accomplish: I need to remote click (or 'focus on') a button in the Acrobat form in order to select the icon button (dynamically set image relevant to each individual form, base on excel cell). The button's name, in Acrobat, is 'Photo1' and it is located on the 3rd page of the form. I've several SendKeys commands in order to save each file with a unique, row specific name.
    Option Explicit
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    Private Const SW_NORMAL = 1
    Public Const PDF_FILE = "Louisiana_Historic_Resource_Inventory Worksheet.pdf"
    Public Sub ClickMe()
        Application.Photo2_Click
    End Sub
    'this was an attempt to setup a sub which I'd call later...
    'all of the below stuff works fine- fills out the form, checks boxes, etc. as necessary
    Public Sub Export_Worksheet()
        Dim sFileHeader As String
        Dim sFileFooter As String
        Dim sFileFields As String
        Dim sFileName As String
        Dim sTmp As String
        Dim lngFileNum As Long
        Dim vClient As Variant
        Dim x As Integer
        ' Builds string for contents of FDF file and then writes file to workbook folder.
        On Error GoTo ErrorHandler
        x = 1
        sFileHeader = "%FDF-1.2" & vbCrLf & _
                      "%âãÏÓ" & vbCrLf & _
                      "1 0 obj<</FDF<</F(" & PDF_FILE & ")/Fields 2 0 R>>>>" & vbCrLf & _
                      "endobj" & vbCrLf & _
                      "2 0 obj[" & vbCrLf
        sFileFooter = "]" & vbCrLf & _
                      "endobj" & vbCrLf & _
                      "trailer" & vbCrLf & _
                      "<</Root 1 0 R>>" & vbCrLf & _
                      "%%EO"
        vClient = Range(ActiveSheet.Cells(989, 1), ActiveSheet.Cells(989, 90))
        Do While vClient(x, 1) <> vbNullString
        sFileFields = "<</T(Street Number)/V(---Street_Num---)>>" & vbCrLf & "<</T(Street Direction)/V(---Street_Dir---)>>"
    ''''''''''''theres a TON of the above correlations, all in the same format
            If vClient(x, 28) = "E" Then
            '     sTmp = Replace(vClient(1, 3), "-", "")
                sFileFields = Replace(sFileFields, "Cond-Excellent", "Yes")
            Else
                sFileFields = Replace(sFileFields, "Cond-Excellent", vbNullString)
            End If
            If vClient(x, 28) = "G" Then
                sFileFields = Replace(sFileFields, "Cond-Good", "Yes")
            Else
                sFileFields = Replace(sFileFields, "Cond-Good", vbNullString)
            End If
    ''''''''''''theres another TON of the above replacements, all in the same format
            sTmp = sFileHeader & sFileFields & sFileFooter
            ' Write FDF file to disk
            If Len(vClient(x, 1)) Then sFileName = vClient(x, 1) Else sFileName = "FDF_DEMO"
            sFileName = ActiveWorkbook.Path & "\Exports\" & sFileName & ".fdf"
            lngFileNum = FreeFile
            Open sFileName For Output As lngFileNum
            Print #lngFileNum, sTmp
            Close #lngFileNum
            DoEvents
            ' Open FDF file as PDF
            ShellExecute vbNull, "open", sFileName, vbNull, vbNull, SW_NORMAL
            Application.Wait Now + TimeValue("00:00:04")
            'Application.Photo2.Focus
    'PDF_FILE.Photo2.Focus
    'Application.Photo2_Click
            'Application.SetButtonIcon "Photo1", ActiveWorkbook.Path & "\Exports\" & "vClient(x, 1)" & "-1.pdf", 0
            'Application.Field.SetFocus "Photo1"
            Call ClickMe
    ''''above is where i'm trying to click the button, although I'd be just as happy if I could 'focus' on the button.
            Application.Wait Now + TimeValue("00:00:02")
            'Application.SendKeys (vClient(x, 1))
            'Application.SendKeys ("-1.pdf")
            'Application.SendKeys ("{ENTER}")
            'SetForegroundWindowap
            Application.SendKeys ("%fap")
            Application.Wait Now + TimeValue("00:00:03")
            Application.SendKeys (vClient(x, 1))
            Application.SendKeys ("{ENTER}")
            'If Len(vClient(x, 1)) Then PrintLine (vClient(x, 1)) ' Else sFileName = "_Check-Parcel"
            ''If Len(vClient(x, 1)) Then SendKeys = Len(vClient(x, 1)) Else sFileName = "_Check-Parcel" {ENTER}
            ''ShellExecute vbNull, "GetSaveFileName", sFileName, vbNull, vbNull, SW_NORMAL & vbCrLf
    '        ShellExecute vbNull, "print", sFileName, vbNull, vbNull, SW_NORMAL
            Application.Wait Now + TimeValue("00:00:02")
            Application.SendKeys ("^w")
            'ShellExecute vbNull, "close", sFileName, vbNull, vbNull, SW_NORMAL
            x = x + 1
        Loop
        Exit Sub
    ErrorHandler:
        MsgBox "Export_Worksheet Error: " + Str(Err.Number) + " " + Err.Description + " " + Err.Source
    End Sub
    I'm pretty sure one of many issues is that I don't know the fully-qualified name of the field/button, or how to properly identify it in the Macro.
    I have no doubt that my approach, if it's even possible, is clumsy and unfounded, but I am (obviously) flailing around for anything that can achieve clicking this confounded button. Any help appreciated.

    It was a button option - I haven't got access to Acrobat 8 here at home, but it was something like
    Add menu item
    File - attach to email
    When the button was clicked, the email application would open with a new email and the PDF would be attached, so you could enter the recipients email address and send.

  • ABAP HR DOUBTS

    Hi ,
      I have some doubts  in ABAP-HR.Please clarify my doubts.
    1) Provide and end provide statements are obsolate.Shall we use select in place of provide and provide?.
    2) what are the important macros in ABAP HR?
    3)Do we have to use logical data base if we are using macros?.
    Moderator message: please do not ask interview-type questions, search for available information.
    Edited by: Thomas Zloch on Jan 6, 2011 10:57 AM

    Hi Shakir,
       First of all you have to assign logical database name say PNP in the attributes of the program. After assigning the logical data base, you can see teh button below with HR REPORT CATEGORY. Click on that and select Master dat(infotypes) radio button. After that go for f4 help to see the existed HR report categories. From that you select one which contains the fields you want. If you are not able to find Hr report category with the fields you want then you need to create your own report category with the fields you want.
    If you want to select only active employees
    RP-PROVIDE-FROM-LAST p0000 space pn-begda pn-endda.
    CHECK P0000-STAT2 = '3'.
    note: '3' or some other value based on the values stored in infotype 0000 for the employment status.
    if employee is not active then it will skip that employee and selects the next employee.

  • Doubts in functional upgradation from 3.x to 7.0.

    Hi All,
    I have some doubts in functional upgradation from 3.x to 7.0.
    After migration of Transfer rules, update rules ( between the ods & cube also) & datasource.
    1). Cube & ods have filed which is added like enhanced field, do we have to do anything after migration for that filed.
    2). Is the Z object also will get migrated automatically or not ( i have zfield in the datasource).
    3). If i have a routines in the trans rules & update rules, what has to be done for these routines
    4). How the custom reports, deliverd reports and workbooks will get migrated.
    5). Macros in the web templets ( is the macros coding in the web templets also will get migrated auto matically r do we need to rewrite the coding).
    6). Is the migration steps are same for the all SD, MM, FI datasources.

    1. this should not be a problem
    2. IO is not needed to be migrated, it is not changed so much between 3x. and 7.x
    3. routines & update rules in the trans rules are migrated automatically, see
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/f00e2696d24c5fe10000000a155369/frameset.htm
    https://wiki.sdn.sap.com/wiki/display/BI/Migrationof3.xobjectstoBI7.0
    4. reports are to be migrated manually, see http://wiki.sdn.sap.com/wiki/display/BI/Migrationof3.xBExQueriestoBI7.0-Useful+Tips
    5. see https://wiki.sdn.sap.com/wiki/display/BI/QueriesorWorkbooksMigration-ErrorsandFixes
    6. in general yes.

  • You need to have xlsm where you can access the macro in numbers.  this is frustrating that the idea of Numbers is to make it like Excel yet you dont have this capability.  Question is, when will it happen or will it happen????

    You need to have xlsm where you can access the macro in numbers.  this is frustrating that the idea of Numbers is to make it like Excel yet you dont have this capability.  Question is, when will it happen or will it happen????

    Hi brev,
    Several points here:
    1. Although there is some compatibility between Numbers and Excel files, I doubt very much that "the idea of Numbers is to make it like Excel." The two applications share some similarities, but also have several differences.
    2. Your Question is unanswerable in this forum. Apple does not generally reveal future development plans or schedules for its applications, and anyone with knowledge of those plans will be bound by a non-disclosure agreement.
    3. "You need to" implies a feature request. If you want to request that a feature be added to a future version of Numbers, that request is better made directly to Apple, via the Feedback channel, than here, where the readers and responders are all users of the software, not developers. From the application menu (the "Numbers" menu in Numbers), choose Provide Numbers Feedback, then make your request for a feature to be added to Numbers.
    Meantime, if you absolutely need the macros capabilities of MS Excel, try one of the Office clones—OpenOffice.org, LibreOffice, or NeoOffice, which may offer macro support, or use the Mac version of Excel itself.
    Regards,
    Barry

  • InDesign CS/CS2 Mac - making a target-specific macro

    Hello.
    This is more a CodeWarrior question than an InDesign question, but because the difficulty is caused by the SDK, I am asking the question here. If anyone objects to the question, I recommend not responding.
    I want to do this in one of my projects (greatly simplified code to illustrate concept only):
    void MyCall(PMString AString)
    #ifdef PRE_RELEASE_VERSION
    CAlert::InformationAlert(AString);
    #endif
    I want to set up my project so that if I am running a prerelease version of my plugin, PRE_RELEASE_VERSION is automatically defined by a compiler flag.
    In Visual Studio this is simplicity, itself. The flag is something like /DPRE_RELEASE_VERSION. I can include it in the Preprocessor definitions field in the Properties pane. In XCode, a similar feature is present. But I have spent the last two hours studying CW8 and CW9 for a similar ability, and the closest I can come is to modify the SDKPluginPrefix.h file, which is the file automatically placed by Dolly in the Prefix File field of the C++ Language pane in the CW Target Settings Panels.
    The problem is that we are not allowed to modify the SDK, as part of the rules we agree to when we download the SDK. Now, I suspect that if I did modify the SDKPluginPrefix.h file to include an additional #define statement, I doubt that Adobe would come hunting me down, nevertheless, I would rather honor that agreement.
    Another possibility is some elaborate scheme of header files included in only one target, etc, but I would rather seek simplicity, if at all possible.
    Is there
    b any other way
    to set up a macro in CW for a single target only?
    TIA!
    John

    if you are using CW8, click on the target settings on the Project Window. Under the Language Settings > C/C++ Language, enter your own "Prefix File" name. In this of your own prefix file, #include "SDKPluginPrefix.h" and enter whatever you feel like defining.
    In CW 9, click on the target settings, too but look for C/C++ Preprocessor. do your #define there.
    Since these are per target settings, you will need to do the same for all the targets.
    HTH.
    pete

  • Use of 'Run macro' in the form field dialog

    Hi Tim,
    Can you please explain the use of the 'Run macro on' on the form field dialog box in the XMLP template.
    One can see the following on the 'Text Form Field Options' dialog box:
    Run macro on
    Entry Exit
    runRTFtoRTF runRTFtoRTF
    runRTFtoXLIFF runRTFtoXLIFF
    runRTFtoXLS runRTFtoXLS
    The above are option values in it. Please explain their usage. I couldnot find anything about it in the XMLP Guide. I am currently using XMLP 5.5 with EBS 11.5.10
    Thanks,
    Nitin

    Form fields are not an XMLP feature. They are part of MS word. Look at the MS doco for information on it. I doubt there is a way that can be used in conjunction with XMLP however.

  • Regarding Macros

    Hi,
    I am kumar. I got job right now i am a trainee in HR ABAP. I got a doubt.
    What is Macro and what is the need of Macros in HR ABAP? Why can't we use subroutines and function modules? what is the difference between Macros, Subroutines and Function Mudules?
    bye
    phanikumar

    hi,
    Go to se38. CTRL+F8 type in define and press enter.
    This is the SAP help about the subject on Macros and helps you understand how they work.
    In ABAP HR however there are lots of macros used, which can be found in the table TRMAC.
    A couple of these provide easier reading of the code and can help in coding.
    Som HR examples are:
    rp-provide-from-last, this one selects data from an infotype
    RP-LOWDATE-HIGHDATE this one defines the data element low-date and high-date, also used a lot in HR abap.
    If you come upon a macro in SAP standard, enter that one in TRMAC sometimes the functionality is explained in that table.
    Kind regards, Rob Dielemans

  • Macros definition in SOP

    Hi,
    I have got some doubts about macro definitions in SOP.
    First, I would like to know how to use the ">" and "<" operators. Sometimes in the sequence of instructions they seem to behave as IF sentences.
    Example
    Operand 1           Operator             Operand 1           Result
          A                       >                        0                       A
    Moreover I would like to know how to refer to an operand in a certain column in my table.
    Thus, I would be very grateful if someone could tell where to get an useful SOP macros tutorial.
    Thanks in advance.

    Hi, here you can find the operations (formulas) that we would like to implement using simple macros in the MC8A transaction, and all the fields involved. Obviously, we can create any other auxiliar field that might we need. Please do not care about row names since they are in Spanish.
    FIRST OPERATION
    Row names involved
    -Cantidad picaroles previsión segura  -
    A
    -Cantidad de picaroles (interface) -
    B
    -Previsiones seguras -
    >C
    Operation to implement
    A = MAX (B,C)
    SECOND OPERATION
    -Cantidad teórica picarol -
    A
    -Cantidad picaroles previsión segura   -
    B
    -Cantidad picaroles 100 (INTERFACE)  -
    C
    -Cantidad picarol mix o Dummy -
    D
    Operation to implement
    D = IF ((A-(BC))<0; 0; (A-(BC)))
    Thanks a lot again for your help. This is very urgent so I would be very grateful if you could please at least spend some time in finding a solution.
    Ben.

  • Macros date range

    Hi,
    I am working on APO version 3.0A. I am trying to change the date range for the macros, i.e. iterations and weeks. I have activated the macro, but that change doesn't have any impact on the result, and when I checked the macro again the date range hasn't been changed.
    if anyone has any idea working on this problem in version 3.0A?
    I have made this changes in production system itself.
    Thanks
    Regards
    Jignesh

    Jignesh,
    In the poperties for step fo the Macros try the following:
    Dont use Automatic Column Adjustment From Column
    Dont use Automatic Column Adjustment To Column
    Just give From Period and to Period and let it calculat the number of iterations.
    Then GENERATE the macro (I assume by saying activating the macro in our query you meant generation as they are separate things in Macro Workbench).
    Try this and see if the calculations are fine. I have a doubt that the combination of th checkboxes and iterations is causing the issue.
    Regards,
    Abhi

  • How to use macro 'TIMESHIFT_FORWARDS'

    Hi experts,
    I can't get appropriate result using macro 'TIMESHIFT_FORWARDS()'. Please advise how to use this function.
    I would like to shift key1 data by offset in Key2.  I've tried like below two but never works.
    Step(2008/10 to 2008/12)
      ActionBox
         TIMESHIFT_FORWARDS(
           Area(Key1 which is Sales Quantity)
           Area(Key2 which is Offset)
    Step(2008/10 to 2008/12)
      Key1 (2008/10)
         TIMESHIFT_FORWARDS(
           Area(Key1 which is Sales Quantity)
           Area(Key2 which is Offset)
      Please adivise if you ever tried this.

    Hi Anha,
          Your syntax is not correct. Here is how it should be:
    Step(2008/10 to 2008/12)
    ActionBox
    TIMESHIFT_FORWARDS(
    Area{(Key1 which is Sales Quantity)(2008/10);(Key1 which is Sales Quantity)(2008/12)}
    Area{(Key2 which is Offset)(2008/10);(Key2 which is Offset)(2008/12)}
    In the above syntax, replace { by [ and { by ]. [ stands for tag link in this forum.
    In case you are still in doubt, refer to the planning book 9AEXAMPLES in macro workbench ( /sapapo/advm)
    Hope this helps

Maybe you are looking for