Function OBJV( ) error
I try to call a FM from integrated planning. I get the following error message:
Formula error: Type 0COSTELMNT is not allowed for the function
Syntax error in row 7, column 13
DATA COSTELMNT TYPE 0COSTELMNT. DATA RATE TYPE F. DATA AMOUNT TYPE KEYFIGURE_NAME. FOREACH COSTELMNT, AMOUNT . COSTELMNT = OBJV( ). CALL FUNCTION Z_PLANNING_CALC_VALUES EXPORTING CALYEAR AMOUNT IMPORTING E_RATE = RATE.
Objv() function is used for the characteristic that is not selected as fields to be changed. Your code reads the value of the costelement from variable COSTELMNT in the foreach statement and also from objv() . I think you should remove the line COSTELMNT = OBJV( ) in order to run the code with no syntax errors.