`
JerryWang_SAP
  • 浏览: 964982 次
  • 性别: Icon_minigender_1
  • 来自: 成都
文章分类
社区版块
存档分类
最新评论

无法添加某个relationship给SAP CRM Product category的一个可能原因

阅读更多

For example, I would like to test relationship type STRSET and then I plan to add it to product category 00001.

 

 

However, in available drop down list, I could not see relationship type STRSET. Why?

 

 

When debugging the backend logic to render relationship type drop down list entries, I found there is a check implemented by the function module below, to avoid a relationship is assigned more than once.

 

 

According to SAP help, a set type / relationship may be assigned to more than one category within a hierarchy, but to only one hierarchy for each product type. Therefore even if two categories are in different hierarchies but have the same product type, it is not possible to assign the set type / relationship to both categories. In my example, the check against my category 00001 belonging to hierarchy R3PRODHIER fails ( assign_not_allowed ).

 

 

The question is, how to find other categories in different hierarchy other than R3PRODHIER, which are already assigned with STRSET? In order to make life easier, I write the following utility method to detect such collision: Method input: relationship type name, here it is STRSET:

 

 

Output is a table with line type category id, hierarchy id and product type the category is assigned to.

 

 

By using this method, I know in current system, in another product hierarchy R3PRODSTYP, there are already three categories with relationship type STRSET assigned:

 

 

As a result I have several approaches: I can remove the relationship STRSET from category ZALTID, after that it will be possible again for me to add STRSET to category 00001. If there is already product created based on category ZALTID, it will not be possible to remove relationship from ZALTID, then I have to consider to directly add category ZALTID or its children category to my product. The utility method signature:

 

 

type TT_USAGE used:

types:
    BEGIN OF ty_usage,
       cat_id TYPE comm_category-category_id,
       hier_id TYPE comm_hierarchy-hierarchy_id,
       prod_type TYPE comm_product-product_type,
        END OF ty_usage .
  types:
    tt_usage TYPE STANDARD TABLE OF ty_usage WITH key cat_id hier_id .
Method source code:
  METHOD rel_type_usage_check.
    DATA: lt_prcat_il_rel TYPE comt_prcat_il_rel_tab,
          ls_prcat        LIKE LINE OF lt_prcat_il_rel,
          ls_category     TYPE comt_category,
          ls_prcattype        TYPE comt_prcat,
          lv_hie_id       TYPE comm_hierarchy-hierarchy_id.

    CALL FUNCTION 'COM_PRCAT_IL_REL_READ_WITH_IL'
      EXPORTING
        iv_il_reltype   = iv_rel
        iv_il_direction = 'S'
      IMPORTING
        et_prcat_il_rel = lt_prcat_il_rel
      EXCEPTIONS
        not_found       = 1
        wrong_call      = 2
        OTHERS          = 3.
    CHECK sy-subrc = 0.

    LOOP AT lt_prcat_il_rel INTO ls_prcat.
      CALL FUNCTION 'COM_CATEGORY_READ'
        EXPORTING
          iv_category_guid = ls_prcat-category_guid
        IMPORTING
          es_category      = ls_category
        EXCEPTIONS
          wrong_call       = 1
          not_found        = 2
          error            = 3.
      CHECK sy-subrc = 0.
      SELECT SINGLE hierarchy_id INTO lv_hie_id FROM comm_hierarchy
         WHERE hierarchy_guid = ls_category-hierarchy_guid.
      CHECK sy-subrc = 0.
      CALL FUNCTION 'COM_PRCAT_READ'
        EXPORTING
          iv_category_guid = ls_category-category_guid
        IMPORTING
          es_prcat         = ls_prcattype
        EXCEPTIONS
          wrong_call       = 1
          not_found        = 2
          OTHERS           = 3.
      APPEND INITIAL LINE TO rt_usage ASSIGNING FIELD-SYMBOL(<result>).

      <result> = value #( cat_id = ls_category-category_id hier_id = lv_hie_id
      prod_type = ls_prcattype-product_type  ).
    ENDLOOP.

  ENDMETHOD.

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

0
1
分享到:
评论

相关推荐

    sap t-code and menu relationship

    and t-code's relationship. SAP standard menu | |-- Office |-- Logistics | | | |-- Materials management | | | | | |-- Inventory management | | | | | | | |-- Goods movement | | | | | | | | ...

    SAPSRM (over view)SAP Supplier Relationship Management (Col92)

    SAPSRM (over view)SAP Supplier Relationship Management (Col92)

    SAP CRM - Statement of Direction for 2006 - 2008 (A4).pdf

    Customer relationship management (CRM) without compromise: with a move to a hybrid model, SAP offers customers more deployment options and more flexibility for growth without disruption....

    Customer Relationship Management (CRM) 客户关系管理(CRM).pdf

    Customer Relationship Management (CRM) 客户关系管理(CRM).pdf

    crm资料大集合 CRM (Customer Relationship Management)

    crm资料大集合 一 CRM概述 CRM (Customer Relationship Management) 既...一个客户的信息 从而知道什么样的客户需要什么东西 同时还能观察和分析客户行为对企业收益的影响 使企业与客户的关系及企业利润得到最优化

    CRM系统基础知识

    在不同场合下,CRM可能是一个管理学术语,可能是一个软件系统,而通常所指的CRM,是指用计算机自动化分析销售、市场营销、客户服务以及应用支持等流程的软件系统。它的目标是缩减销售周期和销售成本、增加收入、寻找...

    SAP课程介绍.doc

    3. SAP global certification program for SAP CRM 2007 SAP2007客户关系管理全球认证 54 4. SAP global certification program for SAP CRM 2005 SAP2005客户关系管理全球认证 55 五、 SAP ERP 56 1. Analytics ...

    native_Customer Relationship Management(crm)_php_

    Source Code Customer Relationship Management System

    CRM(Customer Relationship Management,客户关系管理)

    CRM(Customer Relationship Management,客户关系管理)是一种基于Internet 的应用系统,是企业“以产品为中心模式”向“以客户为中心模式”转移的必然结果。它通过对企业业务流程的重组来整合用户信息资源,以更有效的...

    Customer Relationship Management(CRM)

    为了规定销售管理、提升经营绩效、特制定本方法,赶快来下载Customer Relationship Management...该文档为Customer Relationship Management(CRM),是一份很不错的参考资料,具有较高参考价值,感兴趣的可以下载看看

    某公司客户关系管理系统CRM解决方案

    一、CRM理论概述​2 1.问题的提出​2 2.问题的解决方案​3 3. CRM概念​3 4. CRM的发展和现状​4 5.CRM系统在企业应用系统中的地位​5 6、CRM给企业带来什么​6 二、Pivotal eRelationship功能简介​9 1市场...

    Enhancing Supplier Relationship Management Using SAP SRM.zip

    sap press doc 解压密码:abap_developer

    SAP PA培训课程介绍

    四、 SAP Customer Relationship Management SAP客户关系管理 ............................. 52 1. CRM enterprise 客户关系管理企业 .............................................................................

    CRM的一本好书

    Crm Handbook-The A Business Guide To Customer Relationship Management

    sap-tables.zip

    SAP R3 Table Relationship eBook:SAP MM, SD, FI, PS, PP, PM, HR, System Tables

    CUSTOMER RELATIONSHIP MANAGEMENT (CRM)

    CUSTOMER RELATIONSHIP MANAGEMENT (CRM)以实践认知世界,以实事构架世界,CUSTOMER ...该文档为CUSTOMER RELATIONSHIP MANAGEMENT (CRM),是一份很不错的参考资料,具有较高参考价值,感兴趣的可以下载看看

    CRM data module(table relationship)

    绝大部分CRM核心表之间的关系,很具体,资料来自国外

    电子商务环境下分析型CRM体系结构解析

    随着科学技术的进步和时代的发展,基于互联网的电子商务,已被公认为是影响21世纪...目前,客户关系管理(Customer Relationship Management,CRM)的重要性已经被越来越多的企业所认识、并逐渐应用于企业的管理之中。

    Data mining techniques for customer relationship management

    Keywords: Customer relationship management (CRM); Relationship marketing; Data mining; Neural networks; Chi-square automated interaction detection (CHAID); Privacy rights ∗ Corresponding author. Tel....

    CRM-master.zip

    CRM(Customer Relationship Management) 即:客户关系管理,是一种以"客户关系一对一理论"为基础,旨在改善企业与客户之间关系的新型管理机制。 客户关系管理是企业为提高核心竞争力,利用相应的信息技术以及互联网...

Global site tag (gtag.js) - Google Analytics