Search This Blog

Dynamic SQL Creation - A Shortcut

It is often seen in Payroll projects to create a run control page with company, business unit, department combination and the reports need to be run with any of the above combinations.

The way I have seen a lot of people doing is to create a dynamic SQL based on the parameter check. 

Which you can easily do with the DECODE function. 

The screenshot from a SQR program given below. You can use the same in SQL.


Will be a handy tip for beginners.

Tip of the day: %TruncateTable

One of my colleague was asking the other day why we have to use %TruncateTable instead of DELETE. The below pb line has the answer.
  • On all databases, the use of %TruncateTable causes an implicit commit.
  • The rows deleted by this command, and any other pending database updates, are all committed.
  • Execution is faster than either of the SQL statements.
To postpone the commit until subsequent database updates have been successfully completed, use the SQL statement DELETE FROM table_name or the statement IMPORT REPLACE WITH NULL instead of %TruncateTable(table_name).

PeopleSoft - Mobile Integration - A Trial

I was trying for this integration for few months. And a sample one is done today. Have to go with the advanced level now.

Pulled up the data using PSQuery and integrated using PHP. 

Few details below:

The sample PSQuery:


The backbone source XML:



Screenshot from Sony Xperia:


Screenshot from Samsung Galaxy Note 800:



The New 8.53 PeopleBooks

Have you checked out the new PeopleSoft Online Help (modified Peoplebooks).
 
 
The left hand navigation can make you a bit confused where you are currently and what to be selected next.
 
Hope the team will add appropraite navigation links for smoother navigation.

Good info on Temporary Tables

Temporary tables are used exclusively with Application Engine programs and are intended to provide parallel processing. The Application Engine programs may be executed online via CallAppEngine or invoked through the Process Scheduler.
 
Parallel or concurrent processing allows multiple instances of an Application Engine program to execute against the same tables while drastically reducing the risk for table contention.
 
Batch process performance can be improved by splitting the data to be processed into groups and simultaneously running multiple instances of the program to deal with different groups of data. For example, students could be processed by last name by splitting the group into multiple groups alphabetically.
 
If you have a program that uses a temporary table and it is invoked multiple times, that single temporary table could be used concurrently in multiple executions of the code.
 
This could create unpredictable results since the different instances of the code would be issuing Deletes, Inserts, and/or Updates unsynchronized with each other.
 
You could solve this problem by creating multiple temporary tables as a pool of tables. Each invocation of your program would have to allocate an unused temporary table, mark it as “in use” and release it back to the pool when you are through with it.
 
By using the Temporary Table record type definition, you are able to define a record and the PS Build process will build multiple uniquely named copies of your Temporary Table as a pool.
 
Additionally, PS does Temporary Table management for your Application Engine programs. You can code your program with supplied meta-SQL (%Table) so each execution of your Application Engine program will be given access to its own copy of the Temporary Table for its exclusive use. When the program ends, the table will be returned to the pool of Temporary Tables.
 
Temporary Table Pools
 
Online Pool
  •  Defined in PeopleTools Options by PS Admins. Our current setting is five (5).
  •  Used by Application Engine programs invoked by CallAppEngine.
Batch Pool
  •  Defined in Application Engine program properties. Properties that must be set include:
  •  Assign Temporary Tables to the Application Engine program (Temp Table tab)
  •  Set the Instance Count (Temp Table tab). The number entered here will dedicate the number of instances requested for the AE program.
  •  Set the Runtime option (Temp Table tab). This is the action the AE program will take if batch/dedicated tables cannot be allocated at runtime.
  •  Continue – the base table will be used instead (using Process Instance)
  •  Abort – program execution terminates.
  •  Set the Batch Only checkbox (Advanced tab). If the program will only be run in batch mode and not executed from the CallAppEngine() PeopleCode function, you should use this checkbox. Any dedicated temporary tables used for Batch Only programs do not have online instances created.
Important Notes
  •   Instance Count and the Batch Only checkbox should be set prior to building the record definition.
  •   If the temporary table was originally built with online instances (Batch Only checkbox is not checked) and then changed to “batch only”, online tables must be dropped manually.
 
Program Meta-SQL
 
A critical step in implementing parallel processing is to make sure that you’ve included all of the appropriate meta-SQL within the PeopleCode that your Application Engine program executes.
 
To reference a temp table (Online or Batch), you need to use:
 
%Table(record)
 
You can reference any table with %Table, but only those records defined as Temporary Tables get replaced by Application Engine with a numbered instance of a Temporary Table from the Temporary Table pool.
 
For batch/dedicated Temporary Tables, when Application Engine resolves any %Table, it checks an internal array to see if a Temporary Table instance has already been chosen for the current record. If so, then Application Engine substitutes the chosen table name. If there are no more batch/dedicated instances available, then Application Engine uses the base table instance by default (if the Runtime option Continue has been chosen). Regardless of whether %Table is in PeopleCode SQL or in an Application Engine SQL Action, the program uses the same physical SQL table.
 
For synchronous calls to Application Engine, an available instance number will be selected at random according to internal rules. Synchronous refers to using the CallAppEngine PeopleCode function; all other methods that you use to invoke Application Engine programs are asynchronous which means the page is not “frozen” while the program runs to completion.
 
Populate your Temporary Table Process Instance with the Process Instance
 
All temporary tables should be keyed by Process Instance as a general rule. Also, if you have opted to use the “Continue” runtime option when batch/dedicated tables can’t be assigned, Process Instance is required as a key field. The current Process Instance is automatically put into the State record, but when you Insert rows into your Temporary Tables you must supply that Process Instance.
 
%ProcessInstance or %Bind(PROCESS_INSTANCE)
 
This meta-SQL returns the numeric (unquoted) Process Instance. The %PROCESSINSTANCE meta-SQL is more efficient and faster than using the %Bind(PROCESS_INSTANCE).
 
Note: The Process Instance value is always zero for programs initiated with CallAppEngine. This is because the program called with CallAppEngine runs “in process”, that is, it runs within the same unit of work as the component with which it is associated.
 
Clear Temporary Tables (%TruncateTable)
 
You do not need to delete data from a Temporary Table manually. The Temporary Tables are truncated automatically at the end of processing. If the shared base table has been allocated because no batch/dedicated instances were available, then Application Engine performs a delete of rows by Process Instance instead of performing a truncate. In such a case, the PROCESS_INSTANCE is required as a high-level key.
 
You can perform additional deletes of Temporary Table results during the run, but you will need to include your own SQL Action that does a %TruncateTable.
 
Implementing Parallel Processing
 
There is no simple switch or checkbox that enables you to turn parallel processing on and off. To implement parallel processing, you need to complete a set of tasks in the order that they appear in the following list.
 
1. Define your Temporary Tables by defining and saving your Temporary Table records as type “Temporary Table”.
 
2. Set the Temporary Table Online pool. This will set the basic Temporary Table Online pool based on the PeopleTools Options specifications. (Note: This is done one time by the PS Admin group).
 
3. Assign Temporary Tables to your Application Engine program in its Program Properties, setting the appropriate number of Instance Counts and Runtime option.
 
4. Build/Rebuild your Temporary Table record. This will build the necessary Batch temporary tables into that record’s Temporary Table pool for use at execution time.
 
5. Code %Table meta-SQL as references to Temporary Tables in your Application Engine program, so that Application Engine can resolve table references to the assigned Temporary Table instance dynamically at runtime.

PeopleSoft Interaction Hub


I felt it like improved and robust (Old vine in a new stylish bottle).
 
The latest release value proposition has just been published for the PeopleSoft Interaction Hub (formerly Applications Portal). As you may know, we've moved this product to the Revision release model to bring updates and enhancements to our customers on a more timely basis. This also enbles us to align our Interaction Hub re...leases with the latest PeopleTools capabilities.
 
This RVP covers Release 9.1/Revision 2, and covers the following main features:
  • Rebranding and new Restricted Use License
  • New Style Sheet adoption
  • Red Paper facilitating Single Sign-on between the Hub and PeopleSoft Applications
  • Other User Experience enhancements

 
In particular, customers will find great value in the new Global Search used in the Hub. This enables a more search-centric navigation paradigm by allowing end users to access content via searches executed in Interaction Hub across all PeopleSoft applications.

The red paper will be welcomed by administrators charged with installing and setting up their Interaction Hub with their PeopleSoft applications.

The paper can be downloaded from My Oracle Support here. (requires login)

https://support.oracle.com/epmos/faces/DocumentDisplay?id=1523892.1
 
Contributed by a follower

Knowledge Nuggets


Wisdom of Crowd. It is always there. Only thing is that we have to utilize what's available.
 
This facebook page will be of good help to you.Just read along...
 
Have a great day ahead!

PeopleSoft 8.53 - Is almost here!

Before exploring the features of 8.52, there comes 8.53 version :)
 
Change is always good. And as far as I am concerned, look and feel matters and 8.53 comes with entirely new style sheet (Now have to explore how to customize this guy).
 
Toppings all over the place. Seems like the whole PeopleSoft is getting more and more interactive.
 
Related actions/contents enhanced at every release is improving that space. Context menu's using Red Glyph indicator, Actions drop down menu, SES search realted actions/drop downs,Related Content page level drop down...It's getting more and more interactive. Loving it!
 
For push button we have additional type other than Push Button and Hyperlink. The Action Widget. Let's see whether any wonders can be made from that.
 
PeopleTools is getting more and more better and higly configurable with less code (really?).
 
Pivot grids got a facelift. UI has improved a lot. Have to spend sometime this weekend to checkout the exisitng features beofre the new ones comes in.
 
Turn on/off modal windows at your will. You have some modeless windows too.
 
Excited for the releases which will happen every year now untill 2016, which will release the 8.56 version. Can't imagine the feratures that comes in those releases.

Get The File Names From A Folder

Ok, when some DOS gurus see this post, they might laugh. But for me, in one of the projects, this was a real life saver and a value add to the client.

So the tip - It is not the quantity of the code which creates value; but, how it is being used :)
Like the saying: Even a grass can be a good tool at the right time.

The command is this: DIR /B /ON *.* > MyMusicList.txt

The example here, is the requirement to get the list of the file names in my music folder, to share with a friend, so that he can select the ones he like.


So first I went to the root folder where I have kept all music collections.And then fired the command and gave a target file name.

Then I can see the file MyMusicList.txt generated under the same path where I have kept the music files, which has all the music file names exported.




Now the real power is not getting some music files. But how to use it for adding value to any application we work on.

What if there are files in the PeopleSoft file server that need to be accessible to the client online? There you go.

Archiving the data

I am not very much into the PeopleSoft data archiving part. 

But in the fast few months, while creating our own applications to sell, we had requirements to create archive tables for most of the app related online tables. And what we used to do it is to create app specific stand alone archiving process.

As you might know being a DBA geek, delivered archiving process is having a best practice in it. And it is not tough to use also. Only thing to fit our history tables into the archiving stack is to add the sub record - PSARCHIVE_SBR.

And then you can populate the values using PS Queries and can run a AE program to clean up the data. Everything can be beautifully configured and execute.

Sweet!

Recommended method.

PS_CUST_HOME

PeopleTools has been delivering significant changes to PS_HOME over the past several releases in order to provide a better, more secure organization for the PeopleSoft middle tiers. The improvements began with PS_CFG_HOME (Configuration Home), which was introduced in PeopleTools 8.50. With that release, domain configuration and log files were removed from PS_HOME, allowing us to make PS_HOME read-only. PS_APP_HOME (Application Home) was introduced in PeopleTools 8.52, providing the ability to separate application-specific code from PS_HOME, which helped clarify what must be evaluated at upgrade time.

PeopleTools 8.53 extends this approach to customizations through PS_CUST_HOME (Customization Home). By using PS_CUST_HOME for any customer-specific code, a clear distinction is made between code delivered by PeopleTools and PeopleSoft applications and that produced by individual customers. This change is optional; customers may continue to use a traditional PS_HOME if desired.

Source: PT853RVP Document