Hi,
The below once is my code in application engine program.My requirement is to calculate the values based on salary and print in my state record after running using runcontroll page.
/*using state record in sql action in step 1*/
%Select (BANK_ID,BANK_SAL,BANK_HRA,BANK_TA,BANK_TOT)
SELECT *
FROM PS_RUN_CNTL_AETPC
WHERE OPRID=%OperatorId
AND RUN_CNTL_ID=%RUNCONTROL;
/* using peoplecode action in step 2*/
Local number &SAL, &HR, &TA, &TOT;
&SAL = EXO_AEAET.BANK_SAL.Value;
If RUN_CNTL_AETPC.RUN_CNTL_ID.Value = %OperatorId Then
If &SAL > 1000 Then
&HR = (1000 * 0.5);
&TA = (1000 * 0.2);
&TOT = (&HR + &TA);
Else
&HR = 100;
&TA = 200;
&TOT = 300;
End-If;
End-If;
EXO_AEAET.BANK_HRA.Value = &HR;
EXO_AEAET.BANK_TA.Value = &TA;
EXO_AEAET.BANK_TOT.Value = &TOT;
its nt wrking its throwing error.
error : GetField: Field 'RUN_CNTL_AETPC.RUN_CNTL_ID' not found in scroll level 0. (2,155) EXO_AE_PPL.MAIN.GBL.default.1900-01-01.Step02.OnExecute PCPC:111 Statement:2
| Title | Under | Posted on |
|---|---|---|
| MD5 - SHA checksum of a file. | PeopleSoft Technical | 02/07/2012 - 5:29am |
| nVision Tabular Report through PIA with prompts | PeopleSoft Technical | 02/02/2012 - 10:07pm |
| Can we create an AE to mass update Position - Jobcode data? | PeopleSoft Technical | 01/18/2012 - 3:11am |
| Pay Components on job data can be defaulted and setup based on the rules? | PeopleSoft Functional | 01/05/2012 - 4:58am |
Not sure what you are trying to do, but the below is not correct:
You can't do "SELECT *" to assign values to a state record.
your %Select fields should be what you are selecting back from the select statement.
Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog
I agree with lepa, as a thumb rule, Our SQL statment should have the same number of fields in same sequence as we have in %select construct.
Post new comment