Product Lifecycle Management Blogs by Members
Get insider knowledge about product lifecycle management software from SAP. Tap into insights and real-world experiences with community member blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Depending on the Check Data Type of a variable limit check, only functions that align with the specified Check Data Type may be used. (Un)Available functions depending on Check Data Type listed below:

  • Emission
    • Unavailable functions (GetConsumParam, GetConsumValue, GetMeasurement, GetMeasurementByTime)
    • Available function(s) (GetEmissionValue)
  • Measurement
    • Unavailable functions (GetConsumParam, GetConsumValue, GetEmissionValue)
    • Available function(s) (GetMeasurement, GetMeasurementByTime)
  • Consumption
    • Unavailable functions (GetEmissionValue, GetMeasurement, GetMeasurementByTime)
    • Available function(s) (GetConsumParam, GetConsumValue)

*Note* There are other functions that are unavailable with variable limit checks but the focus of this post is to highlight functions that are (un)available based on the Check Data Type.

Example: for a variable limit check that is pulling a Measurement value from a Emission limit, the check will error if the below GetMeasurement function is used in the limit script, even though the function is technically correct.

Hours = GetMeasurement( Mat_Line, Op_Minutes, DATEFR , DATETO , "min");



Work-around: for a variable emission check, a way to bring in a measurement or consumption value is to trigger an emission off that measurement and/or consumption. See example code:

*Note: Operating Hours is a consumption value that also triggers an emission of Operating Hours*

Code:

FAC_ID = GetTechInfo( E,"DOMAIN_ID");

HRS_ID = GetTechInfo( "Operating Hours","MATERIAL_ID_BY_NAME");

HRS = GetEmissionValue( FAC_ID, HRS_ID); print(HRS.value);

if (HRS.value < 10) {

print("Hours less than 10");

return FAILED; }

print("Hours greater than 10");

return PASSED;