Showing posts with label PeopleSoft. Show all posts
Showing posts with label PeopleSoft. Show all posts

How to read a field from a CSV file in to a PeopleSoft record (not in order) using File Layout

How to read a field from a CSV file in to a PeopleSoft record (not in order) using File Layout
If you want to read a csv file to PeopleSoft record in a sequential order you can use the following code to do that.
Local File &MYFILE;
Local Record &REC;
Local array of string &ARRAY;
Local string &STRING

&MYFILE = GetFile("c:\temp\vendor.csv", "R", %FilePath_Absolute);
&REC = CreateRecord(RECORD.MY_TEST_RECORD);
&ARRAY = CreateArrayRept("", 0);

If &MYFILE.IsOpen Then
   If &MYFILE.SetFileLayout(FILELAYOUT.MY_TEST_FILELAYOUT) Then
      While &MYFILE.ReadLine(&STRING);
         &ARRAY = Split(&STRING, ",");
         For &I = 1 To &REC.FieldCount
            &REC.GetField(&I).Value = &ARRAY[&I];
         End-For;
      /* do additional processing here for converting values */
         &REC.Insert();
      End-While;
   Else
      /* do error processing - filelayout not correct */
   End-If;
Else
   /* do error processing - file not open */
End-If;

&MYFILE.Close();

However, let's assume that you want to read a particular field or few fields from a CSV file to a PeopleSoft record. Then you can use another version of the above code. Here we can use an array object to store all the fields from the CSV and then you can use array index to find the particular field you are looking. Then, you can use SQLExec to insert or update that PS record you want.
Local File &MYFILE;
Local Record &REC;
Local array of string &ARRAY;
Local string &STRING
Local string &2ndFieldFromCSV

&MYFILE = GetFile("c:\temp\vendor.csv", "R", %FilePath_Absolute);
&REC = CreateRecord(RECORD.MY_TEST_RECORD);
&ARRAY = CreateArrayRept("", 0);

If &MYFILE.IsOpen Then
   If &MYFILE.SetFileLayout(FILELAYOUT.MY_TEST_FILELAYOUT) Then
      While &MYFILE.ReadLine(&STRING);
         &ARRAY = Split(&STRING, ",");
   /* lets assume that you want 2nd field from the csv file*/
          &2ndFieldFromCSV = &ARRAY[2];

      /* do additional processing here insert, update etc.. */
         SQLExec("UPDATE PS_MY_TABLE SET FIELD2 = &2ndFieldFromCSV WHERE PK_FIELD1 = 'SOME VALUE') ;
      End-While;
   Else
      /* do error processing - filelayout not correct */
   End-If;
Else
   /* do error processing - file not open */
End-If;

&MYFILE.Close();

Obviously, there are many ways to do the same thing in many different ways. But, leaveraging PeopleSoft File Layouts do the job will be much easier.


Become Awsome in PeopleSoft with these PeopleSoft Books

If you want to become awesome in PeopleSoft and want to take your PeopleSoft skills to the next level grab these awesome PeopleSoft books from PeopleSoft Tutorial.
Simply follow the links below;
  • PEOPLESOFT UPDATE MANAGER Buy Now
  • CREATE PEOPLESOFT REMOTE LAB Buy Now

How to Improve Interpersonal Skils in PeopleSoft Project Management

Whether you are a seasoned PeopleSoft Developer or Guru, or even an expert in PeopleSoft suite of technologies you have to deal with People all the time. Having good knowledge and understanding of stakeholders around you is inevitable in order to gain trust, mutual understanding and ultimately to achieve success in your PeopleSoft project. Here I'm going to list some of the most common interpersonal skills that you may need to enhance in your PeopleSoft career. This is a very short list so feel free to add any thoughts as a comment so that other visitors of this blog can get a value from it.

Interpersonal Skills in (PeopleSoft) Project Management [1]

Well developed technical, interpersonal and conceptual skills help to analyses the situation and interact appropriately.



1. Leadership

Leadership is an ability get things done through others. Respect and trust are the key elements of effective leadership. This is critical in beginning of the project which use to emphasis and communicate the vision and motivating and inspiring project participants to achieve high performance.

2. Team Building

Team building is the result of good leadership and team building is teamwork.

3. Motivation

Overall success of the project depends on the project team's commitment, which is directly related to motivation. Motivational factors in a project/team environment.
  • Self-satisfaction
  • Job satisfaction
  • Challenging work
  • A sense of accomplishment
  • Achievement and growth
  • Money
  • Other rewards and recognition

4. Communication

Single biggest reason for project success and failure. Effective communication and Openness in communication is a gateway to teamwork and high performance. It improves relationships among team members and create mutual trust.
Effective communication involves awareness of communication style, parties, cultural issues, relationships, personalities, and overall context of the situation.
Active and Effective Listening is a big part in good communication.

5. Influencing

According to [2] influencing is the power to change or affect someone or something. In project management Influencing is important to get things done through others in positive manner.

6. Decision Making

Six-Phase Decision making model

7. Political and Cultural Awareness

8. Negotiation

A successful negotiation may include;
  • Analyse the situation
  • Identify Difference between wants and needs - both their and yours
  • Focus on interests and issues
  • Ask for high and offer low but realistic
  • When you make and concession, act if you yield something
  • Make both parties feel they have won, Win-Win negotiation.
  • Active listening and articulating

References

[1] http://www.merriam-webster.com/dictionary/influence

[2]


Where to find www.pscustomizer.com web site

Where to find www.pscustomizer.com web site
http://www.pscustomizer.com/ is a very useful PeopleSoft web site with lot of useful information. One of my favourite is the page page which lists most of the frequently used PeopleTools meta tables. Somehow this web site is no longer be found on the internet (may be they are revamping the site :-) ).
So, if someone wants to access the web site particularly PeopleTools meta table page you can find a cached copy of this web site from this link 

What is PeopleSoft Web Profile

The PeopleSoft web profile contains numerous settings or configuration properties required by the PeopleSoft Internet Architecture running on the web server.

Warning: Modifying of web profile must be handled carefully and with thorough understanding of the web profile configurations. This is a system admin task and modifying web profile properties will affect the web server configurations in your PeopleSoft system.

Following web profiles are delivered within PeopleTools;
  • DEV - The DEV web profile provides basic portal functionality for development, including trace and debug settings that are appropriate for development.
  • TEST - The TEST web profile uses the same settings as the DEV web profile, except that fewer trace and debug properties are enabled.
  • PROD - The PROD web profile uses the settings that are most commonly needed in a production environment that authenticates users.
  • KIOSK - The KIOSK web profile uses the same settings as the PROD web profile, except that public user access is enabled for the Guest user, and all options for storing caching or persistent cookies on the browser are disabled.
To find the web profile in your PeopleSoft system, Navigate to PeopleTools > Web Profile > Web Profile Configuration (Component name: WEB_PROFILE)

Specifying an Initial Web Profile

When your PeopleSoft administrator performs the PeopleSoft Internet Architecture setup procedure for your system he must be specified which web profile will be applied to the portal.
here is an example where you specify web profile in PIA installation.

Pages Used to Configure Web Profiles

How to check PeopleSoft Integration Gateway or Default Node is active

Integration Broker is one of the most important tools in PeopleSoft system which enables us to perform asynchronous and synchronous messaging among internal systems and third-party systems. Integration Broker is a middleware technology and it can;
  • Performs asynchronous and synchronous messaging among internal systems and third-party systems.
  • Exposes PeopleSoft business logic as web services to PeopleSoft and third-party systems.
  • Consumes and invokes web services from third-party and PeopleSoft systems.
PeopleSoft Integration Broker consists of two subsystems: the integration gateway and the integration engine. Main difference between integration gateway and integration engine is that the integration gateway resides on a PeopleSoft web server, and the integration engine is installed on an application server as part of the PeopleSoft application.
This post we will look at how to check that your Integration Gateway and Integration Engine is active. 
For more information on Integration Broker technology please look 

Check Integration Gateway Status

Here we are going to check the status of the integration gateway (which is reside in the web server). 
Login to your PeopleSoft Application and Navigate to Main Menu > PeopleTools > Integration Broker > Configuration > Gateway


Click on the Ping Gateway button to see if the Integration Gateway is up and running. If the gateway is up and running you will see a window a below

Check Default Node Status

In order to enable communication between web server and application server (for inbound traffic) we need to find the default local node of our PeopleSoft Application.
Navigate to PeopleTools > Integration Broker > Integration Setup > Nodes
On the search page, click on the search button to query all the nodes. After that click on the Default
Local Node header of the result grid. The default local node (e.g. PSFT_HR) will now be shown as follows. Then select the default node.


Now that you know the default local node of your Integration Broker. Now Navigate to PeopleTools > Integration Broker > Configuration > Gateway. Then, Click on the link Gateway Setup Properties. In the next screen you have to provide User ID and Password (Please contact your PeopleSoft system administrator if you do not know the User ID and Password).
After you successfully enter the integration gateway security credentials, the PeopleSoft Node Configuration page appears.


Click on Ping Node button for your default local node. If successful the following screen will appear. which means the Integration Gateway can now successfully communicate with the application server.

why these checks are important

This might be useful when you are working with integration broker and if you want to check that gateway and node are active. As an example if you are working with web services and when you want to troubleshoot something then you might want to see whether these component are active in your system.

Quick Introduction to PeopleSoft Web Services

Introduction 

Web Services are getting popular day by day and as developers we are constantly getting requirements to intergrate our PeopleSoft application with thrid-party system to interchange data between systems. In fact PeopleSoft system delivers web services so that we can leverage those web services, extend or create our own web services esaily within our PeopleSoft system. Some examples of PeopleSoft delivered web services are (in Campus Solutions) , List of Values WS, AAWS (Admission Applications Web Services). In addition to the conventional SOAP based web services PeopleSoft now facilitate to develop RESTful web services using PeopleSoft Intergreation Broker.

Web Service Overview

A web service provides external applications a web-services-based means of accessing PeopleSoft data. Web services are implemented through the PeopleTools Integration Broker (IB) framework. The Integration Gateway web application receives all the web service requests and forwards them to the Integration Engine (application server) for processing.

Following process occurs when you use web service with a client application

1. The client application invokes one of the service operations from the API (application programming interface) published by PeopleSoft application.

For example in in Campus Solutions, Admission Applications Web Service contains the following web service operations
  • SAD_ADMISSIONS – Main Admissions Web Service
    • SAD_CREATEAPPL: Create Application
    • SAD_GETAPPL: Find Application
    • SAD_GETAPPLS: Find Applications
    • SAD_SAVEAPPL: Save Application (for later modification or submission)
    • SAD_SUBMITAPPL: Submit Application
    • SAD_GETATTACH: Get Attachment
The service operation SAD_CREATEAPPL is shown below;

2. PeopleSoft Integration Broker receives the service operation request and validates the WS security credentials.

Web services security (WS-Security) is implemented on the integration gateway for inbound and outbound integrations with third-party systems. WS-Security adds a layer of security to sending and receiving service operations by adding a UsernameToken that identifies the sender and authenticates its identity to the web service provider. On inbound processing, PeopleSoft Integration Broker can process requests received from integration partners that contain WS-Security UsernameToken and passwords in the SOAP (Simple Object Access Protocol ) header of the inbound SOAP request. The user name and password should be encrypted via PKI (public key infrastructure).

Some web service operations require a user ID and password. If a user ID and password are not supplied in the SOAP header, Integration Broker rejects the request.
If the request is received from another PeopleSoft system, the user ID associated with the requesting PeopleSoft node is used when the SOAP header does not specify a user name.
When a request is received, PeopleSoft Integration Broker validates the user ID and password in the SOAP header to determine whether the user has the proper security to invoke the service operation requested.

Generally you implement WS security in PeopleSoft via Permission Lists.
in the above screen shot the permission list HCSPSERVICE gives full access to the individual service operations in the SAD_ADMISSIONS WS.
Depending on the requirements, in the service operation level you can specify authentication mechanism so that users who has proper privileges can access to your service operations.

3. The request is passed to Application Server for processing. The Application Server authenticates the service operation and routes it to the respective handler. The handler executes the PeopleCode and sends the response to Integration Gateway.

Handler is basically a application class which has your PeopleCode logic (or business logic) to execute when the service operation is called. handlers can be define in the Handler section in the service operation as follows;

4. Integration Broker sends the response to the client application.

Client application who invoke WS will get XML response message (SOAP based WS). Sometimes client application may get error response messages so that clients can correct and resubmit the WS.
Client application then process this XML response message and present in their Front-end application in a suitable format.

How to determine the time taken to execute your PeopleCode program

Sometime you may have noticed that your PeopleSoft application takes long time to execute and you might get tired of looking at the spinning wheel and thinking of what is going on behind the scenes. This type of performance issues will arise due to many reasons. One reason may be your PeopleCode program logic is not optimised enough so that it takes long time to execute. If you can determine how much time (in other terms algorithmic efficiency) taken to execute your particular program then most probably you can improve you code so that it will reduce processing time of your PeopleCode program. Lets have a look how you can achieve this.
  • You can use the %PerfTime system variable for determining elapsed time. %PerfTime retrieves the local system clock time (of the application server) by making a system call, and the return time is down to the millisecond. Look at the following simple example where you can determine time taken for the particular PeopleCode program segment.
&Start = ​%PerfTime;
   &results = "";
   For &I = 1 To &Count;
      &GnnwgNumber = GetNextNumberWithGapsCommit(QEORDER_DTL.QE_QTY, 999999, 1,⇒
 "where QE_ORDER_NBR='GNNWG'");
      &results = &results | " : " | &GnnwgNumber;
   End-For;
   
   &End = ​%PerfTime;
   &out = "Count = " | &Count | ", total GNNWG time (s) = " | NumberToString⇒
("%6.3", Value(&End - &Start));

PeopleSoft recommends using %PerfTime when measuring performance time for a specific PeopleCode program. This can enable developers to evaluate which coding logic has better performance time.

  • Another option is you can run PeopleSoft SignOn Trace. To get the SignOn tracing options (the signon URL includes the trace directive) In the address bar you can type "http://server:port/psp/ps/?cmd=login&trace=Y". This will show you a page like this. From this page you can specify PeopleCode trace settings. Select Each Statement from Peoplecode Trace Setting and get the trace file generated on your app server. In this trace file you can get the timestamp for each statement in the PeopleCode.