1/2 day unpaid
Hi Gurus,
for configaring the a half day unpaid absene is it enough to do the configartion under the "create counting class " by just not ticking the PAID box and givimng the 50 under % or even we need to do any sort of configartion under "as if" node by giving "wage type" if so how should we have to pass the wage type to the TE schema or payroll schema???
please help me out.
---Akhil
hi murai,
thanks for your replay..
but your answer is not clear and does not answer my question..
my question is what the configaration should be done to pass the Time wage types to the payroll ...or time evalusation schema..
in which part of the PCR should i have to insert the Time waget types which i have assigned in "constant / averages " node unser payroll usa -> absence_>constant / averages.
Similar Messages
-
Wrong display of No. of days worked in Payslip for mid-month joining
Dear Experts,
We use PE51, form editor for payslip for indian payrol. Our issue is when an employee joins mid of the month or say 4th of any month, still in payslip it shows no. of working days as 30/31 days instead of actual days worked. But pay results are correctly being calculated on factoring basis.
Please let me know how to resolve it, we use PCR ZNP1 for factoring which is written as follows
ZNP1 Partial factors for India - /801(CD), /802(WD), /803(WH),/804(Nom)
/801 Partial period factor 1
RTE=TKSOLL Set
RTE-TKAU** Subtraction
RTE*KGENAU Multiplication
RTE/TKDIVI Division
ADDWT * OT Output table
/802 Partial period factor 2
RTE=TASOLL Set
RTE-TAAU** Subtraction
RTE*KGENAU Multiplication
RTE/TADIVI Division
ADDWT * OT Output table
/803 Partial period factor 3
RTE=TSSOLL Set
RTE-TSAU** Subtraction
RTE*KGENAU Multiplication
RTE/TSDIVI Division
ADDWT * OT Output table
/804 Partial period factor 4
/805 Partial period factor 5
/806 Partial period factor 6
/807 Partial period factor 7
Please guide, if i need to modify it for getting correct working days display in payslip
Regards
Tanin that case the Requirement is to display no of working days of employee in a month
Here working days means
Total Calendar Days - Unpaid days - Paid days = working days ( please check the said one again since i have inculded the paid days and unpaid days if u want u can remove paid days)
so in order to fetch this
we need Calendar days that is TKSOLL
Unpaid days check the technical wage types /845 Paid days /846 ( you can have custom wage types too)
Copy a wage type from standrad overtime wage type that will be 1555
The PCR is as follows
NUM=TKSOLL (calendar Days)
NUM-E /846 Paid days
NUM-E /845
ADDWT 15555
Use ACTIO function and insert it any where in Sub Schema XT00 -
How to configure a sick leave setup
Hello All,
I need your help that how I can do the following sick leave process setup in Oracle Payroll using Accrual Plan as some of the sick leaves are being carried over to the next years sick leave entitlement balances.
1- Employee Sick Leaves are being maintained and carried over on the basis of employee hire date anniversary year
2- The Sick Leaves entitlement per year is 90 Days but the days and their respective deduction is logically broken into three following categories
- Full Paid Time Off - 15 Days
- Half Paid Time Off - 30 Days
- Unpaid/No Pay - 45 Days
Note: We must only have one absence type - sick leave and its corresponding element
3- The Sick Leaves Carry Forward at the end of employee respective hire date anniversary should be per the following breakdown
- Full Paid Time Off - 0 to 15 Days - depending on the available balance
- Half Paid Time Off - 0 to 15 Days - depending on the available balance
- Unpaid/No Pay - 0 Days
All Carry Forward Sick is accumulated to next year’s Full Pay segment of Sick Leaves that is in every year the full pay leaves can only increase while the other two logical segments would refresh to its entitlement values
Sick Leaves Ceiling
Full Pay - 90 Days + 15 Days
Half Pay - 30 Days
No Pay - 45 Days
This means that total sick leaves balance any employee can have is (90+15+30+45) 180 Days
I need your help to setup this like
Sick Leave Accrual Plan & fastformulas for balance maintenance
Sick Leave Carry Over FastFaromulas
Sick Leave Deductions
Sick Leave deduction for employee final settlement processes
Waiting for your responses and help
Regards,
UsherHello Avinash,
Thanks for your input dear, it was a great help. Now when I have created these following elements and balances:
Sick Leave - Information
Sick Leave Half Paid - Deduction - Indirect Element
Sick Leave No Paid - Deduction - Indirect Element
Sick Leave Half Paid Days - Balance
Sick Leave No Paid Days - Balance
The deduction is now happening correctly, but only when there is only one sick leave entry in the current payroll period. When we enter two or more sick leaves entries in a single payroll period it is doing repeated deductions for the same paryoll period, in the first deduction it takes into account all the sick leave days but then from the second entry onwards it is also doing deduction for the respective sick leave element only.
Please tell me that how can we have only one deduction per element (llike one sick leave half pay deduction) for all entered sick leaves in a single payroll period.
Awaiting your response,
Regards,
Usher -
Mail send to employee even worked for more than 45 hrs
Hi All,
We have developed functionality in which if employee works less than 45 hrs then mail is triggered to that employee.
But the issue is sometimes mail is triggered to some employees even if he worked more than 45 hrs.
We tried to create a same scenario in quality and development but mail is not triggered in that case.
Please find the below code.
Please let me is it because of not clearing wa_time variable???
GET peras.
rp_provide_from_last p0000 space sy-datum sy-datum. "latest p0000 record
IF p0000-stat2 EQ '3'.
rp_provide_from_last p0001 space sy-datum sy-datum."latest p0001 record
IF p0001-bukrs EQ '***'.
rp_read_infotype peras-pernr 2001 p2001 gv_beg gv_end.
rp_read_infotype peras-pernr 2002 p2002 gv_beg gv_end.
rp_read_infotype peras-pernr 2006 p2006 '18000101' sy-datum.
IF rb1 EQ 'X'.
n = 1.
ELSEIF rb2 EQ 'X'.
n = 5.
ENDIF.
CLEAR : gv_cntr,gv_dat,gv_week.
gv_dat = gv_beg.
DO n TIMES.
IF gv_dat GT gv_end.
gv_week = n - 1.
EXIT.
ENDIF.
gv_cntr = gv_cntr + 1.
IF gv_cntr GT 1 .
* gv_beg = gv_beg + 2.
gv_dat = gv_dat + 2.
ENDIF.
DO 5 TIMES .
* if rb2 eq 'X'.
IF gv_dat LE gv_end.
* endif.
READ TABLE it_time INTO wa_time WITH KEY pernr = p0001-pernr
ldate = gv_dat
satza = 'P10'.
IF sy-subrc EQ '0'.
gv_in = wa_time-ltime.
READ TABLE it_time INTO wa_time WITH KEY pernr = p0001-pernr
ldate = gv_dat
satza = 'P20'.
IF sy-subrc EQ '0'.
gv_out = wa_time-ltime.
gv_time = gv_time + ( gv_out - gv_in ) .
* CALL FUNCTION 'MONI_TIME_CONVERT'
* EXPORTING
* ld_duration = gv_time
* IMPORTING
* lt_output_duration = gv_tot.
*gv_tote = gv_tot.
* gv_total = gv_total + gv_tote.
* clear : gv_tot,gv_tote.
**CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
** EXPORTING
** input = gv_time
*** NO_TYPE_CHECK = 'X'
*** ROUND_SIGN = ' '
** UNIT_IN = 'S'
** UNIT_OUT = 'H'
** IMPORTING
*** ADD_CONST =
*** DECIMALS =
*** DENOMINATOR =
*** NUMERATOR =
** OUTPUT = gv_total
** EXCEPTIONS
** CONVERSION_NOT_FOUND = 1
** DIVISION_BY_ZERO = 2
** INPUT_INVALID = 3
** OUTPUT_INVALID = 4
** OVERFLOW = 5
** TYPE_INVALID = 6
** UNITS_MISSING = 7
** UNIT_IN_NOT_FOUND = 8
** UNIT_OUT_NOT_FOUND = 9
** OTHERS = 10
**IF sy-subrc <> 0.
*** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
**ENDIF.
* CALL FUNCTION 'POINT_IN_TIME_CONVERT'
* EXPORTING
** KZ_ENDTERMIN = ' '
* point_in_time = gv_time
* IMPORTING
** DATE =
* time = gv_hours."actual working hours
* gv_total = gv_total + gv_hours.
gv_punch = 'X'.
CLEAR wa_final.
CLEAR :gv_out,gv_in,gv_hours.
ENDIF.
ENDIF.
IF gv_punch IS INITIAL .
LOOP AT p2001 WHERE pernr EQ peras-pernr AND begda LE gv_dat AND endda GE gv_dat.
* gv_total = gv_total + 090000.
gv_time = gv_time + 32400.
gv_abs = 'X'.
ENDLOOP.
ENDIF.
IF gv_punch IS INITIAL AND gv_abs IS INITIAL.
LOOP AT p2002 WHERE pernr EQ peras-pernr AND begda LE gv_dat AND endda GE gv_dat.
gv_time = gv_time + 32400.
gv_prs = 'X'.
* gv_total = gv_total + 090000.
ENDLOOP.
ENDIF.
* PERFORM holiday_check USING gv_dat.
IF gv_punch IS INITIAL AND gv_abs IS INITIAL AND gv_prs IS INITIAL.
CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
EXPORTING
date = gv_dat
holiday_calendar_id = 'HM'
IMPORTING
holiday_found = gv_ind.
IF gv_ind EQ 'X'.
gv_time = gv_time + 32400.
ENDIF.
CLEAR gv_ind.
ENDIF.
CLEAR :gv_punch, gv_abs ,gv_prs.
gv_dat = gv_dat + 1.
IF gv_dat GT gv_end.
EXIT.
ENDIF.
ENDIF.
ENDDO.
CLEAR : gv_tot,gv_tim.
CALL FUNCTION 'MONI_TIME_CONVERT'
EXPORTING
ld_duration = gv_time
IMPORTING
lt_output_duration = gv_tot.
* IF gv_beg LE gv_end.
CONCATENATE gv_tot+2(2) gv_tot+5(2) gv_tot+8(2) INTO gv_tim.
v_dat = ( gv_dat - 1 ).
wa-awh = wa-awh + gv_time.
IF v_dat EQ gv_end.
wa-pernr = p0001-pernr.
APPEND wa TO it.
CLEAR wa.
ENDIF.
IF gv_tim LT c_hrs .
wa_final-pernr = p0001-pernr.
* WA_FINAL-BEGDA = SY-DATUM.
wa_final-ename = p0001-ename.
* wa_final-actual = gv_time.
wa_final-diff = gv_45hrs - gv_time.
wa_final-plans = p0001-plans.
CLEAR : wa_t001p.
READ TABLE it_t001p INTO wa_t001p WITH KEY werks = p0001-werks
btrtl = p0001-btrtl.
IF sy-subrc EQ 0.
wa_final-dept = wa_t001p-btext.
ENDIF.
CLEAR gv_org.
PERFORM org_text.
wa_final-divsn = gv_org.
wa_final-werks = p0001-werks.
wa_final-sacha = p0001-sachp.
IF wa_final-diff GT 0.
APPEND wa_final TO it_final.
ENDIF.
CLEAR wa_final.
ENDIF.
* ENDIF.
CLEAR : gv_time ,gv_hours.
CLEAR gv_tot.
CLEAR : gv_total.
ENDDO.
CLEAR gv_cntr.
* ENDIF.
ENDIF.
ENDIF.
* CLEAR gv_beg.
END-OF-SELECTION.Hi Ketul,
Still i'm facing the same issue even after clearing wa_time variable.Sometime it's triggering and sometimes it not.
I'm attaching the whole code for your reference. Pls let me know.
Waiting for your reply.
Thanks!!!!!!!!
CODE:
REPORT zhr_vwgsipl_pt_wrknghrs.
INCLUDE zhr_vwgsipl_wrkng_hrs_top. "data declaration
INCLUDE zhr_vwgsipl_wrkng_hrs_init.
INCLUDE zhr_vwgsipl_wrkng_hrs_process. " PROCESSING.
INCLUDE zhr_vwgsipl_wrkng_hrs_display ."DISPLAY
*& Form ORG_TEXT
* text
* --> p1 text
* <-- p2 text
FORM org_text .
CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
EXPORTING
otype = 'O'
objid = p0001-orgeh
costcenter = p0001-kostl
* CONTROLLINGAREA =
status = '1'
begda = '18000101'
endda = '99991231'
reference_date = sy-datum
langu = sy-langu
IMPORTING
* SHORT_TEXT =
object_text = gv_org
* costcenter_name = gv_cst
* INTEGRATION_ACTIVE =
* RETURN =
EXCEPTIONS
nothing_found = 1
wrong_objecttype = 2
missing_costcenter_data = 3
missing_object_id = 4
OTHERS = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " ORG_TEXT
& Include ZHR_VWGSIPL_WRKNG_HRS_INIT
IF rb1 EQ 'X'.
* IF pn-begda IS INITIAL.
IF sy-batch EQ 'X'.
gv_beg = sy-datum - 4."sy-datum - 5.
gv_end = sy-datum.
ELSE.
gv_beg = pn-begda.
gv_end = pn-endda.
ENDIF.
ELSEIF rb2 EQ 'X'.
IF sy-batch NE 'X'." IS NOT INITIAL.
gv_beg = pn-begda.
gv_end = pn-endda.
CALL FUNCTION 'DATE_COMPUTE_DAY'
EXPORTING
date = gv_beg
IMPORTING
day = gv_day.
IF gv_day LT 5.
gv_beg = gv_beg - gv_day + 1 .
ELSEIF gv_day EQ 5 .
gv_beg = gv_beg + 3.
ELSEIF gv_day EQ 6.
gv_beg = gv_beg + 2.
ELSEIF gv_day EQ 7.
gv_beg = gv_beg + 1.
ENDIF.
CLEAR gv_day.
CALL FUNCTION 'DATE_COMPUTE_DAY'
EXPORTING
date = gv_end
IMPORTING
day = gv_day.
IF gv_day LT 5.
gv_end = gv_end - gv_day - 2.
ELSEIF gv_day EQ 5.
gv_end = gv_end.
ELSEIF gv_day EQ 6.
gv_end = gv_end - 1.
ELSEIF gv_day EQ 7.
gv_end = gv_end - 2.
ENDIF.
* ENDIF.
* ENDIF.
ELSE.
IF sy-datum+4(2) NE '01'.
gv_mnth = sy-datum+4(2) - 01."c_date+4(2) - 1."sy-datum+4(2) - 1.
ELSE.
gv_mnth = 12.
ENDIF.
CONCATENATE sy-datum+0(4) gv_mnth sy-datum+6(2) INTO gv_beg.
CALL FUNCTION 'DATE_COMPUTE_DAY'
EXPORTING
date = gv_beg
IMPORTING
day = gv_day.
IF gv_day LT 5.
gv_beg = gv_beg - gv_day + 1 .
ELSEIF gv_day EQ 5 .
gv_beg = gv_beg + 3.
ELSEIF gv_day EQ 6.
gv_beg = gv_beg + 2.
ELSEIF gv_day EQ 7.
gv_beg = gv_beg + 1.
ENDIF.
CLEAR gv_day.
CALL FUNCTION 'DATE_COMPUTE_DAY'
EXPORTING
date = sy-datum
IMPORTING
day = gv_day.
IF gv_day LT 5.
gv_end = sy-datum - gv_day - 2.
ELSEIF gv_day EQ 5.
gv_end = sy-datum.
ELSEIF gv_day EQ 6.
gv_end = sy-datum - 1.
ELSEIF gv_day EQ 7.
gv_end = sy-datum - 2.
ENDIF.
ENDIF.
ENDIF.
CLEAR : it_time,it_receiver,it_usrid,it_t001p.
SELECT pernr ldate ltime satza
FROM teven INTO TABLE it_time
WHERE pernr IN pnppernr AND
ldate BETWEEN gv_beg AND gv_end
AND stokz NE 'X'.
SELECT pernr subty usrid usrid_long
FROM pa0105 INTO TABLE it_receiver
WHERE "pernr IN pnppernr
" AND subty = '0010'
endda >= gv_end
AND begda <= gv_end.
SORT it_receiver BY pernr.
*clear wa_admin.
* select single werks sachz
* from pa0001
* into wa_admin
* where pernr in wa_final-pernr
* and endda >= sy-datum
* and begda <= sy-datum.
SELECT werks sachx usrid
FROM t526 INTO TABLE it_usrid.
* SELECT pernr usrid usrid_long
* FROM pa0105 INTO TABLE it_ccreceiver
* FOR ALL ENTRIES IN it_usrid
* WHERE usrid EQ it_usrid-usrid
* AND subty = '0010'
* AND endda >= gv_end
* AND begda <= gv_end.
SELECT werks btrtl btext FROM t001p
INTO TABLE it_t001p
WHERE werks IN pnpwerks
AND btrtl IN pnpbtrtl.
*& Include ZHR_VWGSIPL_WRKNG_HRS_PROCESS
GET peras.
rp_provide_from_last p0000 space sy-datum sy-datum. "latest p0000 record
IF p0000-stat2 EQ '3'.
rp_provide_from_last p0001 space sy-datum sy-datum."latest p0001 record
IF p0001-bukrs EQ '2680'.
rp_read_infotype peras-pernr 2001 p2001 gv_beg gv_end.
rp_read_infotype peras-pernr 2002 p2002 gv_beg gv_end.
rp_read_infotype peras-pernr 2006 p2006 '18000101' sy-datum.
IF rb1 EQ 'X'.
n = 1.
ELSEIF rb2 EQ 'X'.
n = 5.
ENDIF.
CLEAR : gv_cntr,gv_dat,gv_week.
gv_dat = gv_beg.
DO n TIMES.
IF gv_dat GT gv_end.
gv_week = n - 1.
EXIT.
ENDIF.
gv_cntr = gv_cntr + 1.
IF gv_cntr GT 1 .
* gv_beg = gv_beg + 2.
gv_dat = gv_dat + 2.
ENDIF.
DO 5 TIMES .
* if rb2 eq 'X'.
IF gv_dat LE gv_end.
* endif.
READ TABLE it_time INTO wa_time WITH KEY pernr = p0001-pernr
ldate = gv_dat
satza = 'P10'.
IF sy-subrc EQ '0'.
gv_in = wa_time-ltime.
CLEAR : wa_time.
READ TABLE it_time INTO wa_time WITH KEY pernr = p0001-pernr
ldate = gv_dat
satza = 'P20'.
IF sy-subrc EQ '0'.
gv_out = wa_time-ltime.
gv_time = gv_time + ( gv_out - gv_in ) .
CLEAR : wa_time.
* CALL FUNCTION 'MONI_TIME_CONVERT'
* EXPORTING
* ld_duration = gv_time
* IMPORTING
* lt_output_duration = gv_tot.
*gv_tote = gv_tot.
* gv_total = gv_total + gv_tote.
* clear : gv_tot,gv_tote.
**CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
** EXPORTING
** input = gv_time
*** NO_TYPE_CHECK = 'X'
*** ROUND_SIGN = ' '
** UNIT_IN = 'S'
** UNIT_OUT = 'H'
** IMPORTING
*** ADD_CONST =
*** DECIMALS =
*** DENOMINATOR =
*** NUMERATOR =
** OUTPUT = gv_total
** EXCEPTIONS
** CONVERSION_NOT_FOUND = 1
** DIVISION_BY_ZERO = 2
** INPUT_INVALID = 3
** OUTPUT_INVALID = 4
** OVERFLOW = 5
** TYPE_INVALID = 6
** UNITS_MISSING = 7
** UNIT_IN_NOT_FOUND = 8
** UNIT_OUT_NOT_FOUND = 9
** OTHERS = 10
**IF sy-subrc <> 0.
*** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
**ENDIF.
* CALL FUNCTION 'POINT_IN_TIME_CONVERT'
* EXPORTING
** KZ_ENDTERMIN = ' '
* point_in_time = gv_time
* IMPORTING
** DATE =
* time = gv_hours."actual working hours
* gv_total = gv_total + gv_hours.
gv_punch = 'X'.
CLEAR wa_final.
CLEAR :gv_out,gv_in,gv_hours.
ENDIF.
ENDIF.
IF gv_punch IS INITIAL .
LOOP AT p2001 WHERE pernr EQ peras-pernr AND begda LE gv_dat AND endda GE gv_dat.
* gv_total = gv_total + 090000.
gv_time = gv_time + 32400.
gv_abs = 'X'.
ENDLOOP.
ENDIF.
IF gv_punch IS INITIAL AND gv_abs IS INITIAL.
LOOP AT p2002 WHERE pernr EQ peras-pernr AND begda LE gv_dat AND endda GE gv_dat.
gv_time = gv_time + 32400.
gv_prs = 'X'.
* gv_total = gv_total + 090000.
ENDLOOP.
ENDIF.
* PERFORM holiday_check USING gv_dat.
IF gv_punch IS INITIAL AND gv_abs IS INITIAL AND gv_prs IS INITIAL.
CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
EXPORTING
date = gv_dat
holiday_calendar_id = 'HM'
IMPORTING
holiday_found = gv_ind.
IF gv_ind EQ 'X'.
gv_time = gv_time + 32400.
ENDIF.
CLEAR gv_ind.
ENDIF.
CLEAR :gv_punch, gv_abs ,gv_prs.
gv_dat = gv_dat + 1.
IF gv_dat GT gv_end.
EXIT.
ENDIF.
ENDIF.
ENDDO.
CLEAR : gv_tot,gv_tim.
CALL FUNCTION 'MONI_TIME_CONVERT'
EXPORTING
ld_duration = gv_time
IMPORTING
lt_output_duration = gv_tot.
* IF gv_beg LE gv_end.
CONCATENATE gv_tot+2(2) gv_tot+5(2) gv_tot+8(2) INTO gv_tim.
v_dat = ( gv_dat - 1 ).
wa-awh = wa-awh + gv_time.
IF v_dat EQ gv_end.
wa-pernr = p0001-pernr.
APPEND wa TO it.
CLEAR wa.
ENDIF.
IF gv_tim LT c_hrs .
wa_final-pernr = p0001-pernr.
* WA_FINAL-BEGDA = SY-DATUM.
wa_final-ename = p0001-ename.
* wa_final-actual = gv_time.
wa_final-diff = gv_45hrs - gv_time.
wa_final-plans = p0001-plans.
CLEAR : wa_t001p.
READ TABLE it_t001p INTO wa_t001p WITH KEY werks = p0001-werks
btrtl = p0001-btrtl.
IF sy-subrc EQ 0.
wa_final-dept = wa_t001p-btext.
ENDIF.
CLEAR gv_org.
PERFORM org_text.
wa_final-divsn = gv_org.
wa_final-werks = p0001-werks.
wa_final-sacha = p0001-sachp.
IF wa_final-diff GT 0.
APPEND wa_final TO it_final.
ENDIF.
CLEAR wa_final.
ENDIF.
* ENDIF.
CLEAR : gv_time ,gv_hours.
CLEAR: gv_tot,gv_tim.
CLEAR : gv_total.
ENDDO.
CLEAR gv_cntr.
* ENDIF.
ENDIF.
ENDIF.
* CLEAR gv_beg.
END-OF-SELECTION.
*& Include ZHR_VWGSIPL_WRKNG_HRS_DISPLAY
CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'
EXPORTING
begda = gv_beg
endda = gv_end
* TAB_MODE = ' '
IMPORTING
* DAYS =
c_weeks = gv_week
* C_MONTHS =
* C_YEARS =
* WEEKS =
* MONTHS =
* YEARS =
* D_MONTHS =
* MONTH_TAB =
gv_week = gv_week + 1.
* CALL FUNCTION 'DATE_COMPUTE_DAY'
* EXPORTING
* date = gv_end
* IMPORTING
* day = gv_day1.
* if gv_day1 eq '5' or gv_day1 eq
LOOP AT it_final INTO wa_final."looping at list of employee hvng shrtg.
CLEAR : gv_diff ,gv_cntr1 , gv_cntr2,gv_upl,gv_upl1.
IF rb2 EQ 'X'.
CLEAR : gv_cntr1.
LOOP AT it_final INTO wa_final WHERE pernr EQ wa_final-pernr .
gv_diff = gv_diff + wa_final-diff. " total shrtg
* gv_cntr1 = gv_cntr1 + 1.
ENDLOOP.
* calc no od dyas to be deducted.
gv_cntr1 = FLOOR( gv_diff / 32400 ) .
gv_cntr2 = ( gv_diff MOD 32400 ) .
IF gv_cntr2 IS NOT INITIAL.
gv_cntr2 = '0.50' .
ENDIF.
CLEAR gv_quota.
*total el quota available.
LOOP AT p2006 WHERE subty EQ '20' and DESTA le sy-datum and DEEND ge sy-datum .
gv_quota = gv_quota + p2006-anzhl - p2006-kverb.
gv_quota = FLOOR( gv_quota ).
ENDLOOP.
*leaves to be deducted
IF gv_cntr1 LE gv_quota.
*deduction from EL.
quota-pernr = wa_final-pernr .
quota-infty = c_infty.
quota-subty = c_sub.
PERFORM holidy_check.
quota-endda = sy-datum + gv_cntr1 + gv_no - 1.
CLEAR gv_no.
quota-begda = sy-datum.
quota-awart = c_sub.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = wa_final-pernr.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '2001'
number = wa_final-pernr
subtype = c_sub
validityend = quota-endda
validitybegin = quota-begda
record = quota
operation = 'INS'
tclas = 'A'
nocommit = no_commit
IMPORTING
return = bapireturn
key = bapipakey.
gv_start2 = quota-endda.
*preparing the list whose leave has been deducted.
wa_mail-pernr = wa_final-pernr.
wa_mail-ename = wa_final-ename.
wa_mail-divsn = wa_final-divsn.
wa_mail-dept = wa_final-dept.
wa_mail-lvdays = gv_cntr1.
CONCATENATE sy-datum+6(2) '.' sy-datum+4(2) '.' sy-datum+0(4) '-' quota-endda+6(2) '.' quota-endda+4(2) '.' quota-endda+0(4) INTO wa_mail-lvdat.
* wa_mail-lvdat = sy-datum.
wa_mail-lvtyp = 'Earned Leave'.
IF bapireturn-message IS NOT INITIAL.
wa_mail-status = bapireturn-message.
ELSE.
wa_mail-status = 'Created'.
ENDIF.
wa_mail-werks = wa_final-werks.
wa_mail-sacha = wa_final-sacha.
gv_plnd = gv_week * 45 * 60 * 60. "total planned working hrs
CALL FUNCTION 'MONI_TIME_CONVERT'
EXPORTING
ld_duration = gv_plnd
IMPORTING
lt_output_duration = wa_mail-plnd.
CLEAR wa.
READ TABLE it INTO wa WITH KEY pernr = wa_final-pernr..
IF wa IS NOT INITIAL.
gv_actl = wa-awh . "actual wrkng hrs "gv_plnd - gv_diff. "actual wrkng hrs
CALL FUNCTION 'MONI_TIME_CONVERT'
EXPORTING
ld_duration = gv_actl
IMPORTING
lt_output_duration = wa_mail-actl.
ENDIF.
APPEND wa_mail TO it_mail.
CLEAR :wa_mail,gv_plnd,gv_actl.
CLEAR quota .
* REFRESH quota.
ELSE.
gv_upl = gv_cntr1 - gv_quota.
*unpaid leave deduction
IF gv_quota IS NOT INITIAL.
quota-pernr = wa_final-pernr .
quota-infty = c_infty.
quota-subty = c_sub.
PERFORM holiday_check1.
quota-endda = sy-datum + gv_quota + gv_no - 1.
CLEAR gv_no.
quota-begda = sy-datum.
quota-awart = c_sub.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = wa_final-pernr.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '2001'
number = wa_final-pernr
subtype = c_sub
* OBJECTID =
* LOCKINDICATOR =
validityend = quota-endda
validitybegin = quota-begda
* RECORDNUMBER =
record = quota
operation = 'INS'
tclas = 'A'
* DIALOG_MODE = '0'
nocommit = no_commit
* VIEW_IDENTIFIER =
* SECONDARY_RECORD =
IMPORTING
return = bapireturn
key = bapipakey
gv_start1 = quota-endda.
wa_mail-pernr = wa_final-pernr.
wa_mail-ename = wa_final-ename.
wa_mail-divsn = wa_final-divsn.
wa_mail-dept = wa_final-dept.
gv_quota1 = gv_quota.
wa_mail-lvdays = gv_quota1.
CONCATENATE sy-datum+6(2) '.' sy-datum+4(2) '.' sy-datum+0(4) '-' quota-endda+6(2) '.' quota-endda+4(2) '.' quota-endda+0(4) INTO wa_mail-lvdat.
* wa_mail-lvdat = sy-datum.
wa_mail-lvtyp = 'Earned Leave'.
* CONCATENATE bapireturn-id
* bapireturn-number INTO wa_mail-status.
IF bapireturn-message IS NOT INITIAL.
wa_mail-status = bapireturn-message.
ELSE.
wa_mail-status = 'Created'.
ENDIF.
wa_mail-werks = wa_final-werks.
wa_mail-sacha = wa_final-sacha.
gv_plnd = gv_week * 45 * 60 * 60.
CALL FUNCTION 'MONI_TIME_CONVERT'
EXPORTING
ld_duration = gv_plnd
IMPORTING
lt_output_duration = wa_mail-plnd.
CLEAR wa.
READ TABLE it INTO wa WITH KEY pernr = wa_final-pernr..
IF wa IS NOT INITIAL.
gv_actl = wa-awh . "actual wrkng hrs "gv_plnd - gv_diff. "actual wrkng hrs
CALL FUNCTION 'MONI_TIME_CONVERT'
EXPORTING
ld_duration = gv_actl
IMPORTING
lt_output_duration = wa_mail-actl.
ENDIF.
APPEND wa_mail TO it_mail.
CLEAR :gv_plnd,gv_actl,wa_mail.
CLEAR quota .
* REFRESH quota.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = wa_final-pernr.
ENDIF.
* gv_upl1 = CEIL( gv_upl + gv_cntr2 ).
IF gv_upl IS NOT INITIAL.
*Unpaid leave deduction
quota-pernr = wa_final-pernr .
quota-infty = c_infty.
quota-subty = c_sub1.
* quota-stdaz = gv_upl + gv_cntr2 .
IF gv_start1 IS INITIAL.
PERFORM holiday_check2.
quota-endda = sy-datum + gv_upl + gv_no - 1.
quota-begda = sy-datum.
CLEAR gv_no.
ELSE.
PERFORM holiday_check3.
quota-endda = gv_start1 + gv_upl + gv_no.
quota-begda = gv_start1 + 1.
CLEAR gv_no.
ENDIF.
quota-awart = c_sub1.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = wa_final-pernr.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '2001'
number = wa_final-pernr
subtype = c_sub1
validityend = quota-endda
validitybegin = quota-begda
record = quota
operation = 'INS'
tclas = 'A'
nocommit = no_commit
IMPORTING
return = bapireturn
key = bapipakey.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = wa_final-pernr.
gv_start2 = quota-endda.
wa_mail-pernr = wa_final-pernr.
wa_mail-ename = wa_final-ename.
wa_mail-divsn = wa_final-divsn.
wa_mail-dept = wa_final-dept.
wa_mail-lvdays = gv_upl.
CONCATENATE quota-begda+6(2) '.' quota-begda+4(2) '.' quota-begda+0(4) '-' quota-endda+6(2) '.' quota-endda+4(2) '.' quota-endda+0(4) INTO wa_mail-lvdat.
* wa_mail-lvdat = quota-begda.
wa_mail-lvtyp = 'Unpaid Leave'.
* CONCATENATE bapireturn-id
* bapireturn-number INTO wa_mail-status.
IF bapireturn-message IS NOT INITIAL.
wa_mail-status = bapireturn-message.
ELSE.
wa_mail-status = 'Created'.
ENDIF.
wa_mail-werks = wa_final-werks.
wa_mail-sacha = wa_final-sacha.
gv_plnd = gv_week * 45 * 60 * 60.
CALL FUNCTION 'MONI_TIME_CONVERT'
EXPORTING
ld_duration = gv_plnd
IMPORTING
lt_output_duration = wa_mail-plnd.
CLEAR wa.
READ TABLE it INTO wa WITH KEY pernr = wa_final-pernr..
IF wa IS NOT INITIAL.
gv_actl = wa-awh . "actual wrkng hrs "gv_plnd - gv_diff. "actual wrkng hrs
CALL FUNCTION 'MONI_TIME_CONVERT'
EXPORTING
ld_duration = gv_actl
IMPORTING
lt_output_duration = wa_mail-actl.
ENDIF.
APPEND wa_mail TO it_mail.
CLEAR :gv_actl,gv_plnd,wa_mail.
CLEAR quota.
ENDIF.
ENDIF.
* half day unpaid leave
IF gv_cntr2 IS NOT INITIAL.
quota-pernr = wa_final-pernr .
quota-infty = c_infty.
quota-subty = c_sub1.
quota-beguz = '090000'.
quota-enduz = '133000'.
* quota-stdaz = gv_cntr2 .
IF gv_start2 IS INITIAL.
PERFORM holiday_check4.
quota-endda = sy-datum + gv_no.
quota-begda = sy-datum + gv_no .
CLEAR gv_no.
ELSE.
PERFORM holiday_check5.
quota-endda = gv_start2 + gv_no + 1.
quota-begda = gv_start2 + gv_no + 1."gv_start2 + 1.
CLEAR gv_no.
ENDIF.
quota-awart = c_sub1.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = wa_final-pernr.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '2001'
number = wa_final-pernr
subtype = c_sub1
validityend = quota-endda
validitybegin = quota-begda
record = quota
operation = 'INS'
tclas = 'A'
nocommit = no_commit
IMPORTING
return = bapireturn
key = bapipakey.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = wa_final-pernr.
wa_mail-pernr = wa_final-pernr.
wa_mail-ename = wa_final-ename.
wa_mail-divsn = wa_final-divsn.
wa_mail-dept = wa_final-dept.
wa_mail-lvdays = '0.5'.
CONCATENATE quota-begda+6(2) '.' quota-begda+4(2) '.' quota-begda+0(4) '-' quota-endda+6(2) '.' quota-endda+4(2) '.' quota-endda+0(4) INTO wa_mail-lvdat.
* wa_mail-lvdat = quota-begda.
wa_mail-lvtyp = 'Unpaid Leave'.
* CONCATENATE bapireturn-id
* bapireturn-number INTO wa_mail-status.
IF bapireturn-message IS NOT INITIAL.
wa_mail-status = bapireturn-message.
ELSE.
wa_mail-status = 'Created'.
ENDIF.
wa_mail-werks = wa_final-werks.
wa_mail-sacha = wa_final-sacha.
gv_plnd = gv_week * 45 * 60 * 60.
CALL FUNCTION 'MONI_TIME_CONVERT'
EXPORTING
ld_duration = gv_plnd
IMPORTING
lt_output_duration = wa_mail-plnd.
CLEAR wa.
READ TABLE it INTO wa WITH KEY pernr = wa_final-pernr..
IF wa IS NOT INITIAL.
gv_actl = wa-awh . "actual wrkng hrs "gv_plnd - gv_diff. "actual wrkng hrs
CALL FUNCTION 'MONI_TIME_CONVERT'
EXPORTING
ld_duration = gv_actl
IMPORTING
lt_output_duration = wa_mail-actl.
ENDIF.
APPEND wa_mail TO it_mail.
CLEAR : gv_plnd,gv_actl,wa_mail.
CLEAR quota.
ENDIF.
ENDIF.
DELETE it_final WHERE pernr EQ wa_final-pernr.
IF bapireturn IS INITIAL.
READ TABLE it_receiver INTO wa_receiver WITH KEY pernr = wa_final-pernr
subty = '0010'.
IF sy-subrc EQ '0'.
receiver = wa_receiver-usrid_long.
CLEAR wa_receiver.
ENDIF.
*Commented for cc mail to HR.
* READ TABLE it_usrid INTO wa_usrid WITH KEY werks = p0001-werks
* sachx = p0001-sachp.
* IF sy-subrc EQ '0'.
* READ TABLE it_receiver INTO wa_receiver WITH KEY usrid = wa_usrid-usrid.
* IF sy-subrc EQ '0'.
* READ TABLE it_receiver INTO wa_receiver WITH KEY pernr = wa_receiver-pernr
* subty = '0010'.
* IF rb2 EQ 'X'.
* cc_reciv = wa_receiver-usrid_long.
* ENDIF.
* ENDIF.
* ENDIF.
CONCATENATE wa_final-begda+6(2)'.' wa_final-begda+4(2) '.' wa_final-begda+0(4) INTO gv_begda.
CONCATENATE wa_final-ltime+0(2)'.' wa_final-ltime+2(2) INTO gv_ltime.
* if empid is not initial and employee is not initial and reciever is not initial.
**------------Create Content--------------------*
CONCATENATE 'Dear' wa_final-ename INTO hello_emp SEPARATED BY space.
CONCATENATE hello_emp ',' INTO hello_emp.
APPEND hello_emp TO content.
CLEAR: hello_emp.
APPEND space TO content.
IF rb1 EQ 'X'.
APPEND 'This is to inform you that there is a shortfall in your working hours this week. As you are aware,our working hour policy states that an employee needs to work 45 hours a week - that is,'
TO content.
APPEND 'an average of nine hours a day including the half-hour lunch break.' TO content.
ELSE.
APPEND 'You have not worked 45 hours in a week and the same is also not regularized till 15th of the current month.' TO content.
ENDIF.
APPEND space TO content.
IF rb1 EQ 'X'.
APPEND 'It is recommended that you get this done at the earliest, as it could impact your Earned Leaves, and perhaps, even your salary. ' TO content.
APPEND space TO content.
APPEND 'All it requires is regularising your attendance which takes just a few minutes via our ESS portal. Here is the link: http:************.' TO content.
APPEND space TO content.
APPEND 'If you have any queries, do refer to our Leave Policy or contact HR Team.' TO content.
APPEND space TO content.
APPEND space TO content.
APPEND 'Best Regards,' TO content.
APPEND space TO content.
APPEND 'Your HR Team' TO content.
APPEND space TO content.
APPEND '**This is an automatically generated mail. Please do not reply to this mail.**' TO content.
* APPEND ' You are therefore, advised to regularize your attendance to ensure 45 hours. Failure to do so will lead to deduction of Earned Leave for the shortfall of the absence period.'
* TO content.
ELSE.
APPEND 'Hence, the short fall of the working hours has been adjusted against your “Earned Leave”.' TO content.
* ENDIF.
* CONCATENATE hello_emp '.' INTO hello_emp.
APPEND space TO content.
APPEND'If, you do not have sufficient quota of Earned Leave, this will be treated as “Unpaid Leave” and salary will be deducted accordingly.' TO content.
APPEND space TO content.
APPEND 'For details, please refer the Leave Policy.' TO content.
APPEND space TO content.
APPEND 'Kindly use the following link to access the ESS portal to check your “Leaves and Quotas”.' TO content.
APPEND space TO content.
APPEND 'http:**************' TO content.
APPEND space TO content.
APPEND space TO content.
APPEND '**This is an automatically generated mail. Please do not reply to this mail.**' TO content.
APPEND space TO content.
ENDIF.
*APPEND'Best Regards,' TO content.
*APPEND employee TO content.
**------------Mail trigger----------------------*
TRY.
send_request = cl_bcs=>create_persistent( ).
CATCH cx_send_req_bcs.
ENDTRY.
WRITE 'Shortfall of working time' TO subject.
TRY.
CALL METHOD cl_document_bcs=>create_document
EXPORTING
i_type = 'RAW'
i_subject = subject
* i_length =
* i_language = SPACE
* i_importance =
* i_sensitivity =
i_text = content
* i_hex =
* i_header =
* i_sender =
RECEIVING
result = mail_doc
CATCH cx_document_bcs.
ENDTRY.
TRY.
CALL METHOD send_request->set_document
EXPORTING
i_document = mail_doc.
CATCH cx_send_req_bcs .
ENDTRY.
TRY.
CALL METHOD cl_sapuser_bcs=>create
EXPORTING
i_user = sy-uname
RECEIVING
result = sender.
CATCH cx_address_bcs .
ENDTRY.
TRY.
CALL METHOD send_request->set_sender
EXPORTING
i_sender = sender.
CATCH cx_send_req_bcs .
ENDTRY.
TRY.
CALL METHOD cl_cam_address_bcs=>create_internet_address
EXPORTING
i_address_string = receiver
* i_address_name =
* i_incl_sapuser =
RECEIVING
result = recipient
CATCH cx_address_bcs .
ENDTRY.
CLEAR :receiver.
* *Commented for cc mail to HR.
* TRY.
* CALL METHOD cl_cam_address_bcs=>create_internet_address
* EXPORTING
* i_address_string = cc_reciv
** i_address_name =
** i_incl_sapuser =
* RECEIVING
* result = recipient_cc
* CATCH cx_address_bcs .
* ENDTRY.
TRY.
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient
i_express = 'U'
* i_copy =
* i_blind_copy =
* i_no_forward =
CATCH cx_send_req_bcs .
ENDTRY.
* TRY.
* CALL METHOD send_request->add_recipient
* EXPORTING
* i_recipient = recipient_cc
* i_express = 'U'
* i_copy = 'X'
** i_blind_copy =
** i_no_forward =
* CATCH cx_send_req_bcs .
* ENDTRY.
TRY.
CALL METHOD send_request->set_send_immediately
EXPORTING
i_send_immediately = 'X'.
CATCH cx_send_req_bcs .
ENDTRY.
TRY.
CALL METHOD send_request->send
* EXPORTING
* i_with_error_screen = SPACE
* receiving
* RESULT =
CATCH cx_send_req_bcs .
ENDTRY.
COMMIT WORK.
ELSE.
READ TABLE it_usrid INTO wa_usrid WITH KEY werks = p0001-werks
sachx = p0001-sachp.
IF sy-subrc EQ '0'.
READ TABLE it_receiver INTO wa_receiver WITH KEY usrid = wa_usrid-usrid.
IF sy-subrc EQ '0'.
READ TABLE it_receiver INTO wa_receiver WITH KEY pernr = wa_receiver-pernr
subty = '0010'.
receiver = wa_receiver-usrid_long.
cc_reciv = '*'.
ENDIF.
ENDIF.
CONCATENATE wa_final-begda+6(2)'.' wa_final-begda+4(2) '.' wa_final-begda+0(4) INTO gv_begda.
CONCATENATE wa_final-ltime+0(2)'.' wa_final-ltime+2(2) INTO gv_ltime.
* if empid is not initial and employee is not initial and reciever is not initial.
**------------Create Content--------------------*
CONCATENATE 'Hello' ',' INTO hello_emp.
* CONCATENATE hello_emp ',' INTO hello_emp.
APPEND hello_emp TO content.
CLEAR: hello_emp.
APPEND space TO content.
CONCATENATE 'Employee' wa_final-ename bapireturn-type
bapireturn-id
bapireturn-number
bapireturn-message
bapireturn-log_no
bapireturn-log_msg_no
bapireturn-message_v1
bapireturn-message_v2
bapireturn-message_v3
bapireturn-message_v4 INTO hello_emp SEPARATED BY space.
APPEND hello_emp TO content.
CLEAR: hello_emp.
APPEND space TO content.
* CONCATENATE hello_emp '.' INTO hello_emp.
* APPEND hello_emp TO content.
* CLEAR: hello_emp.
* APPEND space TO content.
* APPEND 'For details, please refer Leave Policy.' TO content.
* APPEND space TO content.
APPEND 'Please check Infotype 2001 and 2006 .' TO content.
APPEND space TO content.
* APPEND '***********************l' TO content.
* APPEND space TO content.
* APPEND space TO content.
APPEND '**This is an automatically generated mail. Please do not reply to this mail.**' TO content.
APPEND space TO content.
*APPEND'Best Regards,' TO content.
*APPEND employee TO content.
**------------Mail trigger----------------------*
TRY.
send_request = cl_bcs=>create_persistent( ).
CATCH cx_send_req_bcs.
ENDTRY.
WRITE 'Shortfall of working time' TO subject.
TRY.
CALL METHOD cl_document_bcs=>create_document
EXPORTING
i_type = 'RAW'
i_subject = subject
* i_length =
* i_language = SPACE
* i_importance =
* i_sensitivity =
i_text = content
* i_hex =
* i_header =
* i_sender =
RECEIVING
result = mail_doc
CATCH cx_document_bcs.
ENDTRY.
TRY.
CALL METHOD send_request->set_document
EXPORTING
i_document = mail_doc.
CATCH cx_send_req_bcs .
ENDTRY.
TRY.
CALL METHOD cl_sapuser_bcs=>create
EXPORTING
i_user = sy-uname
RECEIVING
result = sender.
CATCH cx_address_bcs .
ENDTRY.
TRY.
CALL METHOD send_request->set_sender
EXPORTING
i_sender = sender.
CATCH cx_send_req_bcs .
ENDTRY.
TRY.
CALL METHOD cl_cam_address_bcs=>create_internet_address
EXPORTING
i_address_string = receiver
* i_address_name =
* i_incl_sapuser =
RECEIVING
result = recipient
CATCH cx_address_bcs .
ENDTRY.
TRY.
CALL METHOD cl_cam_address_bcs=>create_internet_address
EXPORTING
i_ad -
Compare two fields and populate a third
I am trying to do the following:
Filed A number of days leave left
Field B Total number of days requested (some of other Fields)
Field C = A - B
Field D = Listed number of days unpaid to be taken
If C < 0 then D = C
I am using the following code
// Get the field values, as numbers
var v1 = this.getField("leaveleft").value;
var v2 = this.getField("totaldaysrequested").value;
var v3 = this.getField("daysleft").value;
var v4 = this.getField("unpaiddays").value;
if (v2 < "0") v4 = v3;
unpaiddays.value = v4.value;
This is not populating the field, what am i doing wrong?Assuming this is the calculation script for "unpaiddays", use this code instead of what you have now:
var v1 = +this.getField("daysleft").value;
event.value = (v1<0) ? v1 : ""; -
Hi all,
I am new to this forum and new to SAP HR module. I am working on Indian Payroll.
I request the SAP gurus to know about how to get the payslip with deducted amounts of basic pay, da,hra, etc., and gross total while considering unpaid half day leave.
Working hours are 8 1/2 hours.
half day unpaid leave is 4.5 hours.
while using infotype 2001 it displays the half day unpaid leave but in payslip it is not displayed.
Waiting for your reply.
Thanks in advance
Cheers
RKHello,
for all the others, found the solution
http://forum.java.sun.com/thread.jspa?messageID=3528322� -
Creation of rule for day type for Unpaid Day off
Hi,
i working on two types of day off one is paid another one is unpaid.
For first one i selected the standerd SAP rule 01
And for unpaid I created one rule Like
Dy.ty Wd d.ty sat d.Sud.
2 2222222 2 2222222 2 2222222
like that i was created i assigned to the work schedule rule.
can u any body tell me is it correct or wrong.
Thanks in Advance
Edited by: bhaskar K on Sep 23, 2008 12:33 PMhi bhaskar
want to make some thing clear when ur creating a rule u take into account the holiday class along with day type when u try to combine and match them u can precisely say tht ur rule wud be correct based on ur requirements.
please make it clear
regards
sb -
Half Day LOP / Unpaid Absence not working for payroll india
Dear Gurus,
I have created Unpaid leave which is working correctly when we maintain full day absence in infotype 2001.
But it is not working for partial absence ie, half day.
I would really appreciate if you help me out on this issue.
Thanks,
Rajesh BaditaDear Venkey / Rajesh,
My issue is resolved. We have tried with Custom PCR which will convert absence days into hours. With this we are able to achieve the desired result.
Copied from standard PCR "INP1" to "ZNP1" and modified "/801 partial period factor 1" logic. Below is the PCR for your kind reference.
RTE=TKSOLL
RTE*8
RTE-TSAU**
RTE/8
RTE*KGENAU
RTE/TKDIVI
ADDWT *
Kindly go through the below link which is very useful. Hence closing the thread. Thanks for your valuable inputs.
http://wiki.sdn.sap.com/wiki/display/sandbox/PCRmodificationincaseofHalfdayUnpaidLeave(LOP),IndiaPayroll
Thanks & Regards,
Rajesh Badita
Edited by: Rajesh Badita - ABAP HR on Oct 13, 2011 7:05 AM
Edited by: Rajesh Badita - ABAP HR on Oct 13, 2011 7:08 AM -
Unpaid and Working Days salary in Payslip
Dear Experts,
Good Afternnon to all.
Kindly guide me to show Unpaid and Working Days salary in Payslip.
How can i do this.
Plse share your valuable experience.
Regards,
SharmaHi
Go to PE51
Then select single node and at the space you want create as below
For Total Days
For Unpaid Absence
And for Working days
Final View Example
Regards,
Srikrishna -
How to get Unpaid balance from 30 days from chose date
hello All,
i have to get the UPB (unpaid balance) from daily table and i need to check the UPB from last month. there are seperate daily and monthly tables. And depending on user enter date range as parameter value i need to look up the monthly table.
for example if user enter date range 08/01/2011 to 08/15/2011 then i need to check for month of July from monthly table to get previous month UPB.
please help
ThanksHave you tried the add_months function?
This would allow you to find the date a month before the given value, then you could truncate that to get the previous month. I haven't tested, but I assume the code would be something such as below:
select trunc(add_months(to_date('15-08-2011','dd-mm-yyyy'),-1),'MON')
from dual;
01-JUL-11I don't know the layout of your tables, but hopefully this will help.
Kerri
Edited by: Kerri_Robberts on Aug 17, 2011 5:14 PM -
Dear experts,
We have two requirements regarding to the "Anual leave" quota.
1. Quota reduction when employee is inactive for more than 180 days
2. Advance quota days when employeee does not have enough balance
We have in place an "Anual Leave" quota related to a calendar year period, that gets generated dialy in time evaluation. This quota gets the employee entitlement from a set of rules that stored the corresponding balance in a period time type, that is the one that we defined in the customizing. This is working fine. The problems start when we try to incorporate the other two requirements.
Regarding the first requirement, if the employee has been inactive for more than 180 days in a calendar year due to unpaid leave, we need to start quota reduction as follow,
First, we need to clear the balance that was calculated above in the schema.
Then, we need to calculate one leave day for every 20 days worked till the end of the year, considering as such, everyday the employee is expected to work, except days on which the employee has been absent on unpaid leave.
For the second requirement we created a manual quota call "Advance Anual Leave". So, if the employee, wishes to take 20 working days holiday, but in his/her Anual Leave quota has only 10 days available, we have to create an "Advance Anual Leave" quota manualy for 10 days. When the quota for next year gets generated, we need to deduct these advanced 10 days from it. This deduction should stop the year after.
The problem we are finding with these two requirements is that, due to the Anual Leave quota gets generated dialy, we can't get the balance right.
Thanks in advance!
Kind regards,
AlexHello binbingogoABC,
Shopping on BestBuy.com should be easy and fun and not fraught with the kind of trouble that you describe. I regret very much that this has been your experience.
Using the information you provided when you signed up for Best Buy Unboxed I was able to locate your cancelled orders. I have requested more information from my back-office partners. As soon as I have additional details about your situation, I will reply again to this message. In the interim, I'm sorry that I must impose upon your patience.
I'm very grateful that you wrote to us with your concerns.
Sincerely, -
How to show no. of actual working days in Payslip in case of +ve time mgt
Dear Experts,
We have a requirement of showing no. of actual working days in payslip, which should be Calendar Days-(Paid+Unpaid absence). I created an w/t 1WRD for actual working days. Our paid absence w/t is 2006 and unpaid absence is 2005 copied from /845 and /846 respectively, both the absences are included in absence valuation table and working fine in that respect. But issue is i wrote a small PCR for calculating actual working days like below:
ZWRD
NUM=TKSOLL Set
NUM-E 2005
NUM-E 2006
ADDWTE1WRD
But still its fetching full working days i.e. calendar days 30 or 31 not deducting paid or unpaid absence for a month.
Pls help, what else should i do.
Regards
TanSorry, i am unable to paste RT, but its exactly as below
01, April, 2011
1WRD Working days 30.00
2006 Paid Absence 2.00
02, May, 2011
1WRD Working days 31.00
2005 Unpaid Absence 1.00
regards
Tan -
Issue with Unpaid Absence for Rotating Shift Employees with Averaging Hours
We run a biweekly payroll where full time employees are paid based on an 80 hr work shift per pay period. We have a requirement where employees in production are on a rotating shift. They may work 80, 88 or 72 hrs per pay period because their work schedule rule is defined this way. However, regardless if they worked 80, 88 or 72 hrs, these employees should still be paid based on 80 hrs of work (overtime will be paid extra). Currently, our system handles it this way.
However, a problem comes up when the employee has an unpaid absence for the period. The WT /801 is calculating a factor that results in incorrect pay. For example, if an employee has an hourly rate of $10 (biweekly rate of $ 800), with a work shift of 88 hrs and 24 hrs unpaid absence for the period, the rule KPPF is calculating the factor (/801) to be: 64/88 = .7272, and therby paying 581.76 ($800 x .7272). The calculation of /801 comes from the formula:
total hrs worked (88) - unpaid hrs (24)
total hrs worked (88)
Given our requirement, the correction calculation for the factor should be:
80 - 24 = .7
80
and the correct pay should be $560 ($800 x .7)
I tried modifying rule KPPF, along with KPP0 and KPP1 and was able to make it work to fit our requirements. However, the modification I made only works when there is only 1 WPBP record. If there are multiple WPBP records , possibly caused by an personnel action , change of IT0007 or IT0008 in the middle of the pay period, it becomes way too complicated to modify the rule to handle each and every scenario.
If anyone has come across a similar requirement, I would really appreciate if you could assist on how this should be handled.
Thanks.
Malou NaveraThanks Amosha, Here is the PCR for calculating the factor during an unpaid absence:
KPP1 Determine partial period factors (subrule)
/801 Partial monthly factor 1
RTE=TSSOLL Set
RTE-TSAU** Subtraction
RTE*KGENAU Multiplication
RTE/TSDIVI Division
ADDWT * OT Output table
Here are the table values for an employee who is on an 88 hr shift, with 52 hrs of unpaid absence:
Total period parameter
Individual divisors for total period
GSDIVI: 88.00
GADIVI: 11.00
GKDIVI: 14.00
Partial period parameter for WPBP period 01
Individual divisors for partial period in WPBP period 01
TSDIVI: 88.00
TADIVI: 11.00
TKDIVI: 14.00
Planned values for period from 01/25/2010 To 02/07/2010
DWS class: 3 Day type: 0 PHoliday cl: 0
TSSOLL: 88.00 GSSOLL: 88.00
TASOLL: 11.00 GASOLL: 11.00
TKSOLL: 14.00 GKSOLL: 14.00
Table PARTA
PParType No Valid from Valid to KAU** AAU** SAU** KAP** AAP** SAP** KAX** AAX** SAX**
T 01 01/25/2010 02/07/2010 8.00 6.00 52.00 2.00 2.00 20.00 0.00 0.00 0.00
G 00 01/25/2010 02/07/2010 8.00 6.00 52.00 2.00 2.00 20.00 0.00 0.00 0.00
In this scenario, /801 was calculated at 40,909.09, it should be 35,000.
Hoping to hear from you soon.
Thanks.
Malou -
Hello i need report that show invoices which was truly unpaid longer than 60 days. I'm new in sql in Sap and this sql dont work good for me ;/
SAP Business One 8.82 (8.82.071)
SELECT T2.[CardCode], T2.[CardName], T1.[DocDueDate], T2.[DocDate] FROM
OINV T1, ORCT T2 INNER JOIN RCT2 T3 ON T2.DocEntry = T3.DocNum WHERE DATEDIFF(day, T1.[DocDueDate], T2.[DocDate]) >= 60
AND T1.[TaxDate] > '2013-07-01 00:00:00.000'AND T1.[TaxDate] < '2014-06-30 00:00:00.000'
ORDER BY T1.[DocDueDate] ASC;
Thanks for any help!Hi Krystian,
Try this query:
SELECT
T0.DocNum [Invoice No.],
T2.DocDueDate [Payment Date],
DATEDIFF(day, T0.DocDate, T2.DocDate) [Days Count from Invoice Date to Payment Date]
FROM
OINV T0 LEFT OUTER JOIN
RCT2 T1 ON (T0.DocEntry = T1.DocEntry AND T0.ObjType = T1.InvType) LEFT OUTER JOIN
ORCT T2 ON T1.DocNum = T2.DocEntry
WHERE
T0.DocStatus = 'O' OR DATEDIFF(day, T0.DocDate, T2.DocDate) >= 60
This will also display invoices without applied payment and those with payment beyond 60 days from invoice date.
Regards,
Donald -
Slow Speeds ages to sort and I'm down 4 days holid...
Hi,
First time I've posted on a forum.
I've had real trouble from the start with BT, ordered Infinity in November 2012, but wasn't installed until December, with me having to take 2 separate days holiday as the first engineer could only fit the the phone line, and the second had to install the broadband. January 2013 after a few teething problems the BT infinity was excellent 75mb download and 19MB upload........Then I used the phone, that's when problems started, and to cut a very long story short, and after 4 visits by engineers, again me having to use my holiday days and unpaid days it was sorted, but I had a whole month where the speed was half what it was supposed to be, with BT customer service telling me how to do speed tests etc etc, fobbing me off. Bearing in mind that they only sorted me out when I cancelled my direct debit, as I wasn't going to pay for a service I wasn't getting.
I emailed BT on 12th July and 15th July (130712-001629 and 130715-007822) no response. Today I contacted them through the online chat, and was cut off not by one but by 3 representatives before they could even help me or me advise the problem. Rudradeep Saha, Mruntunjoy, Junaid, and then finally MD Shahnawaz Akhtar who told me he couldn't help me online.
My main thing is this, yes the BT infinity speed is now perfect, no problem, but I requested that at the very least a month's payment be credited for all the trouble and MY time I have wasted due to a fault that isn't mine.
I've cancelled the Direct Debit and this should speed up contacting me, as it seems to be the only way for BT to actually do something for me.cancelling a direct debit will only lead to one thing suspension of service and it eventual cancellation of service
I suggest you contact the forum mods they should be able to get this problem sorted for you this is a link to them http://bt.custhelp.com/app/contact_email/c/4951
They normally reply by email or phone directly to you within 3/5 working days they will take personal ownership of your problem until resolved and will keep you informed of progress
They are a UK based BT specialist team who have a good record at getting problems solved
This is a customer to customer self help forum the only BT presence here are the forum moderators
If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’
Maybe you are looking for
-
After updating to mavericks I have to constantly enter my apple ID for mail, iBooks, iTunes and many other applications that used to be part of my keychain. How can I get my apple ID log-in to work again?
-
Problem: Deploying application in OC4J
HELP ME!!! I'm deploy j2ee application which is a simple SessionBean, to my OC4J container (for example, OC4J_my) Then I try to start this application via JDeveloper903. Application fails with next error: javax.naming.NamingException: Lookup error: j
-
ROLE OF ABAPERS IN SAP-PLM DEVELOPMENT
HI EXPERTS, I am having 3 yrs of exp in sap - abap. I got an offer to work with sap-plm, please let me know the <b>role of abapers in sap-plm development</b>. If any document u can send me to [email protected] Thanks&Regards. B.SRINIVASULU. 09916308
-
Creating new subarea in existing Area
Hi Guys, I need to configure new subarea like "holiday calendar " in WorkingTime Area, can anyone tell me how to configure through SPRO tcode please .. Thanks in Advance
-
installed cs6 master collection wont install all the components for photoshop , after effects or FB yet everything else is fine