Author Archive
The advantages of the use of Application Package PeopleCode
Recently we had to make quite some customizations in Vanilla PeopleCode in the ePerformance module of HCM. In this case we decided to use an Application Package. We decided to put all our code for the modifications in a class. This worked out quite elegant.
We created a component object in the PostBuild PeopleCode of the Component.
Example:
import KP_EP_FUNCTIONS:BonusSheetCalc;
&oBonusSheetCalc = create KP_EP_FUNCTIONS:BonusSheetCalc(&sBonusStat);
In the private section we could put all the variables, which we would put normally as component variables. Example:
private
instance boolean &bBnsMtxChg;
instance boolean &bEditStat;
instance Rowset &rsBnsShtTgtDpt;
Then at every piece of PeopleCode where we need to use one of the methods, we only needed to put the declaration of the component object and all the defined methods and variables are then available:
Component object &oBonusSheetCalc;
&oBonusSheetCalc.SavePreChange(EP_APPR.PERIOD_BEGIN_DT, &PushButton);
There is a disadvantage though. If you are working in a project with several people, then only person can work on the Application Package at a time.
Release PeopleSoft 9.1 and PeopleTools 8.50: Effort to implement the Wow
As stated in an earlier blog post the new PeopleTools 8.50 really gives you a WOW.
And there are a lot of WOW’s. But do they come of the box or do you have to put a lot effort to get them available to the user when you are upgrading from an earlier version?
Here I’ll give an overview about what Oracle says about some of these, so you can get an idea.

A different way of creating workflow items within an Application Engine program.
When you want to create workflow items in an Application Engine program, you have to build a component, that will generate the workflow items. In the Application Engine program you will use a component interface to make use of the component.
Often when you have to loop through data and update data using a component interface in an Application Engine program, you will create a loop and within the loop you will perform a component interface “get” for every item you want to update or you want create a workflow item for.
We tried out a different approach, where we created a component with a grid, in which we loaded all the items where we wanted to create a workflow item for. So we needed to open the component interface only once. In the Application Engine we looped through the buffer and performed a save for every record in the grid:
&oSession = GetSession();
&oSession.Connect(1, “EXISTING”, “”, “”, 0);
&oKpBotsWfCi = &oSession.GetCompIntfc(CompIntfc.KP_BOTS_WF_CI);
If &oKpBotsWfCi = Null Then
Error MsgGet(30520, 2, “Bericht niet gevonden”);
End-If;
If Not &oKpBotsWfCi.Get() Then
Error MsgGet(30520, 3, “Bericht niet gevonden”);
End-If;
&oKpBotsWfVwCollection = &oKpBotsWfCi.KP_BOTS_WF_VW;
For &i = 1 To &oKpBotsWfVwCollection.Count;
If Not &oKpBotsWfCi.Save() Then;
Error MsgGet(30520, 5, “Bericht niet gevonden”, &oKpBotsWfCi.EMPLID);
End-If;
End-For;
In the component code we put PeopleCode so that at every save action, a workflow item was created for next record in the grid. To be a able to do that, we defined a component integer variable, a counter, where we kept track of the recordnumber in the grid.
In the SavePreChange PeopleCode we copied the data needed for the workflowitem to a work record on level 0 of the component buffer. Also there we incremented the counter.
Component integer &iCount;
Local Rowset &rsBots;
Local Record &rcBots;
&rsBots = GetLevel0()(1).GetRowset(Scroll.KP_BOTS_WF_VW);
&rcBots = &rsBots(&iCount).GetRecord(Record.KP_BOTS_WF_VW);
/* Fields containing input for creating workflowitems */
KP_BOTS_DERIVED.EMPLID.Value = &rcBots.EMPLID.Value;
KP_BOTS_DERIVED.KP_BOTS_ID_NBR.Value = &rcBots.KP_BOTS_ID_NBR.Value;
&iCount = &iCount + 1;
In the component workflow event we put the code to generate the workflow, which was based on the values of the fields from the work record on level 0 of the component.