如何使用BAPI在MRP3视图中为材质配置变体?

时间:2016-12-15 16:38:09

标签: sap variant bapi

我应该在MM02事务的MRP3视图中使用哪个BAPI来为SAP中的成品好材料创建可配置的变体?

enter image description here

1 个答案:

答案 0 :(得分:1)

你应该像这样使用test_size <- FALSE FM:

  1. 获取给定工厂的配置对象

    MATERIAL_SAVE_CONFIGURATION

    或者,您可以手动填写参数

    CALL FUNCTION 'CUXM_GET_CONFIGURATION'
      EXPORTING
        instance = ls_marc-cuobj
        werks    = ls_marc-werks
      TABLES
        t_e1cucfg = ic_e1cucfg
        t_e1cuins = ic_e1cuins
        t_e1cuval = ic_e1cuval
        t_e1cucom = ic_e1cucom
    
  2. 使用返回值作为lt_e1cucfg-POSEX = '4000'. lt_e1cucfg-CONFIG_ID = '000001'. lt_e1cucfg-ROOT_ID = '00000001'. lt_e1cucfg-COMPLETE = 'T'. lt_e1cucfg-CONSISTENT = 'T'. APPEND lt_e1cucfg. lt_e1cuins-INST_ID = '00000001'. lt_e1cuins-OBJ_TYPE = 'MARA'. lt_e1cuins-CLASS_TYPE = '300'. lt_e1cuins-OBJ_KEY = 'C_GLTP'. lt_e1cuins-QUANTITY = '1000'. lt_e1cuins-QUANTITY_UNIT = 'KG'. lt_e1cuins-COMPLETE = 'T'. lt_e1cuins-CONSISTENT = 'T'. lt_e1cuins-OBJECT_GUID = 'C_GLTP'. APPEND lt_e1cuins. gv_matnr = '000000000004002322'. lt_e1cuval-inst_id = '00000001'. lt_e1cuval-valcode = '1'. lt_e1cuval-charc = 'SHOT_PEENING_Y_N'. lt_e1cuval-value = 'N'. APPEND lt_e1cuval. lt_e1cuval-charc = 'BENDING_Y_N'. lt_e1cuval-value = 'N'. APPEND lt_e1cuval. lt_e1cuval-charc = 'LENGTH_MIN_DISCRIMINATING_MM'. lt_e1cuval-value = '5000'. APPEND lt_e1cuval. lt_e1cuval-charc = 'LENGTH_MAX_DISCRIMINATING_MM'. lt_e1cuval-value = '7000'. APPEND lt_e1cuval.

    的输入参数
    MATERIAL_SAVE_CONFIGURATION