Showing posts with label steps to implement Component Interface in peoplesoft. Show all posts
Showing posts with label steps to implement Component Interface in peoplesoft. Show all posts

Creating a new instance in Component Interface

Creating a new instance in Component Interface
The first job is to get a Component interface(CI) ,using GetCompIntfcfunction. This CI definition has already been created in the application designer.
Then the "Create Keys" are set,these are values which uniquely identifies each row of data.If any duplicate set of create key values occur,a runtime error occurs. After keying in the key values,the create method is used to populate the CI with the key values.This creates an instance of data.
Next the remaining fields of the row are entered.
Once all the values have been entered the new instance of data is saved.

Local ApiObject &MYSESSION;
Local ApiObject &CR;

&MYSESSION= %Session;
&CR=&MYSESSION.GetCompIntfc(CompIntfc.CR_EMP_CI);
&CR.CR_EMP_ID = "101";

&CR.Create();
&CR.CR_FIRSTNAME="Chinnu";
&CR.CR_LASTNAME="Raavi";
&CR.CR_MARITAL_STATUS = "M";
&CR.CR_PHONE_NO = "1234567890";

&CR.save();

How to Implement Component Interface in peoplesoft

How to Implement Component Interface in peoplesoft
General points to implement Component Interface and understand the component/page structure.

1) create the component interface.

2) always accept the default loading fields structure.

3) remove the unwanted fields from CI.

4) provide necessary access to CI – permissionlist.

5) test your CI, if any update/insert you do CI returns 1 if it success and ˜0 for failed.

6) arrange the fields as per the page design/ tab order.

7) set get history items to true.

8) Set interactive mode to true. Note this setting affect the performance. It should be used only for testing purpose.

9) pass the key field values.

10) Check the prompts if dynamic prompts are being used on the page. if yes make sure to check the values against these tables.

11) check if any prompts are being used on the page.

12) Put a validation for prompts before passing to CI. Most of the cases we may receive invalid values in prompt.

13) log into error tables if any invalid prompt values found.

14) at child level > set the collection properties insertitem/item.

15) If collection item count is more than one then set to insertitem else item. for first row always property as item .

16) Insert item > just like clicking on + button.

17) enable the save and cancel methods.

18) Do not use save/cancel methods inside the loop. It may lead failure of your program.

19) Always use rowset/arrays for looping the rows, avoid using createsql’s .

20) Always set ignore property (if any error found it will skip that row and process the next row).

21) Set Commit at the end of the step and inside the save method.

22) make sure your CI session is active.

23) finally test your CI thru App Designer.