Tuesday, October 8, 2013

No Data Source for PeopleSoft Pivot Grid

I was trying to create  a Pivot Grid but  the Pivot Grid Wizard is showing "Invalid Value" for the Data Source.I researched over this and found a solution on Oracle Support.


Solution:

The data for the table PSPGDTYPE needs to be imported into the database. This can be achieved by importing the \DATA\pspgdtype.dat file.

Before proceeding, check that the table PSPGDTYPE is empty.

The following steps can accomplish this :

1. Create a datamover script named pspgdtype_custom.dms with the following :

SET INPUT pspgdtype.dat;
SET LOG pspgdtype.log;
SET NO TRACE;

IMPORT *;

2. Log in to Data Mover using a valid OPRID ('PS', 'VP1') and run the pspgdtype_custom.dms script

3. Re-Query the table PSPGDTYPE to ensure there is now 1 row.

4. Stop the Application Server domain(s), Process Scheduler domain(s), and PeopleSoft Internet Architecture instance(s).
5. Clear caches on Application Server domain(s), Process Scheduler domain(s), and PeopleSoft Internet Architecture instance(s) and restart.

6. Verify the issue is resolved.

PeopleSoft Connected Query

If you’ve been using PeopleSoft for any length of time, you know what a query is and possibly how to create a query.  There are many users that can quickly and easily create a basic query from a table or set of tables.
when you need to create a complex report that is not achievable through a simple query, a developer is required to either write an SQR with nested loops or create an application engine program with PeopleCode that produces structured data to be used with XML Publisher.

And this is where the Connected Query comes into play.  The connected Query is new in PeopleTools 8.5 and enables you to create a single XML file based on a set of queries with parent-child relationships.  This means you can create multiple queries which are very simple and join them together or “Connect” them to achieve the same results that you would by programming an SQR or Application Engine.  That’s pretty powerful in my opinion.
I will show you steps involved in creating a connected query.
First of all we need to create PS Queries which will work as a building block for PS Query.
After creating the PS Queries Navigate to :
Main Menu > Reporting Tools >Connected Query> Connected Query Quick Start.
Provide Name and Description of Connected Query. Click Next


 

Provide Parent Query Name. Click Next





Provide Child Query Name. Click Next



Now map the fields of Parent Query to Child Query.  Click Next





Click on Complete.



Use controls to add child/ sibling queries to child query as per requirement.




Click on Preview xml to see the output.


The following table lists the delivered Connected Query permission lists and roles.
Permission List
Role
Description
PTPT2700
Connected Query Developer
Provides full access to Connected Query applications.
PTPT2800
Connected Query User
Provides access to run, preview results, and schedule a connected query. User will not be able to modify existing or create new Connected Queries



Monday, October 7, 2013

XML Publisher - Brusting without Sub Directories

Today I got an issue about a xml publisher report where I was to create different pdf file for different invoice id.

I acheived this by simply brusting the report with Invoice Id.



When we brust the report system creates sub directories in file path and place the files in the sub directories.

In our case, A third party system was to pick files from designated location so sub directories were causing a concern.

To overcome this issue we analyzed the trace and found that PSXP_RPTDEFNMANAGER:Repotdefn is the app package which does all this.

We simply blanked out the &sSubDir variable and Added &sBrustvalue to the output file name so that each brusted file is having a unique name.


Wednesday, October 2, 2013

Embedded help on PS Pages

At times client want embedded help on Peoplesoft pages.

This can be achieved on Scroll/Grid page controls in below manner.

1. Access the page definition in Application Designer.
2. Open Properties box for grid/scroll by double click.
3. On the label tab, in Embedded help group box select Message Catalog Popup option.
4. Provide message set number and message number.
5. Save the page.







Delay People Code

At time we have a requirement of delaying processing for some time.

Below code piece can be used to set the delay.

This code delays processing for 5 seconds. 

method Delay 
   /+ &IBU as String, +/ 
   /+ &item as String +/ 
   Local string &BuExists; 
   Local datetime &current_time, &delay_time; 
   &current_time = %Datetime; 
   &delay_time = AddToDateTime(&current_time, 0, 0, 0, 0, 0, 5); 
   While True 
      If (%Datetime > &delay_time) Then 
         Break; 
      End-If; 
   End-While 
end-method; 

Tuesday, October 1, 2013

Disable paste for a page field

A colleague of mine recently had a requirement to place an email address field on a page, and then just below it a ‘confirm email address’ – however the user should not be permitted to copy and paste from the first field to the second, they should retype their email address.

We didn’t think that there was a way of disabling paste via PeopleCode, so resorted to JavaScript. The solution was actually quite straightforward in the end:

1) Place the two input fields on the page and connect them to the records you wish to save to, as usual.

2) Place an HTML Area on the page, making sure it’s beneath the other fields (both on this screen and the order tab).

3) Make the HTML Area contents static, and paste in the following:



4) Swap DERIVED_TEST_TEXT2 in the above code snippet for you Record/Field name (i.e. it’s the record name, then an underscore, then the fieldname. Look in View Source or Chrome Dev Tools/Firebug if you’re not sure.)

5) You might also want to make the alert message a little more user friendly too.

Courtsey - http://peoplesofttipster.com/

Adding a custom Object Owner Id

Object Owner Id plays a crucial role in determining who is the actual owner of an object.

For example, we clone a delivered record for our custom application. Now as we have cloned the record, this record will have the same object owner id as the delivered record. 

Once an object owner id is assigned it can not be reverted back.

So this gives a misleading information.

To avoid such situations, it is better to create a custom object owner id .

Now the question arises how do we do that.

So steps in creating a new object owner id are mentioned below.

Step1: open the field OBJECTOWNERID.
Step2: Add new translate value.
Step3: save the field.