BP中,供应商和客户的创建发生了很大变化,之前的BAPI无法使用,本文档采用新的方法创建供应商。
1.定义参数
博客频遭盗窃,浏览全文,请移步公众号“斌将军”,输入关键字“供应商批导”查看
供应商主数据
2.BAPI_BUPA_CREATE_FROM_DATA
1.BAPI_BUPA_ROLE_ADD_2
添加BP角色FLVN00 FLVN01
类别税号通过BAPI_BUPA_TAX_ADD
以上操作便完成了供应商主数据的基本创建,之后要通过BAPI维护供应商的公司视图和采购视图。
1.定义参数
2.扩展公司视图和采购视图
2.1抬头和中心数据
此处的的供应商一定要使用带前导零的供应商编号,否则扩展不成功
公司视图数据
采购视图数据
采购中的业务伙伴功能
"-----------------------------@斌将军-----------------------------
FORM frm_bapi_creat.
*--------------------------------------------------------------------*
* BAPI 字段
*--------------------------------------------------------------------*
DATA:businesspartnerextern TYPE bapibus1006_head-bpartner, "导入的客户编码
partnercategory TYPE bapibus1006_head-partn_cat, "伙伴类别
partnertype TYPE bapibus1006_head-partn_typ, "伙伴类型
partnergroup TYPE bapibus1006_head-partn_grp, "伙伴分组
centraldata TYPE bapibus1006_central, "中心信息
centraldataperson TYPE bapibus1006_central_person, "人员信息
centraldataorganization TYPE bapibus1006_central_organ, "组织
centraldatagroup TYPE bapibus1006_central_group, "组
addressdata TYPE bapibus1006_address, "地址
businesspartner TYPE bapibus1006_head-bpartner, "导出的客户编码
lt_telefondata TYPE TABLE OF bapiadtel , "电话
ls_telefondata TYPE bapiadtel , "电话
lt_emaildata TYPE TABLE OF bapiadsmtp,
ls_emaildata TYPE bapiadsmtp,
lt_return TYPE TABLE OF bapiret2, "返回值
ls_return TYPE bapiret2. "返回值.
DATA:ls_bankdata TYPE bapibus1006_bankdetail.
DATA:lt_return_tax TYPE TABLE OF bapiret2 WITH HEADER LINE.
DATA:ls_main TYPE vmds_ei_main,
ls_cor1 TYPE vmds_ei_main,
ls_cor2 TYPE vmds_ei_main,
ls_mesg1 TYPE cvis_message,
ls_mesg2 TYPE cvis_message,
lt_msg TYPE bapiret2_t,
ls_msg TYPE bapiret2,
lt_vend TYPE vmds_ei_extern_t, "扩展数据
ls_vend TYPE vmds_ei_extern,
lt_vat_number TYPE cvis_ei_vat_t,
ls_vat_number TYPE cvis_ei_vat,
lt_remarks TYPE cvis_ei_rem_t,
ls_remarks TYPE cvis_ei_rem,
lt_company TYPE vmds_ei_company_t, "公司代码数据
ls_company TYPE vmds_ei_company,
lt_bankdetails TYPE cvis_ei_bankdetail_t, "银行
ls_bankdetails TYPE cvis_ei_cvi_bankdetail,
lt_purchasing TYPE vmds_ei_purchasing_t, "外部接口:商业组织
ls_purchasing TYPE vmds_ei_purchasing,
lt_functions TYPE vmds_ei_functions_t, "外部界面:合作伙伴角色
ls_functions TYPE vmds_ei_functions.
DATA:lv_lifnr TYPE lfa1-lifnr,
lv_msg TYPE char200,
lv_message TYPE char200, "返回消息
lv_check TYPE char2,
lv_lenth TYPE char2,
lv_ws TYPE char2,
lv_bprole TYPE char6. "BP角色
"-----------------------------@斌将军-----------------------------
"-----------------------------@斌将军-----------------------------
FORM frm_bapi_creat.
*--------------------------------------------------------------------*
* BAPI 字段
*--------------------------------------------------------------------*
DATA:businesspartnerextern TYPE bapibus1006_head-bpartner, "导入的客户编码
partnercategory TYPE bapibus1006_head-partn_cat, "伙伴类别
partnertype TYPE bapibus1006_head-partn_typ, "伙伴类型
partnergroup TYPE bapibus1006_head-partn_grp, "伙伴分组
centraldata TYPE bapibus1006_central, "中心信息
centraldataperson TYPE bapibus1006_central_person, "人员信息
centraldataorganization TYPE bapibus1006_central_organ, "组织
centraldatagroup TYPE bapibus1006_central_group, "组
addressdata TYPE bapibus1006_address, "地址
businesspartner TYPE bapibus1006_head-bpartner, "导出的客户编码
lt_telefondata TYPE TABLE OF bapiadtel , "电话
ls_telefondata TYPE bapiadtel , "电话
lt_emaildata TYPE TABLE OF bapiadsmtp,
ls_emaildata TYPE bapiadsmtp,
lt_return TYPE TABLE OF bapiret2, "返回值
ls_return TYPE bapiret2. "返回值.
DATA:ls_bankdata TYPE bapibus1006_bankdetail.
DATA:lt_return_tax TYPE TABLE OF bapiret2 WITH HEADER LINE.
DATA:ls_main TYPE vmds_ei_main,
ls_cor1 TYPE vmds_ei_main,
ls_cor2 TYPE vmds_ei_main,
ls_mesg1 TYPE cvis_message,
ls_mesg2 TYPE cvis_message,
lt_msg TYPE bapiret2_t,
ls_msg TYPE bapiret2,
lt_vend TYPE vmds_ei_extern_t, "扩展数据
ls_vend TYPE vmds_ei_extern,
lt_vat_number TYPE cvis_ei_vat_t,
ls_vat_number TYPE cvis_ei_vat,
lt_remarks TYPE cvis_ei_rem_t,
ls_remarks TYPE cvis_ei_rem,
lt_company TYPE vmds_ei_company_t, "公司代码数据
ls_company TYPE vmds_ei_company,
lt_bankdetails TYPE cvis_ei_bankdetail_t, "银行
ls_bankdetails TYPE cvis_ei_cvi_bankdetail,
lt_purchasing TYPE vmds_ei_purchasing_t, "外部接口:商业组织
ls_purchasing TYPE vmds_ei_purchasing,
lt_functions TYPE vmds_ei_functions_t, "外部界面:合作伙伴角色
ls_functions TYPE vmds_ei_functions.
DATA:lv_lifnr TYPE lfa1-lifnr,
lv_msg TYPE char200,
lv_message TYPE char200, "返回消息
lv_check TYPE char2,
lv_lenth TYPE char2,
lv_ws TYPE char2,
lv_bprole TYPE char6. "BP角色
"-----------------------------@斌将军-----------------------------