Please do post your comments and suggestions for me to improve on chowdary1105@gmail.com

Monday, June 29, 2009

To overwrite search record on component by using peoplecode

Provide the search keys values in searchinit event.
Use Setsearchdialogbehaviour() function.
Make sure, in the component properties,"Force Search processing" is switched off.

Code to print a image in SQR

let $imgpath = $DB_Server_Path || 'logo.jpeg'
print-image (1,1)
type=jpeg-file
image-size=(75,9)
ource= $imgpath

SQR Migration Strategies

your expert comments and thoughts are invited to further refine this tool.

Type of SQR Migration Strategy

Inbound Interface – Data source: File File Layout + AE + CI if insertion is done to a component

Inbound Interface – Data source: Peoplesoft


App Messaging/IB

Mass Data Changes (Mass hires, Mass update of a table etc.)


AE + CI if updation to a component is done. Analyse whether the Peoplesoft Mass Change functionality can be utilized.

Outbound Interface (Flat files, Dataset)


AE + XML Publisher for report generation/ Web Services if 3rd party supports

SQCs


Custom SQCs can be replaced by Application Classes to be invoked from Peoplecode.

Utility programs (Clean up, File manipulation, Audits, Status Checks)


Audits, File Operations, OS related processes are better done by SQRs, retain them. Utilities that affect database can be replaced by AE.

Letters and Forms (online forms as well as letters that are mailed)


XML Publisher + Peoplecode notification classes for mails

Reports – Simple single data source (reports with one BEGIN-SELECT)


XML Publisher

Reports – Simple multiple data sources (reports with more than one BEGIN-SELECT and simple calculations)


Migration of these might require the use of AE to execute the calculations and XML/XSL modifications. Move to XML Publisher if the logic is not complicated, otherwise retain SQRs.

Reports – On-breaks and multiple reports


XML Publishers

Reports – Complex with multiple BEGIN-SELECTS and complex conditional logic


Do not migrate – the effort is not worth it.

Reports – Status of batch process


This category contains the production of error reports and status reports of processing done by an AE or other batch programs – move to XML Publisher.

SQR Optimisation Techniques

1. Check your SQL queries: Most of the performance issue can be attributed to poorly written SQLs. Critically review each SQL statement of your SQR and ensure their correctness.

2. Usage of Temporary Tables: This is number two on my list. A strategy that I adopt when multiple tables have to be joined and the report involves complex processing, is to pull out the master data and insert the same into a temporary table that has been created in the begin-setup section of the SQR. Further processing can be done by referring the data in the temporary table and this reduces trips to transaction tables whereby giving us significant performance enhancements.

3. Usage of arrays: Arrays are excellent instruments to improve the maintainability of the program. I would always use arrays to hold values of totals and other variables that are to be re-initialised multiple times in the report (note that the values of an array can be reset by using the clear-array command). If variables were used instead, the number of variables that would have to be maintained, the initialisation routine etc. would add to the complexity to the program.

4. Dynamic SQLs: The usage of dynamic sqls greatly reduces the length of a program and helps in improving its performance. One requirement I had was to generate two reports with the same output fields and filter criteria, but one sorted by EMPLID and another by NAME. In this case, the only difference was the ORDER BY clause and instead of writing two different BEGIN-SELECTs, the requirement was achieved by maintaining a single BEGIN-SELECT and passing the order by clause as a dynamic SQL.

5. Break down your SQLs: This is something you will find in Peoplebooks also. Make sure that you are querying the database only when necessary. Let's say you have to produce a report which lists the EMPLID, NAME, BIRTHDATE, MANAGER'S NAME and JOBCODE DESCRIPTION. This will involve the join of 4 tables (including PS_NAMES aliased twice) and considering the key structure of these tables, will take considerable execution time. An alternate strategy would be to have a different procedure to get the JOBCODE descr where only the JOBCODE_TBL is queried for instead of making it a part of the join.

6. Minimal code and re-usable logic: The beauty of SQRs is that it is the most flexible tool in the Peoplesoft technical environment (especially considering the rigidity and ready made nature of an AE, CI or Peoplecode) and offers the developer multiple paths to one solution. Evolve a logic that re-uses your procedures and minimises database trips.

What about Load Lookups? Documentation says that Load Lookups give significant performance enhancements. Practically I have not been able to achieve this. The look up gets loaded at the start of the report and the time taken to load the lookup offsets any advantage that this concept delivers. Usage of temporary tables is a much better alternatives - in effect the concept of the two are inherently the same - reduce database trips and querying of large transaction tables.

Auto creation of user profiles

There are multiple scenarios where its required to create new user profiles in bulk.
The best approach to this problem is to achieve the same by a CI built on the USER_SAVEAS component (Copy User profile component).
Was mulling over the various options to auto generate passwords for the user profiles and ran into the delivered function in DERIVED_HINT.EMAILPSWD.Fieldformula event.

Dynamic Views as Prompt Tables

Dynamic Views are an excellent object type provided by Peoplesoft - a pseudo view that can take any shape! They are excellent candidates where the SQL condition of a view changes dynamically according and are not even a database objects.
There are two major limitations I have come across when you use a Dynamic View as a prompt:
1. If the SQL of the dynamic view contains joins and if the search fields are used in the join.
2. If the SQL of the dynamic view contains joins.

What causes the failure is that the component processor takes the search fields from the prompt and appends to the SQL statement like 'and = '. Now, unfortunately the processor does not do any aliasing which causes the common 'ambiguous column definition' SQL error.

To overcome this, either put the SQL in a view and query from the view or better, treat the SQL as an inline view and query from the inline view.
For example, if the initial SQL of the DV was something like:
SELECT EMPLID FROM PSOPRDEFN UNION SELECT EMPLID FROM PSOPRDEFN, for this to work in a dynamic view, it has to be called from an inline view like:
SELECT EMPLID FROM (SELECT EMPLID FROM PSOPRDEFN UNION SELECT EMPLID FROM PSOPRDEFN)

Gray out an entire page except one field using Peplecode

Option 1 : Use GRAY() function in the page activate event to gray out individual fields.
Option2: Make page display only. and then in the peoplecode use enable property for the field that needs to be enabled.
OR
Loop through
&Rec= Your Record
for &i =1 to &rec.fieldcount
if &rec.field.name <> 'your req field' then
&rec.field.displayonly =true;
else
&rec.field.displayonly =true;
end-if;
end-fo

To display the long name from translate table and display it output in SQR

To display the long name from translate table and display it output in SQR

BEGIN-SELECT
XLATLONGNAME (,132)
FROM
PSXLATITEM
WHERE
FIELDVALUE = &RELATION
AND FIELDNAME = 'RELATIONSHIP'
END-SELECT
(Note:Call it in a procedure)

String to Date conversion (30-dec-2009 to 12/30/2009) in PeopleCode

Below is the code to convert the string to date (30-dec-2009 to 12/30/2009)
&str1 = &array [5];
If &array [5] = "NULL" Then
&oSStu2Tbl.date = "" | "NULL";
&fileLog.WriteLine("&oSStu2Tbl.date = " | &oSStu2Tbl.date);

End-If;
If &str1 <> "" And
Len(&str1) = 9 Then
&str2 = Substring(&str1, 1, 2);
&str3 = Substring(&str1, 4, 3);
Evaluate &str3
When = "Jan"
&mm = 1;
Break;
When = "Feb"
&mm = 2;
Break;
When = "Mar"
&mm = 3;
Break;
When = "Apr"
&mm = 4;
Break;
When = "May"
&mm = 5;
Break;
When = "June"
&mm = 6;
Break;
When = "July"
&mm = 7;
Break;
When = "Aug"
&mm = 8;
Break;
When = "Sep"
&mm = 9;
Break;
When = "Oct"
&mm = 10;
Break;
When = "Nov"
&mm = 11;
Break;
When = "Dec"
&mm = 12;
Break;

End-Evaluate;

rem &b = Month(&str3);

&str4 = Substring(&str1, 8, 2);
&dte = &str2 | "/" | &mm | "/" | &str4;

&oSStu2Tbl.S_STU_DATE = &dte;
&fileLog.WriteLine("&oSStu2Tbl.date = " | &str2 | "/" | &mm | "/"|&str4);
End-If;

If &str1 <> "" And
Len(&str1) = 8 Then
&str2 = Substring(&str1, 1, 1);
&str3 = Substring(&str1, 3, 3);
Evaluate &str3
When = "Jan"
&mm = 1;
Break;
When = "Feb"
&mm = 2;
Break;
When = "Mar"
&mm = 3;
Break;
When = "Apr"
&mm = 4;
Break;
When = "May"
&mm = 5;
Break;
When = "June"
&mm = 6;
Break;
When = "July"
&mm = 7;
Break;
When = "Aug"
&mm = 8;
Break;
When = "Sep"
&mm = 9;
Break;
When = "Oct"
&mm = 10;
Break;
When = "Nov"
&mm = 11;
Break;
When = "Dec"
&mm = 12;
Break;

End-Evaluate;

rem &b = Month(&str3);
&str4 = Substring(&str1, 7, 2);
&dte = &str2 | "/" | &mm | "/" | &str4;
&oSStu2Tbl.S_STU_DATE = &dte;
&fileLog.WriteLine("&oSStu2Tbl.date = " | &str2 | "/" | &mm | "/" | &str4);
End-If;

Friday, June 26, 2009

How to delete process definition

The BEST way to delete any PeopleTools definition that you can insert as an object into application designer is by setting the action to delete for the relevant definitions, copying the project to file and reimporting the project

The exact steps are covered below:
http://peoplesoft.wikidot.com/deleting-definitions

PeopleTools Tables

Projects

* PSPROJECTDEFN — Project header table
* PSPROJECTITEM — Definitions in the project

Fields

* PSDBFIELD — Fields in the system
* PSXLATITEM — Translate Values

Records

* PSRECDEFN — Record header table
* PSRECFIELD — Fields in the record (subrecords not expanded)
* PSRECFIELDALL — Fields in the record (subrecords expanded)
* PSKEYDEFN — Indexes
* PSTBLSPCCAT — Tablespaces
* PSRECTBLSPC — Records’ tablespace assignments

Pages

(Note: Pages still have the name panels in the PeopleTools table names)

* PSPNLDEFN — Page header table
* PSPNLFIELD — Page controls (field types/FIELDTYPE)
* PSPNLHTMLAREA — Static HTML Areas on Pages

Components

(Note: Components still have the name panel group in the PeopleTools table names)

* PSPNLGRPDEFN — Component header table
* PSPNLGROUP — Pages in the components

Component Interface

* PSBCDEFN — header record; one row for each component interface
* PSBCITEM — one row for each property

Menus

* PSMENUDEFN — Menu header table
* PSMENUITEM — Items (components) on the menu

Security

* PSCLASSDEFN — Permission List header table
* PSAUTHITEM — Menu items granted security by permission lists
* PSROLEDEFN — Role header table
* PSROLECLASS — Permission Lists in roles
* PSOPRDEFN — User ID header table
* PSROLEUSER — Roles granted to users

Process Scheduler

* PS_PRCSDEFN — Process Definition Header
* PS_PRCSDEFNGRP — Process Group
* PS_PRCSDEFNPNL — Component
* PS_PRCSJOBDEFN — Job Header
* PSPRCSRQST — Process Request Instances
* PS_PRCSJOBITEM — Job Processes

Portal

* PSPRSMDEFN — Content References and Folders
* PSPRUHTABPGLT — Portal User HP Tab Pagelet

Change Control

* PSCHGCTLHIST — shows history of locked definitions with project name, incident, and description
* PSCHGCTLLOCK — shows definitions that are currently locked

Application Engine

* PSAEAPPLDEFN — header record; 1 row per app engine
* PSAEAPPLSTATE — state records assigned to app engines
* PSAEAPPLTEMPTBL — temp tables assigned to app engines
* PSAESECTDEFN — sections
* PSAESTEPDEFN — steps
* PSAESTEPMSGDEFN
* PSAESTMTDEFN — actions (action types)

List Log Messages

HTML Definitions

* PSCONTDEFN — header record; last update time, etc.
* PSCONTENT — stores actual text in the HTML definition

SQL Definitions

* PSSQLDEFN — header record; last update time, etc.
* PSSQLTEXTDEFN — stores actual text in the SQL definition

File Layout Definitions

* PSFLDDEFN — header record; last update time, etc.
* PSFLDSEGDEFN — stores the segments for each layout
* PSFLDFIELDDEFN — stores the fields for each layout

Workflow


* APPR_RULE_DETL - Approval Rule Defn Details
* APPR_RULE_FIELD - Approval Rule Defn Route Cntl
* APPR_RULE_AMT - Approval Rule Amounts
* RTE_CNTL_LN - Route Control Profile Line
* RTE_CNTL_RUSER - RoleUser Route Cntl Profiles
* RTE_CNTL_TYPE - Route Control Type
* RTE_CNTL_HDR - Routing Control Type

To write Images along with HTML text into a file created in an App Engine in PeopleSoft

It's possible to write images along with HTML text.
Sample Code:
1. Create a new HTML Object as follows:
!html <>
!body
!img src="cid:23abc@pc27" /
!/html
!/body
cid stands for the Content Id
2. Sample PeopleCode:
Local string &STRLURL = GetURL(URL.IMG_PATH);
&image.SetAttachmentContent(&STRLURL, %FilePath_Absolute, "sample.jpg", "This is a sample image!", "", "");

/* The Content ID in the code (Highlighted) must be same as Content ID in HTML */

&image.AddHeader("Content-ID", "23abc@pc27");
We have used this to display html image and text in email notifications. You could try it for documents and let us know if it works for you.

Reasons why PeopleSoft does not recomd SQLEXEC()

PS does not recommend sqlexec(), to avoid direct database calls. As the main reason for 3 tier architecture was to execute the business logic on the application server so that the application can be made database independent. This means if you want to change the database of any application from one vendor to another, you should be able to do it easily.

If you use sqlexec() calls, this purpose is not met as you may use sql which is very specific to the database. However if you use Peoplesoft way of creating a record, for example

RC_CASE is record with key as CASE_ID

Local record &lrec = createrecord(record.rc_case);
&lrec.case_id.value = 123;

Now if you want to select from RC_CASE, you would use sqlexec() as sqlexec("select case_closed from ps_rc_case where case_id=:1",123,&caseclos);

Instead you can also use the record instance as
&lrec.selectbykey();

The above will populate the rc_case record with all the values and you can use it. Also in this case Peoplesoft forms the sql based on the database, so if the organization using this application decides to change the database from Oracle to MS-SQL Server, you will not have to change the code for above.

You are not authorized for this page error in PeopleSoft

These are the steps you will have to follow further to avoid the error:
a) Go to Peopletools > Portal > Structure and Content. (Navigate to your component)
b) Go to security tab
c) Change the security to public(makes all permission list to go) and now again Permission List access (making all permission list to reappear).
d) Save the page
e) Check if the Permission list is shown after the save..
f) Now sign-out and delete the application server and browser cache.
g) Try login again and access the page.

XML navigations Creating the data Source through PS QUERY (Reporting Tools) in PeopleSoft

Creating the data Source through PS QUERY (Reporting Tools)


Defining Data source:

1.Click on Reporting Tools.
2.Click on XML Publisher.
3.Click on Data Source.
4.Click on Add a New Value.
5.Select the Data Source type as PS Query.
6.In Data Source ID select ur Query (Ex:HARSHA_QRY)
7.Click on ADD.
8.Enter the Description Name (Ex:Harsha)
9.Selct the Object Owner ID as Human Resource.
10.Click on Save.

Step2: Defining Data Source

11.In the Related Files-->Sample Data File-->Click on Generate
12.In the Related Files-->Schema File-->Click on Generate.
13.Click on Save.
14.Open the XML file and Save As Harsha1_Qry on Desktop.

Step3: Building/Creating Template:

1.Open MS Word.
2.Click On Add-Ins.
3.Click on Template Builder-->Data-->Load XML data.
4.Click on Template Builder-->Insert-->Table/ Form
5.Drag and dorp the Rows in to Template Work sapce and click on All Nodes.
4.Click on Ok.
5.Save the MS Wrod sheet with same name given to the XML(HARSHA_QRY) with RTF


Step4: CLICK ON REPORT DEFINITION

1.Select the Existing saved Report(HARSHA_QRY)
2.In the Object owner Id make it empty.
3.Clickon template tab
4.Change the status to Active.
5.Click on Upload.
6.Selct the Existing Word doc
7.Click on Save.


CLICK ON QUERY REPORT VIEWER

1.In the Query Report Viewer select ur existing report.
2.Click on View Report.

Creating Component Interface in Application Designer and giving permissions to Component Interface in PeopleSoft

Creating Component Interface in Application Designer:
1. Open new Component Interface.
2. Select the Component
3. Save the Component Interface with _CI.
4. Drag and drop the component Interface in to the Application Engine Programs
(Which generates the People code automatically. Edit it )

To test the component Interface:
1. Right click Component Interface
2. Click on Test Component Interface.

Steps to give permissions to CI:
1. People Tools-->Security-->Permissions & Roles-->Permission Lists
2. Add HCCPFGALLP (Federal all pages)
3. Click on Component Interface tab.
4. Add the Component interface.
5. Select thr Coponent Interface and click on Edit.
6. Click on Full Access and click on Ok.
7. Save it.

Steps to replace DropDownbox in place of Prompt table and Inserting a static Image into a page in PeopleSoft

STEPS TO FRO DROP DOWN BOX IN PLACE OF PROMPT TABLE

1.Delete the filed prompt button from the page (counrty)
2.Click on Insert-->Drop Down List box
3.Double click on the drop down list box.
Select the record name:TIN1_EMP_TBL
Select the Field Name:TIN1_COUNTRY
Select the radio button :Prompt Table Field.
Select the Feild as TIN1_COUNTRY from the drop down list in Prompt Table Field
4.Click on OK.
5.Save the project.


STEPS FOR INSERTING THE STATIC IMAGE IN TO THE PAGE
1.Open a new Image (Ctrl+N-->Image)
Save it and click on F7
2.Click on Insert-->Static Image
3.Double click on it and browse the Image.
4.Click on OK.
5.Save it.

Steps for creating Secondary page with Push Button, Grid and Sate Record in PeopleSoft

Creating Secondary Page With Push Button:
-->Create the requried Fields(Ex:Email,Alternative Adress, Phone No)
-->Drag and drop the field in the Record.
-->Open New Page-->Right Click-->Select Page Properties-->Select Secondary Page fro the drop down box
-->From the record Drag & Drop the Email to the Secondary Page
-->Save it
-->Open the Mian Page-->-->Click on Insert-->Push Button/Hyper Link-->Doubble click on the icon in the Main page
-->Select the destination as:secondary page
-->Record Name as:HARSHA_EMP_TBL\
-->Field Name as:HARSHA_EMP_EMAIL
-->Secondary Page as:HARSHA_EMAIL_PNL
-->Click xon the Label tab-->Select Standard Text
-->Select Static Text
-->Enter the Text as: Email
-->Save it

Creating Grid:
1.Open a new Page.
2.Click on Insert-->Grid
3.Now drag and drop the records in to the grid
4.Save it (Ex:-HARSHA_EMP_PNL)
5.Click on F7.

Creating State Record:
1.Open a New Record.
2.Drag and drop the necessary field in to it
3.Save it with _AET extension (Ex:-HARSHA_EMP_AET)
4.Click on F7.

Steps for creating Run Control ID in PeopleSoft

Creating Run Control Page from the Existing Fields
Open New Page.
Click on insert -->Subpage
Select Subpage as PRCSRUNCNTL_SBP
Select Record Name as PRCSRUNCNTL
Click on ok
Save it as HARSHA_RNCTL_PNL
Click on F7.

Creating Own Run Control Page:
1.Click on Insert-->OPRID
2.Click on Insert-->RUNCNTLID.
3.Click On New-->Field(Employee ID)
4.Click on New-->Record
5.Drag and drop all the 3 records in to it.
6.Make both RUNCNTLID and EMPID as Keys
7.Select the Employee ID-->Double click onit.
8.Click on Edit Tab.
9.Select the Radio Button Table Edit.
10.Select Prompt Table as SRI_EMP1_VW.
11.Save It.

Steps for creating Field,Record,Page,Component and Menu in PeopleSoft

Creating the Fields:
-->Open the Application Designer.
-->Click on File->New
-->In the New Definition Pop Up Window Select Field and double click on it.
-->Select the Field Type as Character.
-->Select the appropriate Field Length (Ex:-20)
-->In the Label ID give the appropriate name (Ex:-AST_HARSHA_EMP_ID)
-->In the Long Name give the appropriate name (Ex:-Employee Name)
-->In the Short Name give the appropriate name (Ex:-EName)
-->Save the Project with appropriate name (Ex:-AST_HARSHA_EMP_ID)
-->Click on Insert-->Click on Current Definition in to project or Hit F7.
-->REPEAT THE SAME ABOVE PROCESS FOR EMPLOYEE NAME.

Creating a Record: (TBL)
-->Click on File-->New
-->In the New Definition Pop Up Window Select Record and double click on it.
-->Drag and drop the Emp_Id and Emp_Name from the Fields.
-->Double click on the Record's and the Record Field Properties Pop Up Window Opens.
-->In Record Field Properties Pop Up Window Select the Key Checkbox and click on OK.(This is Option which is used to establish the relation)
-->Click on Record Type and select Sql Table radio button.
-->Save as AST_HARSHA_TBL
-->Click on Ok
-->Click on Insert->Click on Current Definition in to project or Hit F7.
-->From the Records select AST_HARSHA_TBL right click and click on Build-->In Build Options select the checkbox's Create Tables in Build Options and Execute SQL now in Build Execute Options
-->Click on Build.
-->After the process getting completed close the Build Progress window
-->Open SQL server
-->Execute the SQL statement by selecting the appropriate database (Ex:-HCMTRA90)
-->select * from PS_AST_HARSHA_TBL (Hit on F5).
Creating a Page: (PNL)
-->Click on File-->New
-->In the New Definition Pop Up Window Select Page and double click on it.
-->Resize the Page by Right click->Page Properties-->Use-->Select the required page size and click on Ok.
-->Drag and Drop the Records
-->Align the page
-->save the page as AST_HARSHA-PNL
-->Click on F7
Inserting the Scrolling : ( Which allows inserting Multiple Values at run time)
-->Click on Insert
-->Click On Scroll Area
-->Double click on the scrolled area.
-->Click on Label
-->Uncheck the Display footer check box.
-->Click on the Properties of Display Title.
-->In the Text enter the Name to be displayed.
-->Click on Ok.
Components:
-->Click on File-->New
-->In the New Definition Pop Up Window Select Component and double click on it.
-->Drag and drop the Page Component.
-->Re Name the Item Label (Ex:-Harsha Employee Id)
-->Save it as AST_HARSHA_CMP
-->Then in the Component Properties in the Search Record Field select the file (Ex:-AST_HARSHA_TBL)
-->Click on Ok.
-->Save it as AST_HARSHA_CMP
-->Hit on F7.
-->Select the component file(Ex:-AST_STUDENT_TBL).
-->Right Click and click on Build-->Click on Yes
-->Select the checkbox create tables in Build Options.
-->Select the Radio Button Execute SQL now in Buid Execute Options
-->Click On settings
--> Click On Logging tab
-->Select/enable the Log Settings check Box
-->Click on Ok.
-->Click on Scripts Tab
-->Select the Radio Button Output to single file and in script file names give the path to store the scripts as separate files
-->Click On ok
-->Click On Build.
Creating Menu:
-->Click on File-->New
-->In the New Definition Pop Up Window Select Menu and double click on it.
-->Select Standard from the New Menu and click on Ok.
-->Double click on the Dotted area.
-->In the Bar Item Properties pop Up window Name it as AST_HARSHA_PROCESS
-->Name the label as Harsha.
-->From the component darg and drop the AST_HARSHA_CMP (GBL) in the process sub menu
-->save it as AST_HARSHA_MENU
-->Hit F7
-->Click on File-->Click on save project-->HARSHA_EMP
-->Select the process sub Menu-->Right Click-->Click on register Menu Item
-->Click on next
-->Select Folder Name as AST_HARSHA.
-->OBJECT OWNER ID: HHR (Human Resource)
-->Select the check box Always use default node.
-->Click on Next
-->Click on Select and In Select Permission List -->In Name field give as HCCPFGALLP
-->Click on Next
-->Select the Permission List Check Box
-->Click on Finish.

Steps for creating a Sub Record, Sub Page and Secondary Page In PeopleSoft

Steps for creating a sub record:
1. Create necessary fields.
2. Open a new record and drag and drop the necessary fields in to the record
3. Save it with _SBR and Build the Project.
4. Open the Existing record which we want to insert the sub record into it.
5. Click on Insert-->Subrecord
6. Select the sub record (ex:AST_STU_SBP) and click on insert.
7. Build the project.
8. Save it.

Steps for creating a sub page:
1. Click on New-->Page
2. Right click on the page and select Sub Page.
3. Drag and drop the necessary fields from the Sub record
4. Save it with _SBP
5. Click on Insert-->Subpage
6. Select the Sub page from the list and click on Ok
Steps for creating secondary page
1. Drag and drop all the necessary fields in to the main record
2. Open a new page-->Right click and select Secondary page
3. Drag and drop all the necessary fields in to it.
4. Save it with _SEC.
5. Click on Insert-->hyperlink/push button.
6. Select destination as Secondary PAge.
7. Record name tbl
8. select the secondary page.

Scheduling SQR report through the Process Scheduler

Process Scheduler:
Scheduling a Process :
-->Click on People Tools
-->Process Scheduler->Processes
-->Click on Add a New Value
-->Select the process type as SQR Report.
-->Enter the process name (Ex:-Harsha1)
-->Click on ADD
-->Select the Process Definition tab
-->Select the Run control ID that u have created for the existing project (SRI_RUNCNTRL2_CMP)
-->Select the Process Groups as ALL PAGES
-->Save it
-->Now click on Astute Business Solutions5 Folder
-->Select your name and click on the project
Running a Report through the Process Scheduler
-->Open the http://astsrvr2:10000/psp/HCMTRA90/EMPLOYEE/HRMS/?cmd=logout (PS Sign on page)
-->Click on PeopleTools
-->Click on Process Scheduler
-->System Process Requests
-->Click on Add a New Value (Ex:1)
-->Click on Add
-->Click on Run
-->Select check box Cross reference window listing. (SQR Reports)
-->Click on Ok.
-->Click on Process Monitor (to check the Process status)
-->Click on Details on any of the running Process.
-->Click on View Log/Trace
-->Click on PDF Url (Ex:XRFWIN_2744.PDF)(It opens the Report in PDF from)

Creating New Permission Lists:
-->Open the PS SignOn page.
-->Click on People Tools.
-->Click On security.
-->Click o permissions & Roles.
-->Click on Permission Lists.
-->Click on Add a New Value.
-->Enter the description.
-->In Permission List Home Page Select Human Resources.
-->Click on Save.
-->Click on Page Tab.
-->Select the Menu Name (Your menu name)
-->Click on Edit components
-->Click on Edit pages
-->Click on select all
-->Click on Ok.
-->Click on Save.
-->Click on PeopleTools Tab.
-->In the PeopleTools Permissions select the necessary.
-->In Data Archival Select the necessary
-->Click on Save.
-->Click on Process Tab
-->Click on Process Group Permissions
-->Select the ALLPAGES, ALLPANLS, FEDALL.
-->In the Allow Process Request:
-->In View By select Owner and In Update By select Owner.
-->Click on Ok.
-->Click on save.
-->Click on Web Libraries Tab.
-->Select WEBLIB PORTAL.
-->Click On save
-->Now Click on roles
-->Click on Add New Role.
-->Select the Permission List (Ex:Harsha)
-->Click On save
-->Click on user profiles.
-->Click on Roles Tab.
-->Click On +
-->Select the Role Name and select it.
-->Click on Save.

PeopleSoft WorkFlow Navigations

WorkFlow:-
TO CREATE THE WORKFLOW IN APPLICATION DESIGNER
INSERTING AN WORKLIST INTO THE EXISTING PROJECT:
1. Before that inserting the worklist
2. Copy the existing worklist from R_TT_WL
3. Save it as SRI_EMP_WL
4. Click on F7
CREATING THE BUSINESS PROCESS:
1. Click on New-->Business Process.
2. Drag and drop the Activity1 on to the work space.
3. Drag and drop the Activity2 on to the work space.
4. Link Both Activity1 and Activity2
5. Save the Business process as SRI_EMP_BP.
6. Click on F7.
Creating Activity
1. Open an Existing Project.
2. New--> Activity
Click on the Step (Blue color) and Click on the Work space.
-->Double click on the step and Name it as SHE_EMP_ACT1
-->Give the required Icon Description.
-->Click on the Attributes and Select the Menu, Bar, Item, Page, Action (as add) Names in the project.
-->Click on Ok.
Click on the Event (Yellow color) and Click on the Work space beside the step.
-->Double click on the Event
-->Name: SRI_EVENT and Icon Descr as SRI_EVENT.
-->Select the record name SRI_EMP_TBL.
-->Click on Edit Business Rules which opens a window. And write the following below code:
&I=TriggerBusinessEvent(BUSPROCESS.bus_proc_name,BUSACTIVITY.activity_name,BUSEVENT.bus_event_name)
-->Save it.
-->Click on Ok.
Click on the Worklist (Yellow color rectangle) and Click on the Work space beside the Event.
-->Double click on the Work List.
-->Name: Worklist and Icon Descr: Worklist.
-->Click on Attributes.
-->Select the worklist from the drop down list (SRI_EMP_WL).
-->Select the Business Process from the Drop downlist (SRI_EMP_Bp)
-->Select the Activity2 from the drop down list(SRI_EMP_ACT2)
-->Click on oK.
-->Click on Field Mapping.
-->Click on ADD
-->Select the Field name as OPRID and Map module as copy(by default)
-->Select the radio button Constant.
-->Give the name of the people who want to see the work report (Ex:SARAT)
-->Click on Ok.
-->Click on ADD.
-->Select the Field name as SRI_EMPAE_TBL and Map module as COPY
-->Select the radio button RecField. (sELECT THE FIELD NAME TO BE MAPPED)
-->Click on ok.
--->Click on the link(beside the ?) and point it on the Step towards the Event in the workspace and same to the Worklist.
2. Again create another activity with only one event and save it as SRI_EMP_ACT2
-->Select the Menu Name as ADMINISTER_WORKFORCE_(GBL)
-->Select Bar Name and Use
-->Item Name as JOB_DATA
-->Page Name as EMPLOYEMENT_DATA
-->Action as &UPDATE/DISPLAY
-->Click on Ok
NOTE:-IF WE GET SQL ERROR THEN CHECK OUT WITH THE BUSINESS PROCESS NAME

PeopleSoft Query Security Navigations

Query Security:
-->Open http://Server/psp/XXXXX/EMPLOYEE/HRMS/h/?tab=DEFAULT (PS Sign On page)
-->Select PeopleTools
-->Select Security-->Query Security
-->Click on Query Access Manager.
-->Click on Search.
-->Select the Access Group which is already exists in the database (ex:-AD ACESS GROUP-Admissions Access Group)
-->Select any one of the Leaf Node.(Ex:-SCHOOL LOAD)
-->Click on insert child record.
-->Click on Search
-->Enter the table name (your own table name that u have created before)
-->Click on Look Up
-->Select the table (which u wants to add)
-->Click an Add.
-->Click on Save.
-->Click on Query Access List Cache under Menu.
-->Select the Enable Access List Cache
-->Click on Run.
-->Click on Ok.
-->Sign Out from PS Sign-in page.
-->Open the Application Designer.
-->Select Go-->Click on Query.
-->The list of records will appear in the Left hand side.
-->Search your record which is added before.
-->Send Tree Change Message will be selected by default.
-->Click on OK.

Creating the User Profiles and assigning the Roles and Permissions:

Creating the Permission List (Collection of roles)
-->Open the PS SignOn page.
-->Click on People Tools.
-->Click On security.
-->Click on permissions & Roles.
-->Click on Permission Lists.
-->Click on Add a New Value.
-->Enter the description.
-->In Permission List Homepage Select Human Resources.
-->Click on Save.
-->Click on Page Tab.
-->Select the Menu Name (Your menu name)
-->Click on Edit components
-->Click on Edit pages
-->Click on select all
-->Click on Ok.
-->Click on Save.
-->Click on PeopleTools Tab.
-->In the PeopleTools Permissions select the necessary.
-->In Data Archival Select the necessary
-->Click on Save.
-->Click on Process Tab
-->Click on Process Group Permissions
-->Select the ALLPAGES, ALLPANLS, FEDALL.
-->In the Allow Process Request:
-->In View By select Owner and In Update By select Owner.
-->Click on Ok.
-->Click on save.
-->Click on Web Libraries Tab.
-->Select WEBLIB PORTAL.
-->Click On save.
Creating Roles (Role is a collection of user profiles)
-->Now Click on Roles
-->Click on Add New Role.
-->Select the Permission List (Ex:Harsha)
-->Click On save
Creating User Profiles:
-->Click on User Profiles.
-->Click on user profiles.
-->Click on Roles Tab.
-->Click On +
-->Select the Role Name and select it.
-->Click on Save.

Steps to Run the Appilaction Engine Program (Inbound/OutBound) Program through thr Process Scheduler

In Application Designer:
1. Open a New page.
2. Save the page.
3. Click on Insert-->Subpage-->PRCSRUNCNTL_SBP to PRCSRUNCNTL
4. Save it.
5. Drag and drop the Page into component and save it.
6. Register the component.
7. Open the existing menu and drag and drop the component into it.
8. Save it.
Process Scheduler:
1. Open the PS signin page.
2. Click on people tools-->Process Scheduler-->Process
3. Click on Add a new value.
4. Select the process type as Application Engine
5. Enter the process name (ABC1_STU_AE)
6. Click on Process Definition tab and enter the description (Sample student)
7. Click on Process Definition Options and select the component (ABC1_STU_RUN_CMP).
8. Select the Process Groups as ALLPAGES
9. Save it.

Employee Change Request Application Enginer Code

&MYFILE = GetFile("C:\Documents and Settings\Trainees.AST\Desktop\CR2.csv", "R", %FilePath_Absolute);
&MYFILE1 = GetFile("C:\Documents and Settings\Trainees.AST\Desktop\EMPChange Request AE.TXT", "W", %FilePath_Absolute);
&array = CreateArrayRept("", 0);
&array3 = CreateArrayRept("", 0);
&array4 = CreateArrayRept("", 0);
&intime = CreateArrayRept("", 0);
&outtime = CreateArrayRept("", 0);
&entrytime = 8 * 60;
&exittime = 16 * 60;
&num = 8;
rem Local string &str, &str1;
Local Record &R0;

&R0 = CreateRecord(Record.ABC_EMPCR_TBL);

If &MYFILE.IsOpen Then
While &MYFILE.Readline(&string);
&array = Split(&string, ",");
REM &MYFILE1.WRITELINE(&array.LEN);


&MYFILE1.WRITELINE(&array [1]);
&R0.EMPLID.Value = &array [1];
rem &MYFILE1.WRITELINE(&array [2]);
&R0.ABC_EMPCR_NAME.Value = &array [2];
rem &MYFILE1.WRITELINE(&array [4]);
If &array [4] = "" Then
&R0.ABC_EMP_DATE.Value = "";
Else
&R0.ABC_EMP_DATE.Value = DateValue(&array [4]);
End-If;



If &array [5] <> "" And
&array [6] <> "" Then
&str = TimeValue(&array [5]);
&intime = Split(&str, ".");
&str1 = TimeValue(&array [6]);
&outtime = Split(&str1, ".");



&str = &intime [1] * 60;


rem &MYFILE1.writeline("---Tot Late Min when =8-----" | &str);



If &str = &entrytime Then
&inhrs = 8;
&inmins = &intime [2];
&inmins1 = (&intime [1] * 60) + &intime [2];
&entrymins = 0;
&latentrymin = &inmins - &entrymins;
&MYFILE1.writeline("---Total Late Min when Employee logs at 8=" | &latentrymin);
End-If;

If &str < &entrytime Then
&inhrs = 8;
&inmin = 0;
&MYFILE1.writeline("---Total Late Min when Employee logs at <8-----" | &inmin);
&inmins1 = 480;
End-If;
If &str > &entrytime Then
&inmins = (&intime [1] * 60) + &intime [2];
&entrymins = 8 * 60;
&latentrymin = &inmins - &entrymins;
&MYFILE1.writeline("---Total Late Min when Employee logs at >8-----" | &latentrymin);
&inmins1 = (&intime [1] * 60) + &intime [2];
End-If;

If &outtime [1] > 16 Then
&outhrs = 16;
&outmin = 0;
&MYFILE1.writeline("---Total OUT Late Min when Employee logs OUT at >16-----" | &outmin);
&outmins1 = 16 * 60;
End-If;



If &outtime [1] < 16 Then
&outmins = (&outtime [1] * 60) + &outtime [2];
&exitmins = 16 * 60;
&latexitmin = &exitmins - &outmins;
&MYFILE1.writeline("---Total Late Min when Employee logs OUT at <16-----" | &latexitmin);
&outmins1 = (&outtime [1] * 60) + &outtime [2];
End-If;

If &outtime [1] = 16 Then
&outmins = &outtime [2];
&exitmins = 0;
&outmins1 = (&outtime [1] * 60) + &outtime [2];
rem &latexitmin = &outmins - &exitmins;
rem &MYFILE1.writeline("---Tot Late Min when =16-----" |&latentrymin);
End-If;
&totlatemin = &latentrymin + &latexitmin;
&MYFILE1.writeline("---Tot Late Min = &latentrymin + &latexitmin-----" | &totlatemin);

If Mod(&totlatemin, 60) = 0 Then
&latehrs1 = &totlatemin / 60;
&latehrs2 = Round(&latehrs1, 2);
&MYFILE1.writeline("---Total Late hrs when mod=0-----" | &latehrs2);
Else
&latehrs1 = &totlatemin / 60;
&hrs1 = Substring(&latehrs1, 1, 1);
rem &MYFILE1.writeline("---Tot Late hrs when mod != 0 -----" | &hrs1);
&mins1 = Mod(&totlatemin, 60);
&totlthrs = &hrs1 | ":" | &mins1;
rem late hrs1 and late min;
&MYFILE1.writeline("---Employee Total Late hrs when mod != 0 -----" | &totlthrs);
End-If;



&MYFILE1.writeline("---TOTAL OUT MINUTES---" | &outmins1);
&MYFILE1.writeline("---TOTAL IN MINUTES -----" | &inmins1);
&wrkhrs1 = &outmins1 - &inmins1;
&MYFILE1.writeline("---TOTAL WORKING MINUTES &outmins1 - &inmins1-----" | &wrkhrs1);


/*WORKING HOURS*/
If Mod(&wrkhrs1, 60) = 0 Then

&wrkhrs2 = &wrkhrs1 / 60;

&wrkhrs3 = Round(&wrkhrs2, 0);

&MYFILE1.writeline("---Total WORK hrs when mod=0-----" | &wrkhrs3);
Else

&wrkhrs2 = &wrkhrs1 / 60;
&wrkhrs3 = Substring(&wrkhrs2, 1, 1);
rem &MYFILE1.writeline("---Tot Late hrs when mod != 0 -----" | &hrs1);
&wrkmins1 = Mod(&wrkhrs1, 60);
&totwrkhrs = &wrkhrs3 | ":" | &wrkmins1;
rem Tot Working wrkhrs3 and Tot Working wrkmins1;


&MYFILE1.writeline("---EMPLOYEE TOTAL WORKING HOURS -----" | &totwrkhrs);
End-If;


Else
&wrkhrs3 = 0;
&wrkmins1 = 0;
&hrs1 = 0;
&mins1 = 0;
End-If;

&R0.ABC_EMP_WRKTIME.Value = &wrkhrs3;
&R0.ABC_EMP_TOTMIN.Value = &wrkmins1;
&R0.ABC_EMP_LATEHOUR.Value = &hrs1;
&R0.ABC_EMP_LATEMIN.Value = &mins1;

&R0.Insert();


End-While;
End-If;


rem &R0.Update();
&MYFILE.close();