Dec 30, 2012

PeopleSoft : Check whether user belongs to a role:


IsUserInRole(rolename1 [, rolename2]. . .)

Returns a Boolean value: True if the current user belongs to one or more of the roles in the user role array, False otherwise.

Example:
    
     &flag=IsUserInRole("Admin");

PeopleSoft : Passing values while transfer to another page:


&queryString = "&SOURCE=R";
            /* generate a url */
            &url = GenerateComponentRelativeURL(%Portal, %Node, MENUNAME.MenuName, MARKET.marketname,COMPONENT.componentname,PAGE.pagename,action);
           
            /* Append parameters */
            &url = &url | &queryString;
           
            ViewURL(&url, False);
Syntax:
  1. 1      GenerateComponentRelativeURL(PORTAL.portalname, NODE.nodename, MENUNAME.menuname, MARKET.marketname, COMPONENT.componentname, PAGE.pagename, action, [, keylist])
  2.    ViewURL(URL_str | URL.URL_ID [, NewWindow])
  3.    ViewContentURL(URL_str | URL.URL_ID)


Use the ViewContentURL function to launch a new browser window

Use the ViewURL function to launch the default browser

exmple:

&queryString = "&SOURCE=R";
&url=GenerateComponentRelativeURL(%Portal, %Node, MENUNAME.CH_MENU,"GBL",COMPONENT.CH_COMPONENT,PAGE.CH_PAGE,"U");
 &url = &url | &queryString;
           
 ViewURL(&url, False);

PeopleSoft : Check whether user belongs to a role through peoplecode:


IsUserInRole(rolename1 [, rolename2]. . .)

IsUserInRole() function is used to check whether current user has  the role in his profile or not.

This function returns  a Boolean value:
                                       True if the current user belongs to one or more of the roles in the user role array,
                                        False otherwise.


Example:
 local boolean &hasRole;
 &hasRole= IsUserInRole(CH_ROLE_EMPLOYEE);



&hasRole contains true if the currnet user has CH_ROLE_EMPLOYEE in his profile.

Nov 20, 2012

PeopleSoft : SQLEXEC () in RowInit PeopleCode

We cannot perform INSERT,UPDATE statement's through SQLEXEC( ) in Rowinit PeopleCode event.

Below is the alternative to perform insertion and updation in rowinit .

Creating a stroed procedure, that perform's the insertion or updation.
Execute the procedure using SQLEXEC( ) in rowinit.

Example:

1.Creating the stored procedures in Oracle

CREATE OR REPLACE PROCEDURE CH_SAMPLE_PROCEDURE
AS 
BEGIN
    UPDATE PS_CH_TEST_TBL
            SET  COUNT=100;
    COMMIT;
END CH_SAMPLE_PROCEDURE;

2.Execute the procedure
 
EXECUTE CH_SAMPLE_PROCEDURE;

Sample code in ROWINIT:

1.Create a sql object,that contains the sql for creating stored procedure.
    SQLEXEC(SQL.CH_TESTPROCEDURE_SQL);
   Here CH_TESTPROCEDURE_SQL contains a sql for creating stored procedure.
2.Execute procedure.
    SQLEXEC("EXECUTE CH_SAMPLE_PROCEDURE");

Note:
1. To create a stored procedure , you need to have permissions in database level.
2. If you want to check whether the stored procedure is created or not use the below sql.
SELECT * FROM ALL_PROCEDURES WHERE OBJECT_NAME='CH_SAMPLE_PROCEDURE'



Nov 12, 2012

PeopleSoft : Query to find the Menu Navigation



SELECT * FROM PSXLATITEM WHERE FIELDNAME = 'PROJECT_STATUS';SELECT DISTINCT RTRIM (REVERSE (SYS_CONNECT_BY_PATH (REVERSE (PORTAL_LABEL), ' > ')), ' > ') "PIA NAVIGATION"
  FROM PSPRSMDEFN
WHERE PORTAL_NAME = 'EMPLOYEE'
   AND PORTAL_PRNTOBJNAME = 'PORTAL_ROOT_OBJECT'
START WITH PORTAL_URI_SEG2 = 'RUN_PCPL1000'  à<Component Name>
CONNECT BY PRIOR PORTAL_PRNTOBJNAME = PORTAL_OBJNAME;

PeopleSoft : CTRL+J Issue in Google Chrome

CTRL+J is used to see the information about page that is developed in peoplesoft.

In google chrome we got an issue with CTRL+J .

Here is the solution:

First press and hold J then press CTRL and release J.


PeopleSoft : User Id, Symbolic Id, Access Id, Connect Id



User ID
Symbolic Id
Access Id
Connect Id
Used For
A PeopleSoft user ID is the ID you enter at the PeopleSoft sign-in dialog box. You assign each PeopleSoft user a user ID
Used to map the User Id to Access Id without exposing the Access Id information.

All the User Id's are associated with a Symbolic Id (on User Profile Page). A Symbolic Id is associated with Access Id in PSACCESSPRFL record (Access Id is encrypted in this record).
The PeopleSoft access ID is the RDBMS ID with which PeopleSoft applications are ultimately connected to your database after the PeopleSoft system connects using the connect ID and validates the User ID and password. An access ID typically has all the RDBMS privileges necessary to access and manipulate data for an entire PeopleSoft application. The access ID should have Select, Update, and Delete access

Users do not know their corresponding access IDs. They just sign in with their user IDs and passwords. Behind the scenes, the system signs them into the database using the access ID.
The connect ID performs the initial connection to the database [RDBMS].Used by 2-tier, App Server, Batch Server to connect the database during Sign-in.
Peoplesoft Application Permissions
Obtains all the rights/permission from Roles/Permission Lists
Does not require to have any PS Roles
Full RDBMS rights
Read-only rights to
a) PSDBOWNER (For Oracle/DB2)
b) PSSTATUS
c) PSOPRDEFN
d) PSACCESSPRFL
Type of Account
Peoplesoft Account
Peoplesoft Account
RDBMS Account
RDBMS Account
User exists in Database
No, PeopleSoft no longer creates users at the database level.
No
Yes
Yes
Example
ELLISONLARRY
sa
sysadm [Encrypted in PSACCESSPRFL]. Usually it is schema owner.
people

PeopleSoft : Direct and Indirect reportees in PeopleSoft


 Below is the syntax to get direct and indirect reportees in peoplesoft:
SELECT… CONNECT BY
Select data with a hierarchical (parent/child) relationship
Syntax:
   SELECT
   [START WITH initial_condition]
   CONNECT BY [nocycle] PRIOR recurse_condition
   [ORDER SIBLINGS BY order_by_clause]
Key:
    START WITH        : The row(s) to be used as the root of the hierarchy
    CONNECT BY        : Condition that identifies the relationship between
                        parent and child rows of the hierarchy
    NOCYCLE           : Do not circle around loops (where the current row has
                        a child which is also its ancestor.)
    ORDER SIBLINGS BY : Preserve ordering of the hierarchical query
                        then apply the order_by_clause to the sibling rows
Example:
Select level-1
,PEOPLE_ID
, SUPERVISOR_ID
FROM PS_JOB_VW
start with SUPERVISOR_ID = 'xxxxx'
CONNECT BY PRIOR PEOPLE_ID = SUPERVISOR_ID;

Aug 22, 2012

PeopleSoft : Reserved Variables in SQR


SQR reserves a library of predefined variables for general use.

#current-column : The current column on the page.

$current-date : The current date-time on the local machine when SQR starts running the program.

#end-file : Set to one (1) if end of file occurs when reading a flat file; otherwise, it is set to zero (0).
Your program should check this variable after each READ command.

#page-count : The current page number.

#current-line : The current line on the page.
This value is the physical line on the page, not the line in the report body. See Getting Started with SQR.
Line numbers are referenced in PRINT and other SQR commands used for positioning data on the page.
Optional page headers and footers, defined with BEGIN-HEADING and BEGIN-FOOTING commands,have their own line sequences. Line 2 of the heading is different from line 2 of the report body or footing.

#return-status : Value to be returned to the operating system when SQR exits.
Can be set in your report. #return-status is initialized to the “success” return value for the operating system.

#sql-count : The count of rows affected by a DML statement (INSERT, UPDATE, or DELETE). This is equivalent to ROWCOUNT in Oracle and Sybase.


PeopleSoft : Preventing user from making changes to the field

Gray function:
   
      Gray( ) is used to make the field unavailable to change in page.
 
      Syntax:
                 Gray(scrollpath,targetrow,Record.Fieldname);

      Example:
                 Gray(Record.CH_EMPSTATE, &i, CH_EMPSTATE.STATE);


PeopleSoft : Add Drop-down values through peoplecode


/* Get the field reference into &field variable */

&field = GetRecord(Record.CH_EMPTYPE).GetField(Field.CH_EMPMAIN);


/* Delete all the values from dropdown list */

&field.cleardropdownlist();

/* Add values to the dropdown list */

&field.adddropdownitem(Descr, Value);
   [Value]: It is actual value which is mapped to the dropdown item
   [Descr]: It is actual text which is visible as a dropdown item
Examples:
&field.adddropdownitem("A", "A");
&field.adddropdownitem("B", "B");
&field.adddropdownitem("C", "C");

Aug 20, 2012

PeopleSoft : Handling files in PeopleCode


/*********** To move file data***************/
Exec("cmd /c move " | &file1 | " " | &file2, %Exec_Asynchronous %FilePath_Absolute);

/*********** To copy file data***************/
Exec("cmd /c copy " | &file1 | " " | &file2, %Exec_Asynchronous %FilePath_Absolute);

/*********** To delete the file**************/
Exec("cmd /c del " | &file1, %Exec_Asynchronous %FilePath_Absolute);

***********************************************************OR**********************************************************  
/*********** Create java objects corresponds to files ****************************/                           
Local JavaObject &f = CreateJavaObject("java.io.File", "/the/path/to/the/file.txt"); 
Local JavaObject &target = CreateJavaObject("java.io.File", "/the/target/file.txt"); 

&f.renameTo(&target); 

Local JavaObject &f = CreateJavaObject("java.io.File", "/the/path/to/the/file"); 

&f.delete(); /* delete the file from source */

PeopleSoft : PeopleCode for disable the row delete option in scroll and grid



For &i = 1 To &Asmfloor.ActiveRowCount
   &Asmwing = &Asmfloor(&i).GetRowset(Scroll.ASM_WING_TBL);

   For &j = 1 To &Asmwing.ActiveRowCount
      &Asmcabin = &Asmwing(&j).GetRowset(Scroll.ASM_CABIN_TBL);
   
      If &Asmcabin.ActiveRowCount = 1 Then
         &Asmwing.DeleteEnabled = True; /* to enable the row delete option */

         If &Asmwing.ActiveRowCount = 1 Then
            &Asmfloor.DeleteEnabled = True;
         Else
            &Asmfloor.DeleteEnabled = False; /* to disable the row delete option */
         End-If;
         rem &Asmfloor.DeleteEnabled = True;

      Else
         &Asmwing.DeleteEnabled = False;
         &Asmfloor.DeleteEnabled = False;
       
      End-If;
   
   End-For; /* end-of wing */
             
End-For; /* end-of floor */

PeopleSoft : Convert string to date in SQR

let $dt=strtodate('20120320')

strtodate function converts string to date in sqr report.

PeopleSoft : PeopleCode to find special characters in file other than ASCII characters


Local string &File_path, &File_path1;

&File_path = "C:\temp\ascii.xml";
&bud_rep = GetFile(&File_path, "r", %FilePath_Absolute);
&File_path1 = "C:\temp\ascii_1.txt";
&bud_rep1 = GetFile(&File_path1, "a", %FilePath_Absolute);
&count = 0;

While &bud_rep.readline(&line)
   &line1 = Len(&line);
   &count = &count + 1;

   For &i = 1 To &line1
      &char = Substring(&line, &i, 1);
      &naciichar = Code(&char); /* returns the number corresponds to character */
      /* check whether the character is in the range of ascii char's or not */
      If &naciichar >= 128 Or
            &naciichar < 0 Then
         &bud_rep1.writeline(&count | " " | &char); /* write special character to file */
      End-If;

   End-For;

End-While;

Jul 28, 2012

PeopleSoft : Important Records in Finance Module


Below are the important records in PeopleSoft FSCM:
Account Payables:
DISTRIB_LINE
PAYMENT_TBL
PYMNT_VCHR_XREF
PYMNT_XREF_VW
VCHR_ACCTG_LINE
VENDOR
VENDOR_ADDR
VOUCHER
VOUCHER_LINE

Asset Managemnt
ASSET
ASSET_ACQ_DET
ASSET_ALL_VW
ASSET_CUSTODIAN
 
ASSET_LOCATION
COST
DIST_LN

Billing
BI_ACCT_ENTRY
BI_HDR
BI_LINE
BI_LINE_DST

Commitment Contol/GL
ACCOUNT_EXP_VW
ACCOUNT_REV_VW
DEPT_TBL
LED_DEFN_TBL
LOCATION_TBL
LEDGER
LEDGER_BUDG
 
LEDGER_BUDG_KK
LEDGER_KK
LEDGER_PROJ
 
KK_ACTIVITY_LOG
KK_SOURCE_HDR
KK_SOURCE_LN

Contracts
CNTRCT_HDR
CNTRCT_LINE

GL Journals

BUS_UNIT_TBL_GL
BUS_UNIT_TBL_GL
BUS_UNIT_TBL_XX
CAL_DETP_TBL
GL_ACCOUNT_TBL
JRNL_HEADER
JRNL_LN
SOURCE_TBL

Grants Management
GM_AWARD
GM_BUD_HDR
GM_BUD_LINE_DTL
GM_BUD_LINE_SUM
GM_PROPOSAL
GM_PROP_PROJ

Inventory Accounting
BUS_UNIT_TBL_INV
CM_ACCTG_LINE
CM_ACCT_POST_LN
INV_ITEMS
ITM_VENDOR
ITM_VNDR_UOM
ITM_VNDR_UOM_PR
MASTER_ITEM_TBL

POs
PO_HDR
PO_LINE
PO_LINE_DISTRIB
PO_LINE_MATCHED
PO_LINE_SHIP

Projects
PROJECT
PROJECT_HEADER
PROJ_RESOURCE
PROJECT_STATUS
PROJ_TYPE_TBL

Receiving
RECV_HDR
RECV_LN

Requisitions
REQ_HDR
REQ_LINE
REQ_LN_DISTRIB
  


May 26, 2012

PeopleSoft : SQL to search peoplecode


SELECT OBJECTVALUE1 ,OBJECTVALUE2 ,OBJECTVALUE3 ,OBJECTVALUE4 ,PCTEXT
  from PSPCMTXT ;
Example:
SELECT OBJECTVALUE1 ,OBJECTVALUE2 ,OBJECTVALUE3 ,OBJECTVALUE4 ,PCTEXT
  from PSPCMTXT
 WHERE PCTEXT LIKE '%cleardropdownitem%'

In the above query  OBJECTVALUE  represents any one of the following:
1.component.
2.record.
3.field.
4.peoplecode event.

PCTEXT--Represents the actual text in the peoplecode for an event.

PeopleSoft : New features in PeopleTools 8.52


Records:
PSPCMTXT : Contains the read only version of all peoplecode listed in plain text.
PeopleCode API Reference
New Classes
SchemaLevel class
Search Framework classes, which include:
FacetFilter class
FacetNode class
SearchCategory class
SearchClusteringSpec class
SearchFactory class
SearchField class
SearchFieldCollection class
SearchFilter class
SearchGroupingSpec class
SearchQuery class
SearchQueryService class
SearchResult class
SearchResultCollection class
SearchSortingSpec class
SearchAuthnQueryFilter class
New Methods
Favorite collection, InsertFolderItem method
Chart class, SetExplodedSectorsArray method
File class, GetBase64StringFromBinary method
File class, WriteBase64StringToBinary method
IBInfo class, LoadRESTHeaders method
IntBroker class, GetURL method
Leaf class, GenABNMenuElementWithImage method
Message class, FirstCorrelation method
Message class, GetURIDocument method
Message class, GetURIResource method
Message class, SetContentString method
Message class, OverrideURIResource method
Node class, GenABNMenuElementWithImage method
OrgChart class, SetIMData method
OrgChart class, SetIMRecord method
OrgChart class, SetNodeDisplayData method
OrgChart class, SetNodeDisplayDataRecord method
OrgChart class, SetSchemaLevels method

New Properties
Favorite class, IsFolder property
Message class, HTTPMethod property
Message class, HTTPResponseCode property
Message class, InitializeConversationId property
Message class, SegmentContentTransfer property
Message class, SegmentContentType property
Message class, URIResourceIndex property
OrgChart class, ChartCurrentSchemaLevel property
OrgChart class, IMPresence property
OrgChart class, IMRefreshInterval property
OrgChart class, NodeProportion property
PeopleCode Language Reference
New Built-In Functions
DoModalX
DoModalXComponent
GenDynABNElement
MAddAttachment
ISOToDate
TransferModeless
Modified Built-In Functions
CleanAttachments – Now accepts an optional PreserveCaseHint parameter.
DateTimeValue – Now accepts date/time values in ISO 8601 format.
GenHTMLMenu – Now accepts two optional parameters: fldr_img_class_ID and element_label.
LoadABN – Now accepts three optional parameters: disp_relactions, fldr_img_class_ID, and
CREF_img_class_ID.

Functions No Longer Supported
 You will receive an error if you try to use them in your PeopleCode program:
IsDisconnectedClient
MSFGetNextNumber

Find Definition References
Application packages are now included among the definition types examined when you run the Find Definition References utility.  (earlier it was disabled)
Find In Utility
Select All and Deselect All buttons have been added to the user interface of the Find In utility that you
use to search for specific text strings in PeopleCode and SQL. 
Page Order Tab
The grid on the page order tab has a new Tab Order column. This column helps to clarify the difference between the tab order and the field ID. The column also makes the tab order more explicit by numbering the controls sequentially.
Partial Pagelet Refresh
PeopleTools  8.52  introduces partial pagelet refresh in component-based pagelets that you create in PeopleSoft Application Designer. Partial pagelet refresh enables the application—in response to a user action such as a search, a field value change, or a mouse click—to update pagelets in a different state without refreshing the entire page.
Homepage Pagelet Support
WorkCenter pages  now include support for homepage pagelets. A new field, Pagelet Type, enables you to select Homepage Pagelet as an option. You then can use a modal lookup page to select from any existing homepage pagelet in the portal registry. 
*      User Interface Improvements
Several user interface improvements debut in PeopleTools 8.52. The improvements include:   Pagelet area options. 
*      A drop-down list enables you to select from three options that apply to the WorkCenter page: Reload, Personalize, and Configure. A Home button enable you to refresh the WorkCenter page and return to the   Automatic pagelet sizing.
*      All open pagelets are sized automatically based on the available area in the pagelet frame. The open pages share the area and are sized equally.
Dashboards
Dashboards are similar to homepages; however, unlike homepages, you configure dashboards
separately from the Structure and Content page in the portal registry.
*      You can perform these tasks using the Manage Dashboards Pages page:  Create and manage new and existing dashboard pages.  Add pagelets to dashboards pages.  Manage dashboard page properties, such as content, layout, and security.

Charting Enhancements
Organization Chart Enhancements
Several enhancements to organizational charts in PeopleTools 8.52 make them more flexible, more accessible, and more useful. These enhancements include:  Zoom levels, or schemas, enable the user to select among views that display more nodes with less data or fewer nodes with less data. The zoom schemas incorporate the new node display templates to present different levels of detail. The new SchemaLevel class supports configuring schema levels.
Exploded Pie Charts
Two-dimensional and three-dimensional pie charts can be configured with exploded sectors. The new Chart class method SetExplodedSectorsArray defines which sectors are exploded and the degree of separation.

Mar 10, 2012

PeopleSoft : Differences between peopletools 8.51 and 8.52

1) Up to Peopletools 8.51, the application installation (e.g. HRMS, FSCM…) must be done in the exact same folder where the Peopletools have been installed, known as PS_HOME directory. Otherwise you were not able to load any data in a newly created database (through the database setup of FataMover, no option was appearing). It was quite confusing, expecially for new comers in the Peoplesoft world.

As of Peopletools 8.52, it has been changed. You can install the application where ever you want, and say to the Peopletools where it is through a new variable PS_APP_HOME. That’s not an environment variable, but rather has to be set within the Configuration Manager.

Mar 9, 2012

PeopleSoft : Interview Questions

I added some frequently asked questions on Interview Questions page.
click bellow link to view the page.
Click here

Mar 8, 2012

PeopleSoft : PIA(pure internent architecture)

*PIA is an N-tire architecture.
*It contain several components.
   1.web browser

   2.web server
  • Web Services : The Program installed on host that manages the web server.
  • Servlet Engine : The environment in which servlets run.
  • Java Servlets
  • PeopleSoft Servlets
    • Portal servlet : Handles all of the req and formating for the user accessing PeopleSoft through the PeopleSoft Portal.
    • Integration Gateway Servlet : Handles PeopleSoft-to-PeopleSoft messages,PeopleSoft to 3rd party messages and 3rd party to PeopleSoft messages.
    • Report Repository Servlet : Enables users to easily access and distribute the output of batch reports such as crystal and sqr.
  • Jolt : 
    • Is an application layer network protocol that runs over TCP.
    • Owned by BEA and was developed as the means for allowing Java applications to communicate with TUXEDO.
  • Oracle TUXEDO
    • It schedules PeopleSoft server process to perform the transactions.
    • At run time, all business logic executes in Tuxedo.
  3)Application Server :
  • Domains
  • Listeners
  • Handlers
  • Queues
  • Server Processes 


     3.