|Description||Manage Material Cost Estimate Run|
|Process Component Description||Costing Processing|
|Process Component Name||Costing|
|Process Component Namespace||http://sap.com/xi/AP/FinancialAccounting/Global|
|Deployment Unit Description||Financials|
|Endpoint Activation||By Scoping of Process Component||Operations|
An interface to migrate or create a Material Cost Estimate Run from a source system or file.
The web service interface Manage Material Cost Estimate Run In enables you to connect external applications to your SAP Business By Design system and to create Material Cost Estimate Runs in your system.
The web service interface Manage Material Cost Estimate Run In offers the operation MAINTAIN_BUNDLE.
Here is an example of a simple web service request:
<n0:MaterialCostEstimateRunRequest xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <MaterialCostEstimateRunRequest> <CompanyID>MC10000</CompanyID> <ValidityStartDate>2014-05-15</ValidityStartDate> <Description languageCode="EN">A2X test</Description> <QuantityStructureExplosionIndicator>true</QuantityStructureExplosionIndicator> <QuantityStructureExplosionDate>2014-06-24</QuantityStructureExplosionDate> <SetOfBooksID>0001</SetOfBooksID> <SelectionByMaterial> <InclusionExclusionCode>I</InclusionExclusionCode> <MDRO_IntervalBoundaryTypeCode>1</MDRO_IntervalBoundaryTypeCode> <ProductKeyLow> <ProductTypeCode/> <ProductIdentifierTypeCode/> <ProductID>10000000</ProductID> </ProductKeyLow> <ProductKeyHign> <ProductTypeCode/> <ProductIdentifierTypeCode/> <ProductID/> </ProductKeyHign> </SelectionByMaterial> <SelectionByMaterial> <InclusionExclusionCode>I</InclusionExclusionCode> <MDRO_IntervalBoundaryTypeCode>1</MDRO_IntervalBoundaryTypeCode> <ProductKeyLow> <ProductTypeCode/> <ProductIdentifierTypeCode/> <ProductID>10000010</ProductID> </ProductKeyLow> <ProductKeyHign> <ProductTypeCode/> <ProductIdentifierTypeCode/> <ProductID/> </ProductKeyHign> </SelectionByMaterial> <ActiveIndicator>true</ActiveIndicator> <ScheduleImmediatelyIndicator>true</ScheduleImmediatelyIndicator> </MaterialCostEstimateRunRequest> </n0:MaterialCostEstimateRunRequest>
Existence of referenced business documents:
The following business documents are only referenced and will not be created by the service operations. They must exist in the system already at the time the web service is called:
Set of Books
Products and Product Category
For the creation of Material Cost Estimate Run, the following conditions must be met:
The Company ID and Valid From must be defined.
The Set of Books must be assigned to the Companies.
If you want the Material Cost Estimate Run to be created and scheduled to start immediately, both the ScheduleImmediatelyIndicator and the ActiveIndicator should be set to 'true' as the prequisite.
The Maintain Bundle operation enables external applications to create business document data.
The Maintain Bundle operation is a mass-enabled stateless synchronous web service operation. 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.
The Maintain Bundle operation supports 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 the 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 un-interpretable 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.
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 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, but returns them to the web service consumer instead in the ReferenceObjectNodeSenderTechnicalID elements.
Note: The ObjectNodeSenderTechnicalID is also used to identify failed business document modifications in a mass operation.
<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>
<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
Many external applications consuming web services have special requirements and restrictions regarding the format of WSDLs. Some external applications require service definition WSDLs describing the web service signature. This is normally sufficient for the creation of static client-side proxies. Other external applications, normally those that do not create static client-side proxies, require binding WSDLs including the endpoint definition and authentication policy information.
In both cases, it may be the case that the external application imposes special restrictions on the structure or the size of WSDLs.
Microsoft InfoPath requires binding WSDLs and considers elements with the attribute "minOccurs=0" as "mandatory". However "minOccurs=0" means "optional" in SAP web services. In order to circumvent this problem, the WSDL must be saved locally and an additional attribute "nillable=true" must be added to make a query parameter optional for Microsoft InfoPath.
For very small clients such as mobile devices, the size of the WSDL itself may become a problem. In most cases the client only requires a very small part of the signature, but due to the complexity of the WSDL they may end up with long runtimes during serialization of the request or deserialization of the response. In order to circumvent this problem, the WSDL must be saved locally and the optional parts of the signature have to be removed before the WSDL is imported or static client-side proxies are generated.
External applications have to take into account that web service request and response message types can be enhanced with additional elements and attributes. Enhancements can be created by SAP, SAP partners, and key users. Enhancements of request message types are always optional elements or attributes. The SAP system does not require the external application to provide values in the request. Enhancements of response message types can contain mandatory elements or attributes. The external application must be able to process the extended response successfully.
XML element and attribute names are always stable. Technical definitions of data types can be enhanced in a compatible way. This may result in changed data type names. External applications can rely on XML element names and attribute names, but should not rely on data type names.
Note: You can download the WSDL file for any web service here:
Application and User Management work center -> Input Output Management -> Communication Arrangement.
User Management work center -> Service Explorer view.
You can find the documentation of the global data types in the SAP Community Network: Go to http://scn.sap.com/docs/DOC-17516 and click View Document.
You can find general information about Web services, their structure and consumption in the Web Services documentation.
|Description||Manage material cost estimate runs|
To create a Material Cost Estimate Run in the SAP Business ByDesign system.
The request message of the operation MaintainBundle contains a BasicMessageHeader node element as well as a MaterialCostEstimateRunRequest node element that contains the Material Cost Estimate Run data to be created. The detailed structure of the MaterialCostEstimateRunRequest node will be explained in the following sub-chapters. The MaterialCostEstimateRunRequest node can occur multiple times in the request message; this means that multiple Material Cost Estimate Runs can be created through a single web service request.
The response message type of the operation MaintainBundle contains log items, processing information and a MaterialCostEstimateRun-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as MaterialCostEstimateRun InternalID and UUID.
The structure of the request message has the following nodes and elements:
The MaterialCostEstimateRunRequest node elements contain all general information such as ID, CompanyID, Description, ValidityStartDate, QuantityStructureExplosionIndicator, QuantityStructureExplosionDate and SetOfBooksID. The data of this node is related to the General Data and Control Parameters on the New Material Cost Estimate Run screen in the system.
SelectionByMaterial: Multiple material selection criteria would be maintained in this node for the Material Cost Estimate Run.
SelectionByCrossProcessProductCategory: Multiple product category selection criteria would be maintained in this node for the Material Cost Estimate Run.
SelectionByPermanentEstablishment: Multiple business residence selection criteria would be maintained in this node for the Material Cost Estimate Run.
ActiveIndicator is an action indicator and should be set to 'true' to activate the Material Cost Estimate Run.
ScheduleImmediatelyIndicator is an action indicator and both ActiveIndicator and ScheduleImmediatelyIndicator should be set to 'true' to schedule the Material Cost Estimate Run to start immediately.
Material Cost Estimate Run Order ID and UUID
Change State ID and Sender Technical ID
Log: Containing the error messages from the processing of the request.