on 2013 Nov 06 1:50 PM
Hi everybody,
I need to use Mod operation in a calculation of PT PCR but I could not find any solution. You know 1391 Mod 4 is 3. I need a operation to do this in time evaluation PCR for me.
Although I can develop this operation by ABAP but I expect this basic operation provide by SAP. Do you have any idea for this issue?
Regards,
Omid
I have an option in Payroll. If I want to know when a month is a birthday month from hire date. That is PAYROLL MONTH MOD 12 = 0, then it is a birthday month
NUM=FC M
NUM$12
NUM*12
ADDWT&RES
NUM=FC M
NUM- &RES
then NUM has the modulus operation result. Like in time managment you don't have $ (integral division) you must round down with ROUND operator
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Omid,
Below might work. Give it a try.
From your example A = 1391 B = 4
HRS=A
HRS/B
ROUNDHR23 (Round Down to nearest whole number)
HRS*B
HRS-A
HRS*-1
Include error handling when A is less than B.
Hope it helps.
Thanks.
Regards
Sairam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No any idea? Should I develop a small function by ABAP?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva,
This is not the same MOD I am looking for. I need MOD as mathematics operation. Please look my question again.
5 mod 4 is equal 1. Means if you divide 5 to 4 the remain part is 1. In programing languages we write it like this 5 \ 4 which equals to 1 but 5 / 4 is equal to 1.25
Regards,
Omid
Hi,
As I said I would have it in time evaluation PCR. Round operation works just on time pairs not HRS.
I tried by H (ROUNDH) but it didn't work
If you trace the code you will see how system evaluate.
In my sample HRS is 1.25 (5 / 4) then system times it by 3600 and it will be 4500. As you see in below system divide it to 600 and times to 600 and the result is 4200 which in return it change to 1.167 (4200 / 3600)
I need something like "div" in ABAP to use in Time PCR
Regards,
Omid
User | Count |
---|---|
109 | |
8 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.