abap-关于sap地址,传真,邮箱的地址读取

在sap的应用中,很多地方需要用到地址和联系方式,sap对于地址采用了集中维护,最近对这进行了学习,收集到的一些资料供大家参考,也请大家多多指点。
一、相关package
SZAD
二、相关表(可以参见ADDR_SAVE_INTERN函数的操作)
1 ADR2 : 电话号码 (业务地址服务)(ADDRNUMBER(10),PERSNUMBER(10))
2.ADR3:传真号 (业务地址服务)(ADDRNUMBER(10),PERSNUMBER(10))
3.ADR4:电传号码 (业务地址服务)(ADDRNUMBER(10),PERSNUMBER(10))
4.ADR5:电传号码 (业务地址服务)(ADDRNUMBER(10),PERSNUMBER(10))
5.ADR6:SMTP 编号 (业务地址服务)(ADDRNUMBER(10),PERSNUMBER(10))
6.ADR7:远程邮件地址 (R/3 – R/3; 业务地址服务) (ADDRNUMBER(10),PERSNUMBER(10))
7.ADRC:地址 (业务地址服务) (ADDRNUMBER(10))
8.ADCP:个人/地址分配 (业务地址服务)(ADDRNUMBER(10),PERSNUMBER(10)),纪录用户哪些数据被维护如:FLAGCOMM3为’X’表示传真号被维护;
9.ADRP:个人(办公地址管理)(PERSNUMBER(10))
三、相关BAPI
BAPI_ADDRESSPERS_CHANGE
BAPI_ADDRESSPERS_GETDETAIL
四、获取下一个地址自动编号(代码)
1.供应商地址的读取
addr_ref-appl_table = ‘EKKO’.
addr_ref-appl_field = ‘ADRNR’.
addr_ref-appl_key(3) = ekko-mandt.
addr_ref-appl_key+3(10) = ekko-ebeln.
addr_ref-addr_group = ‘ME03’.
addr_ref-owner = space.
* get address number
CALL FUNCTION ‘ADDR_NUMBER_GET’
EXPORTING
address_handle = address_handle
address_reference = addr_ref
IMPORTING
address_number = p_ekko-adrnr
EXCEPTIONS
address_handle_not_exist = 1
internal_error = 2
parameter_error = 3
OTHERS = 4.
2.客户的地址

3.获取合作伙伴地址号码
先获取联系人编号
REFERENCE-APPL_TABLE = ‘KNVK’.
REFERENCE-APPL_FIELD = ‘PRSNR’.
*PERSON-KEY_CONTENT为合作伙伴的编号
CONCATENATE SY-MANDT PERSON-KEY_CONTENT INTO REFERENCE-APPL_KEY.
REFERENCE-PERS_GROUP = C_ADDRESS_GROUP.
REFERENCE-ADDRNUMBER = ADDRESS_NUMBER.
IF ADDRESS_TYPE = C_TYPE_2.
REFERENCE-PERS_ADDR = ‘X’.
CLEAR REFERENCE-ADDRNUMBER.
ELSE.
CLEAR REFERENCE-PERS_ADDR.
ENDIF.
REFERENCE-OWNER = ‘X’.
CALL FUNCTION ‘ADDR_PERSON_NUMBER_GET’
EXPORTING
PERSON_HANDLE = PERSONHANDLE
PERSON_REFERENCE = REFERENCE
IMPORTING
PERSON_NUMBER = ZAV_TAB-PERSON-NUMBER
EXCEPTIONS
INTERNAL_ERROR = 1
PERSON_HANDLE_NOT_EXIST = 2
PARAMETER_ERROR = 3
OTHERS = 4.
*在获取地址编号
CALL FUNCTION ‘NUMBER_GET_NEXT’
EXPORTING
NR_RANGE_NR = ’01’
OBJECT = ‘ADRNR’
QUANTITY = REQUESTED_QUANTITY
IMPO

剩余70%内容付费后可查看

You may also like...

1 Response

  1. ag说道:

    ADDR_SELECT_ADRC_ARRAY ADDR_SELECT_ADRC_SINGLE

发表评论