How to Send HTML Mail by Peoplecode of Peoplesoft

How to Send HTML Mail by Peoplecode of Peoplesoft

You can use send html email by peoplecode use sendmail function

&MAIL_FLAGS = 0;
&MAIL_CC = “”;
&MAIL_BCC = “”;
&MAIL_SUBJECT = “”;
&MAIL_TEXT = “”;
&MAIL_FILES = “”;
&MAIL_TITLES = “”;
&MAIL_SENDER = “Test@mail.com”;
&MAIL_SUBJECT = &Subject_mail;
&MAIL_TEXT = &Content_Mail;

&CONTTYPE = “Content-type: text/html; charset=utf8”;
&MAIL_SEP = “;”;

&RET = SendMail(&MAIL_FLAGS, &MAIL_TO, &MAIL_CC, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TEXT, &MAIL_FILES, &MAIL_TITLES, &MAIL_SENDER, &MAIL_SEP, &CONTTYPE);

How to Send Mail By Peoplecode of Peoplesoft

How to Send Mail By Peoplecode of Peoplesoft

You can send e-mail by peoplecode  with sendmail function

&MAIL_FLAGS = 0;
&MAIL_CC = “”;
&MAIL_BCC = “”;
&MAIL_SUBJECT = “”;
&MAIL_TEXT = “”;
&MAIL_FILES = “”;
&MAIL_TITLES = “”;
&MAIL_SENDER = “Test@mail.com”;
&MAIL_SUBJECT = &Subject_mail;
&MAIL_TEXT = &Content_Mail;

&RET = SendMail(&MAIL_FLAGS, &MAIL_TO, &MAIL_CC, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TEXT, &MAIL_FILES, &MAIL_TITLES, &MAIL_SENDER);

 

How to Arrange/ Sort/ Filter/ Change Translate Value or Prompt Table

How to Arrange/ Sort/ Filter/ Change Translate Value or Prompt Table

Local Rowset &Xlat;
&Xlat = CreateRowset(Record.PSXLATITEMLANG);
&Xlat.Flush();

/*– Decode Value and Sort of Translate Value–*/
rem &Xlat.Fill(“Where fieldname = ‘Field Name’ order by decode(Fieldvalue,’Jan’,1,0),fieldvalue”);

/*– Filter Value and Change Long Name of Translate Value –*/

&Xlat.Fill(“Where fieldname = ‘WO_WO_TYPE’ AND FIELDVALUE NOT IN ( ‘0’,’1′,’2′,’3′,’4′,’5′,’6′,’7′,’8′,’9′,’10’,’12’) ORDER BY decode(XLATLONGNAME,’Income’,0,’Value Creation’,’2′ ,’Benchmarking’,’3′ ,’Risk Management’,3 ,’KPI Main’,3,1)”);
WO_TBL.WO_WO_TYPE.ClearDropDownList();
&j = &Xlat.ActiveRowCount + 1;
For &i = 1 To &Xlat.ActiveRowCount
       &Value = &Xlat.GetRow(&i).PSXLATITEMLANG.FIELDVALUE.Value;
      &descr = &Xlat.GetRow(&i).PSXLATITEMLANG.XLATLONGNAME.Value;
      rem DERIVED_WO.WO_WO_TYPE.AddDropDownItem(&Value, &Descr);
     If &Value = “11” Then
           &descr = “Value Creation Special”;
     End-If;
       WO_TBL.WO_WO_TYPE.AddDropDownItem(&Value, Rept(Char(9), &j – &i) | &descr);
End-For;

How to Generate XML Publisher from Record Page and Run BI Publisher in PeopleCode

How to Generate XML Publisher from Record Page and Run BI Publisher in PeopleCode

How to select data on scroll area or data grid or data level 0 from page in peoplesoft.

Page for get data for create xml file and run bi publisher by peoplecod.

  1. Create Link or Button and use FieldChange Event : print pdf

 

2. Create PeopleCode for Run BI Publisher.

2.1 Create XML file for Data of RTF Template (Other Template)

               2.1.1 Create Datasource is XML type before create RTF Template go to Reporting tool > BI Publisher > Data Source

Data Source Type =XML

Data Source = Create Name

2.1.2 Upload xml file

2.1.3 Create Report Definition

  

2.2 Generate Report By Peoplecode

 

import PSXP_RPTDEFNMANAGER:*;
import EP_FUNCTIONS:EP_Utilities;

Declare Function GetDirSeparator PeopleCode PSXPFUNCLIB.FUNCLIB FieldFormula;
Declare Function GetFileExtension PeopleCode PSXPFUNCLIB.FUNCLIB FieldFormula;

&EP_Utilities = create EP_FUNCTIONS:EP_Utilities();

Local XmlDoc &xmldocRoot = CreateXmlDoc(“<?xml version=’1.0′ encoding = ‘UTF-8’?><root></root>”);
Local XmlNode &nodeRoot = &xmldocRoot.DocumentElement;
Local XmlNode &nodeCurrent, &nodeParent, &nodeEvaluation, &nodeSection, &nodeItem, &nodeSubItem, &nodeEmployee;
/***********************************************************************************/

/*—- 2.1 Create XML file for Create RTF Template (Other Template) —*/

/*— Selete Data from Page —*/

&nodeCurrent = &nodeRoot.AddElement(“EMPLID”);
&nodeCurrent.NodeValue = TEST_DERIVED.EMPLID;
&nodeCurrent = &nodeRoot.AddElement(“NAME”);
&nodeCurrent.NodeValue = TEST_DERIVED.NAME;
&nodeCurrent = &nodeRoot.AddElement(“NATIONAL_ID”);
&nodeCurrent.NodeValue = TEST_DERIVED.NATIONAL_ID;
&nodeCurrent = &nodeRoot.AddElement(“DEPT_DESCR”);
&nodeCurrent.NodeValue = DEPT_TBL.DESCR254;

/*********Add list Element Scroll Left ***********/
Local Rowset &RS_LEV0, &RS_SECT1, &RS_SECT2;
Local Row &ROW1, &ROW2;

&RS_LEV0 = GetLevel0();
&listNode = &nodeRoot.AddElement(“LIST_ITEM”);

/*—– SCROLL LEFT —-*/
&RS_SECT1 = &RS_LEV0(1).GetRowset(Scroll.TEST_PSVARIABLE);

For &i = 1 To &RS_SECT1.ActiveRowCount

/*– Where condition data in scroll left of page–*/
If (&RS_SECT1(&i).TEST_PSVARIABLE.TEST_PS_FIX.Value = “Y”)  Then

&subNodeCurrent = &listNode.AddElement(“DESCRIPTION” | &i);
&subNodeCurrent.NodeValue = &RS_SECT1(&i).TEST_PSVARIABLE.DESCRIPTION.Value;

&subNodeCurrent = &listNode.AddElement(“DESCR_CALC” | &i);
&subNodeCurrent.NodeValue = &RS_SECT1(&i).TEST_PSVARIABLE.DESCR_CALC.Value;

End-If;

End-For;

/*—– SCROLL RIGHT —-*/

&RS_SECT2 = &RS_LEV0(1).GetRowset(Scroll.TEST_PSVARIABLE2);

For &i = 1 To &RS_SECT2.ActiveRowCount

/*– Where condition data in scroll right of page–*/
If (&RS_SECT2(&i).TEST_PSVARIABLE2.TEST_PS_FIX.Value = “Y”)  Then

&subNodeCurrent = &listNode.AddElement(“DESCRIPTION2” | &i);
&subNodeCurrent.NodeValue = &RS_SECT1(&i).TEST_PSVARIABLE2.DESCRIPTION.Value;

&subNodeCurrent = &listNode.AddElement(“DESCR_CALC2” | &i);
&subNodeCurrent.NodeValue = &RS_SECT2(&i).TEST_PSVARIABLE2.DESCR_CALC.Value;

End-If;

End-For;

&sFormattedXML = &xmldocRoot.GenFormattedXmlString();

/*– WinMessage for Get XML File for Data Source of this report –*/
WinMessage(&sFormattedXML);

 

/***********************************************************************************/
/*— (2.2) Generate Report —*/
Local date &AsOfDate;
Local string &LanguageCd, &MyReportName, &OutFormat, &sTemplateId;
try

/* detect system directory separator */
rem &sDirSep = GetDirSeparator();
/* create process directory */
rem WinMessage(“%FilePath_Relative : ” | %FilePath_Relative, 0);
CreateDirectory(“XMLP”, %FilePath_Relative);

/* Set XML Publisher report required parameters */
&LanguageCd = %Language_User;
&AsOfDate = %Date;
&MyReportName = “COACHING”;

/* create report defn object */
&oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&MyReportName);
&oRptDefn.Get();

&oRptDefn.SetRuntimeDataXMLDoc(&xmldocRoot);
&oRptDefn.ProcessReport(&sTemplateId, &LanguageCd, &AsOfDate, “”);
&sFileExt = GetFileExtension(&sOutputFormat);
CommitWork();

/* display the output */
&oRptDefn.DisplayOutput();

catch Exception &Err
Local string &sSub1, &sSub2, &sSub3, &sSub4, &sSub5;
Evaluate &Err.SubstitutionCount
When > 4
&sSub5 = &Err.GetSubstitution(5);
When > 3
&sSub4 = &Err.GetSubstitution(4);
When > 2
&sSub3 = &Err.GetSubstitution(3);
When > 1
&sSub2 = &Err.GetSubstitution(2);
When > 0
&sSub1 = &Err.GetSubstitution(1);
End-Evaluate;
Error MsgGet(&Err.MessageSetNumber, &Err.MessageNumber, &Err.ToString(), &sSub1, &sSub2, &sSub3, &sSub4, &sSub5);
end-try;

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);

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