One common process in PeopleSoft is to call an App Engine program from PeopleCode. This may be as simple as calling the App Engine from PeopleCode when the page is saved or on a field change event. If you don’t know what an app engine is you may want to learn more about that before using this code.
The following code calls the Application Engine program named YOURAPPENGINEPROGRAM, and passes it the necessary initialization values.
&MYRECORD; = CreateRecord(RECORD.MY_INIT_VALUES);
&MYRECORD.FIELD1.Value; = "123abc"; /* here you are setting the initial values */
This code is pretty straight forward and it should be easy to get you started calling an App Engine from PeopleCode.