BP -> Customer

CRM中客户的双向同步是老话题了,Note 1541354介绍了CRM -> ECC 方向Debug的方法:

  1. Display the BDOC in SMW01
  2. Enter /h in the transaction code field
  3. Press the ‘retry to process message’ button.
  4. In the debugger – select the Settings button and ‘In background task  do not process’ (Classical debugger)  // 新的叫TRFC(In Background Task): Block Sending
  5. Enter F8
  6. Create a new session for the outbound queue (/osmq1) there will be an entry R3AUBUPA*** or CSA_BUPA**
  7. Double-Click on this queue entry twice and choose Debug for the CRM_UPLOAD_TRIGGER
  8. In the debugger, set a breakpoint at statement ‘CALL TRANSACTION’ and then press F8.
  9. At this statement double-click on the statement CALL_TRANSACTION and change the variable CALL_TRANSACTION_MODE from N to A, press the ‘change field content’ button and then press F8
  10. Now you will be in the R/3 System and you can see the batch input screen for this customer and you will then be prompted for the missing field in the BDOC.

CUSTOMER_REL

Adapter Object: CUSTOMER_REL有两个功能:

  • 同步Contact Person,以Relationship的方式
  • 同步Partner Function,同样以Relationship的方式

注意,像Ship-to,Bill-to等等,如果是自身的话(叫做self-reflection),在CRM中是不会产生Relationship的,因为CRM不允许self-reflection。而对于自定义的Partner Function,需要在CRM中配置:

  • Distribution of Partner Functions from SAP ECC into CRM
  • Distribution of Partner Functions from CRM into SAP ECC

针对self-reflection,其实在Define Partner Functions中Block选项就是干这个的,如果不勾选的话,意味着在Partner Determination过程中,可选自身作为任意的Partner Function。详见Note: 417022

在CRM中,self-reflection用BP Role来体现。但是CRM中,BP Role没有什么特殊功能,只是UI的集合,参见Note: 596334

再引用一段话:

The self reflexive partner function by design are not replicated to CRM
from R/3, because in the CRM system they do not make sense as per the
design and data model of the CRM system.

In R/3 when a customer is created in a particular sales area under a
particular account group self reflexive partner functions like
Ship-to-party, Bill-to-party and so on are added.

This information is represented in CRM in terms of roles because in CRM
partner functions refer only to the ones that a BP has with another BP
and not itself. All the information related to a BP in CRM are stored
in the BP data itself and never through partner functions.

Similarly, these partner functions will not be displayed in the
[RELATIONSHIPS] tab. Please note that self-reflecting partner
functions are not allowed in CRM because it’s physically not possible
for a Business Partner to have a relationship or a partner function
with himself. Such partner functions are subject of partner
determination process in CRM, and by default Ship-to-party, Payer and
Bill-to-Party functions are assumed for all Business Partners.
During data exchange such Partner Functions are simply ignored.

 

Partner Determination

两个BADI可以用来做Partner Determination,传统的是COM_PARTNER_DETERM,需要在View: COMV_PARTNER_DOR中创建条目。CRM中现有的Access Sequence,也是通过这个BADI来Implementation。

另外一个叫COM_PARTNER_BADI,对应Access Sequence中Source的COM_PARTNER_X, Y, Z。

上述两个BADI,可以在Function Module: COM_PARTNER_DETERM_STEP_ONE_OW中看看是怎么一回事。