Use of macros in abap- HR

Hi Gurus,
       What is the exact use of macros in abap-hr.Because in normal abap also these macros are existing , but we will not use these in normal abap programming.So is there any specific reason for using macros in ABAP-HR.
Thanks in advance..
Regards,
Rakesh.

This is similar to Logical Database usage. We use LDBs in HR more than in other module. SAP has created many macros that can be used in HR. Ex: you have some macros to make use of when using PNP LDB in your program. Similarly SAP provided macros to read text from PCL1 cluster table. Same thing with reading payroll results. In addition you also can define your own macros in the program and use them in the code.

Similar Messages

  • Running abap programs using the macros

    In our DP implementation we have faced several issues in the extraction of the data from the demand planning to one of the legacy system. We have written the ABAP program and would be using the read planning book bapi. I wanted to run the ABAP program using the macro could some one please let me know what is the structure of the macro builder that is used to fire the ABAP program. this is being fired from the macros as some comparison is to be done to run the macro.

    Hi,
    Some more information on macro function
    REPORT_SUBMIT()
    REPORT_SUBMIT( 'program_name' ;  <'job_name'> ; <'job_number'>; <'newmode'>) causes the specified program to be executed. Use the optional arguments, job name and job number, if you wish the program to run in the background. If you set the argument 'newmode', the results are displayed in a new window.
    Hope this will helps you.
    Regards,
    Sunitha.

  • How to call HR Macros in ABAP-Webdynpro

    HI all,
    I want to extract HR data in webdynpro view.
    Where should I give Logical Database PNP?
    The ifnotypes key word is not accepting in Webdynpro coding?
    Where should I give GET PERNR event in Webdynpro?
    When I use RP_PROVIDE_FROM_LAST .... says error message
    Statement "RP_PROVIDE_FROM_LAST" is not defined. Check your spelling .
    How to use the Macros in Webdynpro (VIEW) methods.
    First time I'm working in ABAP-HR Webynpro.
    Please help me out..
    Thanks,
    Prasad

    Hi,
    How did u  solve this? pls provide the solution.
    Regards,
    Lakshmi.

  • Calling HR Macros in ABAP-Webdynpro

    HI all,
    I want to extract HR data in webdynpro view.
    Where should I give Logical Database PNP?
    The ifnotypes key word is not accepting in Webdynpro coding?
    Where should I give GET PERNR event in Webdynpro?
    When I use RP_PROVIDE_FROM_LAST .... says error message 
    Statement "RP_PROVIDE_FROM_LAST" is not defined. Check your spelling .
    How to use the Macros in Webdynpro (VIEW) methods.
    First time I'm working in ABAP-HR Webynpro.
    Please help me out..
    Thanks,
    Prasad

    Hi,
    I suspect that you are in a right forum. Please post it to appropriate forum.

  • Possible to call a transaction from a planning book using a macro button?

    Hi All,
    Is it somehow possible to call a transaction using a macro button in the planning book? Also, the current selection should be passed as input parameters to the transaction.
    In my example, I am trying to run the transaction /SAPAPO/MC90 - Release to Supply Network Planning from the Demand Planning  Planning Book/Data View. This way if planners need to change forecasts mid month for specific selections, they can easily transfer to SNP without having to go out of interactive planning.
    Thank you,
    Maria

    Hello Maria,
              It's possible to call a transaction from a planning book using a macro button.
    What you can do is ..... Create a function module and inside it use the command "Call Transaction Tcode"  (ABAPer can do this) to call ur specific transaction. And this module can in turn be called from your macro. Please find the below link which explanis how to call a function module from a macro. Do let me know if you need more information on this.
    Calling a function module from APO Macro
    Regards,
    Siva.

  • Execute Infopackage Through BAPI Using Excel Macro (BAPI_IPAK_START)

    Hi everyone,
    I have a problem when execute infopackage through BAPI using excel macro. I have create a button in macro. When this button is clicked, BAPI for trigger InfoPackage will executed (BAPI_IPAK_START) and this button will disabled.
    After this process completely done (traffic indicator for the request is green in update rules), the button will enabled again.
    Here the subroutine or pseudocode that i will write :
    Private Sub ClickButton()
    Begin
    1. ThisButton.Activated = False   --> Disabled Button
    2. Call BAPI/custom Function Module to execute InfoPackage (BAPI_IPAK_START)
    4. ThisButton.Activated = True   --> Enabled Button
    End
    The problem is i need some statement like this between statement no 2 and statement no 4
    Statement That I Want :
    3. Wait Until BAPI Execute Completely
    So user can click this button again only after the process is finished completely. I don't know how to do this in macro (in ABAP i know i can use "WAIT ... SECOND"), others said this can be done using event in schedule option at infopackage. Anyone,please help me.
    Thank you.
    Regards,
    Satria B

    Enter that req number in RSRQ and monitor the load
    or  right click on the DS - manage - you will req in yellow status which is in progress and you can click on the ...takes you monitor screen
    Edited by: Srinivas on Jul 6, 2010 7:51 AM

  • How to translate an excel macro to ABAP code

    Hi Guys,
    My requirement is need to put the subtotaling option w.r.t divison when i download the file to an excel sheet via OLE.
    Iam able to get the records in the excel sheet but unable to write the macro in ABAP code.
    the macro which i recorded in Excel is
    Range("A1:C3").Select
    Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(3), _
    Replace:=True, PageBreaks:=False, SummaryBelowData:=True
    how do i convert this into ABAP code .Pls help. Thanks...
    the data might be like
    NAME DIVISION AMOUNT
    ABC IT 400
    DEF BPO 500
    HTG IT 400

    Hi,
    You can run an excel macro like this
    CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
    Call Method of h_excel 'WORKBOOKS' = h_mapl.
    set property of h_excel 'VISIBLE' = 0.
    Call Method of h_mapl 'OPEN'
    EXPORTING
    #1 = d_file.
    CALL METHOD OF H_EXCEL 'ActiveWorkbook' = h_book .
    CALL METHOD OF H_book 'Activesheet' = H_sheet .
    CALL METHOD OF h_excel 'RUN'
    EXPORTING
    #1 = ld_macro.
    Check the links below as well
    http://sample-code-abap.blogspot.com/2009/07/controlling-excel-using-ole-automation.html
    http://arthur_ong.tripod.com/xab017.htm

  • Translating an excel macro to ABAP

    Hi Guys,
      My requirement is need to put the subtotaling option w.r.t divison when i download the file to an excel sheet via OLE.
    Iam able to get the records in the excel sheet but unable to write the macro in ABAP code.
    the macro which i recorded in Excel is
    Range("A1:C3").Select
        Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(3), _
            Replace:=True, PageBreaks:=False, SummaryBelowData:=True
    how do i convert this into ABAP code .Pls help. Thanks...
    the data might be like
    NAME  DIVISION   AMOUNT
    ABC     IT              400
    DEF      BPO         500
    HTG     IT              400

    Hi,
    You can run an excel macro like this
    CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
    Call Method of h_excel 'WORKBOOKS' = h_mapl.
    set property of h_excel 'VISIBLE' = 0.
    Call Method of h_mapl 'OPEN'
    EXPORTING
    #1 = d_file.
    CALL METHOD OF H_EXCEL 'ActiveWorkbook' = h_book .
    CALL METHOD OF H_book 'Activesheet' = H_sheet .
    CALL METHOD OF h_excel 'RUN'
    EXPORTING
    #1 = ld_macro.
    Check the links below as well
    http://sample-code-abap.blogspot.com/2009/07/controlling-excel-using-ole-automation.html
    http://arthur_ong.tripod.com/xab017.htm

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • Using BAPI's in ABAP code

    Hi bapi Guru's,
    I am asked to use bapi's(Instead of BDC's) for data upload .I am not getting good documentation on 'USING BAPI's IN ABAP',Like Defining structures, and what are the FM's to be called like bapi_commit.
    Any Info is Appriciated.
    Regards
    satish

    Sorry Satish,
    Maybe this is going off topic a little, bit perhaps also its relevant as you have been asked to move from BDC's to BAPIs.
    Juan,
    When I talk about debugging, there are two levels to this:
    <b>1. Debugging by the programmer</b>
    In this case, how can it be easier to debug an error from a BAPI than from the screen?  For a sales order, for example, when you enter a delivery date of 01.01.2000 for an item, via BDC you will get an error message as the item is entered (something along the lines of delivery date is in the past), and you will see exactly the date you have entered, and if you don't understand the error, you can click on F1 and it will give you the long description of the error.  Via a BAPI, you would get the error message, and you MIGHT get the item number and the date in question.  But if you don't understand the error what do you do then?  Debug the BAPI itself?  You could, but isn't this a rather lengthy way to get to the root of the problem?  In general, any errors you get calling BAPIs/BDCs are errors with your master data, or breaking business rules, you shouldn't have to debug standard code to tell you whats going wrong, the application can tell you.
    <b>2. Debugging by the end user</b>
    When you implement a BAPI/BDC this will be related to an interface/automated transaction etc.  When its in production you will occassionally get errors (due to bad master data, not fully capturing all the business logic in your custom coding [it happens], technical issues etc.)  What do you do then?  In the case of BDC you can do nothing.  The error is recorded, and you can get end users to process the errors by stepping through the screens (which they already know how to use) and make corrections as required.  In the case of BAPIs, you have to record the error in a table or a file, then develop some kind of interface to display the errors, then develop some kind of process for re-processing the errors.  If the data used to call the BAPI is not correct then you also need to provide a facility for changing the data before reprocessing.  Normally you do none of this because its too much work and you end up having all errors coming back to the SAP team who have to debug and change table entries etc. to get it all to work.  I would not say that this makes BAPIs easier to debug.
    Oops, just realised my pasta is burning!!!
    Anyway, think I got my point across.  Not personal but feel quite strongly about this topic.  To me BDC's are still a relevant tool despite the push for Idocs/BAPIs.
    Cheers,
    Brad

  • How to use RTRIM function in ABAP

    Hey,
    I have a question on using trim function in ABAP. According to all documents, I should be able to use rtrim as
    shorttext = rtrim('abcde-xx', '-xx').
    But when I do that, it gives me an error message "Comma without preceding colon (after shorttest?)"
    Anyone can tell me why is this happening? how should I use this trim function? And for me to cut off variable's last few character, what else method can I use? 
    Thank you very much.

    DATA : T1    TYPE STRING VALUE 'abcde-xx',
                T2    TYPE STRING  VALUE '-xx'.
    REPLACE T2 INTO T1 WITH SPACE.
    WRITE :/, T1.
    result output is :    'abcde'.
    regards
    Guna

  • Using nested Joins in abap prog

    Hi All,
    please help me  out in using nested joins in abap progrmaming. I dont know about joins in abap.specially in case of outer join.
      I have 5 internal tables.. mara ,marc, mvke,mbew,ampl. am using  a  select query with certain fields from all these tables.
      I need to disply  all the materials  of  a mara for  a particular date irrespective of  the values in fields of  other tables.
            Even if that materail is not present in other table for certain condtion ,that material  should get displyed with all other fields  showing null value..

    Hi RK,
    the  code am using is of the same way...but my problem was with the joins..in the  select query  am using nested join combining inner  and outer join.. but i could  not able to display all the materials  of mara of a particular date..
    The code looks like this..
    SELECT <some fields.......>
    INTO  TABLE i_materials
          FROM  ( marc AS b
          INNER JOIN mara AS a ON amatnr = bmatnr
          INNER JOIN mvke AS c ON cmatnr = amatnr
          INNER JOIN ampl AS g ON gbmatn = amatnr
          LEFT OUTER JOIN mbew AS d ON dmatnr = bmatnr
                                   AND dbwkey = bwerks )
      WHERE a~matnr  IN s_matnr AND .................
    Else
    SELECT <some fields.......>
    INTO  TABLE i_materials
          FROM  ( marc AS b
          INNER JOIN mara AS a ON amatnr = bmatnr
          INNER JOIN mvke AS c ON cmatnr = amatnr
          INNER JOIN ampl AS g ON gbmatn = amatnr
          LEFT OUTER JOIN mbew AS d ON dmatnr = bmatnr
                                   AND dbwkey = bwerks )
       FOR ALL ENTRIES IN i_mara
         WHERE a~matnr = i_mara-matnr AND ............

  • How to use a macro with AAA Authorization set?

    So!
    We have ACS version 4.1, and one goal is to start working on authorization sets for groups. I am able to get basic commands to work, but was curious about making a macro work without having to allow all of the commands that are actually contained wihtin the macro itself.
    I'm looking into this to promote standardization and minimize confiugration issues/inconsistencies on ports accross swtiches in our environment.
    The macro I created is used for configuring a port on a swtich to change its VLAN.  Basically as follows:
    macro name T2
    Description $DESC
    switchport mode access
    no cdp enable
    switchport access vlan $STATIC
    switchport port-security
    switchport port-security aging time 2
    switchport port-security violation restrict
    switchport port-security aging type inactivity
    storm-control broadcast level 25.00
    storm-control action trap
    switchport nonegotiate
    no lldp transmit
    no lldp receive
    #macro keywords $DESC $STATIC
    In ACS I've created a shell command authorization set, and allowed 'macro' with 'permit apply T2' and 'permit trace T2'.  This works fine and allows me to use those macro commands.  The problem I'm having is that every command in the macro is not allowed in the authorization set, so when I run the macro it fails for each command.
    I don't want to allow each individual command in the authorization set as it would then allow jr. admins the ability to make config changes on ports that would be outside of our standard.  For example they could get into a port and forget to disable CDP and LLDP, casuing inconsistencies accross the envrionment.  Is there a way to run these macros without putting all of the commands in the authorization set?

    Hello Eric,
    Please see the below link for configuring Macro and how you can use them with AAA
    http://www.cisco.com/en/US/docs/switches/lan/auto_smartports/12.2_55_se/configuration/guide/configure.html

  • How to use Adobe forms in ABAP

    Hello Everybody,
    I have used Adobe forms in webdynpro applications. Now, i want to use adobe forms in ABAP stack. Please provide me steps and guidelines to develop Adobe forms in ABAP.
    What should be the infrastructure needed for that?
    Thanks in Advance,
    Bhavik

    Hi Bhavik,
    there is extensive documentation on creating PDF-based forms for printing in ABAP Workbench (transaction SFP) on the SAP Help Portal at http://help.sap.com/saphelp_nw04/helpdata/en/d2/4a94696de6429cada345c12098b009/frameset.htm.
    The infrastructure is identical (ADS on Java Engine) except that you need an ABAP backend (minimum 6.40) and the corresponding SAP GUI. You also need to create an HTTP connection from your ABAP system to the ADS in transaction SM59 (see ADS Configuration Guide).
    Your Adobe LiveCycle Designer installation from the NWDS should be OK, if you are working on the same frontend. (If you have difficulties with Designer, uninstall it and install it with the SAP GUI again).
    Note that Web Dynpro for ABAP integration is only supported as of NetWeaver 2004s (going into ramp-up with mySAP ERP 2005 this month), which means that interactive scenarios are more cumbersome to implement in ABAP with NetWeaver 04.
    Some of the things you get with the Web Dynpro framework (such as the return of data in interactive scenarios via the WD context) would need to be manually coded when working in SFP, which was designed for output forms.
    Hope this helps,
    Markus Meisl
    SAP NetWeaver Product Management

  • How to use messages in WebDynpro-ABAP

    Hi,
        How to use messages in WebDynpro-ABAP.
    Does it has any class to manage messages like IWDMessageManager or we can just use standard SAP Message types.. like E,W,X,I,S..
    I hope it have a message container to display messages.
    Thank U for Ur time.
    Cheers,
    Sam

    Hi Sam,
    U can hard code the message or u can use the Assistance class's text elements to store the messages.
    1) Code to display hard coded message:
    report message
    CALL METHOD l_message_manager->report_attribute_error_message
    EXPORTING
    message_text = "Enter the correct Connection ID"
    element = elem_flightinfo
    attribute_name = 'CONNID'.
    2) Code to display message from text element of assistance class:
    lv_text = wd_assist->if_wd_component_assistance~get_text( key = '002' ).
    report message
    CALL METHOD l_message_manager->report_attribute_error_message
    EXPORTING
    message_text = lv_text
    element = elem_flightinfo
    attribute_name = 'CONNID'.
    Where Message "Enter the Correct Connection ID" is stored in Text Element with key '002'
    Hope this helps,

Maybe you are looking for

  • Can anyone please help me connect my iMac to my TV?

    How can i connect my iMac OS X to my sony bavia TV? Its an iMac OS X version 10.5.8 The TV has an hdmi port but the iMac doesn't have an hdmi port. But the TV & the iMac both have a USB port.

  • ITunes open error: "The folder "iTunes" cannot be found or created, ..."

    I have a laptop with iTunes installed. My IT guys have our LAN set up so that when I login on our LAN, all files in the "My Documents" folder are syncronized with a copy of those files on our server. When I'm connected to the LAN, iTunes starts and w

  • How to create a portlet for a new web page?

    I create a web page "A" in the remote server and have another page "B" which have a button in it. And when push the button in page "B", I want to use PRC to add a new portlet object linking to page "A" to portal. How should I do this? I know it's pos

  • Qosmio G30 - system problem after recovery procedure

    I have Qosmio G30 - 148 which have Windows XP MCE, when trying to download some programs system crashed and make automatic restart. I then used a RECOVERY CD to recover my all system and followed the instructions on the CD but when finished and reboo

  • HTTP to SOAP scenario, help needed.

    Hi friendz, I am tyring to do <b>HTTP 2 Soap scenario</b>, so can any one tell me how to download <b>"wsdl" file </b> i know how to import an existing <b>wsdl file</b>, but i want to know how we ll download, the <b>file from webservices</b>. i hope u