客户/供应商主数据维护中,SAP提供了两个强大的类cmd_ei_api=>maintain_bapi和VMD_EI_API下面是客户主数据维护的例子,供应商的类似。当客户编码为数据类型时,一定要将客户编码补0,否则系统会出现莫名其妙的错误。
*&---------------------------------------------------------------------*
*& 程序名称:ZSDB0002
*& 作者 :
*& 开发日期:
*& 请求号 :
*& 描述 :
*& 开发申请:
*& 变更记录
*&
** 修改日期 开发人员 请求号 描述
*&---------------------------------------------------------------------*
REPORT zsdb0002 MESSAGE-ID zl_mess.
INCLUDE ZSDB0002_VAR_INCLUDE.
INCLUDE ZSDB0002_SCREEN_INCLUDE.
INCLUDE ZSDB0002_FILE_INCLUDE.
*&---------------------------------------------------------------------*
*& Include ZSDB0002_VAR_INCLUDE
*&---------------------------------------------------------------------*
TYPES:BEGIN OF ty_basis,
ktokd TYPE kna1-ktokd ,
kunnr TYPE kna1-kunnr ,
chhu type c LENGTH 4,
name1 TYPE adrc-name1 ,
name2 TYPE adrc-name2 ,
sortl TYPE kna1-sortl ,
sort2 TYPE adrc-sort2 ,
street TYPE adrc-street ,
land1 TYPE kna1-land1 ,
regio TYPE kna1-regio ,
tel TYPE adrc-tel_number ,
fax TYPE adrc-fax_number ,
smtp TYPE adr6-smtp_addr ,
remark TYPE adrct-remark ,
stceg TYPE kna1-stceg ,
kukla TYPE kna1-kukla ,
brsch TYPE kna1-brsch ,
umsa1 TYPE kna1-umsa1 ,
uwaer TYPE kna1-uwaer ,
umjah TYPE kna1-umjah ,
katr1 TYPE kna1-katr1 ,
katr2 TYPE kna1-katr2 ,