Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

back to @Return

M SladicFeb 8 2018 — edited May 26 2018

I see that there were few questions about the use and issues with the @Return () in BRs back in 2014, but I haven't found an answer to my problem, so here it is:

Environment: we are on Hyperon Planning 11.1.2.4 patch 004 on SPARC Solaris 64x

Problem:

I have a BR that runs on Save from the form, and which in essence looks like this:

FIX (<sparse Dim1>, <sparse Dim2>, @Relative(<sparse Dim3>), <sparse Dim4>)

<dense Mbr1> (

     IF(<some acct2> == #missing)

          acct1 = #missing;

     ENDIF

     )

ENDFIX

This works fine, does exactly what I want it to do. But I got the request to display the message to the user if the IF statement evaluated to True (i.e., acct1 gets set to #missing). Since this IF() evaluates for each block and all accounts in it, the IF() could be True multiple times, but I want to display message only once. Therefore I did this:

VAR var1 = 0;

FIX (<sparse Dim1>, <sparse Dim2>, @Relative(<sparse Dim3>), <sparse Dim4>)

<dense Mbr1> (

     IF(<some acct2> == #missing)

          acct1 = #missing;

          var1 = 1;

     ENDIF

     )

ENDFIX

<dense Mbr1> (

     IF (var1 ==1)

          @RETURN(<message>, ERROR);

     ENDIF

)

Unfortunately, when I run this, even if the condition in the first (inner) IF() is false (i.e., acct2 <> #missing), the box comes up with the message form the @RETURN(). Also, in the Essbase log it reports terminated transactions, with error 1200076 (I think I got the correct number, can't verify right now).

Any suggestions why is this? I even tried to use dummy account instead of the "var1", but the same keeps happening. As if @Return() executes no matter the condition around it. Help?

Thanks,

Milos Sladic

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2018
Added on Feb 8 2018
3 comments
431 views