PeopleCode Runtime Error - EvalDateConv

Starting from this post, we will try to grab some interesting errors thrown by the PeopleSoft application and understand the reason behind it. The first error code we will be analyzing as a part of this series is provided below:-

---------------------------
Message from webpage
---------------------------
Invalid parameter 1 for function EvalDateConv. (180,116) <Record>.<Field>.FieldChange  PCPC:751  Statement:3

The specified parameter is not correct for the function. It may be the wrong type of parameter (string, number, record.field, etc) or an invalid value in this context.

Review the program for errors.  If necessary, run a PeopleCode trace to determine the program that failed.  Alternatively, for functions defined within PeopleCode, check the function declaration to verify that they are correct.
---------------------------
OK  
---------------------------

Reason:-

"EvalDateConv" does not appear to be a PeopleSoft function. But, this is internally invoked, when we invoke built in functions like YEAR. We get this error when a NULL or invalid value is passed to the YEAR function.

A simple way to simulate this error would be

Local number &Nm_ct = 2;
Error Year(&Nm_ct);

or even passing a NULL value to the YEAR function. Check and correct the YEAR function. That would resolve this issue.


No comments:

Post a Comment