Skip to main content

All articles

SAP CRM: Steps to create new pricing condition type

Submitted by Stefan Barsuhn on

First of all, this blog contains some of the steps required to configure pricing. But in case it goes away, I'm listing the steps here as well.

First item of note is that not all the steps in the blog are actually required, e.g. if your access sequence does not use product, you don't need to maintain anything at the product level. And some of the steps were missing (at least in my case).

Tags

SAP CRM: BPATH - debugging relation traversal

Submitted by Stefan Barsuhn on

Quick note: if you're trying to find out what's going on with your BPATH statement and you want to debug the traversal thereof, the central entrypoint is method CL_WCF_BPATH_PARSER=>STATUSMACHINE. This splits the string and acts on the segments.

Method CL_WCF_BPATH_PARSER=>PROCESS_ACTION is then called to delegate processing of the different segment types to different methods.

Tags

SAP CRM: Remove error messages at application level

Submitted by Stefan Barsuhn on

If you want to remove messages from a CRM order and you want the message to be removed at the database level (not only at the UI level), for instance, to be able to remove errors that prevent you from creating a follow-up document (follow-up documents can only be created from error-free documents), you may find the following code snippet useful:

Note that the following is using function modules because the BOL layer does not provide the appropriate method calls:

Tags

SAP CRM: Get field descriptions for search fields

Submitted by Stefan Barsuhn on

In WebUI, say you have a search attribute OBJECT_ID that is labelled "Object ID" on the UI search screen. How do you retrieve that label "Object ID" at runtime (i.e. to output an error message for mandatory field check)?

Simply call

me->get_possible_fields( ).

inside the implementation class methods (i.e. DO_PREPARE_OUTPUT etc.)

BTW, in all other contexts, to get the text representation of a technical field (say you are reading field communication type, and the technical value (result of get_property_as_string()) is TEL) simply call

Tags

SAP CRM: How order attachments are stored

Submitted by Stefan Barsuhn on

First off, attachments are completely independent from the rest of the transaction. As soon as you add the attachment, it's saved on the DB - no need to save the transaction.

If you're looking for standard source code how to add attachments to an object, set a breakpoint in CL_CRM_DOCUMENTS=>CREATE_WITH_TABLE and upload an attachment. (CL_CRM_BSP_CM_CONTROL=>CREATE_DOCUMENT contains some useful methods to fill the parameters.)

Once the attachment is saved, you can find it in the following tables:

Tags

SAP: Add transaction code to SAP Customizing (SPRO)

Submitted by Stefan Barsuhn on

I'm a friend of keeping my SAP systems tidy and avoiding the need of "expert knowledge" on how certain system functionality works, especially which transactions or tables are involved.

An ideal way of killing those 3 birds with 1 stone is the extension of the IMG (or SAP Customizing or IMG).

It allows you to:

  • group together all transaction codes
  • and customizing tables
  • and documentation

belonging to a functionality.

Tags