Why is “GUID” used in SAP CRM?

One consultant from customer who has rich experience in ERP SD/MM module asked me a question some time ago. why GUID is used in SAP CRM, instead of using <product id>/<business partner id> directly? Because in R/3, ECC or ERP solution, GUID is not introduced. One exception might be the business partners (not customer/vendor/consumer, but business partner like in CRM), if you activate the business partner functionality in ERP, you could also find BP GUID in table BUT000.

Going back to the original question, this time I did some research and now am going to provide an answer which makes sense to me.

1) What is GUID?

Ans: GUID stands for Globally/Generally Unique Identifier. In CRM, they are either 16 bit, 22 bit or 32 bit raw character format(1).

2) Why is GUID used in SAP CRM?

Ans: With GUID, we could prevent issues with number range conflicts and allow for easier access to CRM tables. This rooted at the data model differences between CRM and ERP. CRM has a segment based data model which stores the data of one business object in a logical unit, instead of storing it in a large corresponding table (like in ERP). Therefore when developing CRM, table joins between related tables would be more common than ERP, and with a generic identifier, it would be easier to build up the connection(2).

3) How is GUID created?

Ans: GUIDs are created using the Function Module “GUID_CREATE” and "SYSTEM_UUID_C22_CREATE" in SAP System. From the ‘Export’ parameters, you will know that why there are only three types of GUIDs.

image

And for GUID conversion between the different length function module "GUID_CONVERT" is designed to do that. 

However, as of SAP NetWeaver 7.00 Enhancement Package 2 and Netweaver 7.10, the class "CL_SYSTEM_UUID" is created for the UUIDs creation and convertion. This class provides both static method to create single UUID directly and normal method for different scenarios. You can refer to SAP Note 935047 to get more about this.

4) What are the different GUIDs in SAP CRM?

Ans: Well…that depends how many different objects there are in the SAP CRM. A simple way to get the answer is to use the “where-used-list” for type “GUID_16”, "GUID_22” and “GUID_32”. We could get the most used GUIDs and their corresponding types:

GUID_16: Business Transaction GUID (all business transactions), Business Partner GUID (Business partner), Address GUID (Business Partner Address), Installed Base GUID (IBIB), Trace GUID (Trace Tool), etc..

GUID_22: Mostly used in Data Migrations (tables start with DMC_*).

GUID_32: STAD Record Transaction ID, BDoc ID (SMW3_BDOC2)

5) Some other GUID related questions in CRM Middleware

-5.1) Is GUID only unique in CRM or GUID is unique across CRM and R3 ?

Ans: Based on the information above, we could say that GUID is unique at least across the whole CRM system. If the range is extended to ERP, the answer might depend on the sync scenarios between CRM and R/3.

If the scenario is CRM business partner <–> ERP customer/consumer/vendor, then obviously, there is no GUID in ERP for these objects, and GUID will not exist in ERP.

If the scenario is CRM Business partner <-> ERP business partner, according to the experiment I did, the GUID should be the same across ERP and CRM!!!

- 5.2) During Data Exchange (Material, Customer Master, Employee, Transaction), any GUID created in CRM is also stored in R3 ? any GUID created in R3 is also stored in CRM ?

Ans: One thing for sure is that for material (products in CRM), no GUID exists in ERP, so the GUID is only created when the data is Downloaded/Delta_update to CRM. But the GUID is not stored in ERP (because no place to store) For customer master or employee (all business partners in CRM), there is also no GUID except when the employee/customer master is in Business Partner format also in ERP, otherwise the situation is just like Material and transactions. Only when the data is flowed into CRM when the corresponding GUID is created in CRM and none of these GUIDs will be stored in ERP.

No new GUIDs are created in ERP during data exchange except the “CRM BP <-> ERP BP” scenario.

(The End)

 

Information resource & References:

(1) http://wiki.sdn.sap.com/wiki/display/CRM/Basic+CRM+Technical+Concepts

(2) Another version of answer to this question says that because CRM is a mobile system (sales resp. might use mobile devices often to communicate with CRM server), and when the sales resp. creates the order, he normally would not connect to the backend and identify the unique id for the orders but create a normal order ID as he like. To make sure the order is still unique when they sync the order info with backend, GUID will be necessary. But anyway this is also to avoid the number range conflicts. However I don’t quite agree with this explanation because the scenario is not widely used and also makes little sense (real time sync between sales resp. and customer is possible nowadays.) See more details about this explanation: http://www.magnatraining.com/what-is-guid-in-sap-crm/

posted @ 2012-01-27 04:59  Raymond Zhang  阅读(6155)  评论(0编辑  收藏