SAP CRM data models & the one order framework: Q&A with Stephen Johannes (transcript)

SAP CRM data models & the one order framework: Q&A with Stephen Johannes (transcript)

Published: 01/August/2013

Reading time: 13 mins

SAP CRM’s “one order” framework is a significant departure from the SAP ERP data model. How does this shape your development and enhancement efforts? 

CRM consultant Stephen Johannes, author of the book SAP CRM Technical Principles and Programming,  took readers’ questions about the SAP CRM data model, from basics to technical transactions.

This Q&A, moderated by SAPexperts‘ CRM Hub editor Scott Etkin, covered some of the questions and confusion around SAP CRM’s one order framework and differences between the CRM and ERP data models. 

Scott Etkin: Welcome, Stephen, and thanks for taking the time to answer some questions today. 

 Stephen Johannes: Thank you for having me today.

I look forward to answering the questions here as much as possible. If there is something I can’t answer, but might know a friend with the answer(if beyond our scope).  I will try to post answer here later, otherwise I will start with the current questions already out there.

acanella: Hi Stephen,

I send you my first question: Why haven’t you chosen to speak about BRF PLUS? I mean in the section at page 327 you describe partner determination access rule. I can imagine you speak access sequence, partner determination procedure and the relative BADI used to be used in a custom access sequence.

I mean you can obtain just the same via Rule modeler. Why haven’t you spoken about it?

Can you provide a quick comparison with advantages and disadvantages, by employing the two methods?

Stephen Johannes: The simple answer is that a book has a limited scope, so I couldn’t cover every topic. I also had a limited timeframe to write this, even though it took a year from start to finish. BRF+ is only available starting with CRM 7.0 EHP1 and the content design of the book was geared towards CRM 7.0 instead when I started.  If there were a 2nd edition of the book then I would have wanted to cover rapid applications and redo all the examples using BRF+ instead.

In terms of a comparison between BRF you have to remember all the access sequence/determination procedures are built into the system.  The BRF+ rules are not built in, so you would need to use BTE or BADI’s to put them as part of your business transaction. For now however using BRF+ would need custom code to have the rules invoked.

 

acanella: Hi Stephen,

I send now the second question:

Imagine I have to integrate in the frame of the factsheet (smart form version), a report coming from BO that contains graphics. What kind of API can I call to retrieve data from BO to fill properly the smartform with the content with BO graphics?

You have spoken about common enhancement having always an BI as Reporting tool. But imagine that instead of BI there is a BO. Is it more complicated to integrate across SAP CRM a BO report?

Stephen Johannes: I’m not a business object person so I really don’t have an answer to that question.  In theory if you have a web services or RFC compatible API on the BO side you could then grab the binary blog that way.  I would then take and render a smartform as HTML with a IMG placeholder for your binary blob.  However I’m just guessing on this scenario.  I forwarded this question in advance to my BOBJ friends and they said there was a REST API that could be used for this requirement.  I would recommend that you talk to your BOBJ developer for more information on the REST API.


Ken Murphy:
Hello Stephen, thank you for taking these questions. I’d like to know, what are first steps or tips for product master changes (adding attributes, etc.) that require enhancements to the data model? Thank you!

Stephen Johannes: Essentially, when you are adding attributes to the product master you are enhancing the data model.  The most common scenario when you have CRM integrated with SAP ERP as the backend is that you have extended the material master with a new attribute that is required for pricing or sales order processing or perhaps some type of search.  If you use the tools delivered by SAP to extend the product master then there is no coding needed unless you want to update or manipulate the data via code.

acanella: Hi Stephen,

I experienced personally the following case.

My customer is currently running CRM 7.0 SP 6.

He asked me to enhance the view BP_SALES, or better said the sales area data.

I actually followed this forum. Indeed the whole castle is working. The point is that I have also checked that from CRM 7.02 or better said CRM 7.0 EHP 2 is possible to use straight AET to enhance view BP_SALES.

The question is: how to manage the future upgrade?

Dismantling implicit enhancement points, suggested by the above forum , following the standard or continuing with the old solution?

Thanks in advance,

AndreA

Stephen Johannes: Keep the old solution and just live with it.  It’s going to be more of a migration pain to move all your custom fields over to standard.  I have not really looked at the AET for EHP2 in extending this part, but unless it uses a customizing include for this, then the data model will change to the AET table extension concept which is completely different than your manual extension in 7.0.

 

Scott Etkin: From your talk at SAPitSTL, it’s clear that the CRM data model, “One Data Model to Rule Them All,” is a dramatic change from typical SAP systems. What do you see as the biggest adjustment for anyone in SAP CRM in making the shift from working with SAP ERP data?

Stephen Johannes: The two biggest changes involve the primary key design of the tables and segmented data model.

In CRM the primary key on several if not all of the tables is the GUID or globally unique identifier.   In the traditional ERP system we are used to the unique key being a a technical ID that is numerical character such as customer number or document number.  The GUID instead is a generated identifier that is unique across the system.

For the segmented data model we no longer have tables with hundreds of fields such as VBAK, MARA.  Instead there are header tables with segment tables which may or may not be filled depending on the transaction type.  The one order model can model several different processes.  In addition the CRM business partner models not just customers but several different partner types.  It is like having the customer master/vendor master/contact master/employee master all in a single model which is definitely different from ERP.

 

acanella: Hi Stephen, Here is another question:

Can you just suggest better what is the better tecnologies to integrate external application? WS or RFC calls.

To me SAP CRM is moving towards WS implementation, as it is supposed to be a better SOA technique.

Anyway, somehow, the usage of RFC calls is still common, especially to integrate SAP CRM with SAP ECC.

Is SAP planning to move from RFCs to WS?

Thanks in advance,

AndreA

Stephen Johannes: The interesting comparison about RFC vs WS is that SAP only really promoted use for SOA for applications outside of the business suite.  We have had SOA based communication in the NetWeaver Stack since 2003 and yet I have yet to see WS used for application to application communication for CRM.

I think part of the problem is that RFC has less overhead than WS.  That being said, I would probably go with building RFC’s for ABAP to ABAP communication and then WS for everything else.  If you design things right you can reuse between use scenarios.

 

Shobhit: A simple question for development perspective:

If we need to do some changes for WebUI we should code at BADI (if available) or at component level, which will be more effective performance wise.

Stephen Johannes: Business logic should always be coding in the BADI level, while leaving the WebUI for user interface or navigation/display logic.  This becomes extremely important if you do mobile sales and want that logic to be extended when data is received by another application.  From a performance perspective I don’t really see too much of a difference provided you always use the API’s instead of direct database reads to access the data in your application.


shankars8r:
What is the best way to know where the Smartform is used in CRM? I do not see a table like TNAPR.

Stephen Johannes: Smartforms being executed in SAP CRM are normally done through the post processing framework.  Each business transaction contains an action profile which are assigned in the IMG under CRM->Transactions->Basic Settings->Define transaction types.

Once you located the action profile assigned you can look at the PPF customizing in SPPFCADM to see what outputs are being called.


Shobhit
: Still most of the programs developers created in CRM uses old FM example CRM_ORDER_READ but we can use BOL Query object class inplace of that to achieve result much better by passing exact parameter. Which one is still better ?

Also is there any place where we can find the list of utility class to be used in BOL programming for OneOrder framework?

Stephen Johannes: At the end of the day the BOL objects are still calling all the old one order function modules.  My general rule is use BOL objects if you are doing web client code, and use the function module directly if you are in the BADI/BTE layer of CRM or writing direct code.  Believe it or now the the BOL query stuff calls some CRM reporting framework code, so they act as a wrapper.

I’m not sure what you mean by utility class for BOL programming with OneOrder?  As the OneOrder objects are part of the BOL you would just program with those objects directly as needed.


jyodock:
We have SRM 7.2 in extended classic connecting to an ECC 6
backend. What should we look for as we implement CRM. Is there a place to access known issues.

Stephen Johannes: Well CRM is like almost any other SAP Product where known issues can be found at service.sap.com/notes that have been identified by SAP.  I also recommend the SAP Best Practices guide to in setting up the middleware connection between ERP and CRM.

I honestly follow these guides when I’m doing baseline configuration for the first time in a new module.

cnvchi: For RFCs between CRM and ERP, what is the best strategy to handle errors during RFC calls? For example, ERP calls CRM to update one order, but the order is currently locked. How would you tackle this?

Stephen Johannes: You could have the calling ERP wait and try until successful.  Unfortuantely you are going to have this issue regardless on any ABAP to ABAP type communication using RFC.  I would recommend trying optimistic locking as your approach and then build in retry.  If your calling program can’t wait, you may want to consider looking at implementing a qrfc to handle this.

shankars8r: How can we create a BP with employee role aprt from ECC HR delta? Is there any other technique to create it?

Stephen Johannes: From my knowledge if you are integrated with HR then you are restricted on your ability to do this.  If you don’t have HR turned on, you should be able to create employees manually or via code.

Jenny Xie: Hi, Stephen,  Thanks for your time!

I am just wondering if I can get a copy of CRM data model or a part of data model if it is too big. I recently was required to figure out the data model to illustrate the relationship (1 to many, or many to many) between Contract, Contract Account, Business Partner, Invoice, Billing Order. If I could get a copy from you or some related information, I can help identify my artifact.

Thank you.

Stephen Johannes: If you want to see a full version you can always go to SD11 in your CRM system.  There are model objects PRM_BP for business partners and PRM_BPPROC for the business transaction.  Other data models for CRM start with the prefix PRM* in that transaction.

Bette Ferris: Hi Stephen,

What is the relationship between the CRM data model and the BOL layer in the CRM Web client?

Thank you.

Stephen Johannes: The BOL layer is really an abstraction on top of the physical data model for CRM.  BOL is primarily used by the Web client to update/manage data in CRM that is modeled underneath by the business logic layer that exists underneath.  The key part is that BOL mirrors but is not quite an exact physical representation of the table structures.

cnvchi: Do you know any programs similar to CRM_ORDER_READ, but for business partners?

Stephen Johannes: Honestly I haven’t used any off hand.  I normally stick with single testing function modules such as BUPA_CENTRAL_READ_DETAIL to see if they give me the information that I require.

shankars8r: Is there a way to track ORG Model Changes in CRM?

Stephen Johannes: The CRM org model is based on the HR Org Model found in ERP.  So technically all your positions and organization objects can be delimited instead of being deleted although I must admit I still cheat and update my org model via the SAP GUI instead of the web client.  With org managment we always recommend delimit instead of delete if you need history.

shankars8r: Thanks for your time Stephen. I just brought your book. It is awesome.

I do not know what to ask at this moment but I have different question from CRM data model:  Is there a way to display an incoming email as an URL like  object sales order..etc? What is the best way to get an incoming email along with headers? Is there any transaction to view header information?

Thank You

Stephen Johannes: Thanks for the kind words on the book.

Not 100% certain on your question, but you can always use the ERMS tool to have your CRM system receive inbound e-mails and generate/update business transactions from those mails.  As you also know users can also generate inbound e-mail from their outlook inbox by importing the mails.

For outbound e-mails you can send out and do a lot stuff either through actions or custom code or combination.  It just depends on your requirements. (I will have to pay the consultant penalty box for using it depends).

Shobhit: Hi Stephen,

Does SAP provide any authorization object or some config where we can restrict Org model access based on specific Org Unit or position. There was one requirement and i did fulfill it by webui enhancement and creating custom authorization object but just want to know if sap has anything for this.

Thanks for other answers.

Stephen Johannes: I haven’t had a need for restricting the org model itself based on authorizations, but I’m don’t think that structural authorizations found in HR really are utilized in CRM.  There might be something you could do with ACE, but like most people I try to avoid using ACE due to performance issues.

Ioan: Hi Stephen,

Thanks for taking these questions.

Speaking about data model for Accounts and Contacts, what would be the long-term recommendation for dealing with Prospects (which in fact are truly new Accounts or duplicates of existing Accounts, once appropriate master data processes & controls are followed), assuming a scenario where Accounts are mastered in ECC, while Contacts and Prospects being mastered in CRM?Would you move the creation of a Prospect altogether in ECC instead?

Linked to this, any news on improved performance of duplicate check at the point of creation for Contacts and Prospects in CRM, especially for large implementations?

Thanks!

Stephen Johannes: I would still keep prospect/contact creation in CRM and have your master data management group the ability to merge prospects into customers as needed.  Prospect Creation in ECC normally slows down your sales team(because customer master is usually centrally managed) and it’s another place for the sales team to do their work.

In terms of duplicate check performance, I haven’t heard of any performance improvements in that area, and I would expect however with SAP putting CRM on HANA there might be hope for general performance improvement and out of the box delivery instead of needing a separate TREX.  That being said I don’t and can’t speak for SAP on their long term CRM roadmap.

Charlotte Christy: Hi Stephen, Thanks for taking these questions today. Can you share any best practices for using BAPIs to update business partner and business transaction master data?

Stephen Johannes: In general I would first always look at the XIF adapter function modules if you are doing a bulk data load into your system.  This allows for processing through the CRM middleware and ensures all your validation checks are valid.

For more light-weight scenarios, I would recommend using the CRM_ORDER_MAINTAIN function module for business transactions and the BAPI_BUPA* function modules for business partners.

cnvchi: Some BP tables are not available to enhance with AET such as BP011. How do you go about enhancing these tables? I know it is possible to update the BOL object with a new class, but the standard BAPIs can only be changed with core modifications. What is your strategy?

Stephen Johannes: My only question would is do you really need the data in your logical model to be physically on that table?

If not I would recommend instead using the add new table feature of the AET or add new fields for the business partner and then including that data via webclient BOL programming to your screens or via the AET mashup insertion for new tables.

I think many times in extending the data model we focus too much on a particular table to extend, rather than looking at things logically in terms of what data we need on our business partner.

Scott Etkin: Thanks to everyone for joining us today.

For more questions for Stephen about his book – or to comment on your own experiences working on SAP CRM – there’s also a dedicated Twitter handle just for SAP CRM Technical Principles and Programming readers:  @sapcrmtpp

Finally, thank you to Stephen Johannes for joining us today.

Stephen Johannes: Thank you for having me here today.


Did you find this Q&A helpful? Get access to the latest updates and resources from SAPinsider with a free subscription.

More Resources