cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax for TREX commands used in key figure calculation definitions

Former Member
0 Kudos

Is there a good document describing the syntax and functions available for writing TREX commands used in key figure calculation definitions?

Thanks for any advice on this...

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi everyone,

You should find this HANA documentation quite useful - most if not all of the TREX commands are identical.


http://help.sap.com/saphelp_hanaplatform/helpdata/en/d7/70825bbb5710148ca7cd47cb086923/content.htm?f...

If you have any trouble with the link, just copy it and paste directly into Internet Explorer.

Regards, Mike

former_member217157
Active Participant
0 Kudos

Hi Bob,

S&OP supports all SAP TREX expressions. Unfortunately the TREX expressions wiki is not available externally.If you are SAP internal, you can access the TREX wiki for a list of supported TREX expressions that can be used in calculation expressions;

http://trexweb.wdf.sap.corp:1080/wiki/index.php/TrexExpressions

In general, the following are commonly used in configuration :

Operators :  +      -     *      /      >      <       =        > =     <=

Conditions : IF    ISNULL    ABS    OR      AND  NOT

Aggregation: SUM, AVG, MIN, MAX

There are plenty of examples in SAP delivered SAPMODEL1 which are sufficient for most projects.

We will document these and more  in detail in the Model Help section.

Hope this helps.

Thanks,

Raghav

vikas_ohri2
Explorer
0 Kudos

Thanks Raghav.

HANA supports native low level language so code can be written directly in L which is part of LLVM  http://www.llvm.org/docs/

Former Member
0 Kudos

Hi Raghav,

Is it now possible for SAP external to have access to the TREX supported expressions ? A customer wanted to know what Operators/Conditions are supported and I really did not know what to tell him.

Thanks

Kenneth

Former Member
0 Kudos

Hi Raghav,

Does TREX support excel STDEV, NORMSINV, SQRT and MROUND function? If yes, can you provide sample syntax for the same.

Regards,

Aditya G

0 Kudos

Hi Raghav,

it would like to have a documentation about the expressions on s&op help center as well. I'm SAP external as well and I would be helpful knowing the options which I have during calculation.

Regards,

Christine

Former Member
0 Kudos

Hi Raghav,

Thank you for your kindly information.

I'm extarnal too.

If we can use command increases from below at IBP5.0, please tell us.

-----------------------------------

In general, the following are commonly used in configuration :

Operators :  +      -     *      /      >      <       =        > =     <=

Conditions : IF    ISNULL    ABS    OR      AND  NOT

Aggregation: SUM, AVG, MIN, MAX

Best Regards,

Masao

Former Member
0 Kudos

Hi Masao,

These are the "commonly used" operators - there are many more available.

Please refer to my other message in this blog.

Regards, Mike

0 Kudos

Is there any hep now available on this topic in Model Help. I did not find any though

0 Kudos

I did not find the command list . the posted link in the blog did not work

http://help.sap.com/saphelp_hanaplatform/helpdata/en/d7/70825bbb5710148ca7cd47cb086923/content.htm?f...

Can someone point me to correct Help link for TREX command list ?

vikas_ohri2
Explorer
0 Kudos

Are you referring to LScript/LCODE ? ....S&OP Key Figure calculation can be defined as LScript.

Former Member
0 Kudos

Vikas - TREX is the 'standard language' S&OP uses in the Key Figure text box (so, different from L Script). I think Bob is asking for syntax documentation on the 'standard language'. I too would be interested in reading said documentation.

Example calling an attribute value (with spaces between single quotes to illustrate distinction from a double quote mark):  

PRODID = ' '123' '


I think to call the current time period you use something like this: $$PERIODIDCU$$



Former Member
0 Kudos

Yes, I'm interested in the syntax documentation on the 'standard language' (TREX), rather than the L Script language.