Scrollselect Level 1

Scrollselect Level 1

You can populate data from record or view to grid or scroll on page peoplesoft by use syntax scrollselect level 1 at below

ScrollFlush(Record.COURSE);
ScrollSelect(1, Scroll.COURSE, Record.COURSE, “Where emplid = :1 and To_Char(DATE,’yyyymmdd’) = :2 “,  %EmployeeId&DATE);

How to Create Function PeopleCode of PeopleSoft

How to Create Function PeopleCode of PeopleSoft

Create Function in Record Field Formula (Record.Field)

/********************************************************************
Create Function
********************************************************************/
Function Set_DATE_Format_Number(&DATE_IN, &DATE_OUT)

&DATE_OUT = Right(to_char(&DATE_IN,’dd/mm/’)|to_char(to_number(to_char(&DATE_IN,’yyyy’))+543));

End-Function;

 

How to Call Function in PeopleCode

Declare Function Set_DATE_Format_Number PeopleCode Record.Field FieldFormula;

Set_DATE_Format_Number(sysdate,&DATE_OUT);

1000 Separator In Sql

1000 Separator In Sql

You can use sql at below for 1000 Separator In Sql

SELECT to_char(1000,’9,999.00′, ‘NLS_NUMERIC_CHARACTERS = ”,.”’) FROM DUAL

Replace ENTER SQL/Peoplecode

Replace ENTER SQL/Peoplecode

PeopleCode: How to Replace ENTER in Peoplecode for write file in csv for report and other.

&NEW = SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(&COMMENTS_2000, CHAR(13), ” “),CHAR(10),” “),”,”,” “);

 

SQL: How to Replace ENTER in SQL

REPLACE(REPLACE(REPLACE(TEXT, CHR(10), ”), CHR(13), ”) , CHR(09), ”)

/* Character
CHR(9) — Horizontal tab
CHR(10) — Line feed
CHR(13) — Carriage return.
*/

 

Peoplesoft Table

Peoplesoft Table

Peoplesoft Table.

Table of HTML AREA

SELECT * FROM PSPNLHTMLLANG WHERE PNLNAME = ‘NAME’

Table of Record 

SELECT * FROM PSPNLFIELDLANG WHERE PNLNAME =’NAME’

Table of Translate Value

SELECT * FROM PSXLATITEM

Table of Translate Value Languages

SELECT * FROM PSDBFLDLABLLANG

Table of Label of Field

SELECT * FROM PSDBFLDLABL where FIELDNAME=’NAME’

Table of Database Owner

SELECT DBNAME from PSDBOWNER

PeopleSoft Object Definition Tables

PSACTIVITYDEFN  Activity definitions are stored
PSAESECTDEFN  Stores the application engine section definitions
PSAESTEPDEFN  Stores the application engine step definitions
PSAESTEPMSGDEFN  Stores the messages of the AE programs
PSPCMPROG  PeopleCode programs stored
PSSQLTEXTDEFN  Application engine sql
PSAEAPPLDEFN  Application engine program name
PSMENUDEFN  Menu names
PSPNLDEFN  Page names
PSPNLGROUP  Stores Component definitions
PSBCDEFN  Stores component interface names
PSBUSPROCDEFN  Stores Business process definitions
PS_APPR_RULE_HDR  Stores Approval rule set definitions
PSCHNLDEFN  Stores channel definitions
PSEVENTDEFN  Changing the column value of active to 0 leads to disabling activities
PSFLDFIELDDEFN  Filelayout stored
PSFILEREDEFN  File reference stored
PSINDEXDEFN  Index information stored
PSIODEFN  Stores business interlink information
PSKEYDEFN  Stores the index key information
PSMPDEFN  Contains info about mobilepages
PSMSGAGTDEFN  Refers to the activity object
PSMSGCATDEFN  Related to Messages –  Message catalogs
PSMSGDEFN  Stores Application Message definitions
PSDBFIELD  Contains field definitions
PSDDLDEFPARMS  This table holds the storage structure of the tables for db platforms
PSGATEWAY  This table hold the gateway url.
PSIDXDDLPARM  This table holds the storage structure of the indexes for db platforms
PSRECDEFN  This table holds the information of all the peoplesoft records.
PSPACKAGEDEFN  This table holds the application packages definitions
PSPNLGRPDEFN  Contains Panel group definitions
PSPRDMDEFN  Contains the portal information
PSPROJECTDEFN  Contains project definitions
PSPRSMDEFN  Detailed information of the portal objects
PSPRUFDEFN  Information about portal objects
PSPRUHDEFN  Information about portal objects
PSQRYDEFN  Holds the query definitions
PSROLEDEFN  Role definitions
PSSQLDEFN  SQL object definitions are stored
PSSQLTEXTDEFN  SQL object’s text are stored
PSSTEPDEFN  Contains stepnames with reference to the activity
PSSTYLEDEFN  Contains the styles definitions
PSSTYLSHEETDEFN  Contains the stylesheet definitions
PSSUBDEFN  Conatins Message subscription definitions
PSTOOLBARDEFN  Holds a single row provided by PS, which helps to view the toolbar
PSTREEDEFN  Contains the treename
PSCLASSDEFN  Gives info abt the peoplesoft permission lists
PSURLDEFN  To see which URL’s are used as fileservers for the file attachments
PS_AE_TEMPREC_VW  Tracks all temporary table names and their descriptions
PS_AE_TEMPLOCK_VW  Tracks how many locks are currently in effect for a particular temporary table
PS_DATA_FIND_BASE  Used as search record for the panel.  SHould always be empty.
PS_MSG_CATLG_VW  Contains text for all error messages and warnings.

PeopleSoft Security Tables

PSROLECLASS  Provides the permission lists associated to each role
PSROLEUSER  Gives info abt the roles assigned to the Oprid’s

PeopleSoft Login Details and Authorization

PSACCESSLOG  Login and logout information of the users
PSACCESSPRFL  Contains the symbolic id, accessid/password details.
PSCLOCK  Login fails if the table is empty
PSOPRDEFN  This table holds the peoplesoft Oprid’s/passwords info with symbolic id.

 

PeopleSoft Audit Tables

PSAUDIT  This table holds all the changes for panel/record modifications

PeopleSoft Version Details

PSRELEASE  This table holds the application release details
PSSTATUS  This table gives the PeopleTools information

PeopleSoft Language Details

PSLANGUAGES  Contains 1 for the column INSTALLED against the columnLANGUAGE_CD.

PeopleSoft Modules Listed

PS_INSTALLATION  List the modules in the database

PeopleSoft Process Type Details

PS_PRCSDEFN  Contains process type and process names
PSPRCSLOCK  Contains a single record, this gets updated when a process is submitted

PeopleSoft Process Status

PSPRCSQUE  Holds the process rqst details should be in synch with psprcsrqst.Should be in synch with PSPRCSRQST
PSPRCSRQST  This table holds the process submitted details
PS_CDM_LIST Contains the process instance details.Should be in synch withPS_CDM_AUTH
PS_CDM_AUTH  Contains the process instance details

PeopleSoft Report Node Details

PS_CDM_DIST_NODE  This table holds the report node information which contains the reportrepository details
PS_CDM_DISTSTATUS  Contains the definition of report status

PeopleSoft Batch Server Details

PS_SERVERDEFN  Contains the server definitions
PSSERVERSTAT Gives information about the batch server status

PeopleSoft RenServer Details

PSREN  Holds the portnumber details of a renserver configured domain

PeopleSoft Translate Value Details

PSXLATDEFN  Holds the translate fieldname and version number for caching
PSXLATITEM  Holds the translate fieldname and their values

PeopleSoft Object Versions

PSLOCK  This table is used for version control
PSOPTIONS  This table is used to turn off or on the change control enabling feature
PSVERSION  This table holds the version number details

Ref : http://peoplesofttutorial.com/complete-list-of-peoplesoft-tables/

Base Benefit Tables Peoplesoft

Base Benefit Tables Peoplesoft

Base Benefit Tables

PS_BEN_PROG_PARTIC – EE Benefit program participation.
PS_BENEFIT_PARTIC – Ben Plan type enrollment control
PS_BENEF_COMMENT – Benefit Comments

Dependent Details table

PS_DEPENDENT_BENEF – View Dependents/Beneficiaries
PS_DEP_BEN – EE Dependents/Beneficiaries
PS_DEP_BEN_EFF – EE Dependents Details EFFDT
PS_DEP_BENEF_VW – EE Dependent Only View
PS_DEP_BEN_ADDR – EE Dependent Address details
PS_BEN_NAME – EE Dependent Name
PS_DEP_BENEF_NID – Dependent / Benef National ID s
PS_DEPENDENT_PHONE – Dependent/Benef Phone Numbers

Health Plan Tables – Plan types

PS_HEALTH_PLAN_TBL – Health Plan Attributes Table
PS_HEALTH_PLAN_VW – Health Plans types View with its long descr plan type LIKE ‘1%’
PS_HEALTH_PLAN_LNG – Health Plans types view with its long descr lng plan type like ‘1%’

PS_HEALTH_BENEFIT – Health Benefits EE Elections
PS_HEALTH_DEPENDNT – Health Benefits EE Dependent Elections

PS_HEALTH_VW – EE Current Health Elections

Savings Plan Tables – Plan types

PS_SAVINGS_PLN_TBL -Savings Plan Attributes Table.
PS_SAVINGS_INV_TBL – Describing a specific investment option
Available within a Savings Plan type.
PS_ SAVINGS_PLN_VW -Savings Plan types view with its long description

PS_SAVINGS_PLAN -Savings Plan Enrollment Table.
PS_SAVINGS_BENEFIC -Savings Plan Beneficiaries.
PS_SAVINGS_INVEST -Savings Plan Enrollment Investment option.
PS_SAVINGS_PLAN_VW -Savings Plan Enrollment view

Life Plan Tables – Plan types

PS_LIFE_ADD_TBL -Life AD/D Ben Plan Parameters
PS_LIFE_PLAN_VW -Life AD/D Plan type views

PS_LIFE_ADD_BEN -EE Life AD/D Benefit Enrollment
PS_LIFE_ADD_BENEFC -EE Life AD/D Beneficiaries
PS_LIFE_VW -EE Current Life AD/D Benefits

FSA Plan Tables – Plan types

PS_FSA_BENEF_TBL -FSA Benefit Plan Parameters
PS_FSA_PLAN_VW -FSA Plan Type with its long description.

PS_ FSA_BENEFIT -EE FSA Benefit Enrollment View
PS_FSA_BENEFIT_VW -EE FSA Benefit Enrollment View

Retirement Plan Tables – Plan Types

PS_RTRMNT_PLAN_TBL -Retirement Plan Attributes Table
PS_RTRMNT_PLAN_VW -Retirement Plan types view

PS_RTRMNT_PLAN -EE Retirement Enrollment Table
PS_RTRMNT_VW -EE Current Retirement Benefits

Simple Plan Tables – Plan Types 

PS_SIMPLE_BENEFIT – EE Simple Benefits Plans Enrollments
PS_SIMPLE_PLAN_TBL – Plan attributes table.
PS_SIMPLE_PLAN_VW – Simple Plan Types view with long description.

Disability benefit plan table

PS_DISABILITY_BEN EE Disability Ben Enrollments
PS_DISABILITY_VW EE Current Disability Bens

How to Use SQL for Create Table By Select

How to Use SQL for Create Table By Select

How to Use SQL for Create Table By Select by use below sql.

Create table <<<Table Name>>>
TABLESPACE HRAPP STORAGE (INITIAL 40000 NEXT 100000
MAXEXTENTS UNLIMITED PCTINCREASE 0) PCTFREE 10 PCTUSED 80
as
(select * from <<<Table Name>>>
)

Example 1 :

create table course_backup
TABLESPACE HRAPP
as
select * from course;

Example 2 :

Create table ps_jl_wo_tbl_2020
TABLESPACE HRAPP STORAGE (INITIAL 40000 NEXT 100000
MAXEXTENTS UNLIMITED PCTINCREASE 0) PCTFREE 10 PCTUSED 80
as
(select * from ps_jl_wo_tbl )

How to Retrieve Image URL Using Java In PeopleCode

How to Retrieve Image URL Using Java In PeopleCode ( FieldChange event)

Local JavaObject &joCertString, &joUrl, &joUrlConnection, &joInputStream, &joImageIO, &joBufferedImage, &joFile;
Local JavaObject &joCertificateFactoryClass, &joCertificateFactory, &joCertInputStream, &joCertificate;
Local JavaObject &joKeystoreClass, &joKeystore, &joTrustManagerFactoryClass, &joTrustManagerFactory;
Local JavaObject &joSSLContextClass, &joSSLContext, &joSSLFactory, &joCastObjectClass;
Local any &anyFileData;
Local Record &recTest;
Local string &sPhotosCert;
Local number &nPutResult;

/*Setup CertificateFactory*/
&sPhotosCert = GetHTMLText(HTML.PHOTOS_CERT);
&joCertString = CreateJavaObject(“java.lang.String”, &sPhotosCert);
&joCertificateFactoryClass = GetJavaClass(“java.security.cert.CertificateFactory”);
&joCertificateFactory = &joCertificateFactoryClass.getInstance(“X.509”);
&joCertInputStream = CreateJavaObject(“java.io.ByteArrayInputStream”, &joCertString.getBytes(“UTF-8”));
&joCertificate = &joCertificateFactory.generateCertificate(&joCertInputStream);

/*Create Keystore*/
&joKeystoreClass = GetJavaClass(“java.security.KeyStore”);
&joKeystore = &joKeystoreClass.getInstance(“JKS”);
&joKeystore.load( Null, Null);
&joKeystore.setCertificateEntry(“photos”, &joCertificate);

/*Create TrustManagerFactory*/
&joTrustManagerFactoryClass = GetJavaClass(“javax.net.ssl.TrustManagerFactory”);
&joTrustManagerFactory = &joTrustManagerFactoryClass.getInstance(&joTrustManagerFactoryClass.getDefaultAlgorithm());
&joTrustManagerFactory.init(&joKeystore);

/*Create SSLContext and get SSLSocketFactory*/
&joSSLContextClass = GetJavaClass(“javax.net.ssl.SSLContext”);
&joSSLContext = &joSSLContextClass.getInstance(“TLS”);
&joSSLContext.init( Null, &joTrustManagerFactory.getTrustManagers(), Null);
&joSSLFactory = &joSSLContext.getSocketFactory();

/*Create URL*/
&joUrl = CreateJavaObject(“java.net.URL”, “https://domain.com/handler.ashx?id=123456”);

/*Get URLConnection*/
&joUrlConnection = &joUrl.openConnection();

/*Cast to HttpsURLConnection*/
&joCastObjectClass = GetJavaClass(“com.domain.CastObject”);
&joUrlConnection = &joCastObjectClass.objectToHttpsURLConnection(&joUrlConnection);

/*Set connection properties*/
&joUrlConnection.setSSLSocketFactory(&joSSLFactory);
&joUrlConnection.setRequestMethod(“GET”);

/*Get InputStream*/
&joInputStream = GetJavaClass(“java.io.InputStream”);
&joInputStream = &joUrlConnection.getInputStream();

/*Get Image From Stream*/
&joImageIO = GetJavaClass(“javax.imageio.ImageIO”);
&joBufferedImage = CreateJavaObject(“java.awt.image.BufferedImage”, 1, 1, 1);
&joBufferedImage = &joImageIO.read(&joInputStream);

/*Write Image to File*/
&joFile = CreateJavaObject(“java.io.File”, “/temp/URLImage2.jpg”);
&joImageIO.write(&joBufferedImage, “jpg”, &joFile);

/*Put the File into a PS record so we can get a BLOB of it*/
&nPutResult = PutAttachment(“record://PSFILE_ATTDET”, “013505.jpg”, “/temp/URLImage2.jpg”);

/*Grab that BLOB*/
SQLExec(“SELECT FILE_DATA FROM PSFILE_ATTDET WHERE ATTACHSYSFILENAME = :1 AND VERSION = 1”, “013505.jpg”, &anyFileData);

/*Clean up the temp row we inserted*/
SQLExec(“DELETE FROM PSFILE_ATTDET WHERE ATTACHSYSFILENAME = :1 AND VERSION = 1”, “013505.jpg”);

/*Setup an employee photo record*/
&recTest = CreateRecord(Record.EMPL_PHOTO);
&recTest.EMPLID.Value = “013505”;
&recTest.PSIMAGEVER.Value = (Days365(Date3(1999, 12, 31), %Date) * 86400) + (%Time Time3(0, 0, 0));
&recTest.EMPLOYEE_PHOTO.Value = &anyFileData;

/*Insert/Update the employee photo record*/
&recTest.Insert();
&recTest.Update();

 

Credit:http://stackoverflow.com/questions/18921658/retrieve-image-from-ashx-url-using-java-in-peoplesoft-peoplecode

How to Delete Multiple Files Using PeopleCode

How to Delete Multiple Files Using PeopleCode

How to Delete Multiple Files Using PeopleCode : Deleting files sitting on a server using PeopleCode is one thing I’m sure you will be doing sometime during your PeopleSoft career. The code below should help you out and get you started!

/*The path to the files you need to delete*/
&oldFilesPath = “/my_directory/my_folder”;

/*Notice the “*” at the end of the file name. This means any file that starts with “file_name” will be deleted*/
&oldFiles = “file_name” | “*”;
&PathAndName = &oldFilesPath | &oldFiles;
/*Display file path and name to be deleted */
MessageBox(0, “”, 0, 0, “Delete file: “ | &PathAndName);
&oldFileNames = FindFiles(&PathAndName, %FilePath_Absolute);
/*Loop through files found and delete one by one */
While &oldFileNames.Len > 0/* Delete files one at a time */
&deleteFile = “../../../..” | &oldFileNames.Shift();
/*Display file path and name deleted */
&retcode = DeleteAttachment(URL, &deleteFile);
MessageBox(0, “”, 0, 0, “Deleted file: “ | &deleteFile);
/*Check delete status*/
If (&retcode = %Attachment_Success) Then

MessageBox(0, “File Attachment Status”, 0, 0, “DeleteAttachment succeeded”);
End-If;

If (&retcode = %Attachment_Failed) Then

MessageBox(0, “File Attachment Status”, 0, 0, “DeleteAttachment failed”);

End-If;

If (&retcode = %Attachment_Cancelled) Then

MessageBox(0, “File Attachment Status”, 0, 0, “DeleteAttachment cancelled”);

End-If;

If (&retcode = %Attachment_FileTransferFailed) Then

MessageBox(0, “File Attachment Status”, 0, 0, “DeleteAttachment failed: File Transfer did not succeed”);

End-If;
End-While;

Credit: http://www.compshack.com/peoplesoft/delete-multiple-files-using-peoplecode