Quantcast
Channel: SCN : Document List - SAP ERP PLM - Classification and Variant Configuration
Viewing all articles
Browse latest Browse all 27

Example model of Changing Sales order quantity by reference characteristic

$
0
0

Purpose

 

This guide is a continuation of document Introduction to Variant Configuration with an example model. With the help of this document , you will be able to setup a configuration model to read the sales order quantity and then change it per your dependency procedure.


Example Model from the document.


To setup the data , please follow the directions advised in the document referred above.


Materials


Configurable Header Material - VC_KMAT_PC


Classes

 

VC_CL_PC      (assigned to material VC_KMAT_PC)

 

Characteristic


VC_CHR_NUM

VC_READ_QTY

VC_CHANGE_QTY

 

Scenario:

 

You want to change the quantity of the material based on the values read from the material. You want to read the quantity of material VC_KMAT_PC from the sales order and add it to the value you select for characteristic VC_CHR_NUM. The result should then be the final quantity for the sales order item for material VC_KMAT_PC.

 

E.g. VC_KMAT_PC has Quantity 2.

     VC_CHR_NUM has value 2.


Then Quantity for material VC_KMAT_PC should be changed to 4 (char VC_CHR_NUM + Quantity you added on item level). Final Quantity of the sales order should be 4. You need two characteristics with reference to quantity, one to read the value and second to change the value.


Characteristics

 

To create characteristic use transaction CT04

1) Create characteristic VC_CHR_NUM with a numerical format.

 

2) To read the quantity create a reference characteristic to table VBAP field KWMENG. Save the characteristic and assign this to the class attached to material VC_KMAT_PC. In this model it is class VC_CL_PC.

 

read qty.PNG

     read qty2.PNG

 

Test the Model with reference characteristic to read the quantity.


Transaction VA01 , Enter Material VC_KMAT_PC with quantity 2, you should see characteristic VC_READ_QTY has value 2. If you change it 4 , it will be 4.

 

        qty.PNG

        qty2.PNG

3) To change the quantity of the sales order item, create reference characteristic VC_CHANGE_QTY to table VCSD_UPDATE field KWMENG.

 

 

         change char.PNG

 

Assign this Characteristic to class of the material VC_KMAT_PC . In this model assign it to Class VC_CL_PC.

 

4) Create a procedure (transaction CU01) to calculate the quantity that needs to be changed. Characteristic VC_CHANGE_QTY  should have the calculated value.

 

VC_CHANGE_QTY = VC_READ_QTY + VC_CHR_NUM

 

You can use any formula or syntax to calculate the value. The syntax of the procedure should be the following.

 

          proc.PNG

Use the following syntax

 

$Self.VC_CHANGE_QTY = $self.VC_READ_QTY + $self.VC_CHR_NUM

 

              proc syntax.PNG

 

Make sure you release the procedure after creating it. Assign this procedure to configuration profile (CU42)  of material VC_KMAT_PC.

 

            assign.PNG

Test the Model with reference characteristic to change quantity.

 

Transaction VA01 , Enter Material VC_KMAT_PC with quantity 2, you should see characteristic VC_READ_QTY (reference to VBAP-KWMENG ) has value 2. If you now enter value 2 to characteristic VC_CHR_NUM, you will see characteristic VC_CHANGE_QTY has been calculated to 4 (VC_READ_QTY + VC_CHR_NUM)


               

               so.PNG

                   so 2.PNG

                    so 3.PNG

 

Now if you go back to the sales order main screen , you will see quantity of material VC_KMAT_PC is calculated and changed to 4 ( value coming from    characteristic VC_CHANGE_QTY).

 

                     so.PNG

 

 

 

                   


Viewing all articles
Browse latest Browse all 27

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>