Description | Manage Opportunities |
Name | ManageOpportunityIn |
Namespace | http://sap.com/xi/A1S/Global |
Process Component Description | Opportunity Processing |
Process Component Name | OpportunityProcessing |
Process Component Namespace | http://sap.com/xi/AP/CRM/Global |
Deployment Unit Description | Customer Relationship Management |
Endpoint Activation | By Scoping of Process Component | Operations |
Release Status | Released |
An interface to replicate opportunity data from a source system or a file to a target system.
The web service interface Manage Opportunity In enables you to connect external applications to your SAP Business ByDesign system and to receive structured opportunity data from a source, such as a system or a file. This data is replicated or migrated to a target system either for a single opportunity or for several opportunities by bundle.
The web service interface Manage_Opportunity_In offers the operations Check_Maintain_Bundle and Maintain_Bundle.
Here is an example of a simple web service request:
<n0:OpportunityBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID>00000000000102dcade9bcb0ab000c99</ID> </BasicMessageHeader> <Opportunity actionCode="01"> <ObjectNodeSenderTechnicalID>9B6B11DA-A126-4ADA-8DA7-35FB32751A54</ObjectNodeSenderTechnicalID> <ChangeStateID>20130304073654.7493750</ChangeStateID> <Name>A2X Test Opp</Name> <PriorityCode>3</PriorityCode> <GroupCode>0023</GroupCode> <OriginTypeCode>001</OriginTypeCode> <LifeCycleStatusCode>1</LifeCycleStatusCode> <SalesForecast> <ExpectedRevenueAmount currencyCode="USD">100</ExpectedRevenueAmount> <ExpectedProcessingDatePeriod> <StartDate>2013-03-03</StartDate> <EndDate>2013-04-04</EndDate> </ExpectedProcessingDatePeriod> </SalesForecast> <SalesCycle> <SalesCycleCode>001</SalesCycleCode> <SalesCyclePhaseCode>001</SalesCyclePhaseCode> </SalesCycle> <ProspectParty> <PartyID>MC9785</PartyID> <ContactPerson/> </ProspectParty> <EmployeeResponsibleParty> <PartyID>mc2471</PartyID> </EmployeeResponsibleParty> </Opportunity> </n0:OpportunityBundleMaintainRequest_sync>
Existence of referenced business data:
The following business data is only referenced and will not be created by the service operations. It must already exist in the system at the time the web service is called:
Business partners and related projections like prospects, employees, etc.
Products, Materials, Services
Campaigns
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 and to avoid accidental creation of duplicate business documents.
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 and 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.
You can find general information about Web services, their structure and consumption in the Web Services documentation.
Possible scenarios include the following:
Create Opportunity
The MaintainBundle operation is used to create an opportunity.
Update Opportunity
The MaintainBundle operation is used to update an opportunity.
Delete Opportunity
The MaintainBundle operation is used to delete opportunity as well.
An example of creating an opportunity with the Party and the Item Product information:
<n0:OpportunityBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID>00000000000102dcade9bcb0ab000c99</ID> </BasicMessageHeader> <Opportunity actionCode="01"> <ObjectNodeSenderTechnicalID>9B6B11DA-A126-4ADA-8DA7-35FB32751A54</ObjectNodeSenderTechnicalID> <ChangeStateID>20130304073654.7493750</ChangeStateID> <Name>A2X Test Opp</Name> <PriorityCode>3</PriorityCode> <GroupCode>0023</GroupCode> <OriginTypeCode>001</OriginTypeCode> <LifeCycleStatusCode>1</LifeCycleStatusCode> <SalesForecast> <ExpectedRevenueAmount currencyCode="USD">100</ExpectedRevenueAmount> <ExpectedProcessingDatePeriod> <StartDate>2013-03-03</StartDate> <EndDate>2013-04-04</EndDate> </ExpectedProcessingDatePeriod> </SalesForecast> <SalesCycle> <SalesCycleCode>001</SalesCycleCode> <SalesCyclePhaseCode>001</SalesCyclePhaseCode> </SalesCycle> <ProspectParty> <PartyID>MC9785</PartyID> <ContactPerson/> </ProspectParty> <EmployeeResponsibleParty> <PartyID>mc2471</PartyID> </EmployeeResponsibleParty> <Item actionCode = "01"> <Quantity unitCode="ea">4</Quantity> <ItemProduct> <MaterialInternalID>MCF-0001</MaterialInternalID> </ItemProduct> </Item> </Opportunity> </n0:OpportunityBundleMaintainRequest_sync>
An example of updating an opportunity with the Sales Cycle and the Sales Forecast information:
<n0:OpportunityBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID/> </BasicMessageHeader> <Opportunity actionCode="02"> <ObjectNodeSenderTechnicalID/> <ChangeStateID/> <ID>45</ID> <Name>A2X Test Opp Re-modified</Name> <PriorityCode>1</PriorityCode> <GroupCode>0023</GroupCode> <OriginTypeCode>001</OriginTypeCode> <LifeCycleStatusCode>2</LifeCycleStatusCode> <SalesForecast> <ExpectedRevenueAmount currencyCode="USD">100</ExpectedRevenueAmount> <ExpectedProcessingDatePeriod> <StartDate>2013-03-03</StartDate> <EndDate>2013-04-04</EndDate> </ExpectedProcessingDatePeriod> </SalesForecast> <SalesCycle> <SalesCycleCode>001</SalesCycleCode> <SalesCyclePhaseCode>001</SalesCyclePhaseCode> </SalesCycle> </Opportunity> </n0:OpportunityBundleMaintainRequest_sync>
An example of deleting an opportunity:
<n0:OpportunityBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID/> </BasicMessageHeader> <Opportunity actionCode="03"> <ObjectNodeSenderTechnicalID/> <ChangeStateID/> <ID>43</ID> </Opportunity> </n0:OpportunityBundleMaintainRequest_sync>
Description | MISSING - NOT ASSIGNED (CHECK_MAINTAIN_BUNDLE) |
Name | CheckMaintainBundle |
Synchronous | yes |
Release Status | Not Released |
To maintain one or more opportunities using imported and structured data.
The Check Maintain Bundle inbound operation checks whether one or more opportunities can be maintained in the target system, based on the opportunity data received from a source, a system or a file.
Description | Maintain opportunities |
Name | MaintainBundle |
Synchronous | yes |
Release Status | Released |
To maintain one or more opportunities using imported and structured data.
The Maintain Bundle inbound operation maintains one or more opportunities based on the opportunity data. This data is replicated or migrated from a source, a system or a file, to a target system.
Creating an Opportunity
<n0:OpportunityBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID>00000000000102dcade9bcb0ab000c99</ID> </BasicMessageHeader> <Opportunity actionCode="01"> <ObjectNodeSenderTechnicalID>9B6B11DA-A126-4ADA-8DA7-35FB32751A54</ObjectNodeSenderTechnicalID> <ChangeStateID>20130304073654.7493750</ChangeStateID> <Name>A2X Test Opp</Name> <PriorityCode>3</PriorityCode> <GroupCode>0023</GroupCode> <OriginTypeCode>001</OriginTypeCode> <LifeCycleStatusCode>1</LifeCycleStatusCode> <SalesForecast> <ExpectedRevenueAmount currencyCode="USD">100</ExpectedRevenueAmount> <ExpectedProcessingDatePeriod> <StartDate>2013-03-03</StartDate> <EndDate>2013-04-04</EndDate> </ExpectedProcessingDatePeriod> </SalesForecast> <SalesCycle> <SalesCycleCode>001</SalesCycleCode> <SalesCyclePhaseCode>001</SalesCyclePhaseCode> </SalesCycle> <ProspectParty> <PartyID>MC9785</PartyID> <ContactPerson/> </ProspectParty> <EmployeeResponsibleParty> <PartyID>mc2471</PartyID> </EmployeeResponsibleParty> </Opportunity> </n0:OpportunityBundleMaintainRequest_sync>
Updating an Opportunity
<n0:OpportunityBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID/> </BasicMessageHeader> <Opportunity actionCode="02"> <ObjectNodeSenderTechnicalID/> <ChangeStateID/> <ID>45</ID> <Name>A2X Test Opp Modified</Name> </Opportunity> </n0:OpportunityBundleMaintainRequest_sync>
Deleting an Opportunity
<n0:OpportunityBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID/> </BasicMessageHeader> <Opportunity actionCode="03"> <ObjectNodeSenderTechnicalID/> <ChangeStateID/> <ID>43</ID> </Opportunity> </n0:OpportunityBundleMaintainRequest_sync>