BAPI for Timesheet Approval

Hi, Does anybody know approval / rejection BAPI for timesheets in HR ?
Thanks.
Moderator message - Cross post locked
Edited by: Rob Burbank on Jun 4, 2009 5:16 PM

hello,
For cats approval, I  used this solution:
* declaretion
data: catrecort       type CATS_APPROVAL_IN_TAB,
           wacatrecort   type CATS_APPROVAL_IN,
           MESSAGE_HANDLER  TYPE REF TO CL_MESSAGE_HANDLER_CATSXT,
           esito                type XFELD.
  data: MSG_CUMULATION  Type CATSXT_MSG_CUMULATION.
  data: GR_MSG          type ref to CL_MESSAGE_HANDLER_CATSXT.
* rows to approve
  LOOP AT i_catsdb into wa_catsdb .
    MOVE-CORRESPONDING wa_catsdb  to wacatrecort.
    wacatrecort-TARGET_STATUS = p_stauts.
    APPEND  wacatrecort to catrecort.
  ENDLOOP.
  MSG_CUMULATION =  'X'.
  if gr_msg  is INITIAL.
    create object gr_msg
      EXPORTING
        im_cumulate_messages = msg_cumulation.
  endif.
*approve
  CALL FUNCTION 'CATS_APPROVAL'
  EXPORTING
    MESSAGE_HANDLER           = gr_msg
    AUTH_CHECK                       = ' '
    RECORDS                              = catrecort
  IMPORTING
*     PROCESSED_RECORDS                =
   RECORD_ERROR                     = esito
EXCEPTIONS
   UPDATE_ERROR                     = 1
   NUMBER_RANGE_ERROR       = 2
   LONGTEXT_ERROR                 = 3
   MESSAGE_HANDLER_NOT_ACTIVE       = 4
   OTHERS                           = 5.
  if sy-subrc ne 0.
    MESSAGE s002(ZPECI) WITH TEXT-015.
  else.
    commit work.
endif.
Bye Bye
M.

Similar Messages

  • Standard Bapis for TimeSheet

    HI Gurus,
        I want to know the standard bapis to upload the legacy file(timesheet related data) to infotypes (2001 2002 2006 2007), can u tell me what r the standars bapis available for this purpose . thanks in advance

    BAPI_PTIMEOVERVIEW_DELREPLICA
    BAPI_PTIMEOVERVIEW_GET
    BAPI_PTIMEOVERVIEW_REPLICATE
    BAPI_PTIMEOVERVIEW_SAVEREPLICA
    BAPIHRTIMESKEY-LOGICALSYSTEM
    BAPIHRTIMESKEY-DOCUMENTNUMBER
    BAPI_EMPATTABS_GETDETAIL
    BAPI_EMPATTABS_GETLIST
    BAPI_CONFIRMATION_INPUT
    BAPI_ABSENCE_APPROVE
    BAPI_ABSENCE_CHANGE
    BAPI_ABSENCE_CREATE
    BAPI_ABSENCE_DELETE
    BAPI_ABSENCE_GETDETAIL
    BAPI_ABSENCE_GETDETAILEDLIST
    BAPI_ABSENCE_GETLIST
    BAPI_ABSENCE_REQUEST
    BAPI_ABSENCE_SIMULATECREATION
    For more check in SE37

  • BAPI for Workitem Approval

    Hi Workflow Experts,
    In my scenario i need to approve work items which are in SBWP and workitems either contain BOR Object type or not. Is there any bapis or function module to approve the work items.. i have searched all SCN blogs and I found few function modules below are
    SAP_WAPI_EXECUTE_WORKITEM
    SAP_WAPI_DECISION_COMPLETE
    SAP_WAPI_WORKITEM_COMPLETE
    SAP_WAPI_WRITE_CONTAINER
    SAP_WAPI_READ_CONTAINER
    So Can you please suggest me what is the order of bapis calling in order  to approve the workitems and what are parameters required to them....
    Thanks in advance..
    Best Regards
    Sreenivas Pachva

    Hi Sreenivas,
    SAP_WAPI_DECISION_COMPLETE will work for any User Decision task - even most custom ones.
    For other business objects and class methods, you generally need some sort of specific approval BAPI or equivalent to be provided by the application, which will make the approval changes in the application itself, as if the user had manually launched the application.  Many applications provide such options, quite a lot don't and you might need to take a slightly different approach.
    Depending on how that application works, and whether the approval BAPI or equivalent raises an event such as <object>.APPROVED or <object>.REJECTED you can either use those as terminating events of your workflow task, or use SAP_WAPI_WORKITEM_COMPLETE to close the work item.
    If you have a specific BOR object or ABAP Class you want to approve you need to ask that as a separate question, as different people work in different applications and will be able to advise what works best for the application in question.
    Hope that helps
    Rgds,
    Jocelyn

  • ESS Timesheet Approval from ESS

    Hi,
    We have implemented ESS .We have created workflow for timesheet approval.
    Whenever employee creates a timesheet request.The workitem sent to Manager to approve the timesheet records.But when Manager opens the workitem regarding timesheet approval through ESS ,he see all timesheet records of all employees who are reporting to him.
    But when we open the same workitem through SBWP it shows onli leave records of the employee related with the workitem not all the reportees.We want same functionality through ESS UWL.
    I have checked the configuration related with approval views.
    "Define Profiles and Assign to Views" It seems fine.
    Kindly suggest for the same.
    Regards,
    Kalpesh
    Edited by: kalpesh parab on Dec 30, 2007 8:50 AM

    Dear Friend
    Really need ur help as we are upgrading from 4.7 to ECC6.
    Our client want to implement tiem sheet. Request you to provide gudiance wheher CATS i.e CATSRegular orESS timesheet would be useful.
    if would be great if u could provide a kind of advantages adn disadvantages of both.
    Suitable points would be rewarded
    Sam

  • Timesheet Approval from MSS

    Hi,
    We have implemented ESS .We have created workflow for timesheet approval.
    Whenever employee creates a timesheet request.The workitem sent to Manager to approve the timesheet records.But when Manager opens the workitem regarding timesheet approval through ESS ,he see all timesheet records of all employees who are reporting to him.
    But when we open the same workitem through SBWP it shows onli leave records of the employee related with the workitem not all the reportees.We want same functionality through ESS UWL.
    I have checked the configuration related with approval views.
    "Define Profiles and Assign to Views" It seems fine.
    Kindly suggest for the same.
    Regards,
    Kalpesh

    Dear Friend
    Really need ur help as we are upgrading from 4.7 to ECC6.
    Our client want to implement tiem sheet. Request you to provide gudiance wheher CATS i.e CATSRegular orESS timesheet would be useful.
    if would be great if u could provide a kind of advantages adn disadvantages of both.
    Suitable points would be rewarded
    Sam

  • BAPI for approving service entry sheets

    Hi All,
    I want to approve a service entry sheet
    I am using the BAPi - BAPI_ENTRYSHEET_CREATE, I am able to create a service entry sheet but unable to approve it.
    Please let me know if there is a BAPi- for approving a service entry sheet.
    Regards
    Shiva

    Hi,
    Try this BAPI " BAPI_SERVICE_CREATE ".
    Regards
    Milan

  • Vacation rule   - Timesheet approval for a specific project

    Problem Description: Would like to know how to set the vacation rule for a specific project.
    My requirement is to create vacation rule for a timesheet approval for a specific project. I do see option in vacation rules but there is no option to select specific project.
    Can you please help me out on this?
    ======================================================
    Transfer notification ownership
    A manager may transfer a notification for a specific project to the new manager of that project.
    Regards
    Umeshwar Thakur
    91-9766616912

    Hi Dina, thx for your response
    I have error "Rejection Error : Auto Accouting Error"
    There is Output :
    Project Num Revenue(Credited) Customer Agreement Rejection Reason
    DP700150.01 1 NOKIA SI( 1058) PKS-01/NSN/09 AutoAccounting Error

  • Hi i want to create BAPI to get approver of the employee

    hi i want to create BAPI to get approver of the employee
    in this  BAPI if there are two approver for that employee than i need both approver personal no.
    please help me
    thanks in advanced.

    Hi
    I doubt whether there is a direct Standard BAPI for that.
    The below report will get you the employees approver org position. Even if there are two approvers are there, it will display both the approvers position.
    *& Report  ZGD_TEST_HR_ORG_STR
    REPORT  ZGD_TEST_HR_ORG_STR.
       DATA: plvar            LIKE hrsobid-plvar.
      DATA: otype            LIKE hrsobid-otype.
      DATA: sobid            LIKE hrsobid-sobid.
      DATA: date             LIKE sy-datum.
      DATA: leading_position LIKE hrobject OCCURS 1 WITH HEADER LINE.
      DATA: org_agent        LIKE swhactor.
      DATA: lv_sw_vapos      TYPE xflag,
            lv_subrc         TYPE sy-subrc.
      DATA spfli_wa TYPE spfli.
      DATA carrid_buffer TYPE spfli-carrid.
      IF plvar IS INITIAL.
        CALL FUNCTION 'RH_GET_ACTIVE_WF_PLVAR'
          IMPORTING
            act_plvar       = plvar
          EXCEPTIONS
            no_active_plvar = 1.
        IF sy-subrc > 0.
          MESSAGE e300(5w) RAISING no_active_plvar.
        ENDIF.
      ENDIF.
    IF otype IS INITIAL OR sobid IS INITIAL.
          otype = 'US'.
          sobid = sy-uname.
      ENDIF.
      CALL FUNCTION 'RH_GET_LEADING_POSITION'
        EXPORTING
          plvar              = plvar
          otype              = otype
          sobid              = sobid
          date               = sy-datum
          auth               = ' '
          consider_vac_pos   = space
        TABLES
          leading_pos        = leading_position
        EXCEPTIONS
          no_lead_pos_found  = 1
          OTHERS             = 2.
       IF sy-subrc > 0.
        MESSAGE e802(5w) WITH otype sobid
                         RAISING no_lead_pos_found.
      ELSE.
        LOOP AT leading_position.
          write :  / leading_position-otype,
                     leading_position-objid.
        ENDLOOP.
      endif.
    Hope it helps you

  • BAPI for updating tax code for purchase order..

    Hi friends,
      I have one requirement to change tax code for multiple Purchase order but the
    thing is they should not go for release.So what should I prefer BDC or BAPI.
      I am thinking to implement it through BAPI, but I don't know what procedure to follow.
    If somebody can provide me a small guiding steps or code then it will be very helpful for me..
    Thnaks in advance..
    Useful answers will be rewarded with points....
    Regards,
    Rajesh Akarte

    Hi Friend,
    BAPI_ACC_PURCHASE_ORDER_CHECK  Accounting: Check Purchase Order                                         
    BAPI_ACC_PURCHASE_ORDER_POST   Accounting: Post Purchase Order  
    MEWP                           BAPIs Purchase order                                                     
    BAPI_PO_CREATE                 Create Purchase Order                                                    
    BAPI_PO_GETDETAIL              Display Purchase Order Details                                           
    BAPI_PO_GETITEMS               List Purchase Order Items                                                
    BAPI_PO_GETITEMSREL            List Purchase Orders for Release (Approval): New as of 4.0A              
    BAPI_PO_GETRELINFO             Display Detailed Release (Approval) Information on Purchase Order        
    BAPI_PO_GET_LIST               List Purchase Orders - Only up to 4.0A                                   
    BAPI_PROCOPERATION_GETCATALOGS Determine Valid Catalogs as Value Help                                   
    BAPI_PROCOPERATION_GETINFO     Analysis of Objects to be Generated in Purchasing                        
    <b>AND</b>
    Use condition type NAVS with access sequence 0003 to default the taxcode in the purchase order item using conditions. Materials Management -> Purchasing -> Purchasing order processing ->define screen layout at document level. Search for the transaction ME21.Double click on ME21. Then search for TaxCode
    Use condition type NAVS with access sequence 0003 to default the taxcode in the purchase order item using conditions.
    A2: Go to IMG.
    Materials Management -> Purchasing -> Purchasing order processing ->define screen layout at document level.
    Search for the transaction ME21.Double click on ME21. Then search for TaxCode. It is advisable to configure also the info record. The tax code should be a required entry, and whatever you specify here will be the default value in the Purchase order.
    Materials Management -> Purchasing -> Purchasing info record -> define screen layout.
    When you get here you search for the transaction ME12 ,double click here; search for Input VAT indicator.
    Regards ,
    Kumar.

  • Errors in Job Queue for Timesheet

    I am having errors in my Job Queue when i fill the timesheet (fill+send+approve) and also when i delete the timesheet from Manage Timesheet or from Delete Enterprise object.
    Following is the error description;
    1. For Timesheet Fill and submision:
    Job Type: Reporting (Timesheet Save)
    Job State: Failed But Not Blocking Correlation
    Error Description:
    Reporting message processor failed:
    ReportingTimesheetSaveMessageFailed (24014) - Violation of UNIQUE KEY constraint 'UK_MSP_Timesheet'. Cannot insert duplicate key in object 'dbo.MSP_Timesheet'. The statement has been terminated.. Details: id='24014' name='ReportingTimesheetSaveMessageFailed'
    uid='1ba73948-5c8a-4f8f-b8e8-0b1eb822f54d' QueueMessageBody='TimesheetUid='944c71f6-bce1-43f3-aa15-067f9b9bf0ee'' Error='Violation of UNIQUE KEY constraint 'UK_MSP_Timesheet'. Cannot insert duplicate key in object 'dbo.MSP_Timesheet'. The statement has been
    terminated.'.
    2. For Deletion:
    Job Type: Reporting (Timesheet Delete) 
    Job State: Failed But Not Blocking Correlation
    Error Description:
    Reporting message processor failed:
    ReportingTimesheetDeleteMessageFailed (24011) - Invalid call to MSP_EpmDeleteTimesheetAdminAssignments. Timesheet UID (944C71F6-BCE1-43F3-AA15-067F9B9BF0EE) was not found in MSP_Timesheet.. Details: id='24011' name='ReportingTimesheetDeleteMessageFailed'
    uid='8c923f72-eeb4-43cf-a7eb-9ef79bfae86a' QueueMessageBody='TimesheetUid='944c71f6-bce1-43f3-aa15-067f9b9bf0ee'' Error='Invalid call to MSP_EpmDeleteTimesheetAdminAssignments. Timesheet UID (944C71F6-BCE1-43F3-AA15-067F9B9BF0EE) was not found in MSP_Timesheet.'.
     Can anyone tell me why is it happening and how to resolve this issue?
    Maaz Ibrahim

    Hi, I suppose you are running a patch level before CU August 2010? Following issue was resolved by this CU: "Timesheet actuals are not populated in the Reporting database if an initial save or submit operation fails." I have seen the same before August
    2010 and it was caused by some circumstances while deleting a timesheet. It was deleted from Published DB, but data remained in Reporting DB. You can check if you have the same situation with following statement: SELECT ResourceName, PERIODNAME, FROM MSP_TIMESHEET
    AS MT TIMESHEETUID INNER JOIN AS MTP MSP_TIMESHEETPERIOD ON = MT.PERIODUID MTP.PERIODUID INNER JOIN MSP_TIMESHEETRESOURCE AS MTR ON = MT.OWNERRESOURCENAMEUID MTR.RESOURCENAMEUID TIMESHEETUID WHERE NOT IN (SELECT TS_UID FROM <ProjectServer> _PUBLISHED.DBO.MSP_TIMESHEETS)
    I called support and they helped me to resolve. Regards Barbara

  • Bapi for ourcahse requisition

    hi all
    i need names of all the bapi 's related to purchase requisition i.e bapi for purchase requisition release, refuse etc .
    regards
    navjot

    HI,
    BAPI_REQUISITION_RELEASE - Release Purchase Requisition Item by Item
    BAPI_REQUISITION_RELEASE_GEN - Release Entire Purchase Requisition
    BAPI_REQUISITION_RESET_RELEASE - Cancel Release of Purchase Requisition Items
    BAPI_REQUISITION_RESET_REL_GEN - Cancel Overall Release of Purchase Requisitions
    BAPI_REQUISITION_CHANGE - Change Purchase Requisition
    BAPI_REQUISITION_CREATE - Create Purchase Requisition
    BAPI_REQUISITION_DELETE - Delete/Close Purchase Requisition
    BAPI_REQUISITION_GETDETAIL - Display Purchase Requisition Details
    BAPI_REQUISITION_GETITEMS - Read Purchase Requisition Item
    BAPI_REQUISITION_GETITEMSREL - List Purchase Requisitions Awaiting Release
    BAPI_REQUISITION_GETRELINFO - Display Detailed Release (Approval) Information on Purchase Requisition
    Regards,
    Padmam.

  • Fiori Timesheet Approval

    Hi Friends,
    In timesheet approval app, is there a possibility where manager can reject timesheet in one go for the entire week, rather than clicking on each line item for rejection.
    In one of the project, where business enters time to multiple items according to projects which they are working and the current process followed here is to reject the complete timesheet of entire week, rather than respective day or line item.
    Right now, we need to click on individual line for rejection and which client doesn't want and they wanted one time rejection for entire week.
    Is it possible to customize the approval screen.
    Please advice.
    Srikanth
    Tags edited by: Michael Appleby

    Hi Srikanth,
    As per the current design the default is approve and for Rejection you need to click on the entry which you have to reject and select a rejection reason. This was done for faster approvals since rejections is not the most common scenario.
    we are in process of coming up with a  new design for partially selecting some entries for Rejecetion.
    For the time being the only work around would be to create a new view to replace the current view using the extensibility concept.
    Best Regards
    Pankaj

  • Working of Individual Timesheet approval view  in MSS

    can any one tell what happens(how it works) when a manager selects "Reject " from drop down and press the transfer button in Individual timesheet approval view.
    problem is : i have sorted the data based on A/A type Text. suppose that the data before sorting is 4,1,4 after sorting the data is 4,4,1.  when i select reject for first two entries 4,4(sorted data) and press transfer it will go to collective approval view. then choose review. in this screen it showing the rejected times as 4,1(which is the previous data) rather than 4,4.
    the summary is it is taking only previous data eventhough we have sorted it.
    any help will be greatly appreciated.

    You can select individually and those records which are selected as rejected will be rejected in the final screen
    In individual approval you set the status approve, resubmit or reject! These are different statuses we need to use

  • Project Server No project update after timesheet approval

    Hi,
    I work with Project Server 2013, I can create and schedule projects, assign ressources, fill
    in the timesheet and save it for approval.
    I'm using the
    Single Entry Mode 
    When ressources update theire TimeSheet (approved) and I check my project in project web access, I do not see any progress (0% completed)
    Does someone know why my project is not updated?
    Thanks

    Hi Slim,
    Note that once the timesheet with SEM activated is submitted, there are 2 approvals: from the status manager (project plan owner) and from the timesheet manager of the resource. The project plan will be updated once the status manager approved the task update
    AND published the project plan.
    Thus you have to check that the status manager (and not only the timesheet manager) correctly approved the update and also that he published the project plan for MS Project Pro (or eventually from PWA).
    If it is still not working, you could check the PWA queue for potential error messages related to the task update approval and/or project publish job.
    Please tell us if it helps.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Project Server Timesheet Approval

    Hi,
    How do I remove a chain of Timesheetapprovers, so that the manager can approve the first approval and submit the Timesheet to a Senior Manager for  final approval is not required?

    Remove the final approvers from Resource Manager group.   That would be the first thing to try.  The approval routing is control by RBS, permissions and approval routing.  If approve timesheets permission is removed, then this will stop
    the forwarding of approvals.
    Cheers!
    Michael Wharton, MVP, MBA, PMP, MCT, MCTS, MCSD, MCSE+I, MCDBA
    Website http://www.WhartonComputer.com
    Blog http://MyProjectExpert.com contains my field notes and SQL queries

Maybe you are looking for