New Error

[}:)] Hi Developers, Have you ever had an error from CAL compiler. Error: Please reduce the Expression to make it more Simple. This appears when I try to pass parameters to a function with more than 16 paramters. Is there any restriction on the number of parameters that can be defined for a function.

i don’t know for sure the restrictions, but as you mentioned i assume only 16 parameters can be passed. To make it easier to read i use temporary tables, fill the fields wit the required values and pass only the single record. But then a good documenation is necessary. Hence i always create a documentation-header to every function and explain the used fields of the temporary table and its contents

I have come across that error. It seems that if you assign the return value of a function to a variable, you will be limited to 16 parameters only, Howerever a direct function call seems to allow more parameters. I think the way round this is passing arrays as parameters, I haven’t had the chance to try it out. Wallyshe

Hi Walter, You are right, the problem is I need to have 18 arrays being calculated in Manufacturing 3.10A as our customer wants to add more elements to the costing on the Inventory Posting. they need to have at least 5 more different types of cost to be allocated to an Posting on the Output journal. Currently the function is already using 13 parameters. Anyway I have managed to solve the problem by adding a similar function and create the values in the rest of the arrays.

Hi, I faced the same error while running the nested loop upto 6 level. To overcome the problem I had changed the logic to do the same operation.