I am trying to extend material using BAPI_MATERIAL_SAVEDATA.
Basic, Plant, Sales, Accounting view are required.
Everything is working fine except sales view. But when I tried to include sales view, it's giving error "Field MVKE-MVGRP1 is MANDATORY" and it's asking the values for these 5 MVGRPs.
But when we cretae/extend material using "mm01", it does not ask for this field.
I have written below code for sales view.
BAPI_MVKEX-SALES_ORG = INT_MAT-VKORG.
BAPI_MVKEX-DISTR_CHAN = INT_MAT-VTWEG.
BAPI_MVKEX-ITEM_CAT = 'X'.
BAPI_MVKEX-CASH_DISC = 'X'.
BAPI_MVKE1-SALES_ORG = INT_MAT-VKORG.
BAPI_MVKE1-DISTR_CHAN = INT_MAT-VTWEG.
BAPI_MVKE1-ITEM_CAT = INT_MAT-MTPOS.
BAPI_MVKE1-CASH_DISC = INT_MAT-SKTOF.
Appreciate any help.