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

Variant Pricing Discount Condition

$
0
0

Different Discount for Each Variant in Sales Document

 

While implementing variant pricing we came across a specific requirement where the business want a different % discount for  each variant.

 

For example.

 

In Sales order below is the pricing structure with variant pricing.

 

Condition Type

Variant

Price

VA00

I-CPU

1000

VA00

16 GB

400

VA00

A-Graphic Card

200

VA00

Modem

50

 

The requirement was to calculate different % of discount on each variant.

 

Condition Type

Variant

Price

VA00

I-CPU

1000

VA00

16 GB

400

VA00

A-Graphic Card

200

VA00

Modem

50

 

Discount

 

Condition Type

Variant

%

Amount

 

I-CPU

5%

50

 

16 GB

2%

8

 

A-Graphic Card

3%

6

 

Modem

1%

0.5

 

 

Solution:-

 

We copied VA00 condition type and created ZY00 and changed below fields

 

  1. Calculat. Type   = A (Percentage)

Plus/minus = X (Negative)

Variant Cond. = Activated.


1.jpg

2.jpg

 

 

Create a Pricing routine under Condition Formula for Basis (Condition Base Value)  and write below code.

 


FIELD-SYMBOLS: <fs_xkomv> TYPE komv_index.

CHECK sy-tcode NE 'VA23'.
LOOP AT xkomv ASSIGNING <fs_xkomv>
WHERE kschl   EQ 'VA00'
AND varcond EQ xkomv-varcond.
xkwert
= <fs_xkomv>-kbetr.
ENDLOOP.

 

 

 

 

Assign the pricing routine to discount condition type in pricing procedure.


Display Pricing Referenced Characteristics in VELO

$
0
0

As per SAP standard setting the characteristics which are referenced for pricing in Variant configuration are not displayed in VELO (IS Auto)  configuration screen.

 

Characteristics are referenced for pricing by putting table name as SDCOM and Field Name as VKOND.

 

Untitled.jpg

 

Each vehicle have a configuration screen in VELO transaction. The configuration screen will never show the characteristics which have reference.

SAP Functional module VELO03_DEL_REFERENCE_CHARACT findin all characteristics which are pricing referenced and delete those chars from display structure of VELO Configuration tab.

 

 

To display the referenced characteristics in VELO configuration screen.

 

Create enhancement spot in the FM VELO03_DEL_REFERENCE_CHARACT.

 

In above FM data in structure  detail_config_et  is the display data for configuration tab. In enhancement point create a loop and append detail_config_ls to detail_config_et.

 

 

The above solution will start showing the referenced characteristics in configuration tab of VELO

LO-VC: counting the number of selected values in multiple-value characteristic

$
0
0

For specific reasons, it may be necessary to count the number of values that the user has selected, in a multiple-value characteristic.

 

The task could easily be performed if the characteristic values are well defined, that is, they are available in the characteristic 'Values' tab: this can be accomplished, for instance, by means of an object dependency that will go through the values, counting the selected ones.

But what about if the values are dynamically set?

 

In such a case, we will anyway use an object dependency that will call a variant function (user-defined function), that in turn will count the selected values.


The multiple values characteristic will not be part of the function interface, as it is not possible to use this kind of characteristic in variant function. But this is not blocking us to read anyway the characteristic selected values, and return their count to another characteristic.

 

Let's try to implement a simple trial about it.

 

So, we will have a multiple values characteristic, here I called it TEST_FLAVIO

img20001.png

 

and a single value characteristic, TEST_FLAVIO_COUNT, that will contain the number of  values that have been selected in the previous characteristic. This will be the output of the user defined function.

img20002.png


We have to also define an input characteristic for the same function:  we could use a dummy one, with a default value 'X', for example.

img20003.png

 

All these characteristics will be part of our class.

 

As anticipated, we need an user defined function, here called ZTEST_FLAVIO. It's 'Characteristics' section will look like the following:

img20004.png

 

The function module code itself, will be the following:

 

FUNCTION ZTEST_FLAVIO.

*"----------------------------------------------------------------------

*"*"Local Interface:

*"  IMPORTING

*"     REFERENCE(GLOBALS) TYPE  CUOV_00

*"  TABLES

*"      MATCH STRUCTURE  CUOV_01

*"      QUERY STRUCTURE  CUOV_01

*"  EXCEPTIONS

*"      FAIL

*"      INTERNAL_ERROR

*"----------------------------------------------------------------------

  DATA: i_used_values   TYPE cudbt_vallist,

        w_char          TYPE cudbt_key,

        w_instance      TYPE cudbt_instance,

        w_counter       TYPE i,

        w_value         TYPE cuov_01-atflv.

 

* Initializing the instance number

  IF globals-self ISINITIAL.

    w_instance = 1.

  ELSE.

    w_instance = globals-self.

  ENDIF.

 

* Reading the chosen values in the multiple value characteristic

  w_char = 'TEST_FLAVIO'.

 

  CALLFUNCTION'CUPR_GET_VALLIST'

    EXPORTING

      instance              = w_instance

      characteristic        = w_char

    IMPORTING

      values                = i_used_values

    EXCEPTIONS

      unknown_instance      = 1

      unknown_characteristic = 2

      not_multivalued       = 3

      not_found             = 4

      internal_error        = 5

      OTHERS                = 6.

  IF sy-subrc = 4.

    CLEAR i_used_values.

    REFRESH i_used_values.

  ENDIF.

 

* Counting the values, and send back the number

  IF i_used_values[] ISNOTINITIAL.

    DESCRIBETABLE i_used_values LINES w_counter.

    IF w_counter >0.

      MOVE w_counter TO w_value.

      CALLFUNCTION'CUOV_SET_FUNCTION_ARGUMENT'

        EXPORTING

          argument               = 'TEST_FLAVIO_COUNT'

          vtype                  = 'NUM'

          num_val                = w_value

        TABLES

          match                  = match

        EXCEPTIONS

          existing_value_replaced = 1

          OTHERS                 = 2.

      IF sy-subrc <>0.

      ENDIF.

    ENDIF.

  ENDIF.

 

ENDFUNCTION.

 

What the code is doing is quickly explained: first, thanks to the FM 'CUPR_GET_VALLIST', we read the multiple values characteristic and save them in a local variable. Then, we just count them and return this value to the output characteristic by means of the FM 'CUOV_SET_FUNCTION_ARGUMENT'.

 

Now, we need an object dependency (Procedure) that will call the user defined function. Here it is:

img20005.png

 

We will add it to our configuration profile.

 

That's all. Let's go and give this a quick test inside CU50:

img20006.png

Here above, 4 values have been selected in the multiple values characteristic. Change them, and the counting characteristic will change accordingly:

img20007.png

Thanks.

 

Flavio

Material Variant Matching , exclusion of characterstic

$
0
0

In line with document how to create material variant , we have seen while creating material variant its not obligatory
to choose and setup value for all the characteristic in a material variant, it may possible for our business to create material variant based upon few important characteristic of a configurable material only and when we create such variant there is possibility of miss match when user assign values to characteristic which are not covered in material variant and with such selection , the material variant will not be selected due to miss match during type matching.

 

 

This document will help setting up characteristic value excluded during variant matching.

 

 

Transaction: SA38

Name of report: RCU_EXCL_CHARACTERISTICS

 

Or

 

Choose System -> Services ->Reporting

 

1.gif

 

Enter the name of the report: RCU_EXCL_CHARACTERISTICS.

 

2.gif

 

 

You  can specify material number & name of characteristic which needs to be excluded from type matching, In the lists, you can then mark the characteristics for exclusion in the relevant application.

 

3.gif

 

The system stores the selected characteristics in table CABN_EXCL.

 

 

This table is read during type matching. Only those characteristics are then permitted in the relevant application that are
not stored in this table, or if they are stored in this table, are not marked for exclusion from this application.

 

 

4.gif

Specify the number of the relevant material or the characteristic that you want to exclude from the search and choose .execute

5.gif

If same material is being used in many different plants, you can specify this exclusion is plant specific or valid for all plants.

 

6.gif

 

 

Select the Exclusion Types indicator for the characteristic or combination of material and characteristic to exclude it from the search

 

Choose  save

 

Hope it will be useful document for you, please comment.

 

Thanks

Ritesh

 

 

 

Note: All screen copied are from SAP IDES

Tables in preconditions

$
0
0

Hi

 

As we are well aware that preconditions are used to display/hide the characteristic(s)/characteristic value(s).

 

Variant tables are used to store the combinations and can be used in selection conditions, preconditions, procedures and constraints.

 

We can use tables in preconditions for the following:

 

  • To check the consistency
  • Display possible entries

 

Here, I would like to brief about use of tables in precondition with simple example.

 

Please note that the example chosen is for demonstration purpose only.

 

For e.g. Requirement is that based on Brand chosen, only processors of that brand must display.

 

Class VCL_CLASS contains two characteristics CH_PROC_BRAND (Processors' Brand) & CH_PROCESSORS (Processors)

 

Class (VCL_CLASS).JPG

Below are the values of each characteristic:

 

1. Values of CH_PROC_BRAND

Char CH_PROC_BRAND.JPG

2. Values of CH_PROCESSORS

Char CH_PROCESSORS.JPG

Char CH_PROCESSORS (Contd..).JPG

A variant table T_BRAND_PROC has been created and maintained using CU61 & CU60 respectively.


Please note that value assignment alternatives are not relevant to precondition since preconditions are not used to infer values.

 

Variant table T_BRAND_PROC

Table T_BRAND_PROC.JPG

No value assignment alternative is defined:

Table T_BRAND_PROC (No alternatives).JPG

Variant table T_BRAND_PROC has been maintained with required combinations which may not be unique (this is the reason 'key field' was not checked in either of the characteristic during table definition)

Contents T_BRAND_PROC.JPG

In order to use this table in precondition, we need to create precondition for each characteristic value of characteristic CH_PROCESSORS and assign it to the respective characteristic value.

 

I created following precondition for value VCH_AMD A4:

 

TABLE T_BRAND_PROC

(CH_PROC_BRAND = CH_PROC_BRAND, CH_PROCESSORS = 'VCH_AMD A4')

 

Prec PRE_AMD_A4.JPG

and assigned to it characteristic value 'VCH_AMD A4'

Assign PRE_AMD_A4.JPG

Similarly, create preconditions for all values of characteristic CH_PROCESSORS and assign to respective characteristic values.

 

Once all preconditions have been created and assigned to respective characteristic values, create below precondition and assign to characteristic (NOT values)

 

TABLE T_BRAND_PROC

(CH_PROC_BRAND = CH_PROC_BRAND, CH_PROCESSORS = CH_PROCESSORS)

 

Prec PRE_HEADER.JPG

and assign to characteristic CH_PROCESSORS

Assign PRE_HEADER.JPG

Once this is done, we can check result in CU50. We can see that when 'AMD' is chosen as processor brand, the possible values in processors are being displayed as per entries maintained in variant table T_BRAND_PROC

AMD values.JPG

When 'Celeron' is chosen as processor brand, the possible values in processors are being displayed as per entries maintained in variant table T_BRAND_PROC

Celeron values.JPG

Configuration information flow with an example mode

$
0
0

Friends,

 

Many times i come across post asking information on how to fetch data for characterstic value out of configurable material froma sales order item, material variant, or all characterstic values for a specific material etc

 

There are many tables which stores this relationship , and in variant configuration its not one way to fetch this information.

 

I tried to list down al tables related to variant configuration in my previous post. List of Tables for VC

 

Here i am trying to show linkages using a eaxmple from material master, how all classes, characterstic & there respective values can be fetched step by step.

 

Based upoon your requirement you can provide this table-field information to developer and a report can be written using this logic.

 

Lets start,

 

 

 

Material BIKE

 

 

snap17.jpg

Classification View

Snap18.jpg

 

 

 

 

 

Table INOB, input – OBJEK = Material Number (BIKE) , get
CUOBJ

 

snap19.png

INOB – CUOBJ = KSSK – OBJEK

 

 

KSSK input OBJEK and get CLINT, ADZHL, and ZAEHL

 

snap20.jpg

 

 

Go to KLAH, Input CLINT captured from KSSK

 

snap21.jpg

 

Go To SWOR, input CLINT from KSSK

 

 

 

snap22.jpg

 

To get characteristic associated with class

 

 

Go to KSML, Input CLINT and get internal characteristic number,
IMERK

snap23.jpg

 

 

 

To know name of characteristic go to CABN, input IMERK or ATINN,
Get ATNAM

snap24.jpg

snap25.jpg

To fetch all possible values of characteristic go to CAWN, input ATINN

 

snap26.jpg

 

 

To fetch value description , go to CAWNT , input internal characteristic number & internal counter

 

snap27.jpg

 

 

 

For getting characteristic values maintained in classification view at material master level

 

Go To AUSP, input OBJEK which is CUOBJ from INOB

 

snap28.jpg

Important note http://service.sap.com/sap/support/notes/1547034


Hope this information  will be useful, Please do comment and rate this document.

Best Regards

Ritesh

 

References:

all Screens are captured from SAP IDES ( SAP ECC 6.0, release 7.8.01.014 ) , all master data is created by me

Variant Configuration Material Variants : Creation,Usage in Sales order for replacing Configurable Material Part 1

$
0
0

Material Variants

 

In industries when we deal with Configurable material, many of times we come across a configuration which is asked every now and then by many customer.

Also business don’t want to wait for customer to enter order and then start its production , instead there is a need to have something similar to Make to Stock for this configuration to  bring lead time down and maintain some stock of this fast moving configuration.

 

To address all of these and many other requirements, there is a standard option available in SAP to create “Material Variant”.

 

This document will be useful for beginners in VC area to understand the concept of Material Variant and how it can be setup using standard SAP. Also we will discuss how when you configure a material in sales order (VA01) or Configuration Simulation CU50, you can check whether a material variant already exists that has the same characteristic values and it will manually or automatically replace the configurable material in sales order. You can display existing material variants on the characteristic value assignment screen. However, the configurable material is not automatically replaced by the variant.

 

 

By definition from SAP Help,

 

Material Variants (1)

 

A material variant is a material that can be kept in stock and that arises from an individual configuration of a configurable product.

 

The material master record of a material variant is linked to the configurable material and configured using the characteristics of the configurable material. This variant of the configurable material can then be manufactured and kept in stock.

 

  1. You have a Configurable Product “BIKE” which has 3 attribute on which it can be configured, which become Characteristics of this configurable material.

These characteristics will have possible values associated

 

·        COLOUR

 

o   Red

o   Blue

o   Black

o   Green

o   Golden

o   Silver

o   Orange

o   Purple

o   Yellow

o   Dark Red

 

·        ENGINE TYPE

 

o   200 CC

o   400 CC

o   600 CC

o   800 CC

o   1000 CC

o   1200 CC

o   1400 CC

o   1500 CC

o   1600 CC

o   1800 CC

 

·        EXHAUST

 

o   S- EXHAUST 1

o   S- EXHAUST 2

o   S- EXHAUST 3

o   S- EXHAUST 4

o   S- EXHAUST 5

o   S- EXHAUST 6

o   S- EXHAUST 7

o   S- EXHAUST 8

o   S- EXHAUST 9

o   S- EXHAUST 10

 

You created configurable material with all Basic settings required for “Variant Configuration”

 

S1.jpg(3)

 

 

 

For these settings, reference can be taken from document created by Philipp Kuster on SAP SDN (2)

 

With topic, Introduction to Variant Configuration with an example model. SAP ERP Sales and Distribution (SAP SD)

 

Below are the steps to create a Material Variant”, Create a new material, BIKE - BLACK - 1000

 

Transaction: MM01

 

Snap2.jpg(3)

 

 

 

Select views

 

Snap46.jpg(3)

 

 

 

Complete the material creation process by filling out necessary details and mandatory fields.

 

To manufacture the material variant in-house, you must maintain the variant at plant level, so that BOMs, routings, and so on can be determined. Cross-plant variants can be used in Purchasing, but are not supported in Sales.

 

 

To set up the material variant specific to a plant, in MRP 3 View, in field “Configurable Material ( MARC-STDPD) “ in put the configurable material number.

 

 

Press enter; you will get a message to “Configure the material.

 

S4.jpg(3)

 

Press   to configure this variant, you will get a pop-up

 

 

S6.jpg(3)

 

 

Come out of the screen using,complete the process of creation of material following all required view and mandatory fields.

 

In the basic data, you can link the material variant to a configurable material. This configuration applies to all plants.

 

Now the Material Variant is created, and need to be linked with BOM and Routings of Configurable Material.

 

Transaction: CS40

 

S7.jpg(3)

 

Press enter

 

S8.jpg(3)

Save the assignment.

 

Assign Routing

 

Transaction: CA02

 

S10.jpg(3)

 

Open a routing of configurable material

 

S11.jpg(3)

 

 

 

Use the material assignment option

 

 

Enter Group counter, Material and plant

 

S12.jpg(3)

 

 

 

Save the routing.

 

Now the material Variant is ready to be used.

 

If the strategy group associated is relevant for “Make to stock: production, you can plan the independent requirement, have MRP run, generate plan order, convert it to production order and confirm to generate stock of this material variants.

Make to Stock Production for Variants (1)

Variants can be planned on the finished product level using any make-to-stock strategy, such as Planning with Final Assembly (40) or Net Requirements Planning (10)

Make to Order Production for Variants(1)

Variants can be planned on the finished product level using any make-to-order strategy, such as Planning w/o Final Assembly (50) or Planning with a Planning Material (60)

Replacement of Configurable material with material Variant in Sales order.

You can define the settings for variant matching in the configuration profile of a configurable material and on the characteristic value assignment screen.

  1. In the configuration profile, choose Settings, and on the characteristic value assignment screen choose View --Settings.

 

 

S13.jpg(3)

Prerequisites (1)

You define the settings for variant matching in Customizing for Sales and Distribution, where you maintain item categories.

§  Configuration of Sales and Distribution -> Sales -> Sales Document -> Sales Document Item -> Define Item Categories.

s14.jpg(3)

  • Activate variant matching for an item category, by put a tick as shown above
  • Define Material variant action to decide how the system reacts if it finds a material variant:
    • The system automatically replaces the configurable material with the material variant.
    • You see a message telling you that a material variant with the same configuration exists.

  If the material variant is not available, you can:

    • Receive an automatic message with a list of the material variant stock situation. You can then decide whether to replace the material variant.
    • Decide that you do not want to replace the variant.

  Create Sales order

 

Transaction VA01:

 

s15.jpg(3)

Input configurable material as required material

s16.jpg(3)

  • Configure the configurable material in the sales order.
  • On the value assignment screen, you can check whether material variants match the configuration of the material

 

 

   s17.jpg  (3)

Material Variant matching the values will listed on lower part of screen.

 

s19.jpg(3)

s18.jpg(3)

 

s20.jpg(3)

  • Once you have configured the material, leave the configuration editor.

 

  • Depending on the settings in Customizing, either the material is replaced by the material variant immediately, or you see a message telling you that a suitable material variant has been found.

 

Save the sales order.

Individual or collective requirements can be generated for the material variant. Pricing also applies to the material variant, unless you define the configurable material as the pricing material for the material variant.

 

 

Relevant SAP Notes:

 

 

Note Number ,Description & Link

Note 794941 - Explosion of material variant as a configurable assembly

Note 513288 - Material variant as a component in multi-level configuration

Note 456510 - Material variant in multi-level configuration

Note 900732 - Variant matching does not work

Note 774346 - Composite SAP Note: Material variants

 

 

 

 

 

 

References:

(1)   Some part of text copied from SAP help

(2)   Link mention is a document by Philip Cluster on SAP SDN

(3)   All screen copied are from SAP IDES

 

 

 

 

JSS

Viewing all 27 articles
Browse latest View live


Latest Images

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