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 proportion/prod. unit

Former Member
0 Likes
2,328

Hi all,

I use BAPI_MATERIAL_SAVEDATA for creating material. I always fill the proportion/prod. unit tab when i create material using MM01. But within BAPI_MATERIAL_SAVEDATA, i can not fill this field cause BAPI_MARM structure does not have fields like proportion/prod.unit tab has. How can i fill this properties, is there any BAPI for this ?

Thanks,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,526

Hi all,

I found that proportion/prod. unit fields saved in MARM-ATINN, MARM-XFHDW, MARM-KZESO and MARM-MSEHI fields. Is there any way to fill these fields within BAPI_MATERIAL_SAVEDATA. I found nothing in BAPI_MARM related with these fields.

Thanks,

5 REPLIES 5
Read only

Former Member
0 Likes
1,527

Hi all,

I found that proportion/prod. unit fields saved in MARM-ATINN, MARM-XFHDW, MARM-KZESO and MARM-MSEHI fields. Is there any way to fill these fields within BAPI_MATERIAL_SAVEDATA. I found nothing in BAPI_MARM related with these fields.

Thanks,

Read only

0 Likes
1,526

Try using function VBWS_UOM_MAINTAIN_DARK.

Read only

Former Member
0 Likes
1,526

Hi Maen Anachronos,

Thanks for your answer. Is there any example of usage of this FM?

Read only

Former Member
1,526

Thanks,

Problem solved as below.


  CALL FUNCTION 'VBWS_UOM_MAINTAIN_DARK'
    EXPORTING
      I_MATNR                              = LV_MATNR
      I_KZWSM                             = 'B'
      I_KZWSMX                           = 'X'
*     I_TYPE_OF_BLOCK             = 'E'
      I_EXIT_BY_FIRST_ERROR   = 'X'
*     I_LIST_ERRORS_ONLY       = ' '
      I_USER                                 = SY-UNAME
      I_BUFFER_REFRESH            = 'X'
*     I_UPDATE_BUFFER_ONLY  = ' '
      I_NO_UPDATE                    = ' '
*     I_RFC_SENDER                  =
*     I_CALLING_METHOD          =
*   IMPORTING
*     E_KZWSM                          =
*     E_KZWSM_OLD                 =
    TABLES
      I_MEINH_WS_UPD              = LT_MEINH_WS_UPD
      I_MEINH_WS_UPDX            = LT_MEINH_WS_UPDX
*      I_MEINH_WS_SFN             =
*      I_MEINH_WS_SFNX           =
*      E_MEINH_WS                    =
*      E_MEINH                            = 
*     E_MEINH_OLD                    =
*     E_MESSAGE                      =
      E_RETURN                          = LT_RETURN
*   EXCEPTIONS
*     ERROR                       = 1
*     OTHERS                      = 2
            .

Read only

0 Likes
1,526

As mentioned in the above thread This particular FM CALL FUNCTION 'VBWS_UOM_MAINTAIN_DARK' helped to update proportion/prod. unit in material master .