Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Groovy Script with RTP variables fails to launch

edited Nov 15, 2019 9:35PM in Planning 12 comments

Summary

Groovy Script with RTP variables fails to launch

Content

I am able to successfully validate and deploy the rule created with Groovy script having three (3) RTP variables.  However, when I try to launch the rule, it gives me the following error:

"Error:Unable to retrieve variable WhatYears deployed in application INV000 Rule INV000.InvPln.RM_TEMP_EDL"
 

Code Snippet

import java.util.TimeZone

/*RTPS:{WhatYears} {WhatScenario} {WhatVersion}*/

def varWhatYears = rtps.WhatYears.toString()
def varWhatScenario = rtps.WhatScenario.toString()
def varWhatVersion = rtps.WhatVersion.toString()

def tz = TimeZone.getTimeZone("America/Atlanta")
def currentDate = new Date().format("MM_dd_yyyy-HH:mm:ss",tz)
/***def timeCST = currentTimeMillis() + (3600000 * -6)***/
/***def timeEST = currentTimeMillis() + (3600000 * -5)***/

"""
SET CACHE HIGH;
SET UPDATECALC OFF;
SET AGGMISSG ON;

SET DATAEXPORTOPTIONS
{
DataExportLevel LEVEL0;
DataExportDynamicCalc ON;
DataExportRelationalFile ON;
DataExportOverwriteFile ON;
};

FIX(
   @RELATIVE("Total Legal Entity", 0)"No Entity"
    @RELATIVE("OEP_Total Entity", 0),
    @relative("STAT1", 0),@relative("P000_A", 0),"STAT6","STAT7","STAT8","STAT590",@relative("Exchange Rates", 0)
    @RELATIVE("Total Product", 0),
    @RELATIVE("All Sales Team", 0),
     {WhatYears},
    @REMOVE(@RELATIVE("Currency",0),"LOC"),
    {WhatScenario},
	{WhatVersion},
    @relative("YearTotal", 0)
   

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!