Monday, August 29th, 2011

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.

 Viewed 5957 times by 1733 visitors


Category: Technical
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses (last comment shown first)

August 30, 2011
Rob van Steensel
avatar

Andrew

Good to mention this!
We considered this also as an option since there is a delivered class for ePerformance, but decided for several reasons not to extend the ePerformance class. But it is indeed a good option alos.

[Reply to this comment]


August 29, 2011
Andrew
avatar

And also you can extend delivered classes sometimes. It is a little difficult when Oracle places a lot of code in the private section. For example the XML Publisher classes – they’re not really designed well for extending the class.

[Reply to this comment]