Who's Online Now
0 registered members (), 10 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Ravi Pasapula, kumar1900, B_DOYLE, rdeshab, samba
1296 Registered Users
Recent Posts
Closing a Payroll
by delboy. 23/07/20 06:24 AM
Top Posters(30 Days)
delboy 3
CT 2
Popular Topics(Views)
497,049 PAYE RTI
61,042 HR_PF.K RUP4
Previous Thread
Next Thread
Print Thread
Rate This Thread
Page 2 of 2 1 2
#12200 - 15/02/19 03:19 PM Re: Update employee spinal point via API [Re: Andrew]  
Joined: Feb 2019
Posts: 6
Andrew Offline
lurker
Andrew  Offline
lurker

Joined: Feb 2019
Posts: 6
lThanks Clive, that was very good!

Still having problems, unfortunately. I'm calling three APIs to make the changes. The first two appear to work OK, but the third fails with 'Grade step is invalid. Either grade step does not exist or the eff dates for the assignment are outside those for the grade step'. Sounds straightforward, but I can't find anything that looks wrong - am I missing something?

I hate to inflict reams of code on people, but here are the calls I make (in the correct order but with the surrounding code edited out). I'm only half-familiar with this stuff so am not particularly confident that what I'm doing is sensible.

- I wasn't able to post the code in this window so have attached as PDF.

Thanks for looking!
Andrew

Attached Files
Thanks Clive.pdf (109 downloads)
Last edited by Andrew; 15/02/19 03:22 PM.
#12202 - 19/02/19 05:13 PM Re: Update employee spinal point via API [Re: Andrew]  
Joined: Feb 2019
Posts: 6
Andrew Offline
lurker
Andrew  Offline
lurker

Joined: Feb 2019
Posts: 6
...UPDATE....

Have discovered that I'm using the wrong step id. Will investigate and update ......

Andrew

#12206 - 01/03/19 11:20 AM Re: Update employee spinal point via API [Re: Andrew]  
Joined: Mar 2005
Posts: 2,119
CT Offline
CT  Offline

****

Joined: Mar 2005
Posts: 2,119
Andrew, sorry I didn't get an alert that this thread had been updated so I've only just seen it. If in the meantime you've fixed it, then good on you, if not then post an update here and hopefully you won't wait a couple of weeks for me to respond laugh


CT
#12207 - 01/03/19 02:40 PM Re: Update employee spinal point via API [Re: Andrew]  
Joined: Mar 2005
Posts: 2,119
CT Offline
CT  Offline

****

Joined: Mar 2005
Posts: 2,119
Andrew, something just occurred to me regarding the validation mode.

If you are running your api calls with the p_validation_mode parameter set to TRUE in each case, it may be that the act of rolling back the previous transaction(s) will cause the last one to fail.

It's better, I think, to create a save point prior to your first API call, then set all your p_validation_mode parameters to false - meaning they aren't rolled back (but then neither are they committed).

Then, after the last API call has completed, establish whether you were doing validate-only, and do a ROLLBACK TO <savepoint name> if so.

I'd probably go further and have that entire 3-api sequence in a single procedure with appropriate error handling as well as the savepoint stuff (in case either the second or third APIs failed for some weird reason) that way, you are able to treat the succession of API calls as a pseudo-API in itself - if you see what I mean! No? OK then! smile


CT
Page 2 of 2 1 2

Moderated by  Administrator, bcooper, CT 

Forum Statistics
Forums60
Topics2,229
Posts12,038
Members1,296
Most Online283
Dec 25th, 2019
Today's Birthdays
NeilDurant (58)
Recent vacancies
Top Posters(All Time)
CT 2,119
delboy 1,311
bcooper 1,293
paulgos 439
SBi 427
pat 254
Gus 252
vkumar 223
August
S M T W T F S
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.228s Queries: 17 (0.008s) Memory: 2.7647 MB (Peak: 2.9217 MB) Zlib disabled. Server Time: 2020-08-04 20:37:07 UTC