Ansicht
Dokumentation

EXIT_SAPLWMVC_002 - User Exit for Automatic Maintenance of Quota Scales

EXIT_SAPLWMVC_002 - User Exit for Automatic Maintenance of Quota Scales

General Material Data   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

You use quota scales to distribute the total quantity of a generic material among the individual variants. Quota scales define the relative quantities for the values of the variant-forming characteristics.

You can use this user exit to have the system generate quota scales from, for example, your own sales or planning data.

As different customers may use different key figures in different sequences for generating quota scales, this function was created as a user exit instead of a function in the standard system.

You take the internal tables that are to be transferred to the user exit from the interface documentation. These tables may not be changed by the user exit, as they will be required later for consistency checks.

The user exit can use this information to create new quota scales or to change existing ones. Information on this is stored in other internal tables (see interface documentation).

The program calling the function checks the returned data for consistency and posts it to the database. The calling program determines whether records have to be added or modified. In certain circumstances, data records must also be deleted:

  • Items from quota scales with quota 0 are not created or deleted if they already exist.
  • TWMWQ records (corresponding quota scale to material class/plant) are not created or deleted if the field QOLST (quota scale) is set to the initial value (0).

The header data from a quota scale is not created if no items exist or if all the items have quota 0. Header data from existing quota scales cannot, however, be changed in this manner.

Example

Creating quota scales

The user exit supplies the calling program with the data from the desired quota scale via the tables PE_T_WMQK, PE_T_WMQKT and PE_T_WMQP. The calling program then posts the quota scale data.

Changing quota scales

The user exit notifies the calling program of the desired changes in the quota scales using the tables PE_T_WMQKT and PE_T_WMQP. The following changes are possible:

  • Change header text
  • Change quotas
  • Add quotas to characteristic values that previously had none
  • Delete quotas for characteristic values that previously had a quota. For this to be possible, a corresponding record with quota 0 must be returned in table PE_T_WMQP.

Processing the data "corresponding quota scale per plant/material group"

The user exit returns the desired data records to the calling program using table PE_T_TWMWQ. The calling program posts them.

  • If no data record for the table key exists, one is created.
  • If a data record for the table key exists, it is overwritten.
  • If the table key is filled but the quota scale is 0, the record for that key is deleted from table TWMWQ. If no record previously existed for that key, no new record is created.

Notes

The value scales that connect the characteristics and the quota scales cannot be created using the user exit. You have to create value scales manually before you start automatic generation.

You can have the system create, change and delete data in the same run.

Further information

The user exist is called up using the function module value_curve_user_exit.





Parameters

PE_T_TWMWQ
PE_T_WMQK
PE_T_WMQKT
PE_T_WMQP
PI_T_TWMWQ
PI_T_WMQK
PI_T_WMQKT
PI_T_WMQP
PI_T_WMWK
PI_T_WMWP

Exceptions

Function Group

XMVC

TXBHW - Original Tax Base Amount in Local Currency   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 4184 Date: 20240523 Time: 050217     sap01-206 ( 72 ms )