Efficient production order confirmation with Peakboard and SAP
.jpg)
general information
A production order may require various confirmation steps to be carried out smoothly. These steps could include starting the process, submitting updates, and finally confirming the process.
Usually, a specific confirmation number is used to send the respective confirmation. This number is often printed as a barcode on one of the documents, which are provided along with instructions for completing the order.
Our interactive terminal is presented in the GIF below. Here, users enter the confirmation number to retrieve certain details from SAP, such as the production order number and the corresponding process. It is then possible to provide information on output, scrap quantity and machine time.

Of course, this is just an example. In the real world, more sophisticated values could also be transmitted and the machine time would be automatically recognized by Peakboard.
Retrieve order details from SAP
Before you dive into SAP integration, let's take a look at the user interface first. There is a text field where you enter the confirmation number and another text field that outputs the order number. But the real magic happens behind the button.

By sending the confirmation number, you can use the function module BAPI_PRODORDCONF_GET_TT_PROP to retrieve further information. For this purpose, we create an SAP data source. The following XQL request fills the TIMETICKETS table and receives the return value from SAP in the same table. The actual number is inserted into the XQL request using the variable placeholder. Make sure you pre-fill out the variable with a valid confirmation number during the design period to press the button to load the data and get some sample data.
EXECUTE FUNCTION 'BAPI_PRODORDCONF_GET_TT_PROP'
TABLES
TIMETICKETS = ((CONF_NO),
('#[ConfirmationNo]#'))
INTO @RETVAL;

When you press 'Load Information 'on the Peakboard application, your entry is written to the variable and the data source is reloaded.

To write the data returned from the data source to the text box output, we use a few simple blocks in the updated script. (Pro tip: You can also use data binding to get the data into the text fields. That works well too.)

Send confirmation to SAP
To submit the user entry to SAP, we use a pattern similar to the previous section. XQL is getting a bit more complex. Here we use the function module 'BAPI_PRODORDCONF_CREATE_TT'. The actual data is transmitted in the TIMETICKETS table. In the XQL request, we need to fill in various columns. The CONF_NO, YIELD, and SCRAP fields are easy to understand.
For transmitting a time value (in our case the machine time), this table provides dynamic values, depending on the process. When we look at the operation in the SAP user interface, we see that machine time is the second time attribute. Therefore, we need to fill in the 'ONF_ACTIVITY2' column. CONF_ACTI_UNIT2 is set to H for hours 'CONF_TEXT' contains additional information in the form of random text.

The final XQL request is as follows. Note that we must add a call to a second function module called 'BAPI_TRANSACTION_COMMIT. ' If we don't, SAP rolls back the command and doesn't execute anything. The 'DETAIL_RETURN' table contains the confirmation notification from SAP. We'll use it later, so we'll define it as the output from the data source.
The final data source is as follows:

In the user interface, we'll add text boxes for user input and a button to submit confirmation.

Behind the “Submit Confirmation” button, the user inputs are converted into numbers, entered into the global variables and the data source that does the actual work is reloaded.

Here is the updated script of the call. The output from the data source is used to forward the SAP message to the user. We're using a simple pop-up notification.

synopsis
This example demonstrated how easy it is to use SAP's standard BAPIs to read and write production order confirmations. This method is an efficient solution, particularly in conjunction with Peakboard. By using Peakboard, companies can optimize their production processes and ensure seamless integration with SAP. This practical application enables companies to improve their work processes while increasing efficiency.