Description | Manage E-mail Activities |
Name | ManageEmailActivityIn |
Namespace | http://sap.com/xi/A1S/Global |
Process Component Description | Activity Management |
Process Component Name | ActivityManagement |
Process Component Namespace | http://sap.com/xi/AP/FO/Activity/Global |
Deployment Unit Description | Foundation |
Endpoint Activation | By Scoping of Process Component | Operations |
Release Status | Released |
An interface to migrate email activity data from a source system or file.
The web service interface Manage E-Mail Activity In enables you to connect external applications to your SAP system, and also to create and edit e-mail activities within your system. The web service interface Manage E-Mail Activity In is relevant if your company wants to access and manage activity data from external applications.
The web service interface Manage E-Mail Activity In offers the operations MaintainBundle and CheckMaintainBundle.
Here is an example of a simple web service request:
<n0:EmailActivityBundleMaintainRequest_sync_V1 xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID>00000000000102dcade9bcb0aa000c68</ID> </BasicMessageHeader> <EmailActivity actionCode="01"> <Name>A2X Create E-Mail with Parties, Text, etc. </Name> <MessageFromParty> <BusinessPartnerInternalID>MDECP9785</BusinessPartnerInternalID> </MessageFromParty> <MessageToParty actionCode="01"> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MCP6049</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </MessageToParty> <CopyMessageToParty actionCode="01"> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MDECP6049</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </CopyMessageToParty> <BlindCopyMessageToParty actionCode="01"> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MCPB9785</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </BlindCopyMessageToParty> <BlindCopyMessageToParty actionCode="01"> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MCPC9785</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </BlindCopyMessageToParty> <EmployeeResponsibleParty> <BusinessPartnerInternalID>MC2471</BusinessPartnerInternalID> </EmployeeResponsibleParty> <ActivityUnitParty> <OrganisationalCentreID>MC10000</OrganisationalCentreID> </ActivityUnitParty> <Text actionCode="01"> <TextTypeCode>10002</TextTypeCode> <ContentText>A2X Example for text type "Body Text"</ContentText> </Text> <Text actionCode="01"> <TextTypeCode>10011</TextTypeCode> <ContentText>A2X Example for text type "Internal Comment"</ContentText> </Text> </EmailActivity> </n0:EmailActivityBundleMaintainRequest_sync_V1>
Existence of referenced business data:
The following business data are only referenced and will not be created by the service operations. They must already exist in the system at the time the web service is called:
Parties:
Business partners and related projections like customers, employees, and so on
Organizational centers
Maintain Bundle operations enable external applications to create and change business document data. Check Maintain Bundle operations enable external applications to simulate maintain bundle requests without changing business document data. In particular, Check Maintain Bundle operations have the following functions:
Return system messages similar to corresponding maintain bundle operations
Provide the same message type as the corresponding operation Maintain Bundle
Do not assign internal numbers from a productive number range interval (number range statuses are not increased)
Do not change business documents
Action codes represent an instruction to the recipient of the web service request to process transmitted message node elements.
Action Code | Description |
---|---|
01 | Create; the system returns an error message if the node element already exists. |
02 | Update; the system returns an error message if the node element does not exist. |
03 | Delete; the system returns an error message if the node element does not exist. |
04 | Save; the system creates or changes the node element data. |
05 | Remove; the system deletes the node element. If the node element does not exist, the system does not send an error message. |
06 | No Action; the system does not change the node element. |
Default action code: 04 (Save).
Note: Action code 04 (Save) creates business documents if the system could not identify a matching target business document. This applies in particular if no business document ID or UUID is provided by the web service consumer. The web service consumer (external application) is responsible for providing correct business document IDs or UUIDs, in order to avoid the accidental creation of duplicate business documents.
The processing of node elements with cardinality > 1 (for example a list of parties with a certain party role) can be controlled using List Complete Transmission Indicators (LCTI). The LCTI indicates whether a list of node elements is completely transmitted. The LCTI of a node element with cardinality > 1 is modeled as an attribute of its parent node element (attribute name: <name of child element>ListCompleteTransmissionIndicator).
LCTI | Description |
---|---|
false | The list of node elements is not completely transmitted. Hence, all node elements that are not transmitted remain unchanged. If transmitted node elements in the list can be uniquely identified, the system processes the node elements according to the action code. If transmitted node elements in the list cannot be uniquely identified, the system appends the node element to the corresponding list of node elements in the target business document. |
true | The list of elements is completely transmitted. Hence, all node elements that are not transmitted are removed. If no node element is transmitted, the complete list is removed. |
Default list complete transmission indicator: false.
Note: The LCTI refers to the completeness of the list of node elements and does not imply completeness of sub-elements.
Optional leaf elements in request messages that are not transmitted within a web service request are not changed in corresponding business documents.
Maintain bundle and check maintain bundle operations are mass-enabled stateless synchronous web service operations. Transferring or requesting amounts of data that are too large causes communication timeouts. The web service consumer is responsible for ensuring reasonable sizes of data for mass operations.
Maintain bundle and check maintain bundle operations support exactly one execution (idem potency). To ensure exactly one execution of web service requests, the web service consumer has to provide unique values for the elements ID or UUID of the BasicMessageHeader node element.
Using change state identifier (element name ChangeStateID), external applications can enforce that a modifying operation is not executed because the state of the business document has changed since the external application last read its data.
The change state ID is an uninterpretable string that is provided by query and read operations. It can be utilized by all modifying operations. If the change state identifier is provided when calling a modifying operation, the system does not perform the operation if the state of the business document instance has changed since the change state ID was computed. If the change state ID is not provided by the web service consumer, the system performs the web service operation without checking the state of the business document.
The web service consumer (external application) is responsible for preventing accidental changes to business documents.
Request node elements with cardinality > 1 contain an object node sender technical identifier to relate response message elements and log items to corresponding node elements in the request message.
The object node sender technical identifiers are provided as ObjectNodeSenderTechnicalID in request message types and are referred to as ReferenceObjectNodeSenderTechnicalID in corresponding response message types.
If the object node sender technical ID is initial, the object node sender technical ID of the parent node element in the request is returned as the reference object node sender technical ID. If the object node sender technical IDs of all parent node elements are initial, the reference object node sender technical ID is returned as initial as well.
Note: The values specified in the ObjectNodeSenderTechnicalID are transient values that establish the correspondence between elements for only a single call. The web service consumer is not required to specify them or to use the same values for different calls. Also, the service provider does not interpret these values at all. Instead, the service provider returns them to the web service consumer in the ReferenceObjectNodeSenderTechnicalID elements.
Note: The ObjectNodeSenderTechnicalID is also used to identify failed business document modifications in a mass operation.
Example
Request:
<Child> <ObjectNodeSenderTechnicalID>999_A<ObjectNodeSenderTechnicalID> <Content>Child A: Some correct content</Content> </Child> <Child> <ObjectNodeSenderTechnicalID>999_B<ObjectNodeSenderTechnicalID> <Content>Child B: Some erroneous content</Content> </Child>
Response:
<Log> <Item> <ReferenceObjectNodeSenderTechnicalID>999_B </ReferenceObjectNodeSenderTechnicalID> <Note>Error message for Child B</Note> </Item> </Log>
The structure of the response message consists of two parts:
A business document-specific part containing information about IDs and UUIDs of the created and changed business documents
Log items containing system messages including errors, warnings, and information messages raised by the system during processing of the web service request
You can find general information about Web services, their structure and consumption in the Web Services documentation.
Possible scenarios include the following:
Create E-Mail Activity
The MaintainBundle operation is used to create activities.
Update E-Mail Activity
The MaintainBundle operation is used to update activities.
Example to create an e-mail activity:
<n0:EmailActivityBundleMaintainRequest_sync_V1 xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID>00000000000102dcade9bcb0aa000c68</ID> </BasicMessageHeader> <EmailActivity actionCode="01" <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <ChangeStateID></ChangeStateID> <UUID></UUID> <MigratedDataAdaptationTypeCode></MigratedDataAdaptationTypeCode> <Name>A2X Create E-Mail w. multiple Parties</Name> <PriorityCode>2</PriorityCode> <InformationSensitivityCode>1</InformationSensitivityCode> <GroupCode></GroupCode> <DataOriginTypeCode></DataOriginTypeCode> <LifeCycleStatusCode></LifeCycleStatusCode> <CorrespondenceTransmissionStatusCode> </CorrespondenceTransmissionStatusCode> <MessageFromParty> <BusinessPartnerInternalID>MDECP9785</BusinessPartnerInternalID> </MessageFromParty> <MessageToParty actionCode="01"> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MCP6049</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </MessageToParty> <CopyMessageToParty actionCode="01"> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MDECP6049</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </CopyMessageToParty> <BlindCopyMessageToParty actionCode="01"> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MCP6049</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </BlindCopyMessageToParty> <BlindCopyMessageToParty actionCode="01"> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MCPB9785</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </BlindCopyMessageToParty> <BlindCopyMessageToParty actionCode="01"> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MCPC9785</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </BlindCopyMessageToParty> <EmployeeResponsibleParty> <EmployeeID>7000033</EmployeeID> </EmployeeResponsibleParty> <ActivityUnitParty> <OrganisationalCentreID>MC10000</OrganisationalCentreID> </ActivityUnitParty> <Text actionCode="01"> <TextTypeCode>10002</TextTypeCode> <ContentText>A2X Example for text type "Body Text"</ContentText> </Text> <Text actionCode="01"> <TextTypeCode>10011</TextTypeCode> <ContentText>A2X Example for text type "Internal omment"</ContentText> </Text> </EmailActivity> </n0:EmailActivityBundleMaintainRequest_sync_V1>
<n0:EmailActivityBundleMaintainRequest_sync_V1 xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID>00000000000102dcade9bcb0aa021c99</ID> </BasicMessageHeader> <EmailActivity actionCode="02"> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <ChangeStateID></ChangeStateID> <UUID>00163e02-8b12-1ee1-aeab-582199ad6423</UUID> <Name languageCode="EN"> A2X Update E-Mail subject description</Name> </EmailActivity> </n0:EmailActivityBundleMaintainRequest_sync_V1>
Attention: the party ID and party role are not unique keys for a party instance. Thus, for parties with 1:n cardinality, in case of updates (change + delete), the ListCompleteTransmissionIndicator needs to be set. The whole list of updated parties that should replace the existing list of parties also has to be provided.
Example data for BlindCopyMessageToParty:
List of existing BlindCopyMessageToParty to be changed:
MCP6049
MCPB9785
MCPC9785
What do we want to achieve?
Delete party MCP6049
Keep party MCPB9785
Change party MCPC9785 -> MCP17101
Add party MCP17102
Add party MDECP9786
Due to the fact that no unique identification of a party instance is possible via party ID and party role, the BlindCopyMessageToPartyListCompleteTransimissionIndicator is to be set to "true". Then the behavior will be as follows: the list of parties is completely transmitted. Hence, all parties that are not transmitted are removed. If no party is transmitted, the complete list is removed.
In the following, the desired list of parties is to be provided:
MCPB9785
MCP17101
MCP17102
MDECP9786
The respective XML document to achieve this looks like the following:
<n0:EmailActivityBundleMaintainRequest_sync_V1 xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID>00000000000102dcade9bcb0aa000c68</ID> </BasicMessageHeader> <EmailActivity actionCode="02" blindCopyMessageToPartyListCompleteTransimissionIndicator="true"> <!-- comment: set LCTI to "true" and provide whole list of parties --> <ID>1298</ID> <BlindCopyMessageToParty> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MCPB9785</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </BlindCopyMessageToParty> <BlindCopyMessageToParty> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MCP17101</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </BlindCopyMessageToParty> <BlindCopyMessageToParty> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MCP17102</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </BlindCopyMessageToParty> <BlindCopyMessageToParty> <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID> <BusinessPartnerInternalID>MDECP9786</BusinessPartnerInternalID> <MainIndicator></MainIndicator> </BlindCopyMessageToParty> </EmailActivity> </n0:EmailActivityBundleMaintainRequest_sync_V1>
In case a new party instance has to be appended to the existing list of parties, this can be achieved by just providing the new party and setting the ListCompleteTransimissionIndicator to "false".
Example data:
List of existing parties:
MCP6049
MCPB9785
MCPC9785
What do we want to achieve?
Keep MCP6049
Keep MCPB9785
Keep MCPC9785
Add MCP8300
Add MCP60500
In the following, just the list of new parties has to be provided:
MCP8300
MCP60500
The respective XML document to achieve this looks like the following:
<n0:EmailActivityBundleMaintainRequest_sync_V1 xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID>00000000000102dcade9bcb0aa000c68</ID> </BasicMessageHeader> <EmailActivity actionCode="02" blindCopyMessageToPartyListCompleteTransimissionIndicator="false"> <!-- append new party instances with LCTI = "false" --> <ID>1298</ID> <BlindCopyMessageToParty> <BusinessPartnerInternalID>MCP8300</BusinessPartnerInternalID> </BlindCopyMessageToParty> <BlindCopyMessageToParty> <BusinessPartnerInternalID>MCP60500</BusinessPartnerInternalID> </BlindCopyMessageToParty> </EmailActivity> </n0:EmailActivityBundleMaintainRequest_sync_V1>
Description | Maintain e-mail activities |
Name | MaintainBundle |
Synchronous | yes |
Release Status | Released |
No documentation available.
Description | Check e-mail activities |
Name | CheckMaintainBundle |
Synchronous | yes |
Release Status | Released |
No documentation available.