The standard action profile ORDER_MESSAGES allows you to send output documents to your customers. With Action Wizard, you can build an action profile that automatically creates a follow-up activity when a sales contract expires. Also, find out how to use actions to send alerts to the Business Workplace or SAP NetWeaver Portal inbox.
Key Concept
Actions are planned activities or tasks assigned to business processes, such as sending email, that you create in transaction documents. You can start actions manually or automatically depending on rules known as action profiles. Action profiles are summaries of actions with common attributes, such as the business object or date profile. An action profile consists of one or more action definitions, attributes that you configure to determine actions characteristics, such as processing time and sort order. If necessary, you can also configure conditions that control the planning and start time of the action, which can be time based or field based. Once you configure the action profile and conditions, you assign the action profile to a transaction or item category in the IMG.
Imagine you are a new CRM consultant. Your first experience with actions would typically occur while you are configuring output determination. If you are familiar with SAP R/3 Sales and Distribution (SD), you might be a little curious about why you use actions (planned activities or tasks that react to a situation) in mySAP CRM where you would use the condition technique (a hierarchy of components that define data combinations) in R/3. In fact, actions provide far more functionality than just output determination.
With actions and alerts, you can schedule, start (either automatically or manually), and monitor business processes. For example, you can automatically print documents, send email confirmations, create follow-on documents, and generate subitems. In the first part of this article, I will explain how you can manipulate the settings of the standard action profile ORDER_MESSAGES to send an order confirmation to a customer. Then I will show you how to use the Action Wizard to automatically create a follow-up activity and an automatic alert to a manager when a contract expires.
Note
The screenprints and processes in this article are from mySAP CRM 4.0.
Manually Configure an Action
Configure actions in transactions by following IMG menu path Customer Relationship Management>Basic Functions>Actions> Actions in Transaction>Change Actions and Conditions>Define Action Profiles and Actions. For this example, select standard action profile ORDER_MESSAGES and click on the magnifying glass icon to view the action details (Figure 1). You can manually configure ORDER_MESSAGES using the following five steps.

Figure 1
View the details of action ORDER_MESSAGES click here to view a larger version of this image
Step 1. Configure the Object Type. In the action details, the Object Type should match the intended transaction type or item category with which you want to work. If you need to update this field, check the Leading Transaction Category field in the IMG node Definition of Transaction Types for transaction types. Select Item object type in the IMG node Define Item Categories for item categories. If an action profile contains an incorrect business object, you cannot assign that action profile to the transaction type or item category.
In this example, I configured the object type BUS2000115 in the action profile, which corresponds to the leading transaction category for transaction type TA - Standard Order (Figure 2). The system automatically assigns the context class based on the application that you configure. Because I am using the IMG node Actions in Transaction, the application CRM_ORDER defaults and the system selects the coinciding context class CL_DOC_CONTEXT_CRM_ORDER in the action profile.

Figure 2
Configuration for BUS2000115
Step 2. Drill down to the Action Definition folder. The Sort Order field determines the order in which action definitions appear in the transaction (Figure 3). If you configure multiple actions definitions, the system saves them in alphabetical order. If you leave the Sort Order field blank, the system considers it as zero and displays the actions in alphabetical order. In this example, the system displays sort order 1 first, sort order 2 second, and so forth. When you flag the Inactive field, the system ignores the action definition during determination and does not generate the action when it creates the transaction. This is an option if you have created several action definitions in an action profile and you would like to deactivate one or more of them.

Figure 3
Action Definition folder for ORDER_MESSAGES click here to view a larger version of this image
Step 3. View and edit the action definition details. Select action definition ORDER_CONFIRMATION, then click on the magnifying glass icon for the action definition details (Figure 4). The Processing Time field determines when the system executes an action — by selection report, immediate processing, or when saving the document. For this example, I set the processing time to 4 Processing when saving document, so the system automatically sends an order confirmation when I save the sales order. The Processing Time Not Permitted field limits the scenarios in which the system executes an action. In the example, I selected XXXXX No Restrictions because I’m executing the action when I save the document.

Figure 4
Action definition details click here to view a larger version of this image
Under the Action Definition tab, Sort Order For Display shows the value from the Sort Order field in Figure 3. I selected Schedule Automatically, so the system automatically activates the action and sends the order confirmation when I save the transaction.
If an action depends on a partner, you must select the Partner dependent field in the Partner Determination for Action tab. Choose the appropriate partner function, a descriptive term about the partner you do business with, such as sold-to party. In sales or service order transactions, partner functions are carried out by business partners that you have entered in the system. If the configured partner function does not exist in the transaction, then the system does not generate the action. In this example, the sold-to party is the person who receives the emailed order confirmation, so I selected the Partner dependent field and configured Partner Function 0001 Sold-to party. When the system executes the action, it sends the confirmation to the email address listed in the sold-to party record.
In the Action Determination and Action Merging tab, I set the Determination Technique field to Determination Using Conditions that Can Be Transported. This allows you to set up conditions based on transaction type or item category attributes/time-dependent rules to schedule and start an action. I set the Action Merging field to Max. 1 Unprocessed Action for Each Action Definition. This field determines how to merge existing actions with newly determined actions when the user changes a transaction. In this example, this field prevents the system from sending multiple documents to the same destination.
Note
If you want to manually trigger the action during the transaction creation or change, go to the Action Settings tab. Select the Display in Toolbox to display the action icon in the toolbar of the transaction. You also need to select Changeable in Dialog under this tab.
Note
For more information about configuring partner functions, review the configuration under Customer Relationship Management>Basic Functions>Partner Processing.
Step 4. View the Processing Type configuration. The processing type determines which output medium the system uses. Go to Action Definition>Processing Types and double-click on the Processing Types folder. For my example, I selected Smart Forms Fax, Mail, and Print to generate output documents. Select Smart Forms Print, and then click on the Set Processing button. Enter the standard Smart Form, CRM_ORDER_CONFIRMATION_01, and set Processing Class to CL_DOC_ PROCESSING_CRM_ORDER and Processing Method to CRM_ORDER_ EXEC_SMART_FORM.
Note
Use Method Call to create a single-step item and use Workflow to create more complex scenarios with several steps.
Step 5. Select IMG node Define Conditions. Follow the IMG menu path Customer Relationship Management> Basic Functions>Actions>Actions in Transaction>Change Actions and Conditions>Define Conditions. In the Conditions for Actions: Change screen, the system sorts action profiles alphabetically by ID on the left and displays the action profile descriptions on the right (Figure 5). In the right pane, scroll to Order messages (the action profile description for ORDER_ MESSAGES), double-click on it, then double-click on the first action definition Order confirmation – Sold To. On the Header Overview tab, select Default Settings frm Action Definition, which means the system creates the settings in Action Definition when defining the profile default. You can deselect this option if you want to make changes instead of using the template action definition created in step 2.

Figure 5
Define conditions for your action click here to view a larger version of this image
Next, configure a condition in ORDER_ MESSAGES to send the order confirmation when you save the sales order. Set the Start Condition to No Condition (Seen as Fulfilled). On the Actions tab, assign Smart Forms Mail so the system sends an automatic email when you create the order. You can tell the automatic email action was successful if the icon in the Status column turns green (Figure 6).

Figure 6
Successfully generated order confirmation action click here to view a larger version of this image
When you create actions manually, make sure that the business partner you use has an email address on the General Data Address tab. Since I am using order type TA, the system already assigned action profile ORDER_MESSAGES to the transaction type. Also make sure the Basis team configures the Simple Mail Transfer Protocol (SMTP) for the email server. Finally, you can use the copy as icon in the Change View Action Profile Overview screen if you want to create a custom action profile with different settings than the standard action profiles. Action definition names must be unique, so add a preceding Z when you copy the name.
Note
When creating follow-on documents, make sure that you configure the copy control beforehand by following the IMG path Customer Relationship Management>Transactions>Basic Settings>Copying Control for Business Transactions>Define Copying Control for Transaction Types.
Create Actions with Action Wizard
Now that I have shown you how to manually create an action, let me show you Action Wizard, a tool that helps you create actions more easily. Action Wizard enables you to create an action definition in an existing profile or create a new action profile. It guides you through a series of data entry screens with documentation for the individual steps.
In the following example, I want the system to automatically create a business activity (transaction type 0010) when a sales contract (transaction type QCTR) is about to expire (time-dependent). Prerequisites for this scenario include verifying the business object and date profile assigned to the source document under Customer Relationship Management>Transactions> Basic Settings>Define Transaction Types for QCTR Quantity Contract. The leading transaction category is object type BUS2000121 (sales contracts) and the date profile is CONT001.
To launch Action Wizard, execute Create Actions with Wizard under the IMG menu path Customer Relationship Management>Basic Functions>Actions> Actions in Transaction. Select Create New Action Profile. Enter ZEXPCONTRACT for the Action Profile ID and ZContract for the Description (Figure 7). Enter the Date Profile CONT001 and Object Type BUS2000121 (from the source transaction QCTR) and click on Continue. In the screen that follows, enter ZEXPCONTRACT in the Action Definition field and enter EXPRING CONTRACT TRIGGERS ACTIVITY for the Description field. Click on the Continue button (Figure 8).

Figure 7
Create a new action profile ZEXPCONTRACT click here to view a larger version of this image

Figure 8
Describe the new action ZEXPCONTRACT click here to view a larger version of this image
In the next screen (Figure 9), set the Processing Time to 1 Processing using selection report because this alert is time-dependent. Select the ScheduleAutomatically field. The system selects Chngbl (changeable) in Dialog and Executable in Dialog as default. Click on the Continue button. In the next screen, skip the partner determination step by deselecting the Partner-dependent box and clicking on the Continue button. In the screen that follows, select Method Call for the Processing Type and click on Continue.

Figure 9
Set up the processing time for the action click here to view a larger version of this image
In the next screen (Figure 10), under the Settings Method Call tab, select the method called COPY_DOCUMENT and click on the change definition (pencil) icon. Then click on the create icon and make the following entries in the Display Container Element screen (Figure 11):
- For Element, Name, and Short Descript. enter
process_type for each field
- Under the Data Type tab, enter
CRMD_ORDERADM_H for Structure
- Under the Data Type tab, enter
PROCESS_TYPE for Field
- On the Initial Value tab select 0010 Business Activity from the drop-down menu. This is the target document that the system creates from the sales contract. Click on the Continue button and enter a text description, for example
Expiring Contract triggers the creation of a business activity.

Figure 10
Change the definition for COPY_DOCUMENT by clicking on the change icon

Figure 11
Edit the process_type container element for COPY_DOCUMENT
After entering the text description click on the Continue button. Click on the Continue button for the next two screens, Assign Schedule Condition and Assign Start Condition. Click on the Complete button, then click on the Save button to save the changes. To create the start condition, follow the IMG menu path in step 5. On the StartCondition tab in the Conditions for Actions: Change screen, click on the Edit Condition button. Enter a name in the Name field, for example Expiring Contract. Next, select Click here to create a new condition. Enter the start condition &2 Wks Before Contract & £ %Current Date% under the Condition Definition tab (Figure 12). Save the condition by clicking on the save icon.

Figure 12
Enter a start condition for your action
After you create the action profile with Action Wizard, assign it to transaction type QCTR by following IMG path Customer Relationship Management>Basic Functions>Actions>Actions in Transaction>Assign Action Profile to the Business Transaction Type. Now when you save a sales contract with an expiration date, the system generates an action within two weeks. A yellow triangle on the action tab indicates the action. Call transaction SPPFP to execute the action in the action monitor. Select the action definition to narrow the results.
Send an Alert
Once you have set up an action to indicate expiring contracts, you can create an alert (a signal emitted by the alert monitor when an object gains a certain status) to send to the contract manager. Follow IMG menu path SAP Web Application Server>SAP Web Application Server>Basis Services>Generic Business Tools>Alert Management>Define Alert Categories. Select Unclassified in the left pane, then click on the create icon (Figure 13).

Figure 13
Select the Unclassified folder to create an alert for the contract manager click here to view a larger version of this image
In the pop-up screen that appears, specify a key in the Alert Category column. Enter the Description Expiring Contract under the Alert Definition tab at the bottom of the screen (Figure 14). Click on the save icon, then click on the Fixed Recipients button in the following screen to assign the contract manager’s user ID to the alert. You can also define the alert recipients by role in this screen.

Figure 14
Add details for the alert
Now return to the Action Wizard (Customer Relationship Management> Basic Functions>Actions>Actions in Transaction>Create Actions with Wizard) to create a new action profile to assign to transaction type 0010 Business Activity. Follow the steps you used to create the sales contract action profile in the previous section, but make the following changes:
- Select object type BUS2000126 from transaction type 0010
- You do not need to enter a date rule because the system generates this action when you save the transaction
- For processing time, select 4 Processing when saving document
- Select method TRIGGER_ALERT
For the start condition, enter SALRTCUST as the Structure and CATEGORY as the Field (Figure 15). Set the Initial Value as you did in the previous example. Once you have completed these steps, create a sample contract that is about to expire. You should see the alert in Business Workplace, which you access via transaction SBWP (Figure 16). If you have SAP NetWeaver Portal installed, you would see the alert there.

Figure 15
Create an alert to let users know when the system automatically creates a new business activity

Figure 16
View alert in Business Workplace click here to view a larger version of this image
The alert gives the recipient the information needed to follow up on the contract in a timely manner.
Karen Lindholm
Karen Lindholm is a senior consultant with PRAGMATEK Consulting Group in Minneapolis. She has been working with SAP products for more than eight years. As an SAP AG SD consultant, she implemented apparel and footwear (AFS) projects in Europe. Karen has also worked as a global support consultant for SAP America in SD and CRM , as well as a CRM consultant for SAP America’s Demo Development Group. Karen holds a bachelor of arts degree from Stanford University. Currently, she is the CRM consultant for a medical device company.
You may contact the author at Karen.Lindholm@pragmatek.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.