Description | Manage Purchase Requests |
Name | ManagePurchaseRequestIn |
Namespace | http://sap.com/xi/A1S/Global |
Process Component Description | Purchase Request Processing |
Process Component Name | PurchaseRequestProcessing |
Process Component Namespace | http://sap.com/xi/AP/Purchasing/Global |
Deployment Unit Description | Purchasing |
Endpoint Activation | By Scoping of Process Component | Operations |
Release Status | Released |
An interface to migrate or create Purchase Request from a source system or file and execute 'CancelOpenQuantityAction' and 'ReOpenQuantityAction' on the purchase request item node.
The web service Interface ‘Create Purchase Request Manually’ enables you to connect external applications to your SAP Business ByDesign system and to create and edit Purchase Request in your system. The web service interface ‘Create Purchase Request Manually’ is relevant if your company wants to access and manage Purchase Request data from external applications.
The Purchase Requests view in the Purchase Requests and Orders work center allows you to process and monitor all purchase requests received based on projects from project management, purchase proposals from materials requirements planning (MRP), and shopping carts from self-service shopping. You can also create purchase requests directly, that is without any preceding documents in the Purchase Requests (Manual) view of the Purchase Requests and Orders work center.
The web service interface 'Create Purchase Request Manually' offers the operations CheckMaintainBundle and MaintainBundle.
Existence of referenced business documents:
The following business documents are only for reference and will not be created by the service operations. They must exist in the system already at the time the web service is called. They are:
• Business Partners (Supplier, Company Purchasing units)
• Employees (Recipient, Requester, Customer etc.)
• Location (Ship-To)
• Products and Product Category.
• Cost Objects (Cost center)
If the Purchase Request need to be do cancel open quantity action using the web service then the Request message element 'cancelOpenQuantityActionIndicator' in ITEM node should be set as true.
If the Purchase Request need to be do reopen quantity action using the web service then the Request message element 'reopenQuantityActionIndicator' in ITEM node should be set as true.
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 operation
• Provide the same message type as the corresponding Maintain_ Bundle operation
• Does not assign internal numbers from a "productive" number range (number range status are not increased)
• Does not change business documents
Action codes represent an instruction to the recipient of the web service request to process transmitted message node elements.Following are the existing action codes and their description.
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.
The processing of node elements with cardinality > 1 (for example a list of descriptions in different languages or a list of telephone numbers) can be controlled using List Complete Transmission Indicators (LCTI). The LCTI indicates whether a list of node elements is transmitted completely. 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 transmitted completely and hence all node elements that are not transmitted remain unchanged. If transmitted node elements in the list can be identified uniquely, the system processes the node elements according to the action code. If transmitted node elements in the list cannot be identified uniquely, the system appends the node element to the corresponding list of node elements in the target business document. |
true | The list of elements is transmitted completely and 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 state completeness of sub-elements.
New description with language code DE (German) is created while an existing description with language code EN (English) is updated. Moreover, an existing description with language code FR (French) remains unchanged and any other description, with language code ES (Spanish) for example, is deleted. An error is raised if there is already a German description or if the English or French description does not exist.
<Root actionCode="04" descriptionListCompleteTransmissionIndicator="true" > <Description actionCode="01"> <Description languageCode="DE">neuer deutscher Text </Description> <Description actionCode="02"> <Description languageCode="EN">changed english text </Description> <Description actionCode="06"> <Description languageCode="FR"></Description> </Description> </Root>
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.
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. In addition, 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.
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
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 runtime 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.
Possible scenarios include the following:
• Create one or many of Purchase Request
• execute Cancel Open Quantity action on the existed purchase request item node
• execute Reopen Quantity action on the existed purchase request item node
Description | Manage purchase requests |
Name | MaintainBundle |
Synchronous | yes |
Release Status | Released |
To create and update (only actions Cancel and Reopen) Purchase Requests in Business ByDesign system.
The request message of the operation MaintainBundle contains a BasicMessageHeader node element as well as a PurchaseRequest node element that contains the PurchaseRequest data to be created or updated. The detailed structure of the PurchaseRequest node will be explained in the following sub-chapters. The PurchaseRequest node can occur multiple times in the request message – this means that multiple PurchaseRequests can be created and updated through a single web service request.
Purchase request once created in the system cannot be updated (other than few actions) and deleted. You can only update the cancellation status of purchase request by calling Cancel and Reopen action on existing purchase request in update call.
The response message type of the operation MaintainBundle contains log items, processing information and an PurchaseRequest-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as PurchaseRequest InternalID and UUID.
Example : Create new Purchase Request
Web service request
<n0:PurchaseRequestMaintainBundleRequest xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseRequestMaintainBundle actionCode="01"> <Item actionCode="01"> <ProductKeyItem> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCR-0005</ProductID> </ProductKeyItem> <TypeCode>18</TypeCode> <DeliveryPeriod> <StartDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <ShipToLocationID>MC64000</ShipToLocationID> <ListUnitPrice> <Amount currencyCode="USD">10</Amount> <BaseQuantity unitCode="EA">1</BaseQuantity> </ListUnitPrice> <Quantity unitCode="EA">10</Quantity> <CompanyIDParty actionCode="01"> <PartyID>MC10000</PartyID> </CompanyIDParty> <RequesterIDParty actionCode="01"> <PartyID>MC0172</PartyID> </RequesterIDParty> <RecipientIDParty actionCode="01"> <PartyID>MC0172</PartyID> </RecipientIDParty> <BuyerResponsibleIDParty actionCode="01"> <PartyID>MC0172</PartyID> </BuyerResponsibleIDParty> <SupplierIDParty actionCode="01"> <PartyID>MC2000</PartyID> </SupplierIDParty> </Item> </PurchaseRequestMaintainBundle> </n0:PurchaseRequestMaintainBundleRequest>
Web service response
<n0:PurchaseRequestMaintainBundleConfirmation xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAEE0B36BCC3167C82F9285:804"> <PurchaseRequestResponse> <ChangeStateID> 20180413044656.0000000</ChangeStateID> <PurchaseRequestID>1051</PurchaseRequestID> <PurchaseRequestUUID>00163e07-3d62-1ed8-8fda-b61024d94036</PurchaseRequestUUID> </PurchaseRequestResponse> <Log/> </n0:PurchaseRequestMaintainBundleConfirmation>
Structure of the request message has the following nodes and elements
The Purchase Request node elements contain the following elements
PurchaseRequestID is the internal ID of Purchase Request with which the purchase request can be addressed and found.
This node has information relevant for the purchase request items like the product, quantity, price, various item statuses. The attributes here can be seen on the Items view of the Purchase Order UI.
Following are some of the important attributes on Item node:
Item ID: This is the serial no of the item in purchase request and is unique.
Following are the type code for items supported.
TypeCode | Description |
---|---|
18 | Material |
19 | Service |
20 | Limit |
21 | Hierarchy |
Delivery Period: This is the time frame in which the goods must be delivered
Direct Material Indicator: This indicator indicates if the item is a stock or consumable item. If the flag is set then it is a stock item
Indicators: There are indicators for follow on processes like delivery and invoice. These are shown as indicators on the UI but modeled as type code attributes in business object.
DirectMaterialIndicator
Whether the item is a stock material or not
ThirdPartyIndicator:
Indicator is the representation of a situation that has exactly two mutually exclusive Boolean values
At Item level of Purchase Request following four types of parties are important.
BuyerParty: This is the buying company
Employee Responsible Party: The Purchaser who is requesting the purchase of goods
Purchasing Unit: The organization unit responsible for making the purchase.
Seller Party: The supplier to whom the Purchase Request is raised.
Product Recipient Party: The employee who is suppose to receive the goods/service.
Requester Party: The employee who requested the goods/service.
Following are the common party type codes existing in the system:
Party Type Code | Description |
---|---|
154 | Company (Buyer Party) |
410 | Purchasing Unit |
266 | Supplier |
167 | Employee |
The AttachmentFolder node element can be used to add and remove Purchase Request attachments. Data for this node can be found on the Purchase Request UI as attachments. On the user interface, files and links can be created. In the web service request, links and files are differentiated through the CategoryCode:
Category Code | Description |
---|---|
2 | Document |
3 | Link |
The different types of attachments are differentiated by the TypeCode
TypeCode | Description |
---|---|
10001 | Standard Attachment |
10068 | Internal Attachment |
To create link attachments, document elements must be as follows:
Element | Value |
---|---|
VisibleIndicator | true |
CategoryCode | 3 |
TypeCode | None |
AlternativeName | <Document Title> |
ExternalLinkWebURI | <link URI> |
Description | <comment> |
To create file attachments, document elements must be as follows:
Element | Value |
---|---|
VisibleIndicator | true |
CategoryCode | 2 |
TypeCode | None |
Name | <Document Title> |
AlternativeName | <Document Title> |
Description | <comment> |
This node is used to maintain Notes on Purchase Order Header or Item Level. There are different types of notes supported in Purchase Order:
TypeCode | Description |
---|---|
10011 | Internal comment from the Purchase |
10014 | Remark for Supplier |
10015 | Remark from Supplier |
10029 | Approval Note |
The node contains the cost assignment of the Purchase Request item. The cost can be assigned to following types of cost objects:
TypeCode | Description |
---|---|
CC | Cost Center |
ACC | General Ledger |
IMAT | Individual Material |
PRO | Project Task |
SLS | Sales Order |
SRV | Service Order |
The node contains the information about the various price conditions (Manual Price, List Price, Discounts and Surcharges) which are required for calculation for net value at item. Following are the Type Code for various price conditions
Type Code | Description |
---|---|
01PB | Manual Price |
01MP | Manual Discount(Percent) |
01MA | Manual Discount(Value) |
01MD | Manual Discount(Value/Quantity) |
01PS | Manual Surcharge(Percent) |
01AS | Manual Surcharge(Value) |
01MS | Manual Surcharge(Value/Quantity) |
Purchase Request ID and UUID
Change State ID and Sender Technical ID
Log: Containing the error messages from the processing of the request.
<n0:PurchaseRequestMaintainBundleRequest xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseRequestMaintainBundle actionCode="01"> <Item actionCode="01"> <ProductKeyItem> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCR-0005</ProductID> </ProductKeyItem> <TypeCode>18</TypeCode> <OpenQuantity unitCode="EA">10</OpenQuantity> <DeliveryPeriod> <StartDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <ShipToLocationID>MC64000</ShipToLocationID> <ListUnitPrice> <Amount currencyCode="USD">10</Amount> <BaseQuantity unitCode="EA">1</BaseQuantity> </ListUnitPrice> <Quantity unitCode="EA">10</Quantity> <CompanyIDParty> <PartyID>MC10000</PartyID> </CompanyIDParty> <RequesterIDParty> <PartyID>MC0172</PartyID> </RequesterIDParty> <RecipientIDParty> <PartyID>MC0172</PartyID> </RecipientIDParty> <BuyerResponsibleIDParty> <PartyID>MC0172</PartyID> </BuyerResponsibleIDParty> <SupplierIDParty> <PartyID>MC2000</PartyID> </SupplierIDParty> </Item> <Item actionCode="01"> <ProductKeyItem> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCR-0005</ProductID> </ProductKeyItem> <TypeCode>18</TypeCode> <OpenQuantity unitCode="EA">10</OpenQuantity> <DeliveryPeriod> <StartDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <ShipToLocationID>MC64000</ShipToLocationID> <ListUnitPrice> <Amount currencyCode="USD">10</Amount> <BaseQuantity unitCode="EA">1</BaseQuantity> </ListUnitPrice> <Quantity unitCode="EA">10</Quantity> <CompanyIDParty> <PartyID>MC10000</PartyID> </CompanyIDParty> <RequesterIDParty> <PartyID>MC0172</PartyID> </RequesterIDParty> <RecipientIDParty> <PartyID>MC0172</PartyID> </RecipientIDParty> <BuyerResponsibleIDParty> <PartyID>MC0172</PartyID> </BuyerResponsibleIDParty> <SupplierIDParty> <PartyID>MC2000</PartyID> </SupplierIDParty> </Item> </PurchaseRequestMaintainBundle> <PurchaseRequestMaintainBundle actionCode="01"> <Item actionCode="01"> <ProductKeyItem> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCR-0005</ProductID> </ProductKeyItem> <TypeCode>18</TypeCode> <OpenQuantity unitCode="EA">10</OpenQuantity> <DeliveryPeriod> <StartDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <ShipToLocationID>MC64000</ShipToLocationID> <ListUnitPrice> <Amount currencyCode="USD">10</Amount> <BaseQuantity unitCode="EA">1</BaseQuantity> </ListUnitPrice> <Quantity unitCode="EA">10</Quantity> <CompanyIDParty> <PartyID>MC10000</PartyID> </CompanyIDParty> <RequesterIDParty> <PartyID>MC0172</PartyID> </RequesterIDParty> <RecipientIDParty> <PartyID>MC0172</PartyID> </RecipientIDParty> <BuyerResponsibleIDParty> <PartyID>MC0172</PartyID> </BuyerResponsibleIDParty> <SupplierIDParty> <PartyID>MC2000</PartyID> </SupplierIDParty> </Item> <Item actionCode="01"> <ProductKeyItem> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCR-0005</ProductID> </ProductKeyItem> <TypeCode>18</TypeCode> <OpenQuantity unitCode="EA">10</OpenQuantity> <DeliveryPeriod> <StartDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <ShipToLocationID>MC64000</ShipToLocationID> <ListUnitPrice> <Amount currencyCode="USD">10</Amount> <BaseQuantity unitCode="EA">1</BaseQuantity> </ListUnitPrice> <Quantity unitCode="EA">10</Quantity> <CompanyIDParty> <PartyID>MC10000</PartyID> </CompanyIDParty> <RequesterIDParty> <PartyID>MC0172</PartyID> </RequesterIDParty> <RecipientIDParty> <PartyID>MC0172</PartyID> </RecipientIDParty> <BuyerResponsibleIDParty> <PartyID>MC0172</PartyID> </BuyerResponsibleIDParty> <SupplierIDParty> <PartyID>MC2000</PartyID> </SupplierIDParty> </Item> </PurchaseRequestMaintainBundle> </n0:PurchaseRequestMaintainBundleRequest>
<n0:PurchaseRequestMaintainBundleRequest xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseRequestMaintainBundle actionCode="01"> <Item actionCode="01"> <ProductKeyItem> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCR-0005</ProductID> </ProductKeyItem> <TypeCode>18</TypeCode> <OpenQuantity unitCode="EA">10</OpenQuantity> <DeliveryPeriod> <StartDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <ShipToLocationID>MC64000</ShipToLocationID> <LimitValue currencyCode="USD">120</LimitValue> <Quantity unitCode="EA">10</Quantity> <CompanyIDParty> <PartyID>MC10000</PartyID> </CompanyIDParty> <RequesterIDParty> <PartyID>MC0172</PartyID> </RequesterIDParty> <RecipientIDParty> <PartyID>MC0172</PartyID> </RecipientIDParty> <BuyerResponsibleIDParty> <PartyID>MC0172</PartyID> </BuyerResponsibleIDParty> <SupplierIDParty> <PartyID>MC20100</PartyID> </SupplierIDParty> <ItemAccountAssignmentDistribution ActionCode="01" AccountingCodingBlockAssignmentListCompleteTransmissionIndicator="true"> <CompanyID>MC10000</CompanyID> <AccountingCodingBlockAssignment ActionCode="01"> <Percent>100</Percent> <AccountingCodingBlockTypeCode>CC</AccountingCodingBlockTypeCode> <CostCentreID>MC10000</CostCentreID> </AccountingCodingBlockAssignment> </ItemAccountAssignmentDistribution> </Item> </PurchaseRequestMaintainBundle> </n0:PurchaseRequestMaintainBundleRequest>
<n0:PurchaseRequestMaintainBundleRequest xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseRequestMaintainBundle actionCode="01"> <Item actionCode="01"> <ProductKeyItem> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCR-0005</ProductID> </ProductKeyItem> <TypeCode>18</TypeCode> <OpenQuantity unitCode="EA">10</OpenQuantity> <DeliveryPeriod> <StartDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <ShipToLocationID>MC64000</ShipToLocationID> <LimitValue currencyCode="USD">120</LimitValue> <Quantity unitCode="EA">10</Quantity> <CompanyIDParty> <PartyID>MC10000</PartyID> </CompanyIDParty> <RequesterIDParty> <PartyID>MC0172</PartyID> </RequesterIDParty> <RecipientIDParty> <PartyID>MC0172</PartyID> </RecipientIDParty> <BuyerResponsibleIDParty> <PartyID>MC0172</PartyID> </BuyerResponsibleIDParty> <SupplierIDParty> <PartyID>MC2000</PartyID> </SupplierIDParty> <ItemAccountAssignmentDistribution ActionCode="01" AccountingCodingBlockAssignmentListCompleteTransmissionIndicator="true"> <CompanyID>MC10000</CompanyID> <AccountingCodingBlockAssignment ActionCode="01"> <Percent>20</Percent> <AccountingCodingBlockTypeCode>CC</AccountingCodingBlockTypeCode> <CostCentreID>MC10000</CostCentreID> </AccountingCodingBlockAssignment> <AccountingCodingBlockAssignment ActionCode="01"> <Percent>80</Percent> <AccountingCodingBlockTypeCode>CC</AccountingCodingBlockTypeCode> <CostCentreID>MC22000</CostCentreID> </AccountingCodingBlockAssignment> </ItemAccountAssignmentDistribution> </Item> </PurchaseRequestMaintainBundle> </n0:PurchaseRequestMaintainBundleRequest>
<n0:PurchaseRequestMaintainBundleRequest xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseRequestMaintainBundle actionCode="02"> <PurchaseRequestID>4444</PurchaseRequestID> <Item> <ItemID>1</ItemID> <cancelOpenQuantityActionIndicator>true</cancelOpenQuantityActionIndicator> </Item> </PurchaseRequestMaintainBundle> </n0:PurchaseRequestMaintainBundleRequest>
<n0:PurchaseRequestMaintainBundleRequest xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseRequestMaintainBundle actionCode="02"> <PurchaseRequestID>4444</PurchaseRequestID> <Item> <ItemID>1</ItemID> <reOpenQuantityActionIndicator>true</reOpenQuantityActionIndicator> </Item> </PurchaseRequestMaintainBundle> </n0:PurchaseRequestMaintainBundleRequest>
Release | Change Description | Details |
1808 | Documentation change | Service Interfaces and Operation, Structure of request message and response message, Example of payload updates |
1808 | Reference Field Bundle | RFB created for extension enablement |
Description | Check purchase requests |
Name | CheckMaintainBundle |
Synchronous | yes |
Release Status | Released |
To simulate create and update (only actions Cancel and Reopen) on Purchase Requests in Business ByDesign system.
The request message of the operation MaintainBundle contains a BasicMessageHeader node element as well as a PurchaseRequest node element that contains the PurchaseRequest data to be created or updated. The detailed structure of the PurchaseRequest node will be explained in the following sub-chapters. The PurchaseRequest node can occur multiple times in the request message – this means that multiple PurchaseRequests can be created and updated through a single web service request.
Purchase request once created in the system cannot be updated (other than few actions) and deleted. You can only update the cancellation status of purchase request by calling Cancel and Reopen action on existing purchase request in update call.
The response message type of the operation MaintainBundle contains log items, processing information and an PurchaseRequest-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as PurchaseRequest InternalID and UUID.
Example: Create Purchase Request with account assignment and price conditions.
Web service request
<n0:PurchaseRequestMaintainBundleRequest xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseRequestMaintainBundle actionCode="01"> <Item actionCode="01"> <ProductKeyItem> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCR-0005</ProductID> </ProductKeyItem> <TypeCode>18</TypeCode> <OpenQuantity unitCode="EA">10</OpenQuantity> <DeliveryPeriod> <StartDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="UTC">2016-05-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <ShipToLocationID>MC64000</ShipToLocationID> <LimitValue currencyCode="USD">120</LimitValue> <Quantity unitCode="EA">10</Quantity> <CompanyIDParty> <PartyID>MC10000</PartyID> </CompanyIDParty> <RequesterIDParty> <PartyID>MC0172</PartyID> </RequesterIDParty> <RecipientIDParty> <PartyID>MC0172</PartyID> </RecipientIDParty> <BuyerResponsibleIDParty> <PartyID>MC0172</PartyID> </BuyerResponsibleIDParty> <SupplierIDParty> <PartyID>MC20100</PartyID> </SupplierIDParty> <ItemAccountAssignmentDistribution ActionCode="01" AccountingCodingBlockAssignmentListCompleteTransmissionIndicator="true"> <CompanyID>MC10000</CompanyID> <AccountingCodingBlockAssignment ActionCode="01"> <Percent>100</Percent> <AccountingCodingBlockTypeCode>CC</AccountingCodingBlockTypeCode> <CostCentreID>MC10000</CostCentreID> </AccountingCodingBlockAssignment> </ItemAccountAssignmentDistribution> </Item> </PurchaseRequestMaintainBundle> </n0:PurchaseRequestMaintainBundleRequest>
Web service response
<n0:PurchaseRequestMaintainCheckConfirmation xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAEAAA71651A5DA3586E564:804"> <PurchaseRequestResponse> <ChangeStateID> 20180413060135.0000000</ChangeStateID> <PurchaseRequestID>##1</PurchaseRequestID> <PurchaseRequestUUID>00163e07-3d62-1ed8-8fdc-03bf79df031a</PurchaseRequestUUID> </PurchaseRequestResponse> <Log/> </n0:PurchaseRequestMaintainCheckConfirmation>
Structure of the request message has the following nodes and elements
The Purchase Request node elements contain the following elements
PurchaseRequestID is the internal ID of Purchase Request with which the purchase request can be addressed and found.
This node has information relevant for the purchase request items like the product, quantity, price, various item statuses. The attributes here can be seen on the Items view of the Purchase Order UI.
Following are some of the important attributes on Item node:
Item ID: This is the serial no of the item in purchase request and is unique.
Following are the type code for items supported.
TypeCode | Description |
---|---|
18 | Material |
19 | Service |
20 | Limit |
21 | Hierarchy |
Delivery Period: This is the time frame in which the goods must be delivered
Direct Material Indicator: This indicator indicates if the item is a stock or consumable item. If the flag is set then it is a stock item
Indicators: There are indicators for follow on processes like delivery and invoice. These are shown as indicators on the UI but modeled as type code attributes in business object.
DirectMaterialIndicator
Whether the item is a stock material or not
ThirdPartyIndicator:
Indicator is the representation of a situation that has exactly two mutually exclusive Boolean values
At Item level of Purchase Request following four types of parties are important.
BuyerParty: This is the buying company
Employee Responsible Party: The Purchaser who is requesting the purchase of goods
Purchasing Unit: The organization unit responsible for making the purchase.
Seller Party: The supplier to whom the Purchase Request is raised.
Product Recipient Party: The employee who is suppose to receive the goods/service.
Requester Party: The employee who requested the goods/service.
Following are the common party type codes existing in the system:
Party Type Code | Description |
---|---|
154 | Company (Buyer Party |
410 | Purchasing Unit |
266 | Supplier |
167 | Employee |
The AttachmentFolder node element can be used to add and remove Purchase Request attachments. Data for this node can be found on the Purchase Request UI as attachments. On the user interface, files and links can be created. In the web service request, links and files are differentiated through the CategoryCode:
Category Code | Description |
---|---|
2 | Document |
3 | Link |
The different types of attachments are differentiated by the TypeCode
TypeCode | Description |
---|---|
10001 | Standard Attachment |
10068 | Internal Attachment |
To create link attachments, document elements must be as follows:
Element | Value |
---|---|
VisibleIndicator | true |
CategoryCode | 3 |
TypeCode | None |
AlternativeName | <Document Title> |
ExternalLinkWebURI | <link URI> |
Description | <comment> |
To create file attachments, document elements must be as follows:
Element | Value |
---|---|
VisibleIndicator | true |
CategoryCode | 2 |
TypeCode | None |
Name | <Document Title> |
AlternativeName | <Document Title> |
Description | <comment> |
This node is used to maintain Notes on Purchase Order Header or Item Level. There are different types of notes supported in Purchase Order:
TypeCode | Description |
---|---|
10011 | Internal comment from the Purchase |
10014 | Remark for Supplier |
10015 | Remark from Supplier |
10029 | Approval Note |
The node contains the cost assignment of the Purchase Request item. The cost can be assigned to following types of cost objects:
TypeCode | Description |
---|---|
CC | Cost Center |
ACC | General Ledger |
IMAT | Individual Material |
PRO | Project Task |
SLS | Sales Order |
SRV | Service Order |
The node contains the information about the various price conditions (Manual Price, List Price, Discounts and Surcharges) which are required for calculation for net value at item. Following are the Type Code for various price conditions
Type Code | Description |
---|---|
01PB | Manual Price |
01MP | Manual Discount(Percent) |
01MA | Manual Discount(Value) |
01MD | Manual Discount(Value/Quantity) |
01PS | Manual Surcharge(Percent) |
01AS | Manual Surcharge(Value) |
01MS | Manual Surcharge(Value/Quantity) |
Purchase Request ID and UUID
Change State ID and Sender Technical ID
Log: Containing the error messages from the processing of the request.
<n0:PurchaseRequestMaintainBundleRequest xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseRequestMaintainBundle actionCode="02"> <PurchaseRequestID>4445</PurchaseRequestID> <Item> <ItemID>1</ItemID> <cancelOpenQuantityActionIndicator>true</cancelOpenQuantityActionIndicator> </Item> <Item> <ItemID>2</ItemID> <cancelOpenQuantityActionIndicator>true</cancelOpenQuantityActionIndicator> </Item> </PurchaseRequestMaintainBundle> </n0:PurchaseRequestMaintainBundleRequest>
Release | Change Description | Details |
1808 | Documentation change | Service Interfaces and Operation, Structure of request message and response message, Example of payload updates |
1808 | Reference Field Bundle | RFB created for extension enablement |