cancel
Showing results for 
Search instead for 
Did you mean: 

BPC Script Logic: Error Relational operator "==" is not supported.

0 Kudos

Hi All,

We are on CPMBPC release: 810 SP-level: 0011. The requirement is to read data in an Audittrail IN_IE and if no record exists on it, then copy the value on another auitdttrail IN_BPC to it.

Below is the script logic I am trying to use:

*XDIM_MEMBERSET GCR_AUDITTRAIL=IN_IE
*XDIM_MEMBERSET GCR_CATEGORY=Actual
*XDIM_MEMBERSET GCR_GC_CURR_CODE=USD
*XDIM_MEMBERSET GCR_FISC_PERIOD=%GCR_FISC_PERIOD_SET%
*XDIM_MEMBERSET GCR_MVT_TYP_CODE=300
*XDIM_MEMBERSET GCR_GRP_ACCNT_ID=15900
*WHEN GCR_GRP_ACCNT_ID
*IS *
*REC(EXPRESSION=%VALUE%==0 ? [GCR_AUDITTRAIL].[IN_BPC] : 0, GCR_AUDITTRAIL=IN_IE)
*ENDWHEN
*COMMIT

While executing the script the below error is thrown:

RUN_LOGIC:Relational operator "==" is not supported.

UJKT execution gave the below log:

REC :(%VALUE%==0) ? [GCR_AUDITTRAIL].[IN_BPC] : 0

------------ ABAP Code Generation Error:4 -------------

MESSAGEG27Relational operator "==" is not supported.

Line13 Word==

-------- Code ---------

program.

class main definition.

public section.

methods METH1 importing

P1 type decfloat34

P2 type decfloat34

exporting RET type decfloat34

raising CX_SY_ZERODIVIDE.

endclass.

class main implementation.

method METH1.

"(%VALUE%==0) ? [GCR_AUDITTRAIL].[IN_BPC] : 0

if ( P2 == 0 ) .

RET = P1.

else.

RET = 0.

endif.

endmethod.

endclass.

-------- Input formulas ---------

(%VALUE%==0) ? [GCR_AUDITTRAIL].[IN_BPC] : 0

------------ ABAP Code Generation Error Ends ------------

UJK_VALIDATION_EXCEPTION:Relational operator "==" is not supported.

Appreciate any help to resolve this

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Looks like you are using ABAP calculation engine for script logic. If you switch to Javascript engine the script will comple correctly.

But the logic of your script is incorrect in general - if there is no record then nothing to loop in when/endwhen. You have to loop records IN_BPC and test value in IN_IE.

0 Kudos

Thanks Vadim. Can you please let me know how to switch to the JavaScript engine.

Also how do I loop records in IN_BPC and test value in IN_IE. The %VALUE% will return the value in IN_BPC

former_member186338
Active Contributor
0 Kudos

Please spend at least 5 minutes to search and you will find how to switch to Javascript engine. Hint - in one of my blogs...

Instead of %VALUE% use

[GCR_AUDITTRAIL].[IN_IE]

0 Kudos

Got the blog. Thanks a lot Vadim.

Answers (0)