on 10-17-2014 11:59 AM
Hi Friends,
The requirement is that, during the Rehire action the Date Type 04 i.e. Hire Date needs to be updated with the Rehire date automatically. Below is the code done in T588Z to achieve this. In this code 03 stands for Rehire action.
The date is updated correctly if the Date Type 04 already exists in the filed DAR04, but if the Date Type 04 exists in some other field like DAR03 then the system gives an error "Date type 04 already exists". Please see below snapshot.
Is there a possibility to fix the above issue with some changes in T588Z or some other approach needs to be done?
Please share your thoughts.
Thank you in advance.
Regards,
Vish
Hi Friends,
We checked the routine creation approach but it involves changes to standard SAP code hence not recommended. Please share if there are any other approaches.
Regards,
Vish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In that case, the dynamic action you have written will not be enough. As Jimson suggested, you can update your dynamic action to call a custom routine as seen below:
In the example above, we use the custom routine to determine the specific location of specific date types and then handle updating them accordingly based on different scenarios. Not sure why you said that this approach involved changes to standard SAP code.
Hi Scott,
Thanks for the sharing the screen shot. Our technical consultant did try with the custom routine but it didn't work as expected hence the suggestion was to touch the SAP code.
But since you've confirmed that your custom routine approach worked we are trying with the now.
Below is the screen shot of our dynamic action part for the Rehire action.
With these steps we will be populating date type 02 with Rehire action date. With the routine GET_REHIREDAT(ZHR_REHIRE_DA) we are trying to fill the date type 04 Hire Date.
The logic in the routine is "Checking if date type 04 already exists. If any of the 12 date type fields has 04 then populate the date field with the action begin date. If no match found then to fill the 12th date type and date fields with 04 and the date value respectively."
The issue we are facing is that the routine does get called but IT41 isn't getting updated. So only the dynamic action steps work.
Please let us know if we are missing out on something.
Thank you in advance.
Regards,
Vish
Hi Vish,
If you will use same date type for two different purpose then at time of calculation for any thing in payroll or time managment how you will bifurcate this two.
In this table you can create 12 date type but there should be unigue always. So my advise to you that use two different date type for hiring and rehiring action.
It's the best practice would be. Your client does not want, client does not know the sap table design and you can give them one example how they will bifurcate two date of they will maintain in the same date type (like two same chocolate will keep in the same shelf where one is 2day's old and another one is 1day's old).
Hope so client will understand and accept the design process about date type in IT41.
Regards,
Sankarsan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Vishwanath,
I think so same name can't be accepted for little information kindly click on below link
Ur's Mohan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Are you assigning the same old personnel no. For rehire employee ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vish,
In case if you are going ahead with Date type 04 for re-hire, then you will have to create a routine.Because its very difficult to know which date type has 04. The date type position can be varying for different employee categories. So its only possible with creation of routine which eventually will not be used if new date type is going to be used for re-hire.
Thanks & Regards
JIm
Is there a reason why rehire date does not have its own date type? Seems rather odd to have two different dates tied to the same date type. Think in terms of reporting - how will you differentiate? Of course, there is option to write logic to compare both dates and the one that is more recent will be the rehire date but you can avoid doing that.
I have 2 recommendations for you -
1. Create a seperate date type for rehire date.
2. Use DAR12 in your dynamic action - It is very unlikely that a person will have 12 dates on a single record. Using DAR12 will ensure the date type and date will default in the last spot and upon saving, it'll adjust.
Hope this helps.
Donnie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Donnie.
Going for a separate date type for rehire will surely solve the issue, we had already proposed this approach but the requirement confirmed by the user is to use the same date type 04 - Hire Date.
Please let me know if you have any further thoughts on this.
Thanks in advance.
Regards,
Vish
Hi Vish,
check this document may help you
Auto Updation of Date Specifications and Mail G... | SCN
In FC give 06 and instead of COP go with INS then it overwrite the value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praneeth,
Thank you for the quick reply and the document link.
Going with INS instead of COP will not copy the previous date types and values of IT 41. It will create a new blank record. FC 06 also won't be helpful.
We need to retain the existing Date Types and their respective dates and only the Date Type 04 needs to be populated with the Rehire action date. Another concern is the Hire Date could be in any field and need not be in DAR04 only.
Regards,
Vish
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.