Skip to Content
author's profile photo Former Member
Former Member

This code works only in the debugger (UJKT)

All,

the following simple code works perfectly into UJKT.

It is used to calculate the GROSS SALES VALUE as result of SALES VOLUME x Single COST OF SALES of a PRODUCT( The product has no entity and no customer ) .

So in UJKT it works fine, no matter of the data region specified.

*XDIM_MEMBERSET ACCOUNT=<ALL>

*XDIM_MEMBERSET PRODUCT=<ALL>

*XDIM_MEMBERSET TIME=<ALL>

*XDIM_MEMBERSET ENTITY=<ALL>

[ACCOUNT].[#CoGS_Calc]=[ACCOUNT].[SalesVol]*([ACCOUNT].[CoGS],[ENTITY].[NONE_ENT],[CUSTOMER].[NONE_CUST])

*COMMIT

But when I try to trigger this code from an input schedule, it does NOTHING.

To be sure, I changed the data region of my input schedule, to be the same as the data region of UJKT.

The record ACCOUNT.COGS_CALC value is EMPTY when I do each trial, so there is no influence from any other data record. The ACCOUNT.SALESVOL has value and the ACCOUNT.COGS ( none, none) has value.

I am in NW 7.5 ( SP06).

Tnx, any reply much appreciated.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 13, 2012 at 01:26 PM

    Hi Walter,

    Did you try using *WHEN statement?

    Assuming that the script must record with same key as SalesVol:

    *XDIM_MEMBERSET ACCOUNT=SalesVol

    *WHEN ACCOUNT

    *IS *

    *REC(EXPRESSION= [ACCOUNT].[SalesVol]*([ACCOUNT].[CoGS],[ENTITY].[NONE_ENT],[CUSTOMER].[NONE_CUST]),ACCOUNT="CoGS_Calc")

    *ENDWHEN

    Regards,

    Lucas

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Walter,

      After additional analyses of your process I can recommend to split the calculations in two scripts:

      1. The default.lgf containing calculations for the particular data region (ENTITY and CUSTOMER). This script will do calculations assuming that ListPrice and COGs are already entered. It will be simple and fast.

      2. Separate script launched by DM by account manager after his input of ListPrice and COGs. This script will recalculate everything based on the scope directly set by account manager.

      Unfortunately if you want to combine both logics in one script then you will have to use *FOR to loop all ENTITY and CUSTOMER - extremely slow!

      B.R. Vadim

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.