Expand +



How to Post Real-Time Usage Decisions with the Automatic Usage Decision Functionality in SAP Quality Management

by Caetano Almeida, Support Architect, SAP

April 17, 2017

Learn the necessary customizing steps and technical prerequisites to implement the automatic usage decision immediately after posting the results recording in SAP Quality Management (QM).

Usage decision is a key part of the quality inspection process, as it is by means of the usage decision that a material becomes available as part of the inventory, if approved by the quality inspection. The usage decision was typically carried out manually after the results recording, or automatically if you schedule the program RQEVAI30 to run in a background job.

With both of these options you have a delay between recording the results of the last inspection characteristic and posting the usage decision. This delay means that the material is not immediately available to be shipped to the customer or used as a component of a production order. It means there is an unnecessary delay in lead time.

For a long time, companies tried different approaches to avoid this lead time, but now SAP has delivered a standard way to immediately trigger the usage decision after posting the results of the last inspection characteristic.

Review of the Technical Prerequisites to Activate the Automatic Usage Decision

This new functionality is available as of Support Package 16 of enhancement package 6 and Support Package 9 of enhancement package 7. Alternatively, it can be implemented with SAP Note 2161987 on systems running lower Support Packages of enhancement packages 6 and 7.

Even though it is not mandatory, I recommend the implementation of SAP Notes 2234667 and 2179854, as these are corrections to program errors related to the automatic decision.  

If the system is already running on the mentioned or higher Support Packages, you don’t need to worry about the implementation of SAP Note 2161987, and you can go directly to the “Switching on the Event Type Linkage for Inspection Lots” section.

However, if the system is running a lower Support Package, the first step to activate the automatic usage decision is to implement this note in the system. This note can be directly accessed in the SAP Support Launchpad through the link or you can download it directly in transaction code SNOTE.

This note must be very carefully implemented, as it contains several manual steps.

SAP Note 1729128 is a prerequisite, and it should be implemented even before you start with the manual steps for implementation.

Because SAP Note 2161987 brings changes in the Data Dictionary, it brings attached the report NOTE_2161987 (Figure 1). This report must be manually created in transaction code SE38 and executed before the note implementation in transaction code SNOTE.

Figure 1
Report NOTE_2161987 attached to SAP Note 2161987

You can change the report name to ZNOTE_2161987 so that it won’t use the SAP namespace and subsequently you can avoid the request of an access key. Figure 2 shows the report main screen. 

Figure 2
Execution of report ZNOTE_2161987

The first step is to execute the report in TESTRUN mode to check if all the Data Dictionary changes can be implemented on the system. If there is no error in the test run, then you can run the report in UPDATE & ACTIVATE mode, checking the respective flag in the report. Figure 3 shows the results of a successful execution of the report.

Figure 3
Successful execution of report ZNOTE_2161987

If the report is successfully executed in ACTIVATE mode, the changes are implemented and activated in the Data Dictionary. You then can proceed with the standard process of note implementation in transaction SNOTE.

After the note implementation, there is one additional manual step— the enhancement of the business object repository (BOR). In this case, you have to change the SAP standard object BUS2045 in transaction code SWO1. Because it is a standard object delivered by SAP, you need to request an access key to make this change.

After you execute transaction code SWO1, select the Events section in the screen that opens and then click the create icon (Figure 4).

Figure 4
Creation of the new event in the BOR

In the pop-up screen that opens (Figure 5), enter ResultRecorded in the Event and Name fields. In the Description field, enter Inspection Results Recorded, and then click the continue icon (the green checkmark).

Figure 5
Input values for the ResultRecorded event

In the next screen, click the generate icon to generate the object (Figure 6).

Figure 6
Generation of the business object repository

SAP Note 2161987 has been now implemented and the technical prerequisites to activate the automatic usage decision are completed. You can now follow on with the activation of the necessary customizing settings to activate this functionality on your system.

Switching on the Event Type Linkage for Inspection Lots

The automatic usage decision will be posted by the standard report RQEVAI30. This is the same report already used in the past to post usage decisions of inspection lots. The difference is that the report was previously scheduled as a background job and now this report is automatically triggered after the results recording of the last inspection characteristic.

The report is automatically triggered by means of a workflow event. To have the workflow triggered by the SAP Event Manager, you have to switch on the event type linkage for the new event ResultRecorded, which was introduced by SAP Note 2161987. This is the event responsible for triggering the workflow that executes report RQEVAI30 after the usage decision.

You can create the event type linkage after you execute transaction code SWETYPV. After you execute transaction code SWETYPV, click the New Entries button to add a new event type linkage (Figure 7).

Figure 7
Create a new event type linkage

The new event type linkage should be created with the following parameters:

  • Object Category: BOR Object Type
  • ObjectType: BUS2045
  • Receiver Type: RESULTRECORDED
  • Receiver Call: Function Module
  • Receiver Function Module: QAVE_EVENT_EXECUTE_VE
  • Check Function Module: QAVE_EVENT_CHECK_READY_4_VE
  • Event delivery: Using tRFC (Default)
  • Linkage Activated: <check>
  • Enable Event Queue: <check>
  • Behavior Upon Error Feedback: System defaults
  • Receiver Status: No errors 

Figure 8 shows exactly how the new event type linkage should look after you input all the parameters. 

Figure 8
New event type linkage created

After adding this new entry, you can click the save icon (not shown) to save the results. A transport request will be required, as this is a customizing change.

Now that the event type linkage is created, you can go through the customizing changes that should be implemented to activate the automatic usage decision.

Customizing Changes to Activate the Automatic Usage Decision

The implementation of SAP Note 2161987 brings the automatic usage decision into the system, but it still must be activated at the client level in customizing so that the business event is called immediately after the inspection results recording.

There are two customizing steps:

  1. The activation of the functionality at client level
  2. The definition of the usage decision code that should be used when performing the usage decision automatically

To activate the functionality at the client level in transaction code SPRO in customizing follow menu path Quality Management > Basic Settings > Maintain Settings at Client Level.

After entering the customizing activity to maintain the QM settings at client level, you must ensure that the Automatic Usage Decision flag is checked, as shown in Figure 9.

Figure 9
Automatic Usage Decision activated at the client level

The second step is the definition of the Usage Decision Code. To complete this step in customizing follow menu path Quality Management > Basic Settings > Maintain Settings at Plant Level. 

After entering the customizing transaction, you select the plant and then go to the InspLot Completion tab, where you see a box called Immediate Usage Decision (Figure 10).

Figure 10
Immediate Usage Decision in customizing

Add the inspection types for which you want to trigger the automatic usage decision by clicking the blank sheet icon in Figure 10. In this example, post the automatic usage decision for an inspection lot created during the goods receipt of a process order, so add the inspection lot 04.

After that, you need to select the Usage Decision Code, which is used when the usage decision is posted automatically. The best way to do that is to use the F4 help key for this field and select the desired record, as shown in Figure 11. The rest of the fields should be automatically completed once the Usage Decision Code is selected.

Figure 11
Usage Decision selected set

You can add as many inspection types as you want; however, you can add a specific inspection type only once. For the added inspection lot you can also check the Take Long-Term Characteristics Into Account flag for each inspection lot type (Figure 10). (In Figure 10 the name is truncated.) When this flag is checked, the automatic usage decision is only posted when the long-term inspection has also been completed.

The system can also automatically post the goods movement releasing the stock from quality stock to unrestricted use. This setting is done for the selected Usage Decision Code under the SPRO path Quality Management > Quality Planning > Basic Data > Catalog > Edit Catalogs” (transaction code QS51). In this transaction, you define which stock posting should be executed together with the usage decision. As seen in Figure 12 you choose the option To unrestricted use (key VMENGE01) so that the stock is transferred to unrestricted use.

Figure 12
Stock posting to unrestricted use defined at the usage decision code

After adding the Inspection Type, selecting the UD Code, and making sure that the posting proposal is set for the UD code selected, you have completed the customizing settings. You can now test the automatic usage decision.

Posting the Results Recording with the Automatic Usage Decision

Now that all the technical prerequisites are checked and all the customizing settings are implemented in your system, you are ready to see how the automatic usage decision works when posting the inspection results for an inspection lot.

In this example, use an inspection lot of inspection type 04, which is created during the goods receipt of a production order, since you set up the automatic usage decision for this inspection type in customizing. 

Execute transaction code QA32 to find this inspection lot, select it, and then click the Results button (Figure 13) to post the inspection results and the set values for the inspection characteristics.

Figure 13
Post the Inspection lot results

You have two different inspection characteristics in your inspection lot: color and length. Input the inspection results for both characteristics. After that, click the lock icon shown in Figure 14 to close the inspection characteristics and complete the inspection.

Figure 14
Posting the inspection results

The automatic usage decision only takes place when all the inspection characteristics are closed. The only exception is the long-term characteristics that may be relevant or not, depending on the customizing settings defined for the Take Long-Term Characteristics Into Account field for this inspection type, as already mentioned in this article (Figure 10).

After saving the results, go back to the Change Data for Inspection Lot main screen (Figure 13) and click the Usage Decision button to see the usage decision details (Figure 15). In Figure 15 you can observe that the usage decision system status contains the following values:

  • UD: Usage decision has been made
  • SPCO: Stock posting completed

This data means that the usage decision was made and that the stock was transferred from the quality stock to unrestricted stock, as you defined in customizing. You can also observe that the UD Code is A, as defined for Inspection Type 04 in customizing (Figure 10).

Figure 15
Usage decision after the inspection results recording

You should also consider that the usage decision will only be executed automatically if all the inspection characteristics were accepted. Figure 16 shows another inspection lot for which one of the characteristics was rejected. In this case, the usage decision was not made and the stock remains in the quality stock. Because this is an exception, it must be handled by the user, who should decide which action should be taken.

Figure 16
Usage decision not executed because of rejected inspection characteristics

In addition, if at least one of the inspection characteristics is not accepted, the automatic usage decision does not take place.

Overview of the QM Functionalities Delivered by the SAP Customer Connection Process

The ability to trigger the usage decision immediately after the inspection was a very old request of QM users and it was now introduced into the standard system, as part of the SAP Customer Connection process.

Table 1 lists the most relevant QM functionalities introduced by this process.






Removal of actions of the FMEA



FMEA list objects and tasks: Enhancement of the field selection



Enhancements for actions of FMEA and Audit Management



Enhanced selection: Search help for the work center field



Automatic reversal and automatic closing of inspection lots



Results recording: SAP 3D Visual Enterprise Viewer bill on demand



Results recording: SAP 3D Visual Enterprise Viewer



Results recording: SAP 3D Visual Enterprise Viewer



QE51N - display inspection results for completed inspection lots



Update of an inspection lot when you change the start date of orders



Automatic usage decision for results recording

Table 1
SAP Notes delivered by the SAP Customer Connection in SAP QM

(Note: In Table 1 the reference to FMEA stands for failure modes and effects analysis.)  

You can find more details about the SAP Customer Connection process and see what is coming next on the SAP Customer Influence page (

An email has been sent to:


Caetano Almeida

Caetano Almeida ( is a computer engineer with an MBA in IT management. He has more than nine years of experience in production planning.

More from SAPinsider


Please log in to post a comment.

No comments have been submitted on this article. Be the first to comment!