abhi10aug's blog

Integration Broker Basic SetUp for PeopleTools 8.48

While browsing through various sites to find some information on IB, I found the following executable.
It is a nice tutorial on how to do basic setup for Integration Broker.

Just open the following link , save the exe and run it.

http://blogs.oracle.com/peopletools/gems/ibsetupws.exe

Traversing the Dept Security tree

We can use the connect by prior function provided by Oracle to traverse the Dept security Tree . Suppose an Organization has 7 levels in Dept tree i.e. 1 to 7 .
We want to traverse the dept tree from level 3 to level 6.
Also we know the deptid at the level 3 say 'LVL3-DPT' .

We can use the following SQL to traverse the whole tree (3-6) starting from 'LVL3-DPT'. Only child of 'LVL3-DPT' will be seen in sql output. The starting deptid has to be used with "START WITH " clause.

SELECT TR.TREE_NODE , TR.TREE_LEVEL_NUM        

FROM PSTREENODE TR

Generic Scroll PeopleCode

We always find it confusing to write code for Scrolls. Following is generic peoplecode which you can use for pages having parent child relationships (scrolls).

Just replace the record and field for respective level.

&rs_level0 = GetLevel0();

&level0fieldvalue = &rs_level0.(1).Level0_Record.Level0_field.Value ;

&row_level0 = &rs_level0.GetRow(1);
&rs_level1 = &row_level0.GetRowset(Scroll.Level1_Record);
For &J = 1 To &rs_level1.RowCount

   &level1fieldvalue = &rs_level1.GetRow(&J).Level1_Record.Level1_field.Value
   
   &row_level1 = &rs_level1.GetRow(&J);

Writing XLS file using SQR and PeopleCode

We can write a XLS file using PeopleCode and SQR. We will be simply writing a XLS file using HTML tags.
Below is the SQR code.

Let $filename='C:\PeopleSoft\PsftHRMS90\'||$Prcs_Process_Instance||'\Report'||$Prcs_Process_Instance||'.xls'
Open $filename  as 2 for-writing record=20000 status=#filestat2
<*start of  table *>
Write 2 from '<table border = 1>'

<*start of heading row*>
Write 2 from '<tr>'
<*heading cell tag, we can have multiple headings cells in a heading row*>
Write 2 from '<th>'
Write 2 from  $head
Write 2 from '</th>'
<*end of heading cell tag*>