Skip to Content
author's profile photo Former Member
Former Member

Salary change workflow

Hi Experts,

My current workflow requirement of Employee Salary change, Promotion, Redesignation Approval is as follows.

1. Employee's Salary change or promotion or redesignation changes are made through Custom webdynpro screen which updates the custom ztable.

2. So practically when ever an entry is made into this table i need to trigger the workflow which carries this salary change information and askes for managers approval.

3.If he approves then salary change should be updated in the infotypes 0000,0001 and 0008.

4.If he rejects then the entry in ztable should be deleted along with notification.

I thought of using standard Pay increase approval with SAP forms-WS20000003 but since it uses interactive forms i cannot use it. Please help me in this regard.

Also can i use the business object BASICPAY and Which methods can i use to updated infotypes?

Thanks in advance,

Devananda A J

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

9 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2010 at 08:12 AM

    Hi,

    In your WD application , you must have provided some button while finally saving the data.You can trigger WF at the time when user clicks on button using FM SAP_WAPI_START_WORKFLOW and pass required data to WF.

    Later you can use Decision step to approve or reject the application.

    Once approved use some Background method and update required Infotypes. Search for methods in the corresponding BOR object to change or update data or take help of FM .

    If rejected, use another Background method to delete data from custom table.

    I hope this is clear and enough to start your developemnet.

    Regards,

    Sangvir Singh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 08, 2010 at 11:44 AM

    Hi,

    There's a lot of HR workflow questions all of a sudden.

    Well Workflow and HR works differently.

    Check the forum about how SWEHR1, SWEHR2 and the custom one SWEHR3 works.

    So find out how triggering of event works in HR, do not use the aforementioned start workitem FM. This is not recommended.

    Then if you allow the users to tinker with infotypes in PA30. you have to create a method to undo teh changes made in infotype 8. The time constraint of infotype 8 is if I recall correctly 1, so it is easy to revert the changes, just delete the last change made and the master data is as it was before the change.

    A different approach is to not let users change IT0008 or just a select few. And create custom screens for gathering information. use the enqueue method of BO EMPLOYEET to queue the data and after approval dequeue and change it.

    Have fun (I know I always do when I have to do WF in HR)

    Kind regards, Rob Dielemans

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member
      1. Employee's Salary change or promotion or redesignation changes are made through Custom webdynpro screen which updates the custom ztable.

      I don't find any other way of triggering the Workflow from Custom Web dynpro screen other than Using FM 's.

      Regards,

      Sangvir Singh

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2010 at 12:20 PM

    Hi Rob,

    Thanks for the reply. Actually i am using the Custom screen for user input and after submit for approval the salary change details are stored in ztable. Now after managers approval i have to update the info type as your second suggestion. tell me how can i trigger the workflow when ever a new entry is made in to that table. And which Business Object can i use and which methods can i use to update infotypes? Do i have to create a custom method.

    Thanks,

    Devananda A J

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      So what initiates the entire process actually?

      Isnt it better to start from the infotypes, so whenever infotype 0000 (and, or 0302 to be complete) is updated the workflow starts for that employee. The subsequent screens and control etc could then be done through workflow.

      I didnt read you start it from an update in a custom table. Presumably the update can only take place from a custom transaction (if not make it so). Just fire an event after you've determined a change has been made fm SAP_WAPI_CREATE_EVENT

      Use the where used functionality and the documentation to see how this is used or search this forum.

      Depends on what needs updating, BASICPAY has some methods. Alternatively extend (I say extend I mean through delegation) BUS1065 or EMPLOYEET for a generic update of infotype, or indeed BASICPAY for amounts and other infotype 0008 stuff.

      Custom methods can use FM HR_INFOTYPE_OPERATION for updating, this FM is documented and there are plenty of examples in the HR and ABAP forums on how to use this one.

      Kind regards, Rob Dielemans

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2010 at 12:33 PM

    Hi Devananda A J,

    Here in your requirement, I don't see any need for using Z table.All you want is to collect data from Z table which can be achieved in other way also.

    My suggestion here is:

    While you are inserting data in the Custom table from WD application , at that point rather than inserting data into Custom Table,

    Trigger the Workflow using FM 'SAP_WAPI_START_WORKFLOW' and pass the required data to the Workflow container.

    Now you have data in WF container and after approval, you can write a backgrouns step that can use this data to Update the infotype. For rejection, you need not to do anything as you have mentioned that in case of Z table you are deleting the record.

    Hope this helps.

    Regards,

    Sangvir Singh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2010 at 11:12 AM

    Hi Sangvir,

    Thanks for your reply. How can i pass the data into workflow conatiner in the function module SAP_WAPI_START_WORKFLOW.

    can i pass single row of records in to WF Conatiner?

    Thanks,

    Devananda A J

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2010 at 12:24 PM

    Hi Sangvir,

    I am updating a custom ztable after user enters salary change details in webdynpro screen. So i can trigger the workflow when ever a new entry is made into that table right?

    Thanks,

    Devananda A J

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello !

      Your requirement is to trigger the workflow when a ztable is updated(create/change/delete) from webdynpro application.

      In other words, when ever this ztable is updated, workflow should trigger.

      To do this , go that table maintenance generator of that table and maintain authorization group,function group and screen numbers.Thereafter take Environment->Modification->Events in generate table maintenance screen.By clicking on new entry, choose the "creating a new entry" .Thereafter ,create a column form routine,double click on it,select "new include" and call the function module "SAP_WAPI_START_WORKFLOW".

      By doing so, when ever your ztable is updated with an entry , workflow can be triggered.Similarily you can configure whenever data is deleted in ztable.

      For additional details , refer saptechnical com website at triggering workflow from table-level events

      Regards,

      S.Suresh

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2010 at 02:14 PM

    Hello Devananda,

    Please look into using HCM forms. They are designed for this specific purpose instead of have to develop any Z tables. They will hold the changes until approved. Search SDN and the forum for more information about HCM Processes & Forms.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2010 at 04:47 AM

    Hi Rob,

    Can you please tell me which is the preferred way for this workflow among two.

    1. Update infotype and discard last changes if the manager rejects it. Or

    2. Update a ztable and update infotype after approval.

    Can u please tell me which is the preferred way and which way is less customized?

    Thanks,

    Devananda A J

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello,

      I would configure this following way:

      - Person who is allowed to create salary change request should have authorisation only to create locked records for infotype 0008 (this means P_ORGIN or P_ORGINCON authorisation object to have authorisation level E)

      - It is easy to trigger workflow using SWEHR3 for locked entries for infotype 0008

      - Payroll will never pick up locked records - only the last unlocked one so this is safe from payroll point of view

      - If salary change is approved WF-BATCH should remove the locking (dequeue) or if it is rejected just delete the locked record (which will then extend the last one back to 31.12.9999 since the time contraint what was mentioned in earlier posts).

      - If the ztable was originally required for reporting purposes it would be still easy to report locked infotype 0008 records

      As a bonus you can enjoy standard SAP 😊

      Saku

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2010 at 08:53 AM

    Hi all,

    Thanks for every one. I finished this workflow by creating lock records for the salary changes in infotyp1-0008. And unlocking it after approval.

    Thanks,

    Devananda A J

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.