Ansicht
Dokumentation

MWMK0001 - Warehouse management: Customer exit for storage unit number

MWMK0001 - Warehouse management: Customer exit for storage unit number

Vendor Master (General Section)   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

In the SAP standard, the conversion of the storage unit number is carried out in four function modules according to the editing selected in Customizing.

In Customizing, in addition to setting a length for the storage unit number, you can choose from the following settings for the type of conversion:

(1) only a length conversion

(2) length conversion with check digit according to EAN

(3) customer specific user exits

Depending on the setting, different processing is started in the listed function modules. For settings (1) or (2), the necessary conversion has already been programmed. In the case of a customer-specific conversion a customer function module (customer-function) is called in each case, which you must supply with corresponding program logic.

The four standard function modules are roughly described in the following. Please refer to the documentation on the respective function module for more details.

  • CONVERSION_EXIT_LENUM_INPUT
    Converts an entered storage unit number into the working storage format.
  • CONVERSION_EXIT_LENUM_OUTPUT
    Formats the working storage format for output.
  • L_LENUM_INTERNAL_NUMBER_ASSIGN
    Assigns the next storage unit number for the number range.
  • L_LENUM_EXTERNAL_NUMBER_CHECK
    Checks the admissibility of external storage unit numbers with regard to possible conflicts with internal number ranges.

NOTE: If you program the customer-specific exit, it is absolutely necessary that you supply the necessary program logic for this user exit. Since data inconsistencies result during incorrect programming, it is absolutely necessary that the above-mentioned function modules are understood fully.

The already mentioned customer function module, which contains exactly one include, is in each of the function modules already listed above. You have to supply this include with the program runs, which are required for your individual conversion. You only have all the data transferred to the customer function module available if you use the named names.

You must create the following includes in detail:

This include is integrated in the customer function module EXIT_SAPLLVSK_001, which is called from the function module CONVERSION_EXIT_LENUM_INPUT. The interface is:

call customer-function '001'
importing  CF_INPUT  = INPUT               "entered LE number
           LNGTH     = IT344-LNGTH         "Length of LE number                                             according to tax table
exporting  CF_OUTPUT = OUTPUT              "internal data format
exceptions CHECK_FAILED = 1                "not accepted
           NOT_NUMERIC  = 2                "is not numeric
           WRONG_LENGTH = 3.               "wrong length

The include takes on the task to convert an entered storage unit number into the required internal data format or to reject incorrect entries.

The named exceptions generate corresponding error messages and are also used in standard processing. In this case, the field is ready for input again and the user is requested to enter a permitted storage unit number.

CAUTION: Other error messages than those defined in the interface must be processed directly in the include and cannot (without modification) be transferred to the calling program.

Corresponding include for EXIT_SAPLLVSK_002. It is called from the function module CONVERSION_EXIT_LENUM_OUTPUT as follows:

call customer-function '002'
importing  CF_INPUT  = INPUT              "Internal data format
                                           of the LE number
           LNGTH     = IT344-LNGTH        "Length according to control                                            table
exporting  CF_OUTPUT = OUTPUT.            "Output format of the
                                           LE number

The internal display of the storage unit number (data format) is formatted for output in this include.

Correspondingly for EXIT_SAPLLVSK_003 from L_LENUM_INTERNAL_NUMBER_ASSIGN:

call customer-function '003'
importing  CF_INPUT  = LENUM              "Assigned number from
                                           the number range
           LNGTH     = IT344-LNGTH        "Length according to control                                            table
exporting  CF_OUTPUT = LENUM              "Internal data format
                                           of the LE number
exceptions LENUM_TOO_LONG = 1.

This include edits the number received via internal number assignment to the storage format you require.

If a too long storage unit number results from incorrect settings (number range maintenance, customizing of the conversion exit of the storage unit number), you can return this error to the calling program.

Correspondingly for EXIT_SAPLLVSK_004 from L_LENUM_EXTERNAL_NUMBER_CHECK:

call customer-function '004'
importing  CF_INPUT  = EXTERNAL_NUMBER     "Internal storage format
                                            of the LE number
           LNGTH     = IT344-LNGTH         "Length according to control                                             table
exporting CF_OUTPUT  = EXTERNAL_NUMBER.    "Display according to
                                            number range LE number

The internal storage format is transferred to the display of the set up number ranges according to the required conversion. It can be found out this way how this external number lies in an internal number range and this information is returned to the calling program. For example, it is possible to reject an external number which lies in the future number range of the LE number.

Be careful if you want to use non-numeric numbers. In this case you have to set the exporting variable EXTERNAL_NUMBER to a numeric dummy value. Otherwise the system will try to interpret the value as a numeric value within the program coding and will terminate.

Procedure:

  1. Activate the user exits using the customizing function. (Create a project and assign the SAP enhancement MWMK0001). Save and activate the project.
  2. Create includes for the EXIT_SAPLLVSK_001 - 004 using the Workbench.
  3. Write the coding for the includes.






CPI1466 during Backup   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 10453 Date: 20240419 Time: 080010     sap01-206 ( 92 ms )