Thursday, 20 September 2012

Message Class and Message numbers for messages on the UI

In the SAP CRM GUI,it is easy to get the Message Class and Message Number for any error. However,  for the errors encountered in SAP CRM WebUI interface, you can not directly get the message class and message numbers. Here is a quick tip of how to do that.
1) Put a breakpoint in CL_CRM_GENIL_GLOBAL_MESS_CONT, method IF_GENIL_MESSAGE_CONTAINER~GET_MESSAGES. This break point is encountered every time a message is raised.
2) Perform the action of the UI that throws the error for which you need to find out the message class and message id.
3) When debugger stops at the above set break point, check the contents of ET_MESSAGES
4) Here field ID gives the Message Class and Number field gives the message number.

Thursday, 6 September 2012

Role dependent Field Grouping on SAP CRM Web UI

Have you ever come accross the requirement of controlling the field grouping of Accounts on webUI based on a given BP role?
Have you found notes OSS notes like
  1. Note 1257009 - Role-dependent field modification not supported 
  2. Note 1301742 - TXN. BUCG mandatory field settings not working in Web UI
  3. Note 1734377 - Mandatory fields not requested in WebUI 
not relevant?

Then, check the OSS note Note 1683774 - Mandatory setting for field groups 71 and 92 not considered if you are aiming to mandate standard communication type and house number fields. 

Finally, if you have tried everything and still unable to crack why a field mandated on the GUI is not mandated on web UI for a given role, look into the class CL_CRM_UIU_BP_TOOLS and method MAP_FIELDGROUP (see the screenshot below). Here the case statement handles most of the fields in Central Data, Address and Classification data sets. However, if you are looking for a field which is not a part of these three data sets (for example field group 49, to mandate industry id for say Sold-to-party role), system may not show you an error even if the field is made mandatory in BUCG tcode and left unfilled on the webUI account screen.