CompShack Blogs

PeopleSoft Object Type List

Below is a complete list of all PeopleTools object types with value number and description.

VALUE   DESCRIPTION
0       Record
1       Index
2       Field
3       Field Format
4       Translate Value
5       Page
6       Menu
7       Component
8       Record PeopleCode
9       Menu PeopleCode
10      Query
11      Tree Structure
12      Tree
13      Access Group
14      Color
15      Style
16      Business Process Map
17      Business Process
18      Activity
19      Role
20      Process Definition
21      Process Server Definition
22      Process Type Definition
23      Process Job Definition
24      Process Recurrence Definition
25      Message Catalog
26      Dimension
27      Cube Definition

PeopleSoft Data Integrity Error (124,85)

Today, I had my first 'Data Integrity Error (124,85)' in PeopleSoft.

It occured while I was trying to run a QA external check on the careers page for my client. I was not the only consultant who received this error - one of the others who I work alongside received the same error.

Unwanted Save Warnings in Display Only Pages

Use function

SetSaveWarningFilter( True);

Breadcrumb SQL to find the Navigation path for the component in the PIA

Breadcrumb SQL:

WITH parent (breadcrumb, portal_label, portal_objname, portal_prntobjname, portal_reftype, component) AS
(SELECT varchar(rtrim(portal_label), 1000)
, portal_label
, portal_objname
, portal_prntobjname
, portal_reftype
, RIGHT(portal_urltext, length(portal_urltext) - locate('.', portal_urltext))
FROM psprsmdefn
WHERE portal_name = 'EMPLOYEE'
AND portal_reftype = 'C'
UNION ALL
SELECT varchar(rtrim(c.portal_label), 1000) || ' > ' || p.breadcrumb
, c.portal_label
, c.portal_objname
, c.portal_prntobjname
, c.portal_reftype
, p.component

Application Designer Index naming convention

The indexes generated by the Application Designer have the following naming convention:

INDEX_NAME = 'PS '||{index_id}||{peoplesoft record name}

Index ID : Description

_ : PeopleSoft key index. Implied from the record definition.

1–9 : Alternate search key indexes. Implied from the record definition.

# : List index. Implied from the record definition. Only applicable in PeopleTools 7.5 and earlier; not used in PeopleTools 8.

A–Z : User-specified index.

Running an SQR from within your PeopleCode program

Therefore, the best and safest way to launch an SQR program is to use the People Code functions CreateProcessRequest() and Schedule(). The CreateProcessRequest function allows you to create a Process Request object. Remember, you should be coding your People Code programs using the Object Oriented methods. Once you’ve created your object, you can assign values to its properties and use the Schedule method to submit the process request for scheduling. The CreateProcessRequest function takes 2 arguments. The Process Type and the Process Name.

REM Declare your Variables;

Code to insert any data from file to Record using Appengine

we need to create an AET record and Base Record (if it is anew record or else we can use the existing Record). Then create a RunControl Page with the fields File Path Name, Record Name.

SQL Code:
%SelectInit (FILE_PATH_NAME, RECNAME)
 SELECT FILE_PATH_NAME
 , RECNAME
  FROM %Table (XX_XXXXX_RUN1)
 WHERE OPRID=%OperatorId
   AND RUN_CNTL_ID=%RunControl

People Code:

Local File &MYFILE, &MYFILE1;
Local string &PATH_READ, &PATH_WRITE, &REC, &rec_value;
Local array of string &values;
Local Record &rec1;
&DATE = %Datetime;

How to create Trigger in DB2

Follow the below steps to create the trigger for the tables
1.Create the Sequence

Syntax
Create Sequence G02491P.TRIGGER_SEQ1 as INTEGER 
 Start With 1 
 Increment by 1 
 MinValue 1 
 MaxValue 2147483647  
 Cache 24

2.Create the function

[code]
Syntax
Create Function G02491P.get_next ()
Returns INTEGER
Specific get_next
Language SQL
Deterministic
External Action
Reads SQL Data

Emplid increment automatically

Hi Friends,

For scenario like i want to increase Emplid value when am click search page automatically.

It is possible in Rowinit Peoplecode.

Sample Code:
If %mode = "A" then /*A Means add mode */
SQLExec("Select max(Emplid) from ps_abc",&a); /* &a is a variable */
&a=&a+1;
PS_ABC.Emplid.value=&a;
gray(PS_ABC.Emplid);
end-if;

Regards,
Mahendra

How can we romove multiple duplicate rows of data printing under each Print command in SQR Program?

Hi Friends.

Instead of Print command, by using String.So that we can get each and every row one time in either CSV/HTML/XML output format.

Example:
Print $Name(,)
Print $Name (,)
Print $Address2(,)
Print $State (,)
Print $Country(,) /* Use Strings here to remove multiple duplicate rows of data*/
STRING $Name $Address1 $Address2 $State $Country BY ',' INTO $ST1
STRING $N ,............................................................ BY ',' INTO $ST2
STRING $ST1 $ST2 BY ',' INTO $ST3
PRINT $ST3 (+1,1)

Regards,
Mahendra