Ansicht
Dokumentation

CRM_PS_ACTIVITY_CREATE - Creation of Activities

CRM_PS_ACTIVITY_CREATE - Creation of Activities

PERFORM Short Reference   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module is used to create Service activities in the Social Services component. You can for example use it to control automatic notifications and task assignment for a caseworker.

The creation of Service activities is designed for the two business object types BUS2000125 (Task) and BUS2000126 (Business Activity). This means you need to assign one of these two business object types to your transaction types as the leading business transaction category.

An overview of the parameters processed by this function module is shown below:

Template Values

You can transfer an existing activity template in the IV_TEMPLATE parameter. The data in this template is transferred to the new activity as a copying template. Note that when data is transferred both from the template and concurrently as a manual importing parameter, the manually transferred values are always used.

Example: 'Frankfurt' is specified as the activity location in the template. If the function module CRM_PS_ACTIVITY_CREATE is executed with this template, and the importing parameter IV_ACTIVITYLOCATIONalso contains the value 'London', the location 'London' is transferred into the new activity.

Case Assignment

The parameters IV_CASE_GUID and IV_CASE_IDenable you to assign the activity being created to an existing Service case. To do this, you need to transfer either the case GUID (IV_CASE_GUID), or the external case ID (IV_CASE_ID).

If a case does not exist, is blocked, or if a node for one of the two business objects BUS2000125 or BUS2000126 does not exist in the respective case record model, an error is generated and the activity is not created.

Start and End Date

The dates of the activity being created are transferred in the three parameters IV_TIMESTAMP_FROM(activity start date), IV_TIMESTAMP_TO(activity end date), and IV_APPOINTMENT_TYPE(date type).

Business Partners

The business partner functions with the corresponding business partner IDs can be transferred in the importing table IT_BUSINESS_PARTNERS. Note that you can only specify business partner functions that are found in the partner determination procedure that is assigned to the transaction type. Otherwise, the activity is created with an error. The 'Main Partner' indicator enables you to stipulate whether the business partner is to act as the main partner for the partner function.

Message Texts

In the importing table IT_TEXT_T100, you can specify a T100 message for each text ID in the activity. The long text for the T100 message is added under Texts in the new activity. The text ID is found in the text determination procedure that is assigned to the transaction type. The system must contain the T100 message in the relevant language. The indictor 'ACT_DESCRIPTION' in the table IT_TEXT_T100means that the short text for this T100 message is copied into the description of the activity. This indictor can be selected once only for each activity. The four message variables MSGV1 - MSGV4 are entered in the short text and in the long text for the T100 message.

Document Flow

The parameter IV_DOCFLOWenables you to create a link to an existing business transaction object. This object then appears under Document Flow in the new activity.

Attachments

In the importing structure IS_ATTACHMENT, you can transfer any text that is inserted as a document under Attachments in the new activity. The field CONTENT contains the text for the document, the field NAME contains the name of the document (for example, XML_FILE.xml), and the field MIMETYPE contains the mime type (for example, 'text/xml' for an XML document).

Disable Business Partner Determination

The IV_BP_DETERM_OFFindicator enables you to disable partner determination for the activity. Partner determination can be defined for each partner function with access sequences in the partner determination procedure. When the indicator 'IV_BP_DETERM_OFF' is selected, only the partners in the table IT_BUSINESS_PARTNERSare copied into the new activity.

Activity Attributes Goal, Status, Priority, Category

You can use the importing parameters IV_GOAL, IV_STATUS, IV_PRIORITY, and IV_CATEGORYto transfer the values for goal, status, priority, and category in the activity that are defined in Customizing. These values are defined in Customizing for Service under Transactions -> Settings for Activities.

Activity Reason

The parameter IV_REASON is a code in a code group (activity reason). The parameter IV_REASON_CODEGROUP is the relevant code group that contains the activity reason. If only one of these two parameters is filled, an error occurs.

Note:
The catalog must always be 'A1'. Afterwards, you can create your own code groups. The various activity reasons are stored in the code groups. In turn, the code group is assigned to a code group profile. This code group profile contains different code groups each with various codes (activity reasons).
You assign the code group profile to a subject profile in the Customizing activity Define Subject Profiles. You assign a subject profile to a transaction type in the Customizing activity Assign Status and Subject Profile for Each Transaction Type. You can specify a separate subject profile for each status of a transaction type and thus control different activity reasons.

For more information about creating codes, code groups, and activity reasons, see Customizing for Service under Transactions -> Settings for Activities -> Define Activity Reasons.

BAdI CRM_PS_ACTIVITY_CHANGE

You can use the Business Add-In CRM_PS_ACTIVITY_CHANGE to add customer-specific requirements to the functions in this module. For more information about this, see the BAdI documentation.

Example

Notes

Further information





Parameters

ES_NEW_ACTIVITY
ET_EXCEPTION
IS_ATTACHMENT
IT_BUSINESS_PARTNERS
IT_EEW_FIELDS
IT_TEXT_T100
IV_ACTIVITYLOCATION
IV_APPOINTMENT_TYPE
IV_BP_DETERM_OFF
IV_CASE_GUID
IV_CASE_ID
IV_CATEGORY
IV_COMMIT_WORK
IV_DESCRIPTION
IV_DESC_LANGU
IV_DOCFLOW
IV_GOAL
IV_IS_CALLED_IN_EC
IV_LEADING_ORDER
IV_PRIORITY
IV_REASON
IV_REASON_CODEGROUP
IV_STATUS
IV_TEMPLATE
IV_TEMPLATE_GUID
IV_TIMESTAMP_FROM
IV_TIMESTAMP_TO
IV_TRANSACTION_TYPE

Exceptions

ANCHOR_NOT_IN_RECORD
CASE_GUID_NOT_FOUND
CASE_IS_LOCKED
CASE_NOT_FOUND
CODEGROUP_MISSING
ERROR_ATTACHMENT
ERROR_BADI_EXIT
ERROR_CASE_ASSIGNMENT
ERROR_CASE_SAVE
ERROR_CRM_ORDER_MAINTAIN
ERROR_CRM_ORDER_SAVE
INVALID_ACTIVITY_TEMPLATE
INVALID_DOCFLOW_ITEM
INVALID_EEW_FIELD
SEVERAL_CASES_FOUND
WRONG_BUS_TYPE
WRONG_T100_MESSAGE
WRONG_TRANSACTION_TYPE

Function Group

CRM_PS_ACTIVITY

BAL_S_LOG - Application Log: Log header data   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 10675 Date: 20240523 Time: 090128     sap01-206 ( 202 ms )