sshr queries
TRANSCRIPT
-
8/17/2019 SSHR Queries
1/6
To delete pending leaves
To delete pending leavesAs far as i know there is no API to delete pending leaves.
Solution1:
This is my own way of deleting the leaves
CRAT !R RP"AC PR!C#$R %%&delete&pending&leaves
AS C$RS!R '1
IS
S"CT hat.transa'tion&id( hats.transa'tion&step&id )R!* hr&api&transa'tions hat( hr&api&transa'tion&steps hats
+,R hat.transa'tion&ref&ta-le /PR&A0SC&ATT#ACS/
A# hat.transa'tion&group /A0SC&*2*T/ A# hat.transa'tion&identifier /A0SCS/
A# hat.transa'tion&ref&id IS !T $""
A# hat.status /3/
A# hat.transa'tion&id hats.transa'tion&id455)or a parti'ular employee6pass the person&id values as a 'ursor parameter
55A# hat.CRAT!R&PRS!&I# 117894
55A# hats.'reator&person&id p&person&id4 55 Add date 'onditon later and person I# ifreuired
l&transa'tion&id $*0R4
l&transa'tion&step&id $*0R4 l&error ;ARC,AR8 4
02I
!P '14 "!!P
)TC, '1
IT! l&transa'tion&id( l&transa'tion&step&id4 ?IT +, '1@!T)!$#4
I) l&transa'tion&step&id IS !T $""
T, #"T )R!* hr&api&transa'tion&values
+,R transa'tion&step&id l&transa'tion&step&id4 #0*S&!$TP$T.put&line < /#eleted Transa'tion ;alue of transa'tion step id: /
l&transa'tion&step&id
>4
# I)4
I) l&transa'tion&id IS !T $""
http://sravan20apps.blogspot.in/2015/10/to-delete-pending-leaves.htmlhttp://sravan20apps.blogspot.in/2015/10/to-delete-pending-leaves.html
-
8/17/2019 SSHR Queries
2/6
T,
#"T )R!* hr&api&transa'tion&steps
+,R transa'tion&id l&transa'tion&id4 #0*S&!$TP$T.put&line
< /#eleted Transa'tion step of transa'tion id: /
l&transa'tion&id >4
#"T )R!* hr&api&transa'tions +,R transa'tion&id l&transa'tion&id4
#0*S&!$TP$T.put&line 4
# I)4 # "!!P4
C"!S '14
C!**IT4?CPTI!
+, !T,RS T,
l&error : S$0STR and 'hange the de'odevalue of 'an'el&i'on( Confirm&i'on and update&i'on values -y passing
/,rCan'elna-led6,rCan'el#isa-led/ !R /,r$pdatena-led6,r$pdate#isa-led/ values and
repla'e with the 'ustom uery.
Ta-les $sed in Standard Buery are:
per&a-sen'e&attendan'es(
per&a-sen'e&attendan'e&types( per&a-s&attendan'e&types&tl(
hr&lookups(
hr&api&transa'tions( hr&api&transa'tion&steps
Standard Buery:
-
8/17/2019 SSHR Queries
3/6
S"CT ;" end&date
(paattl.name a-sen'e&type (paat.a-sen'e&attendan'e&type&id a-sen'e&attendan'e&type&id
(f'l.meaning a-sen'e&'ategory
(paat.a-sen'e&'ategory a-sen'e&'ategory&'ode (paa.a-sen'e&hours
( approval&status
( /A/ approval&status&'ode
(de'ode(//>>supporting&do'uments
(de'ode <
paa.date&start(null( de'ode(1(/,rCan'elna-led/(
de'ode
>
> 'an'el&i'on
(de'ode
-
8/17/2019 SSHR Queries
4/6
($""
details&i'on
(paa.a-sen'e&attendan'e&id (null transa'tion&id
(to&'har supporting#o'Fey
(paa.a-sen'e&days)R!* per&a-sen'e&attendan'es paa
(per&a-sen'e&attendan'e&types paat
(per&a-s&attendan'e&types&tl paattl (hr&lookups f'l
+,R 11
and paa.person&id :1
and paa.-usiness&group&idE= :8 and paa.a-sen'e&attendan'e&type&id paat.a-sen'e&attendan'e&type&id
and paat.a-sen'e&attendan'e&type&id paattl.a-sen'e&attendan'e&type&id
and paattl.language userenv
-
8/17/2019 SSHR Queries
5/6
(hr&a-sutil&ss.getApprovalStatusCode a-sen'e&status
( hats.Information7 a-sen'e&status&'ode (hr&a-sutil&ss.hasSupporting#o'uments 'an'el&i'on (hr&a-sutil&ss.isConfirmAllowed update&i'on
(null details&i'on (hat.TRASACTI!&R)&I# a-sen'e&attendan'e&id
(hat.transa'tion&id transa'tion&id
(to&'har a-sen'e&daysfrom hr&api&transa'tions hat
(hr&api&transa'tion&steps hats
where hat.TRASACTI!&R)&TA0"/PR&A0SC&ATT#ACS/
and hat.TRASACTI!&2R!$P/A0SC&*2*T/and hat.TRASACTI!&I#TI)IR/A0SCS/
and hat.TRASACTI!&R)&I# is not null55and hat.S"CT#&PRS!&I# :L
55and hat.CRAT!R&PRS!&I# nvl
and hat.transa'tion&idhats.transa'tion&idand hat.status not in
and not is null and hat.status/+/>
Posted -y sravan at 1=:1L P* o 'omments: "inks to this post
"a-els: SS,R Bueries
To get pending leaves
S"CT hat.transa'tion&id( hats.transa'tion&step&id
)R!* hr&api&transa'tions hat( hr&api&transa'tion&steps hats
+,R hat.transa'tion&ref&ta-le /PR&A0SC&ATT#ACS/ A# hat.transa'tion&group /A0SC&*2*T/
A# hat.transa'tion&identifier /A0SCS/
A# hat.transa'tion&ref&id IS !T $"" A# hat.status /3/
A# hat.transa'tion&id hats.transa'tion&id A# hat.CRAT!R&PRS!&I# :p&person&id4Posted -y sravan at 1=:19 P* o 'omments: "inks to this post
"a-els: SS,R Bueries
To get approved leaves
https://www.blogger.com/profile/01455736770031388667http://sravan20apps.blogspot.in/2015/10/to-delete-pending-leaves.htmlhttp://sravan20apps.blogspot.in/2015/10/to-delete-pending-leaves.html#comment-formhttp://sravan20apps.blogspot.in/2015/10/to-delete-pending-leaves.html#linkshttp://sravan20apps.blogspot.in/search/label/SSHR%20Querieshttp://sravan20apps.blogspot.in/2015/10/to-get-pending-leaves.htmlhttps://www.blogger.com/profile/01455736770031388667http://sravan20apps.blogspot.in/2015/10/to-get-pending-leaves.htmlhttp://sravan20apps.blogspot.in/2015/10/to-get-pending-leaves.html#comment-formhttp://sravan20apps.blogspot.in/2015/10/to-get-pending-leaves.html#linkshttp://sravan20apps.blogspot.in/search/label/SSHR%20Querieshttp://sravan20apps.blogspot.in/2015/10/to-get-approved-leaves.htmlhttps://www.blogger.com/profile/01455736770031388667http://sravan20apps.blogspot.in/2015/10/to-delete-pending-leaves.htmlhttp://sravan20apps.blogspot.in/2015/10/to-delete-pending-leaves.html#comment-formhttp://sravan20apps.blogspot.in/2015/10/to-delete-pending-leaves.html#linkshttp://sravan20apps.blogspot.in/search/label/SSHR%20Querieshttp://sravan20apps.blogspot.in/2015/10/to-get-pending-leaves.htmlhttps://www.blogger.com/profile/01455736770031388667http://sravan20apps.blogspot.in/2015/10/to-get-pending-leaves.htmlhttp://sravan20apps.blogspot.in/2015/10/to-get-pending-leaves.html#comment-formhttp://sravan20apps.blogspot.in/2015/10/to-get-pending-leaves.html#linkshttp://sravan20apps.blogspot.in/search/label/SSHR%20Querieshttp://sravan20apps.blogspot.in/2015/10/to-get-approved-leaves.html
-
8/17/2019 SSHR Queries
6/6
S"CT pat.A* a-sen'e&type( paa.date&start leave&start&date( paa.date&end leave&end&date( paa.a-sen'e&days( paa.a-s&information&'ategory(
paa.a-s&information8( paa.a-s&information9(paa.a-s&informationL
)R!* per&a-sen'e&attendan'es paa( per&a-sen'e&attendan'e&types pat(
per&all&people&f papf
+,R paa.a-sen'e&attendan'e&type&id pat.a-sen'e&attendan'e&type&id
A# papf.person&id paa.person&id
A# TR$C 0T+ TR$C
A# TR$C 0T+ TR$C
A# TR$C