Skip to Content
Author's profile photo Former Member

获取CRM系统下Sales org/office/group之间的关系

当ERP中的组织架构传输到CRM下的时候,CRM系统里面的组织数据会产生变化。

无法通过PPOMA_CRM或者 ‘RH_STRUC_GET’ FUNCTION来直接获取到销售组织、办事处和组之间的关系。

在ERP中的关系如下:

Sales Org : Sales Off = 1 : n

Sales Off  : Sales Grp = 1 : n

2B1ED06C-FCD3-4A17-8FEA-8FD417E5A1D6.png

在CRM中,Org/Off/Grp之间的关系是存储在表     HRV5551A

为了方便,我们可以利用类 cl_crm_orgman_servicescl_crm_orgman_interface

范例如下:

  CALL METHOD cl_crm_orgman_services=>list_sales_orgs
     IMPORTING
       sales_orgs = lt_sales_orgs.

****************************

  CALL METHOD cl_crm_orgman_interface=>read_attributes_for_maint
     EXPORTING
       scenario   = ‘SALE’
       otype      = ‘O’
       objid      = lw_sales_offsobjid                “传入objid
       attributes = lt_attributes                         ”填入想要获取到的属性(可选)
       sel_date   = sydatum
     IMPORTING
       values     = lt_values.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.