Skip to Content

Introduction

There can be instances of a material being highly configurable with the possibility of the values under the characteristics being huge. This is apt if the material is an automobile product, say a truck or a highly configurable car. Assuming an auto OEM is involved in the sales of trucks, and SAP is used as the ordering template. The end user, while creating a sales order for example, has the possibility to configure the vehicle with huge number of options (number of tires, different kinds of paints, number of axles, etc).. In the system, the options of the vehicle model can be mapped with a variant condition type to receive the prices (say from an external master system for prices) and show the same in the SAP document. In such a scenario when a user configures a vehicle there is a possibility to choose several options, which results in the variant condition type occurring in the SAP document repeatedly.

When a specific variant condition type exceeds 99 the system throws an update termination error and the document does not get created. The below approach intends to provide a solution for such a scenario.


Issue

It has been noticed that Update Termination errors are thrown during creation of Quotation, Purchase Order or Debit Memo request documents in certain scenarios (when the material is a configurable vehicle) whenever a particular condition type (say a variant condition) repeats for more than 99 times.

The only way to resolve the issue is to delete existing options from the vehicle to reduce the repetition of the variant condition type.

 
Illustration of the existing issue:

   Figure1.JPG

Figure 1: Screenshot of update termination during PO creation

Figure2.JPG

Figure 2: Error message stating the reason for update Termination error.

Observations

In KONV table there is a field ‘Condition counter’ which has a field length of ’2’ digits hence the counter can go up to a maximum of 99. If the options repeat more than 99 times, the condition type counter will restart from 00. This will lead to duplicate records in table KONV and hence will result in update termination error.

Figure3.JPG

  Figure 3: Screenshot showing the repetition of ‘Condition Counter’ from ‘00’ for a condition type after reaching ‘99’

Solution

To resolve the occurrence of such update termination errors the following solution could be adopted.

Say Condition Type A is a variant condition type and it tends to repeat in a certain document for more than 99 times. We could follow the below approach to resolve the issue.

  1. Create a New condition type, say Condition type B which will be exactly similar to that of Condition Type A and add it to the existing pricing procedure.
  2. Ensure that the customizations are done for subtotals calculations such that Condition type A & B are falling under the same bucket.
  3. Create a new access sequence say ‘ZABC’ and attach it to both Condition Type A and B.
  4. Creation of routine, say 999. This routine will ensure that as soon as the counter for condition type A exceeds that of 99, condition type B is picked up.
  5. Addition of routine ’999’ to access sequence ZABC. It will ensure that condition types are not repeated more than 99 times.

Illustration after required changes:

  Figure4.JPG

Figure 4: In this screen shot ‘ZFAC’ represents condition type A and ‘ZXYZ’ represents condition type B

Source code of Routine: 999

  tb_tkomv[] = tkomv[].

  IF komt1-kschl = ‘ZFAC’.

    DELETE tb_tkomv[] WHERE kschl <> komt1-kschl.

    READ TABLE tb_tkomv[] WITH KEY varcond = xvckey-varcond TRANSPORTING NO FIELDS.

    IF sy-subrc = 0 AND sy-tabix GT 99.

      sy-subrc = 4.

    ENDIF.

  ELSEIF komt1-kschl = ‘ZXYZ’.

    DELETE tb_tkomv[] WHERE kschl <> komt1-kschl.

    IF tb_tkomv[] IS INITIAL.

      tb_tkomv[] = tkomv[].

      DELETE tb_tkomv[] WHERE kschl <> ‘ZFAC’.

      READ TABLE tb_tkomv[] WITH KEY varcond = xvckey-varcond TRANSPORTING NO FIELDS.

      IF sy-subrc = 0 AND sy-tabix LE 99.

        sy-subrc = 4.

      ENDIF.

    ELSE.

      READ TABLE tb_tkomv[] WITH KEY varcond = xvckey-varcond TRANSPORTING NO FIELDS.

      IF sy-subrc = 0 AND sy-tabix GT 99.

        sy-subrc = 4.

      ENDIF.

    ENDIF.

  ENDIF.

References:

  1. www.sdn.sap.com
  2. www.help.sap.com
To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply