Ansicht
Dokumentation

C1L30001 - EHS: BOMBOS - Percentage Calculation

C1L30001 - EHS: BOMBOS - Percentage Calculation

RFUMSV00 - Advance Return for Tax on Sales/Purchases   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

You can use this SAP enhancement to calculate the percentages of the components of a specification.

As standard, it is only possible to calculate the percentages with reference to one unit of measurement dimension. With this enhancement, you can make more complex calculations, for example, to take chemical reactions between the components into account or to convert the units of measurement of different dimensions.

Important

The base unit of measurement of the bill of materials (BOM) must be in the dimensions weight or volume in order to be able to specify the reference value of the percentage parts (W/W; Vol/Vol). Otherwise an error occurs and the generation of the specification is canceled.

Input parameters

  • I_BOMHEAD
Passes the whole BOM header of the entry to be edited from the worklist.

Output parameters

  • E_COMPREL
Returns the reference value (not a required entry field).
You can determine the reference value in your enhancement independent of the base unit of measure and return it to the caller.
As a prerequisite you must have defined the reference value in Customizing for Product Safety in the IMG activity Specify Reference Values for the Composition.
If a value was passed for the reference value, it is entered without any further checks.
If no value was passed for the reference value, the reference value is determined according to the standard functionality:
  • If the base unit of measure is assigned to the dimension weight in the BOM header, the system selects the reference value W/W.

  • If the base unit of measure is assigned to the dimension volume in the BOM header, the system selects the reference value Vol/Vol.

Otherwise, an error message is written to the application log.

Tables

  • I_BOMPOS_TAB
    Passes all BOM items and corresponding specification keys (SUBRECN) relevant for the composition.
  • E_BOSCOMP_TAB
    Returns all components for the composition. The following table fields must be filled to guarantee error-free processing:
  • RECN
    Assignment of the sequential data record number to define the uniqueness of the components. (Compare the function module C149_RECN_GET_NEXT; use the function module NUMBER_GET_NEXT.)

  • RECNTVA
    Reference to the RECN of the value assignment instance. Define RECNTVA (compare the function module C149_RECN_GET_NEXT; use the function module NUMBER_GET_NEXT) to assign the component uniquely to the value assignment instance of the value assignment type (composition). The value assignment type was specified as an environment parameter in the IMG activity Specify Environment Parameters and Conditions.
    Determine the RECNTVA before calculating the components and transfer RECNTVA to all components. This means that all components must possess RECNTVA.

  • RECNCMP
    Reference to the header data of the specification for the component. Here you pass the specification key SUBRECN from the respective BOM item (I_BOMOP_TAB).

  • COMPAVG
    Specifies the percentage part of the component.

  • COMPEXP
    Specifies the exponent of the component.

Exceptions

  • COMPUTATION_FAILED
    You can trigger exceptions with RAISE if it is not possible to calculate the component parts. An error message is written in the application log and the calculation for this composition is aborted.

Note

To get a complete log, write appropriate log messages. You can then make an exact analysis of any errors (use the function modules for the function group SBAL - application log).






CL_GUI_FRONTEND_SERVICES - Frontend Services   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 4839 Date: 20240418 Time: 061317     sap01-206 ( 72 ms )