【转自http://blog.csdn.net/lyb_yt/article/details/17962609】
进来遇到一个创建供应商的需求,由于在系统中关于供应商和客户的创建比较特殊,且没有相关函数进行创建,
找到一个类和方法来创建,类名:VMD_EI_API 方法名:MAINTAIN_DIRECT_INPUT,类似的
* 供应商表头
ls_vendors-header-object_instance-lifnr = lv_vendor. "供应商
ls_vendors-header-object_task = 'M'. "创建/更改
* 通用数据
ls_vendors-central_data-central-data-stceg = stceg. "增值税登记号
ls_vendors-central_data-central-data-ktokk = '0001'. "账户组
ls_vendors-central_data-central-data-j_1kfrepre = j_1kfrepre. "代表名称
ls_vendors-central_data-central-datax-stceg = 'X'. "增值税登记号
ls_vendors-central_data-central-datax-ktokk = 'X'. "账户组
ls_vendors-central_data-central-datax-j_1kfrepre = 'X'. "代表名称
* 电话
ls_phone-contact-data-telephone = phone.
APPEND ls_phone TO ls_vendors-central_data-address-communication-phone-phone.
CLEAR ls_phone.
* 邮箱
ls_smtp-contact-data-e_mail = smtp.
APPEND ls_smtp TO ls_vendors-central_data-address-communication-smtp-smtp.
CLEAR ls_smtp.
ls_vendors-central_data-address-postal-data-name = name. "名称
ls_vendors-central_data-address-postal-data-name_2 = name. "名称
ls_vendors-central_data-address-postal-data-sort1 = sort1. "属性(SAP为搜索项 1)
ls_vendors-central_data-address-postal-data-street = street. "街道/门牌号
ls_vendors-central_data-address-postal-data-postl_cod1 = postl_cod1. "邮政编码
ls_vendors-central_data-address-postal-data-city = city. "城市
ls_vendors-central_data-address-postal-data-country = country. "国家
ls_vendors-central_data-address-postal-data-region = region. "地区
ls_vendors-central_data-address-postal-data-langu = '1'. "语言
ls_vendors-central_data-address-postal-datax-name = 'X'.
ls_vendors-central_data-address-postal-datax-name_2 = 'X'.
ls_vendors-central_data-address-postal-datax-sort1 = 'X'.
ls_vendors-central_data-address-postal-datax-street = 'X'.
ls_vendors-central_data-address-postal-datax-postl_cod1 = 'X'.
ls_vendors-central_data-address-postal-datax-city = 'X'.
ls_vendors-central_data-address-postal-datax-country = 'X'.
ls_vendors-central_data-address-postal