PeopleSoft Component Interface

Updating a row using Peoplecode - Component Interface.

Hi, My client requirement is to insert and update rows from staging record to a transaction records PS_LOCATION_TBL. I am getting issues when a row is already exists in a record and I CI need to update a row.
For example: With Location ID 001 there are two rows in location table with effective dates 01/01/1900 and 01/01/2001. There is a row in a staging record with effdt 01/01/1900 that need to be updated.

Below is a snippet of a code and I am getting issue where I am comparing location collection effective date with the date in a staging record to tell CI only that row need to be updated (If &oLocationTblCollection.EFFDT = &currLocEffdt Then).

If I do not enter above IF statement then I get an error Instance must exist to set property {LOCATION.EFFDT} as it's trying to update 01/01/2001 and it's not in staging record. If I enter If &oLocationTblCollection.EFFDT = &currLocEffdt then I get First operand is .NULL error because collection has not been loaded. But it's important to compare collection effective date with staging effective date to update the row correctly without errors.

Component Interface error message while performing a MSS transaction like terminate an employee

Need reason for the attached error message and provide details as to why the WORKFORCE_SYNC is failing.

SQL error. Stmt#:332 Error Position:0 Return: 8604 - [IBM][CLI Driver][DB2] SQL0913N Unsuccess

Regarding Errror -"SQL.Execute: SQL object is not open, or is a open on a select."

Hi,
I am trying to load a set of data files using Application Engine and CI.
I was successfully able to load 1 file with 500 rows and without any issues.
but while loading the 2nd file I encounterd an error:
"SQL.Execute: SQL object is not open, or is a open on a select. (2,295) AF_ACCT_TRAN.MAIN.GBL.default.1900-01-01.Step01.OnExecute PCPC:5107 Statement:71"

Can someone please help?

Following is my code:

/* ===>
This is a dynamically generated PeopleCode template to be used only as a helper
to the application developer.

Instance already exists for a CI

I am loading data from a CSV file into PS database using App engine and CI.Only the first row of data gets loaded ,while loading the 2nd row it gives an error saying Instance already exists for a CI.
So create failed.Can some one please help?
Following is my code:

/* ===>
This is a dynamically generated PeopleCode template to be used only as a helper
to the application developer.
You need to replace all references to '[*]' OR default values with  references to
PeopleCode variables and/or a Rec.Fields. */


Local File &fileLog;
Local ApiObject &oSession, &oAfAcctTransCi;

Peopletools

WHILE INSERTING DATA FROM CI I AM GETTING THIS ERROR-Instance already exists {TM_JOB_CI}....PLZ HELP.. TM_JOB_CI IS MY CI NAME

Getting error 'Unknown key of uninstantiated object {USER_PROFILE.UserID} (91,16)' while saving Component Interface

I am getting the error 'Unknown key of uninstantiated object {USER_PROFILE.UserID} (91,16)' while saving the component interface using the following code:-

SQLExec("Select OPRID from PSOPRALIAS where PERSON_ID = :1", RD_PERSON.PERSON_ID.Value, &lstrOPRID);

If All(&lstrOPRID) Then
try
rem ***** Set the Log File *****;
&fileLog = GetFile("C:\temp\USER_PROFILE.log", "w", "a", %FilePath_Absolute);
&fileLog.WriteLine("Begin");
&oSession = %Session;
&oSession.PSMessagesMode = 3;