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: 
t_ramkumar73
Participant
Hello Everyone,

SAP ME provides a configurable feature to do data collection from the POD and record it for SFC numbers, resources, and work centers. The data collected will be stored in SAP ME WIP database which can be accessed and processed for further analysis. The collected data can be of type Numeric, Boolean, Formula, Text, and Data Field List.

In this blog, we will see how to use formula in the data collection process. When we use Formula as the DC data type, then user defined formula will be used to calculate the value for the DC parameter instead of the user keying-in the value.

High-Level Overview



  1. Using formula in Data collection with data collected from same DC group

  2. Using formula in Data collection with data collected from different DC group

  3. Using formula in Data collection with data being collected at different operation


Prerequisite:



  1. To use the data collection formula capabilities, you may need to enable the use of Java
    Script on the SAP ME server.


SAP ME supports the below methods in DC formula:



  1. callEJB() : use this method to call the Enterprise JavaBeans

  2. executeQuery() : use this method to execute an SQL query on the SAP WIP database.

  3. findSingleParameter() : use this method with arguments to read a value. Each argument must be enclosed either with single or double quotes.

  4. getEJBProperties() : Use this method to retrieve one or more properties from the EJB.

  5. print() : Use this method to print the string value of the variable. Use it for the debugging/testing purpose only. The print result can be seen in Log Viewer (Developer Traces view).

  6. printAll() : Use this method to print all the variables available to the script. Use it for the debugging/testing purpose only. The printAll result can be seen in Log Viewer (Developer Traces view).

  7. exit() : use this method to stop the script execution.


Using formula in Data Collection:


1. Using formula in Data collection with data collected from same DC group



  1. Create a DC group

  2. Create required DC parameters (with data type as Numeric) and associate it to the dc group

  3. Create one parameter with data types as Formula to calculate the value

  4. Associate the dc group to the operation

  5. Open standard POD-SFC and start and stop the operation by collecting the DC

  6. The system automatically calculates the Volume Z_VOLUME (4th DC Parameter) using the formula L * W * H

  7. Verify the calculated parameter from Data Collection Results Report







 

2. Using formula in Data collection with data collected from different DC group



  1. Create DC Group Z_LENGTH (Parameter Z_LENGTH)

  2. Create DC Group Z_WIDTH (Parameter Z_WIDTH)

  3. Create DC Group Z_HEIGHT (Parameter Z_HEIGHT)

  4. Create DC Group Z_VOLUME (Parameter Z_VOLUME)

  5. All 4 DC groups must be assigned in the same operation

  6. From the Pod-SFC, start the SFC and collect the DC

  7. The user will enter the value in the 3 parameters at the same operation for Length, Width & Height

  8. The system automatically calculates the Volume Z_VOLUME (4th DC Parameter) using the formula L * W * H

  9. Verify the calculated parameter from Data Collection Results Report


Note:

To read the value of the parameter from different DC group, we will use the findSingleParameter() method.
Syntax:

findSingleParameter("parameterName", "this", "itemName", "itemRevision", "operationName", "operationRevision", "resourceName", "last")
Example:

Z_LENGTH = findSingleParameter("Z_LENGTH", "this", FG Item (with in double quotes), "*", Operation step (within double quotes), "A", "DEFAULT", "last");






 

3. Using formula in Data collection with data collected from different operation



  1. Create a DC Group Z_LENGTH (Parameter Z_LENGTH) - Assign it to operation 1

  2. Create a DC Group Z_WIDTH (Parameter Z_WIDTH) - Assign it to operation 2

  3. Create a DC Group Z_HEIGHT (Parameter Z_HEIGHT) - Assign it to operation 3

  4. Create a DC Group Z_VOLUME (Parameter Z_VOLUME) - Assign it to operation 4

  5. From the Pod-SFC, start the SFC and collect the DC

  6. The user will enter the value for 3 parameters - Length, Width & Height

  7. The system automatically calculates the Volume in Z_VOLUME (4th DC Parameter) using the formula L * W * H

  8. Verify the calculated parameter from Data Collection Results Report


Note:

1) To read the value of the parameter from other DC group, we will use the findSingleParameter() method:
2) Different operation name is mapped to read each of the parameter value.


Input DC values as 5 for Z_LENGTH, Z_WIDTH, Z_HEIGHT.



 

Conclusion:


To sum up, this blog details the use of a formula to automatically calculate the DC parameter out of the operator provided DC parameter values in various data collection scenarios.
Thank you for taking the time to read this post, and I hope this blog is useful to those who are new to SAP ME.
I look forward to hearing your feedback related to the blog, and if you need any clarification, please feel free to post your questions.