In a business-to-business scenario, distributors or resellers typically place orders using their own material numbers — not those of the manufacturer. This feature is often overlooked on most Web sites, but it is a touch of personalization that allows customers to transact more quickly online due to their familiarity with their own products. Enabling customers to search for and place orders using their own product numbers not only increases productivity but also improves customer satisfaction. Find out how you can use customer-material information records to streamline SAP CRM processes such as order entry and product searches if you have sales-area-dependent customer part numbers.
Key Concept
Customer-material information records are cross-references of your customer’s material numbers and descriptions to your system part numbers. These records are found in SAP ERP Central Component, but you can use them in SAP CRM processes such as product search and order entry. These records enable the use of the customer-material number, which is interpreted by the SAP system and mapped to a corresponding SAP material master record.
Customer-material information records (also known as partner product numbers) are commonly used in order management scenarios in which customers can place orders using their own part numbers, as opposed to your company’s numbers. However, this functionality isn’t exclusive to order management. Agents can also use this functionality when looking for products in the system using the customer’s part number.
SAP CRM has two methods you can use to maintain customer part numbers. These methods are similar, but the area where they differ is in their use (or lack thereof) of the distribution chain, also known as the sales area. Whether your customer part numbers are sales-area dependent dictates which table (table COMM_IL_PRDCPN versus table COMM_IL_PRDSCP) is used. Table COMM_IL_PRDCPN is not sales-area dependent. Given that customer-material information records in SAP ERP Central Component (SAP ECC) are in fact sales-area dependent, I will focus on the integration between SAP CRM and SAP ECC in this regard. If your customer part numbers are not sales-area dependent or you do not have customer-material information records created in SAP ECC, the steps in this article are not relevant for you.
Otherwise, the following steps help you synchronize the customer-material information records between SAP ECC and SAP CRM so you can use this data in product master and order processing scenarios. Furthermore, I discuss how this solution works with alternative IDs. These IDs tie everything together. They are substitute sources of identification that can be used for the product master, thereby allowing companies flexibility in setting up multiple associated views for a single product.
Steps to Set Up Customer Partner Numbers
Step 1. Create an ID type to represent the customer’s part number. Follow IMG menu path Cross-Application Components > SAP Product > Alternative Product IDs > Define ID Types.
Step 2. Enter a name for the new ID type (e.g., ZCUSTMAT_ID) as shown in Figure 1.

Figure 1
Create a new ID type
Step 3. Select Expert Mode and then click the Create button.
Step 4. In the following screen, a default custom class is automatically entered (Figure 2). You can modify the naming convention of this class or leave the selected value as is. Select the Do Not Generate and Unique check boxes. Because you are creating an ID that needs to reference particular table and field information (table COMM_IL_PRDSCP), it’s important that you select these settings to make the linkage possible. These settings turn off the SAP logic that automatically generates the code that the ID type uses, which is useful because you’ll be providing the custom code references.

Figure 2
ID type selection options
Step 5. Click the save icon and exit. If you’re prompted for a package request, enter the required information and save it if you are going to transport this configuration to other systems. Otherwise, choose Local Object. Note that you only use the Local Object option if you want this functionality to remain local to that client (e.g., a sandbox environment). Otherwise, you always transport such functionality. Make sure you create a workbench request if this configuration is going to be transportable.
Step 6. Next, create a custom class (ZCL_ALTID_ZCUSTMAT_ID) to match the entry you assigned to the ID type in step 4. To do this, use transaction SE24. Note that developer access is required to create custom classes. If you do not have this authorization, you can work with your development team to adjust this.
Step 7. Enter the class CL_ALTID_PRODUCT_CUSTOMER_ID in the Object type field (Figure 3).

Figure 3
Enter the SAP reference class name
Step 8. Click the copy icon and copy the reference custom class logic (Figure 4).

Figure 4
Reference class copy
Now that you’ve completed the preparation activities required to set up customer part numbers, you can move to the coding aspect by following the steps below.
Step 1. Once the system creates the new class, you must enhance the following three methods, which I explain in detail in the following steps:
- GET_GUID_FROM_ALTID
- GET_ALTID_FROM_GUID
- GET_ALTID_FROM_GUIDS
Step 2. For method GET_GUID_FROM_ALTID, change one line of code: 111. Figure 5 shows the original code and Figure 6 shows the code with the change you need to make. The purpose of modifying the code in these methods is to point table/field reference PRDCPN to your new table, COMM_IL_PRDSCP. This table stores all customer part number/sales area dependencies.
Note
Because SAP ECC customer-material information records are sales-area dependent, the SAP CRM table that corresponds with SAP ECC is COMM_IL_PRDSCP. While SAP CRM has a standard customer part number table, COMM_IL_PRDCPN, this table is not sales-area dependent and does not integrate with SAP ECC (and as a result, is not relevant for the context of this article).

Figure 5
SAP standard code

Figure 6
New code with the change
Step 3. For the method GET_ALTID_FROM_GUID, change several lines of code: 8, 9, 18, 22, 23, 26, 28, 30, and 34. The new code should look like what is shown in Figure 7.

Figure 7
Update table/field references for method GET_ALTID_FROM_GUID
Step 4. For the method GET_ALTID_FROM_GUIDS, change several lines of code: 9, 10, 11, 19, 29, 30, 33, 36, 38, 41, 42, and 47 (Figure 8).

Figure 8
Update table/field references for method GET_ALTID_FROM_GUIDS
Note
The code changes in this article support the use of customer-material information records in SAP CRM without checking the sales area assignment. For the purposes of keeping this example simple, I focus only on the necessary enhancements to support the usability of customer part numbers in SAP CRM. If you wish to use customer part number searches by sales area, you can work with your development team to add a few additional code references to some of the methods above.
Step 5. Syntax-check your code for the class by clicking the check icon
. No errors should result.
Step 6. Save your class and create a workbench request if the code needs to be transportable.
Step 7. Activate your class by clicking the activate icon
and exit.
Step 8. Create a profile for alternative ID use. Follow IMG menu path Cross-Application Components > SAP Product > Alternative Product IDs > Define Profiles.
Step 9. Set up the profile entries by entering the necessary information for the various fields (Figure 9). This configuration defines the profile that you use in the configuration to start the search mechanism that controls or influences how the system searches for alternative product IDs.

Figure 9
Set up the profile entries
Step 10. Click the Sequence of ID Types folder from the Dialog Structure on the left side of the screen. Enter the alternative ID types that are valid for this profile (Figure 10).

Figure 10
Alternative ID types
Step 11. Assign the ID profile you created and link it to a product type. This allows the product search to recognize alternative IDs that you configured. To perform this step, follow IMG menu path Cross-Application Components > SAP Product > Alternative Product IDs > Assign ID Profile to Product Type and enter the necessary information (Figure 11).

Figure 11
Link the profile to a product type
Step 12. Set context data for the object so the customer number is considered during, for example, the use of customer-material numbers in an order. Follow IMG menu path Cross-Application Components > SAP Product > Alternative Product IDs > Specify Context Data for ID Types and create a new entry for your ID type (Figure 12). This way, when it is referenced it uses the customer number as a key during the search to validate the search results.

Figure 12
Specify the context in which the ID type is used
Step 13. If you want to use customer part numbers during your sales order process, simply assign the alternative ID profile to your transaction types in configuration. Follow IMG menu path Customer Relationship Management > Transactions > Basic Settings > Define Transaction Types.
Step 14. Choose your transaction type and go to the details view. Assign the alternative ID profile you created in Figure 9 to the Profile for Altern. Identif. field in the Product Determination section and save your changes (Figure 13).

Figure 13
Set up product determination
Step 15. Replicate all customer-material records in SAP ECC with SAP CRM. You can do this by launching transaction R3AS.
Step 16. Enter the replication object CUST_MAT_INFO with your SAP ECC system as the source and your SAP CRM system as the target and execute (Figure 14).

Figure 14
Replicate customer-material information records from SAP ECC
Step 17. Monitor the load object using transaction R3AM1. Note that during the replication of this object, you might encounter the error Parent not O.K. (Figure 15).

Figure 15
Possible problem you might run into
If you come across this error, refer to SAP Note 711254 for assistance. If the note doesn’t resolve the issue, chances are that this object’s failure to run is due to a parent object (e.g., CUSTOMER_MAIN/DNL_PLANT/MATERIAL) that has not synchronized successfully. This means one of the parent objects has not been registered in SAP CRM as replicated successfully. You should ensure that previous objects ran and processed successfully using transaction R3AM1.
Once you’ve completed the steps in this article, you can search for products using an alternative product ID (e.g., customer part number) or place an order. Figure 16 shows the results of a product search using a customer part number. If you select your custom alternative ID type from Figure 2 and enter it in the Alternative ID field, the system can now locate a unique system record for this reference. Figure 17 shows the Items view of a sales order in which entering the customer part number in the Product ID field returns a valid company part number in the Replaced by Prod. field.

Figure 16
Product search view (search for SAP product by customer product ID)

Figure 17
Item view in an order transaction (order entry using customer product ID)
Gil Magana
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.