This is more specific to Student Award Entry Component. Recently, I have a requirement to automate the cancellation of award in the Award Entry page (PeopleSoft Student Administration: Financial Aid). The approach was to make a Component Interface and run it thru App Engine as batch process. In the page there are 4 buttons and 2 of these buttons should be click to validate and post data in the database. I created a new custom methods in my CI and put the peoplecode behind the button so that I can just call these methods in my AppEngine, but I encountered an error while running my program. I learned that I can't use RemoteCall inside the CI method. So after several trial and error, I came up with the solution to separate the remotecall from other codes and put it on the AppEngine PeopleCode. The AppEngine/CI Peoplecode looks like these;
Function Validate()
commitwork();
RemoteCall(call validateCOBOL program.......);
End-Function;
Function Post()
commitwork();
RemoteCall(call postCOBOL program.......);
End-Function;
try
&ci = &session.GetCompIntfc(CompIntfc.yourCI);
.
.
.
&ci.PreValidate(); /*my custom CI method contains code to validate before RemoteCall*/
Validate();
&ci.PostValidate(); /*my custom CI method contains code to validate after RemoteCall*/
&ci.PrePost(); /*my custom CI method contains code to post before RemoteCall*/
Post();
&ci.Posted(); /*my custom CI method contains code to post after RemoteCall*/
.
.
.
end-try;
4 comments:
Hi Jeff,
Thank you for the wonderful solution. Could you please share the code?
Thanks.
pang
panghsiang@gmail.com
The code shown above will be your AppEngine PeopleCode codes. I forgot to mention that you need to create two or four methods (two if you are just using 2 buttons of the page) in your component interface object. Copy the fieldchange peoplecode of that buttons and transfer it to the newly created method in your CI. Sorry, I'm afraid I can't post my code due to confidentiality. Hope you understand. Thanks!
Currently attempt generates an Excel file from an engine application, I ejcutao only two lines of code:
&oWorkApp = CreateObject("COM", "Excel.Application");
&oWorkApp.DisplayAlerts = "False";
I get the error:
Error de automatización OLE en Excel.Application.DisplayAlerts: ObjectSetProperty: No se puede asignar la propiedad DisplayAlerts de la clase Application.. (180,161) REPRIES.MAIN.GBL.default.1900-01-01.Step01.OnExecute PCPC:396 Statement:5
Please tell me that I need to run my process
hi pang ,can you please share the code
Post a Comment