Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_MATERIAL_SAVEDATA conversion factor

Former Member
0 Likes
1,098

Hi, everyone:

I meet a problem when extend material master WM view with BAPI: BAPI_MATERIAL_SAVEDATA as following:

WM unit is different from Base Unit, I have filled the structure UNITSOFMEASURE / UNITSOFMEASUREX for conversion, but the system populdates message: M3 468 Unit of measure must be base unit, WM unit, or unit of issue

My code as follows:

    

      LVSME  = 'SET' "wm unit

      WAREHOUSENUMBERDATA-WM_UNIT = .LVSME.

       WAREHOUSENUMBERDATAX-WM_UNIT = 'X'.


      CLEAR: ALT_UNIT, ALT_UNIT_ISO.

       CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
         EXPORTING
           INPUT          = LVSME
           LANGUAGE       = SY-LANGU
         IMPORTING
           OUTPUT         = ALT_UNIT
         EXCEPTIONS
           UNIT_NOT_FOUND = 1
           OTHERS         = 2.

       SELECT SINGLE
         ISOCODE
       INTO ALT_UNIT_ISO
       FROM T006
       WHERE MSEHI = ALT_UNIT.

       CLEAR: UNITSOFMEASURE, UNITSOFMEASURE[],
              UNITSOFMEASUREX, UNITSOFMEASUREX[].


       UNITSOFMEASURE-ALT_UNIT = ALT_UNIT.
       UNITSOFMEASUREX-ALT_UNIT = ALT_UNIT.
       UNITSOFMEASURE-ALT_UNIT_ISO = ALT_UNIT_ISO.
       UNITSOFMEASUREX-ALT_UNIT_ISO = ALT_UNIT_ISO.
       UNITSOFMEASURE-NUMERATOR = '1'.
       UNITSOFMEASUREX-NUMERATOR = 'X'.
       UNITSOFMEASURE-DENOMINATR = '1'.
       UNITSOFMEASUREX-DENOMINATR = 'X'.
       APPEND: UNITSOFMEASURE, UNITSOFMEASUREX.


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
758

I get the answer: the unit of palletization data should be Base unit or issue unit or WM unit

1 REPLY 1
Read only

Former Member
0 Likes
759

I get the answer: the unit of palletization data should be Base unit or issue unit or WM unit