Description | Manage Purchase Orders |
Name | ManagePurchaseOrderIn |
Namespace | http://sap.com/xi/A1S/Global |
Process Component Description | Purchase Order Processing |
Process Component Name | PurchaseOrderProcessing |
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 Orders from a source system or file.
The web service Interface ‘Manage PurchaseOrder In’ enables you to connect external applications to your SAP Business ByDesign system and to create and edit Purchase Orders in your system. The web service interface ‘Manage PurchaseOrder In’ is relevant if your company wants to access and manage Purchase Orders data from external applications.
The web service interface Manage PurchaseOrder In offers the operations CHECK_MAINTAIN_BUNDLE and MAINTAIN_BUNDLE.
Purchase orders (PO) can be created manually in the Purchase Orders view of the Purchase Requests and Orders work center
Here is an example of a simple web service request:
<n0:PurchaseOrderBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseOrderMaintainBundle actionCode="01" ItemListCompleteTransmissionIndicator="true"> <ObjectNodeSenderTechnicalID>1</ObjectNodeSenderTechnicalID> <ChangeStateID>Token 15</ChangeStateID> <BusinessTransactionDocumentTypeCode>001</BusinessTransactionDocumentTypeCode> <CurrencyCode>USD</CurrencyCode> <BuyerParty actionCode="01"> <ObjectNodePartyTechnicalID>2</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <SellerParty actionCode="01"> <ObjectNodePartyTechnicalID>3</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC4000</PartyID> </PartyKey> </SellerParty> </PurchaseOrderMaintainBundle> </n0:PurchaseOrderBundleMaintainRequest_sync>
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 Orders need to be canceled using the web service then the Purchase Orders provided as input should be in Status ‘Sent’ or ‘Not yet Acknowledged’.
If the Purchase Orders need to be Ordered using the web service then the Purchase Orders provided as input should be in status ‘In Preparation’ and should be consistent with all the existing mandatory data.
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.
In updating a postal address of a Purchase Order , the request updates the city name, street postal code, street name, and house ID. The country code remains unchanged, as the element “CountryCode” is not contained in the XML document (commented out).
<PostalAddress actionCode="02"> <!-- <CountryCode>DE</CountryCode> --> <CityName>Heidelberg</CityName> <StreetPostalCode>69117</StreetPostalCode> <StreetName>Hauptstrasse</StreetName> <HouseID></HouseID> </PostalAddress>
Note: The request deletes the house ID or updates the house ID with its initial value.
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 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. 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>
Using address node under ship to location, customer and recipient in the web service request, Purchase Order can be created with document specific address passed in the respective nodes
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, Update and Delete one or many of Purchase Orders
• Cancel one or many numbers of Purchase Orders ByDesign
• Cancel one or many numbers of Purchase Orders
Description | Check purchase orders |
Name | ManagePurchaseOrderInCheckMaintainBundle |
Synchronous | yes |
Release Status | Released |
To simulate create or update one or more Purchase Orders.
The request message of the operation MaintainBundle contains a BasicMessageHeader node element as well as a PurchaseOrder node element that contains the PurchaseOrder data to be created or updated. The detailed structure of the PurchaseOrder node will be explained in the following sub-chapters. The PurchaseOrder node can occur multiple times in the request message – this means that multiple PurchaseOrders can be created and updated through a single web service request.
The response message type of the operation MaintainBundle contains log items, processing information and an PurchaseOrder-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as PurchaseOrder InternalID and UUID.
Example : Check Purchase Orders Creation
Web service request
<n0:PurchaseOrderBundleCheckMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseOrderMaintainBundle actionCode="01" ItemListCompleteTransmissionIndicator="true"> <ObjectNodeSenderTechnicalID>1</ObjectNodeSenderTechnicalID> <ChangeStateID>Token 15</ChangeStateID> <BusinessTransactionDocumentTypeCode>001</BusinessTransactionDocumentTypeCode> <CurrencyCode>USD</CurrencyCode> <BuyerParty actionCode="01"> <ObjectNodePartyTechnicalID>2</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <SellerParty actionCode="01"> <ObjectNodePartyTechnicalID>3</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC2000</PartyID> </PartyKey> </SellerParty> <EmployeeResponsibleParty actionCode="01"> <ObjectNodePartyTechnicalID>4</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC0678</PartyID> </PartyKey> </EmployeeResponsibleParty> <BillToParty actionCode="01"> <ObjectNodePartyTechnicalID>5</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC21100</PartyID> </PartyKey> </BillToParty> <Company actionCode="01"> <ObjectNodePartyTechnicalID>6</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </Company> <ShipToLocation actionCode="01"> <ObjectNodePartyTechnicalID>7</ObjectNodePartyTechnicalID> <LocationID>MC64000</LocationID> </ShipToLocation> <Item ItemImatListCompleteTransmissionIndicator="true" actionCode="01"> <ObjectNodeSenderTechnicalID>8</ObjectNodeSenderTechnicalID> <BusinessTransactionDocumentItemTypeCode>18</BusinessTransactionDocumentItemTypeCode> <Quantity unitCode="EA">1</Quantity> <ListUnitPrice> <Amount currencyCode="USD">100.00</Amount> <BaseQuantity unitCode="EA">5.0</BaseQuantity> </ListUnitPrice> <DeliveryPeriod> <StartDateTime timeZoneCode="EST">2018-07-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="EST">2018-07-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <DirectMaterialIndicator>false</DirectMaterialIndicator> <ThirdPartyDealIndicator>false</ThirdPartyDealIndicator> <FollowUpPurchaseOrderConfirmation> <RequirementCode>04</RequirementCode> </FollowUpPurchaseOrderConfirmation> <FollowUpDelivery> <RequirementCode>01</RequirementCode> <EmployeeTimeConfirmationRequiredIndicator>true</EmployeeTimeConfirmationRequiredIndicator> </FollowUpDelivery> <FollowUpInvoice> <BusinessTransactionDocumentSettlementRelevanceIndicator>false</BusinessTransactionDocumentSettlementRelevanceIndicator> <RequirementCode>01</RequirementCode> <EvaluatedReceiptSettlementIndicator>false</EvaluatedReceiptSettlementIndicator> <DeliveryBasedInvoiceVerificationIndicator>false</DeliveryBasedInvoiceVerificationIndicator> </FollowUpInvoice> <ItemProduct actionCode="01"> <ObjectNodePartyTechnicalID>9</ObjectNodePartyTechnicalID> <CashDiscountDeductibleIndicator>true</CashDiscountDeductibleIndicator> <ProductKey> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCF-0001</ProductID> </ProductKey> </ItemProduct> <ShipToLocation actionCode="01"> <ObjectNodePartyTechnicalID>10</ObjectNodePartyTechnicalID> <LocationID>MC64000</LocationID> </ShipToLocation> <ItemAccountingCodingBlockDistribution AccountingCodingBlockAssignmentListCompleteTransmissionIndicator="true" actionCode="01"> <TechnicalID>17</TechnicalID> <AccountingCodingBlockAssignment actionCode="01"> <TechnicalID>18</TechnicalID> <CostCentreID>MC10000</CostCentreID> </AccountingCodingBlockAssignment> </ItemAccountingCodingBlockDistribution> <ItemTextCollection actionCode="01"> <TechnicalID>12</TechnicalID> <Text actionCode="01"> <TechnicalID>13</TechnicalID> <TypeCode>10011</TypeCode> <CreationDateTime>2018-04-11T23:59:59.1234Z</CreationDateTime> <TextContent actionCode="01"> <TechnicalID>14</TechnicalID> <Text languageCode="EN">Hellotext</Text> </TextContent> </Text> </ItemTextCollection> </Item> <CashDiscountTerms ActionCode="01"> <ObjectNodeSenderTechnicalID>11</ObjectNodeSenderTechnicalID> <Code>0005</Code> <PaymentBaselineDate>2018-08-13</PaymentBaselineDate> </CashDiscountTerms> <TextCollection actionCode="01"> <Text actionCode="01"> <TechnicalID>13</TechnicalID> <TypeCode>10029</TypeCode> <TextContent actionCode="01"> <TechnicalID>14</TechnicalID> <Text languageCode="EN">Hellotext</Text> </TextContent> </Text> </TextCollection> </PurchaseOrderMaintainBundle> </n0:PurchaseOrderBundleCheckMaintainRequest_sync>
Web service response
<n0:PurchaseOrderBundleMaintainConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAEADCB6FE7AE1CC3A8850E:804"> <PurchaseOrder> <ReferenceObjectNodeSenderTechnicalID>1</ReferenceObjectNodeSenderTechnicalID> <ChangeStateID> 20180411064611.0000000</ChangeStateID> <BusinessTransactionDocumentID>##1</BusinessTransactionDocumentID> <UUID>00163e07-3d68-1ee8-8faa-807fc6120e82</UUID> </PurchaseOrder> <Log/> </n0:PurchaseOrderBundleMaintainConfirmation_sync>
Structure of the request message has the following nodes and elements
The Purchase Order node elements contain all general information such as ID, names, TypeCode and business partners. The data of this node is related to the General Data on the Purchase Order UI.
TypeCode : The type code determines the business object. Purchase Order is identified with type code 001.
PurchaseOrderID is the internal ID with which the Purchase Order can be addressed and found.
CurrencyCode is the currency in which the purchase is made.
Date is the creation date of Purchase Order.
Order Purchase Order is an indicator and should be set to trigger ‘Order’ action on Purchase Order
Cancel Purchase Order is an indicator and should be set to trigger the cancellation of ordered Purchase Order.
PreventDocumentOutputIndicator is an indicator that specifies whether the purchase order output to supplier shall be prevented or not.
At header level of Purchase order 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 Order is raised.
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 delivery Terms node will have the information like incoterms and Incoterms location. This data is useful in case of contractual terms of transportation of goods.
Incoterms values are derived from the contract or the supplier used in the purchase order. The set of values applicable for incoterms are chosen during BC scoping.
The Payment terms information in Purchase Order is maintained in this node. Again the set of Payment terms applicable for the buying company are chosen during the system setup.
The AttachmentFolder node element can be used to add and remove Purchase Order attachments. Data for this node can be found on the Purchase Order 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 |
This node has information relevant for the purchase order 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 order and is unique.
Following are the type code for items supported.
TypeCode | Description |
---|---|
18 | Material |
19 | Service |
20 | Limit |
84 | Expense |
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. Following are the type codes:
TypeCode | Description |
---|---|
01 | Follow on document required |
05 | Follow on document not required |
There are multiple parties that are relevant at item level. Each item can be delivered to a different address and hence the address is derived from the parties or location at item level. Following parties and type codes are important at item level:
PartyTypeCode | Description| |
---|---|
167 | Requester or Recipient or Service Agent |
159 | End Buyer (Customer) |
Location Codes applicable for Purchase Order are
TypeCode | Description |
---|---|
1 | Ship To Location |
2 | Ship From Location |
3 | Receiving Location |
The delivery address of Purchase Order item is derived from Parties or location based on some priorities. If Ship-To location takes the highest priority. Then the Customer takes precedence and last priority is Recipient party.
Delivery terms on item level maintain the information on how much over or under delivery is allowed. It has three main elements:
UnlimitedOverDelivery : This is an indicator specifying that the PO item can be delivered to any extent.
Under-Delivery Tolerance: it specifies in percentage that how much under delivery can be tolerated.
Over-Delivery Tolerance: it specifies in percentage that how much Over delivery can be tolerated.
The node contains the cost assignment of the Purchase order 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 |
Purchase Order ID and UUID
Change State ID and Sender Technical ID
Log: Containing the error messages from the processing of the request.
Release | Change Description | Details |
1808 | Documentation change | Service Interfaces and Operation, Structure of request message and response message, Example of payload updates |
Description | Maintain purchase orders |
Name | ManagePurchaseOrderInMaintainBundle |
Synchronous | yes |
Release Status | Released |
To create, update, or delete Purchase Orders in Business ByDesign system.
The request message of the operation MaintainBundle contains a BasicMessageHeader node element as well as a PurchaseOrder node element that contains the PurchaseOrder data to be created or updated. The detailed structure of the PurchaseOrder node will be explained in the following sub-chapters. The PurchaseOrder node can occur multiple times in the request message – this means that multiple PurchaseOrders can be created and updated through a single web service request.
The response message type of the operation MaintainBundle contains log items, processing information and an PurchaseOrder-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as PurchaseOrder InternalID and UUID.
Example : Create new Purchase Orders
Web service request
<n0:PurchaseOrderBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseOrderMaintainBundle actionCode="01" ItemListCompleteTransmissionIndicator="true"> <ObjectNodeSenderTechnicalID>1</ObjectNodeSenderTechnicalID> <ChangeStateID>Token 15</ChangeStateID> <BusinessTransactionDocumentTypeCode>001</BusinessTransactionDocumentTypeCode> <CurrencyCode>USD</CurrencyCode> <BuyerParty actionCode="01"> <ObjectNodePartyTechnicalID>2</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <SellerParty actionCode="01"> <ObjectNodePartyTechnicalID>3</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC2000</PartyID> </PartyKey> </SellerParty> <EmployeeResponsibleParty actionCode="01"> <ObjectNodePartyTechnicalID>4</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC0678</PartyID> </PartyKey> </EmployeeResponsibleParty> <BillToParty actionCode="01"> <ObjectNodePartyTechnicalID>5</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC21100</PartyID> </PartyKey> </BillToParty> <Company actionCode="01"> <ObjectNodePartyTechnicalID>6</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </Company> <ShipToLocation actionCode="01"> <ObjectNodePartyTechnicalID>7</ObjectNodePartyTechnicalID> <LocationID>MC64000</LocationID> </ShipToLocation> <Item ItemImatListCompleteTransmissionIndicator="true" actionCode="01"> <ObjectNodeSenderTechnicalID>8</ObjectNodeSenderTechnicalID> <BusinessTransactionDocumentItemTypeCode>18</BusinessTransactionDocumentItemTypeCode> <Quantity unitCode="EA">1</Quantity> <ListUnitPrice> <Amount currencyCode="USD">100.00</Amount> <BaseQuantity unitCode="EA">5.0</BaseQuantity> </ListUnitPrice> <DeliveryPeriod> <StartDateTime timeZoneCode="EST">2018-07-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="EST">2018-07-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <DirectMaterialIndicator>false</DirectMaterialIndicator> <ThirdPartyDealIndicator>false</ThirdPartyDealIndicator> <FollowUpPurchaseOrderConfirmation> <RequirementCode>04</RequirementCode> </FollowUpPurchaseOrderConfirmation> <FollowUpDelivery> <RequirementCode>01</RequirementCode> <EmployeeTimeConfirmationRequiredIndicator>true</EmployeeTimeConfirmationRequiredIndicator> </FollowUpDelivery> <FollowUpInvoice> <BusinessTransactionDocumentSettlementRelevanceIndicator>false</BusinessTransactionDocumentSettlementRelevanceIndicator> <RequirementCode>01</RequirementCode> <EvaluatedReceiptSettlementIndicator>false</EvaluatedReceiptSettlementIndicator> <DeliveryBasedInvoiceVerificationIndicator>false</DeliveryBasedInvoiceVerificationIndicator> </FollowUpInvoice> <ItemProduct actionCode="01"> <ObjectNodePartyTechnicalID>9</ObjectNodePartyTechnicalID> <CashDiscountDeductibleIndicator>true</CashDiscountDeductibleIndicator> <ProductKey> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCF-0001</ProductID> </ProductKey> </ItemProduct> <ShipToLocation actionCode="01"> <ObjectNodePartyTechnicalID>10</ObjectNodePartyTechnicalID> <LocationID>MC64000</LocationID> </ShipToLocation> <ItemAccountingCodingBlockDistribution AccountingCodingBlockAssignmentListCompleteTransmissionIndicator="true" actionCode="01"> <TechnicalID>17</TechnicalID> <AccountingCodingBlockAssignment actionCode="01"> <TechnicalID>18</TechnicalID> <CostCentreID>MC10000</CostCentreID> </AccountingCodingBlockAssignment> </ItemAccountingCodingBlockDistribution> <ItemTextCollection actionCode="01"> <TechnicalID>12</TechnicalID> <Text actionCode="01"> <TechnicalID>13</TechnicalID> <TypeCode>10011</TypeCode> <CreationDateTime>2018-04-11T23:59:59.1234Z</CreationDateTime> <TextContent actionCode="01"> <TechnicalID>14</TechnicalID> <Text languageCode="EN">Hellotext</Text> </TextContent> </Text> </ItemTextCollection> </Item> <CashDiscountTerms ActionCode="01"> <ObjectNodeSenderTechnicalID>11</ObjectNodeSenderTechnicalID> <Code>0005</Code> <PaymentBaselineDate>2018-08-13</PaymentBaselineDate> </CashDiscountTerms> <TextCollection actionCode="01"> <Text actionCode="01"> <TechnicalID>13</TechnicalID> <TypeCode>10029</TypeCode> <TextContent actionCode="01"> <TechnicalID>14</TechnicalID> <Text languageCode="EN">Hellotext</Text> </TextContent> </Text> </TextCollection> </PurchaseOrderMaintainBundle> </n0:PurchaseOrderBundleMaintainRequest_sync>
Web service response
<n0:PurchaseOrderBundleMaintainConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAE3E9D9EC4EB4058BA5225:804"> <PurchaseOrder> <ReferenceObjectNodeSenderTechnicalID>1</ReferenceObjectNodeSenderTechnicalID> <ChangeStateID> 20180411071619.0000000</ChangeStateID> <BusinessTransactionDocumentID>1408</BusinessTransactionDocumentID> <UUID>00163e07-3d68-1ee8-8fab-0738be190fbd</UUID> </PurchaseOrder> <Log/> </n0:PurchaseOrderBundleMaintainConfirmation_sync>
Structure of the request message has the following nodes and elements
The Purchase Order node elements contain all general information such as ID, names, TypeCode and business partners. The data of this node is related to the General Data on the Purchase Order UI.
TypeCode : The type code determines the business object. Purchase Order is identified with type code 001.
PurchaseOrderID is the internal ID with which the Purchase Order can be addressed and found.
CurrencyCode is the currency in which the purchase is made.
Date is the creation date of Purchase Order.
Order Purchase Order is an indicator and should be set to trigger ‘Order’ action on Purchase Order
Cancel Purchase Order is an indicator and should be set to trigger the cancellation of ordered Purchase Order.
PreventDocumentOutputIndicator is an indicator that specifies whether the purchase order output to supplier shall be prevented or not.
At header level of Purchase order 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 Order is raised.
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 delivery Terms node will have the information like incoterms and Incoterms location. This data is useful in case of contractual terms of transportation of goods.
Incoterms values are derived from the contract or the supplier used in the purchase order. The set of values applicable for incoterms are chosen during BC scoping.
The Payment terms information in Purchase Order is maintained in this node. Again the set of Payment terms applicable for the buying company are chosen during the system setup.
The AttachmentFolder node element can be used to add and remove Purchase Order attachments. Data for this node can be found on the Purchase Order 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 |
This node has information relevant for the purchase order 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 order and is unique.
Following are the type code for items supported.
TypeCode | Description |
---|---|
18 | Material |
19 | Service |
20 | Limit |
84 | Expense |
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. Following are the type codes:
TypeCode | Description |
---|---|
01 | Follow on document required |
05 | Follow on document not required |
There are multiple parties that are relevant at item level. Each item can be delivered to a different address and hence the address is derived from the parties or location at item level. Following parties and type codes are important at item level:
PartyTypeCode | Description| |
---|---|
167 | Requester or Recipient or Service Agent |
159 | End Buyer (Customer) |
Location Codes applicable for Purchase Order are
TypeCode | Description |
---|---|
1 | Ship To Location |
2 | Ship From Location |
3 | Receiving Location |
The delivery address of Purchase Order item is derived from Parties or location based on some priorities. If Ship-To location takes the highest priority. Then the Customer takes precedence and last priority is Recipient party.
Delivery terms on item level maintain the information on how much over or under delivery is allowed. It has three main elements:
UnlimitedOverDelivery : This is an indicator specifying that the PO item can be delivered to any extent.
Under-Delivery Tolerance: it specifies in percentage that how much under delivery can be tolerated.
Over-Delivery Tolerance: it specifies in percentage that how much Over delivery can be tolerated.
The node contains the cost assignment of the Purchase order 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 |
Purchase Order ID and UUID
Change State ID and Sender Technical ID
Log: Containing the error messages from the processing of the request.
Example 1: Create Purchase Order with Price component details (complex prices)
<n0:PurchaseOrderBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseOrderMaintainBundle actionCode="01" ItemListCompleteTransmissionIndicator="true"> <ObjectNodeSenderTechnicalID>1</ObjectNodeSenderTechnicalID> <ChangeStateID>Token 15</ChangeStateID> <BusinessTransactionDocumentTypeCode>001</BusinessTransactionDocumentTypeCode> <CurrencyCode>USD</CurrencyCode> <BuyerParty actionCode="01"> <ObjectNodePartyTechnicalID>2</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <SellerParty actionCode="01"> <ObjectNodePartyTechnicalID>3</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC4000</PartyID> </PartyKey> </SellerParty> <EmployeeResponsibleParty actionCode="01"> <ObjectNodePartyTechnicalID>4</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC0678</PartyID> </PartyKey> </EmployeeResponsibleParty> <BillToParty actionCode="01"> <ObjectNodePartyTechnicalID>5</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC21100</PartyID> </PartyKey> </BillToParty> <Company actionCode="01"> <ObjectNodePartyTechnicalID>6</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </Company> <ShipToLocation actionCode="01"> <ObjectNodePartyTechnicalID>7</ObjectNodePartyTechnicalID> <LocationID>MC64000</LocationID> </ShipToLocation> <Item ItemImatListCompleteTransmissionIndicator="true" actionCode="01"> <ObjectNodeSenderTechnicalID>8</ObjectNodeSenderTechnicalID> <BusinessTransactionDocumentItemTypeCode>18</BusinessTransactionDocumentItemTypeCode> <Quantity unitCode="EA">5</Quantity> <DeliveryPeriod> <StartDateTime timeZoneCode="EST">2012-07-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="EST">2012-07-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <DirectMaterialIndicator>false</DirectMaterialIndicator> <ThirdPartyDealIndicator>true</ThirdPartyDealIndicator> <FollowUpPurchaseOrderConfirmation> <RequirementCode>04</RequirementCode> </FollowUpPurchaseOrderConfirmation> <FollowUpDelivery> <RequirementCode>01</RequirementCode> <EmployeeTimeConfirmationRequiredIndicator>true</EmployeeTimeConfirmationRequiredIndicator> </FollowUpDelivery> <FollowUpInvoice> <BusinessTransactionDocumentSettlementRelevanceIndicator>false</BusinessTransactionDocumentSettlementRelevanceIndicator> <RequirementCode>01</RequirementCode> <EvaluatedReceiptSettlementIndicator>false</EvaluatedReceiptSettlementIndicator> <DeliveryBasedInvoiceVerificationIndicator>false</DeliveryBasedInvoiceVerificationIndicator> </FollowUpInvoice> <ItemProduct actionCode="01"> <ObjectNodePartyTechnicalID>9</ObjectNodePartyTechnicalID> <CashDiscountDeductibleIndicator>true</CashDiscountDeductibleIndicator> <ProductKey> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCR-0004</ProductID> </ProductKey> </ItemProduct> <ShipToLocation actionCode="01"> <ObjectNodePartyTechnicalID>10</ObjectNodePartyTechnicalID> <LocationID>MC64000</LocationID> </ShipToLocation> <EndBuyerParty> <ObjectNodePartyTechnicalID>20</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>1000730</PartyID> </PartyKey> </EndBuyerParty> <ItemAccountingCodingBlockDistribution AccountingCodingBlockAssignmentListCompleteTransmissionIndicator="true" actionCode="01"> <TechnicalID>17</TechnicalID> <AccountingCodingBlockAssignment actionCode="01"> <TechnicalID>18</TechnicalID> <CostCentreID>MC10000</CostCentreID> </AccountingCodingBlockAssignment> </ItemAccountingCodingBlockDistribution> <ItemPriceCalculation actionCode="01"> <ItemPriceComponent actionCode="01"> <TypeCode>01PB</TypeCode> <Rate> <DecimalValue>30</DecimalValue> <CurrencyCode>USD</CurrencyCode> <BaseDecimalValue>3</BaseDecimalValue> <BaseMeasureUnitCode>EA</BaseMeasureUnitCode> </Rate> </ItemPriceComponent> </ItemPriceCalculation> <ItemTextCollection actionCode="01"> <TechnicalID>12</TechnicalID> <Text actionCode="01"> <TechnicalID>13</TechnicalID> <TypeCode>10011</TypeCode> <CreationDateTime>2012-07-10T23:59:59.1234Z</CreationDateTime> <TextContent actionCode="01"> <TechnicalID>14</TechnicalID> <Text languageCode="EN">Hellotext</Text> </TextContent> </Text> </ItemTextCollection> </Item> <CashDiscountTerms ActionCode="01"> <ObjectNodeSenderTechnicalID>11</ObjectNodeSenderTechnicalID> <Code>0005</Code> <PaymentBaselineDate>2012-08-13</PaymentBaselineDate> </CashDiscountTerms> <TextCollection actionCode="01"> <Text actionCode="01"> <TechnicalID>13</TechnicalID> <TypeCode>10029</TypeCode> <TextContent actionCode="01"> <TechnicalID>14</TechnicalID> <Text languageCode="EN">Hellotext</Text> </TextContent> </Text> </TextCollection> </PurchaseOrderMaintainBundle> </n0:PurchaseOrderBundleMaintainRequest_sync>
Example 2: Cancel Purchase Orders
<n0:PurchaseOrderBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID>00300571CE9F1DED9698C626CD53DAEK</ID> <UUID>12345678-90AB-CDEF-0123-456789ABCDEF</UUID> </BasicMessageHeader> <PurchaseOrderMaintainBundle actionCode="02"> <ObjectNodeSenderTechnicalID>1</ObjectNodeSenderTechnicalID> <BusinessTransactionDocumentTypeCode>001</BusinessTransactionDocumentTypeCode> <PurchaseOrderID/> <CancelPurchaseOrderActionIndicator>true</CancelPurchaseOrderActionIndicator> </PurchaseOrderMaintainBundle> </n0:PurchaseOrderBundleMaintainRequest_sync>
Example 3: Update price information within purchase orders
<n0:PurchaseOrderBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseOrderMaintainBundle actionCode="02"> <PurchaseOrderID>1730</PurchaseOrderID> <BusinessTransactionDocumentTypeCode>001</BusinessTransactionDocumentTypeCode> <Item actionCode="02"> <ItemID>1</ItemID> <BusinessTransactionDocumentItemTypeCode>18</BusinessTransactionDocumentItemTypeCode> <ItemPriceCalculation actionCode="02"> <ItemPriceComponent actionCode="02"> <UUID>00163E07-3D62-1EE5-92DB-A6B48DF31B27</UUID> <Rate> <DecimalValue>30</DecimalValue> <CurrencyCode>USD</CurrencyCode> <BaseDecimalValue>3</BaseDecimalValue> <BaseMeasureUnitCode>EA</BaseMeasureUnitCode> </Rate> </ItemPriceComponent> </ItemPriceCalculation> </Item> </PurchaseOrderMaintainBundle> </n0:PurchaseOrderBundleMaintainRequest_sync>
Example 4: Create PO with specific tax code information
<n0:PurchaseOrderBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseOrderMaintainBundle actionCode="01" ItemListCompleteTransmissionIndicator="true"> <ObjectNodeSenderTechnicalID>1</ObjectNodeSenderTechnicalID> <ChangeStateID>Token 15</ChangeStateID> <BusinessTransactionDocumentTypeCode>001</BusinessTransactionDocumentTypeCode> <CurrencyCode>USD</CurrencyCode> <BuyerParty actionCode="01"> <ObjectNodePartyTechnicalID>2</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <SellerParty actionCode="01"> <ObjectNodePartyTechnicalID>3</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC4000</PartyID> </PartyKey> </SellerParty> <EmployeeResponsibleParty actionCode="01"> <ObjectNodePartyTechnicalID>4</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC0678</PartyID> </PartyKey> </EmployeeResponsibleParty> <BillToParty actionCode="01"> <ObjectNodePartyTechnicalID>5</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC21100</PartyID> </PartyKey> </BillToParty> <Company actionCode="01"> <ObjectNodePartyTechnicalID>6</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </Company> <ShipToLocation actionCode="01"> <ObjectNodePartyTechnicalID>7</ObjectNodePartyTechnicalID> <LocationID>MC64000</LocationID> </ShipToLocation> <Item ItemImatListCompleteTransmissionIndicator="true" actionCode="01"> <ObjectNodeSenderTechnicalID>8</ObjectNodeSenderTechnicalID> <BusinessTransactionDocumentItemTypeCode>18</BusinessTransactionDocumentItemTypeCode> <Quantity unitCode="EA">5</Quantity> <ListUnitPrice> <Amount currencyCode="USD">100.00</Amount> <BaseQuantity unitCode="EA">5.0</BaseQuantity> </ListUnitPrice> <DeliveryPeriod> <StartDateTime timeZoneCode="EST">2016-07-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="EST">2016-07-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <DirectMaterialIndicator>true</DirectMaterialIndicator> <ThirdPartyDealIndicator>false</ThirdPartyDealIndicator> <FollowUpPurchaseOrderConfirmation> <RequirementCode>04</RequirementCode> </FollowUpPurchaseOrderConfirmation> <FollowUpDelivery> <RequirementCode>01</RequirementCode> <EmployeeTimeConfirmationRequiredIndicator>true</EmployeeTimeConfirmationRequiredIndicator> </FollowUpDelivery> <FollowUpInvoice> <BusinessTransactionDocumentSettlementRelevanceIndicator>false</BusinessTransactionDocumentSettlementRelevanceIndicator> <RequirementCode>01</RequirementCode> <EvaluatedReceiptSettlementIndicator>false</EvaluatedReceiptSettlementIndicator> <DeliveryBasedInvoiceVerificationIndicator>false</DeliveryBasedInvoiceVerificationIndicator> </FollowUpInvoice> <ItemProduct actionCode="01"> <ObjectNodePartyTechnicalID>9</ObjectNodePartyTechnicalID> <CashDiscountDeductibleIndicator>true</CashDiscountDeductibleIndicator> <ProductKey> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCR-0005</ProductID> </ProductKey> </ItemProduct> <ShipToLocation actionCode="01"> <ObjectNodePartyTechnicalID>10</ObjectNodePartyTechnicalID> <LocationID>MC64000</LocationID> </ShipToLocation> <ItemTaxCalculation actionCode="02"> <TaxationCharacteristicsCode listID="">10</TaxationCharacteristicsCode> <CountryCode>US</CountryCode> </ItemTaxCalculation> <ItemTextCollection actionCode="01"> <TechnicalID>12</TechnicalID> <Text actionCode="01"> <TechnicalID>13</TechnicalID> <TypeCode>10011</TypeCode> <CreationDateTime>2012-07-10T23:59:59.1234Z</CreationDateTime> <TextContent actionCode="01"> <TechnicalID>14</TechnicalID> <Text languageCode="EN">Hellotext</Text> </TextContent> </Text> </ItemTextCollection> </Item> <CashDiscountTerms ActionCode="01"> <ObjectNodeSenderTechnicalID>11</ObjectNodeSenderTechnicalID> <Code>0005</Code> <PaymentBaselineDate>2012-08-13</PaymentBaselineDate> </CashDiscountTerms> <TextCollection actionCode="01"> <Text actionCode="01"> <TechnicalID>13</TechnicalID> <TypeCode>10029</TypeCode> <TextContent actionCode="01"> <TechnicalID>14</TechnicalID> <Text languageCode="EN">Hellotext</Text> </TextContent> </Text> </TextCollection> </PurchaseOrderMaintainBundle> </n0:PurchaseOrderBundleMaintainRequest_sync>
Example 5: Create PO new address of ship to location, customer and recipient
<n0:PurchaseOrderBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseOrderMaintainBundle actionCode="01" ItemListCompleteTransmissionIndicator="true"> <ObjectNodeSenderTechnicalID>1</ObjectNodeSenderTechnicalID> <ChangeStateID>Token 15</ChangeStateID> <BusinessTransactionDocumentTypeCode>001</BusinessTransactionDocumentTypeCode> <CurrencyCode>USD</CurrencyCode> <BuyerParty actionCode="01"> <ObjectNodePartyTechnicalID>2</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <SellerParty actionCode="01"> <ObjectNodePartyTechnicalID>3</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC4000</PartyID> </PartyKey> </SellerParty> <EmployeeResponsibleParty actionCode="01"> <ObjectNodePartyTechnicalID>4</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC0678</PartyID> </PartyKey> </EmployeeResponsibleParty> <BillToParty actionCode="01"> <ObjectNodePartyTechnicalID>5</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC21100</PartyID> </PartyKey> </BillToParty> <Company actionCode="01"> <ObjectNodePartyTechnicalID>6</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </Company> <ShipToLocation actionCode="01"> <ObjectNodePartyTechnicalID>7</ObjectNodePartyTechnicalID> <LocationID>MC64000</LocationID> </ShipToLocation> <Item ItemImatListCompleteTransmissionIndicator="true" actionCode="01"> <ObjectNodeSenderTechnicalID>8</ObjectNodeSenderTechnicalID> <BusinessTransactionDocumentItemTypeCode>18</BusinessTransactionDocumentItemTypeCode> <Quantity unitCode="EA">5</Quantity> <TypeCode>001</TypeCode> <ListUnitPrice> <Amount currencyCode="USD">100.00</Amount> <BaseQuantity unitCode="EA">5.0</BaseQuantity> </ListUnitPrice> <DeliveryPeriod> <StartDateTime timeZoneCode="EST">2012-07-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="EST">2012-07-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <DirectMaterialIndicator>false</DirectMaterialIndicator> <FollowUpPurchaseOrderConfirmation> <RequirementCode>04</RequirementCode> </FollowUpPurchaseOrderConfirmation> <FollowUpDelivery> <RequirementCode>01</RequirementCode> <EmployeeTimeConfirmationRequiredIndicator>true</EmployeeTimeConfirmationRequiredIndicator> </FollowUpDelivery> <FollowUpInvoice> <BusinessTransactionDocumentSettlementRelevanceIndicator>false</BusinessTransactionDocumentSettlementRelevanceIndicator> <RequirementCode>01</RequirementCode> <EvaluatedReceiptSettlementIndicator>false</EvaluatedReceiptSettlementIndicator> <DeliveryBasedInvoiceVerificationIndicator>false</DeliveryBasedInvoiceVerificationIndicator> </FollowUpInvoice> <ItemProduct actionCode="01"> <ObjectNodePartyTechnicalID>9</ObjectNodePartyTechnicalID> <CashDiscountDeductibleIndicator>true</CashDiscountDeductibleIndicator> <ProductKey> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCR-0004</ProductID> </ProductKey> </ItemProduct> <ShipToLocation actionCode="01"> <LocationID>MC64000</LocationID> <Address> <CorrespondenceLanguageCode>EN</CorrespondenceLanguageCode> <Name> <Name> <FirstLineName>New Tech Co. Ltd.</FirstLineName> <SecondLineName>NTC</SecondLineName> </Name> </Name> <PostalAddress> <CountryCode>US</CountryCode> <RegionCode>IN</RegionCode> <CityName>Kokomo</CityName> <StreetPostalCode>46911</StreetPostalCode> <StreetName>DV Street</StreetName> <HouseID>1001</HouseID> <TaxJurisdictionCode>IN</TaxJurisdictionCode> </PostalAddress> </Address> </ShipToLocation> <EndBuyerParty actionCode="01"> <PartyKey> <PartyID>1000971</PartyID> </PartyKey> <Address> <CorrespondenceLanguageCode>EN</CorrespondenceLanguageCode> <Name> <Name> <FirstLineName>New Tech Co. Ltd.</FirstLineName> <SecondLineName>NTC-1</SecondLineName> </Name> </Name> <PostalAddress> <CountryCode>US</CountryCode> <RegionCode>IN</RegionCode> <CityName>Kokomo</CityName> <StreetPostalCode>46911</StreetPostalCode> <StreetName>DV Street</StreetName> <HouseID>1001-1</HouseID> <TaxJurisdictionCode>IN</TaxJurisdictionCode> </PostalAddress> </Address> </EndBuyerParty> <ProductRecipientParty actionCode="01"> <PartyKey> <PartyID>MC2643</PartyID> </PartyKey> <Address> <CorrespondenceLanguageCode>EN</CorrespondenceLanguageCode> <Name> <Name> <FirstLineName>New Tech Co. Ltd.</FirstLineName> <SecondLineName>NTC-2</SecondLineName> </Name> </Name> <PostalAddress> <CountryCode>US</CountryCode> <RegionCode>IN</RegionCode> <CityName>Kokomo</CityName> <StreetPostalCode>46911</StreetPostalCode> <StreetName>DV Street</StreetName> <HouseID>1001-2</HouseID> <TaxJurisdictionCode>IN</TaxJurisdictionCode> </PostalAddress> </Address> </ProductRecipientParty> <ItemAccountingCodingBlockDistribution AccountingCodingBlockAssignmentListCompleteTransmissionIndicator="true" actionCode="01"> <TechnicalID>17</TechnicalID> <AccountingCodingBlockAssignment actionCode="01"> <TechnicalID>18</TechnicalID> <CostCentreID>MC10000</CostCentreID> </AccountingCodingBlockAssignment> </ItemAccountingCodingBlockDistribution> </Item> </PurchaseOrderMaintainBundle> </n0:PurchaseOrderBundleMaintainRequest_sync>
Release | Change Description | Details |
1808 | Documentation change | Service Interfaces and Operation, Structure of request message and response message, Example of payload updates |
Description | Read purchase orders |
Name | ManagePurchaseOrderInRead |
Synchronous | yes |
Release Status | Released |
To read the data of one or more Purchase Orders.
The request message of the operation ReadPurcahseOrder contains a PurchaseOrder node element that contains the PurchaseOrder ID and UUID. The PurchaseOrder node can occur multiple times in the request message – this means that multiple PurchaseOrders can be read.
The detailed structure of the PurchaseOrder node response will be explained in the following sub-chapters.
Example : Read Purchase Order with ID 1406
Web service request
<n0:PurchaseOrderByIDQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <PurchaseOrder> <ID>1406</ID> </PurchaseOrder> </n0:PurchaseOrderByIDQuery_sync>
Web service response
<n0:PurchaseOrderByIDResponse_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAE51EF207D6CEFBAF64FC9:804"> <PurchaseOrder> <ID>1406</ID> <UUID>00163e07-3d68-1ee8-8faa-717e2089ee52</UUID> <DataOriginTypeCode>19</DataOriginTypeCode> <ProcessingTypeCode>ECPO</ProcessingTypeCode> <Name languageCode="EN"> </Name> <CurrencyCode>USD</CurrencyCode> <TotalNetAmount currencyCode="USD">20.0</TotalNetAmount> <CashDiscountTerms> <UUID>00163e07-3d68-1ee8-8faa-717e2091ae52</UUID> <Code>0005</Code> <PaymentBaselineDate>2018-08-13</PaymentBaselineDate> <MaximumCashDiscount> <DaysValue>14</DaysValue> <EndDate>2018-08-27</EndDate> <Percent>2.0</Percent> </MaximumCashDiscount> <FullPaymentDueDaysValue>30</FullPaymentDueDaysValue> <FullPaymentEndDate>2018-09-12</FullPaymentEndDate> </CashDiscountTerms> <ChangeStateID> </ChangeStateID> <DeliveryTerms> <Incoterms> <ClassificationCode>EXW</ClassificationCode> <TransferLocationName>AMS, AKRON</TransferLocationName> </Incoterms> </DeliveryTerms> <Status> <ApprovalStatusCode>1</ApprovalStatusCode> <DeliveryProcessingStatusCode>1</DeliveryProcessingStatusCode> <InvoiceProcessingStatusCode>1</InvoiceProcessingStatusCode> <InvoicingStatusCode>1</InvoicingStatusCode> <PurchaseOrderConfirmationStatusCode>9</PurchaseOrderConfirmationStatusCode> <PurchaseOrderDeliveryStatusCode>1</PurchaseOrderDeliveryStatusCode> <PurchaseOrderLifeCycleStatusCode>1</PurchaseOrderLifeCycleStatusCode> </Status> <BillToParty> <PartyUUID>00145ef5-88e6-02eb-b8b3-acc2fa7b809e</PartyUUID> <PartyTypeCode>410</PartyTypeCode> <AddressReference> <AddressHostUUID>00145ef5-88e6-02eb-b8b3-acf5212287bc</AddressHostUUID> </AddressReference> <PartyKey> <PartyTypeCode>200</PartyTypeCode> <PartyID>MC21100</PartyID> </PartyKey> </BillToParty> <BuyerParty> <PartyUUID>00163e07-3d68-1ee8-8faa-717e208a2e52</PartyUUID> <PartyTypeCode>154</PartyTypeCode> <AddressReference> <AddressHostUUID>00145ef5-88e6-02db-b8b3-ac7afa9cd618</AddressHostUUID> </AddressReference> <PartyKey> <PartyTypeCode>200</PartyTypeCode> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <EmployeeResponsibleParty> <PartyUUID>00163e07-3d68-1ee8-8faa-717e208cce52</PartyUUID> <PartyTypeCode>167</PartyTypeCode> <AddressReference> <AddressHostUUID>00163e07-3d6a-1ee7-b4ed-a1155a4d4b5f</AddressHostUUID> </AddressReference> <PartyKey> <PartyTypeCode>147</PartyTypeCode> <PartyID>MC0678</PartyID> </PartyKey> </EmployeeResponsibleParty> <Item> <ItemID>1</ItemID> <ItemUUID>00163e07-3d68-1ee8-8faa-717e2091ce52</ItemUUID> <TypeCode>18</TypeCode> <DeliveryPeriod> <StartDateTime timeZoneCode="EST">2018-07-28T12:00:00Z</StartDateTime> <EndDateTime timeZoneCode="EST">2018-07-28T12:00:00Z</EndDateTime> </DeliveryPeriod> <Description languageCode="EN">AHT COMBI 75 - change</Description> <Quantity unitCode="EA">1.0</Quantity> <QuantityTypeCode>EA</QuantityTypeCode> <TotalDeliveredQuantity unitCode="EA">0.0</TotalDeliveredQuantity> <TotalDeliveredQuantityTypeCode>EA</TotalDeliveredQuantityTypeCode> <TotalInvoiceQuantity unitCode="EA">0.0</TotalInvoiceQuantity> <TotalInvoiceQuantityTypeCode>EA</TotalInvoiceQuantityTypeCode> <TotalInvoicedQuantity unitCode="EA">0.0</TotalInvoicedQuantity> <TotalInvoicedQuantityTypeCode>EA</TotalInvoicedQuantityTypeCode> <ItemStatus> <PurchaseOrderItemLifeCycleStatusCode>1</PurchaseOrderItemLifeCycleStatusCode> <PurchaseOrderItemApprovalStatusCode>1</PurchaseOrderItemApprovalStatusCode> <CancellationStatusCode>1</CancellationStatusCode> <DeliveryProcessingStatusCode>1</DeliveryProcessingStatusCode> <InvoiceProcessingStatusCode>1</InvoiceProcessingStatusCode> <InvoicingStatusCode>1</InvoicingStatusCode> <OrderingStatusCode>1</OrderingStatusCode> <PurchaseOrderConfirmationStatusCode>9</PurchaseOrderConfirmationStatusCode> <PurchaseOrderDeliveryStatusCode>1</PurchaseOrderDeliveryStatusCode> </ItemStatus> <NetAmount currencyCode="USD">20.0</NetAmount> <CostUpperLimitAmount currencyCode="USD">0.0</CostUpperLimitAmount> <CostUpperLimitExpectedAmount currencyCode="USD">0.0</CostUpperLimitExpectedAmount> <NetUnitPrice> <Amount currencyCode="USD">100.0</Amount> <BaseQuantity unitCode="EA">5.0</BaseQuantity> <BaseQuantityTypeCode>EA</BaseQuantityTypeCode> </NetUnitPrice> <ListUnitPrice> <Amount currencyCode="USD">100.0</Amount> <BaseQuantity unitCode="EA">5.0</BaseQuantity> <BaseQuantityTypeCode>EA</BaseQuantityTypeCode> </ListUnitPrice> <FollowUpPurchaseOrderConfirmation> <RequirementCode>04</RequirementCode> </FollowUpPurchaseOrderConfirmation> <FollowUpDelivery> <RequirementCode>01</RequirementCode> <EmployeeTimeConfirmationRequiredIndicator>false</EmployeeTimeConfirmationRequiredIndicator> </FollowUpDelivery> <ItemProduct> <ProductStandardID schemeAgencyID=" ">22222222222226</ProductStandardID> <CashDiscountDeductibleIndicator>false</CashDiscountDeductibleIndicator> <ProductCategoryIDKey> <ProductCategoryHierarchyID>BASE_PCH</ProductCategoryHierarchyID> <ProductCategoryInternalID>50-10</ProductCategoryInternalID> </ProductCategoryIDKey> <ProductKey> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCF-0001</ProductID> </ProductKey> </ItemProduct> <EndBuyerParty> <PartyKey> <PartyID>MC0678</PartyID> </PartyKey> </EndBuyerParty> <ItemAccountingCodingBlockDistribution> <ValidityDate>2018-04-11</ValidityDate> <CompanyID>MC10000</CompanyID> <HostObjectTypeCode>001</HostObjectTypeCode> <TotalAmount currencyCode="USD">20.0</TotalAmount> <TotalQuantity unitCode="EA">1.0</TotalQuantity> <AccountingCodingBlockAssignment> <Percent>100.0</Percent> <Amount currencyCode="USD">20.0</Amount> <Quantity unitCode="EA">1.0</Quantity> <AccountingCodingBlockTypeCode>CC</AccountingCodingBlockTypeCode> <CostCentreID>MC10000</CostCentreID> <CostCentreUUID>00145ef5-88e6-02db-b8b3-ac44715e0cc1</CostCentreUUID> <CompanyID>MC10000</CompanyID> <CompanyUUID>00145ef5-88e6-02db-b8b3-ac44715e0cc1</CompanyUUID> </AccountingCodingBlockAssignment> </ItemAccountingCodingBlockDistribution> <ItemAttachmentFolder> <UUID>00163e07-3d68-1ee8-8faa-717e20968e52</UUID> </ItemAttachmentFolder> <ItemTextCollection> <UUID>00163e07-3d68-1ee8-8faa-717e2096ee52</UUID> <Text> <TypeCode>10011</TypeCode> <CreationDateTime>2018-04-11T23:59:59Z</CreationDateTime> <TextContent> <Text languageCode="EN">Hellotext</Text> </TextContent> </Text> </ItemTextCollection> <ItemTaxCalculation> <CountryCode>US</CountryCode> <TaxationCharacteristicsCode listID="US">1</TaxationCharacteristicsCode> <TaxJurisdictionCode listID="US">OH 77</TaxJurisdictionCode> <WithholdingTaxationCharacteristicsCode listID="US"> </WithholdingTaxationCharacteristicsCode> <ItemProductTaxDetails> <UUID>00163e07-3d68-1ee8-8faa-717e209a4e52</UUID> <TransactionCurrencyProductTax> <CountryCode>US</CountryCode> <RegionCode listID="US">OH</RegionCode> <JurisdictionCode listID="US">OH</JurisdictionCode> <EventTypeCode listID="US">1</EventTypeCode> <TypeCode listID="US">1</TypeCode> <BaseAmount currencyCode="USD">20.0</BaseAmount> <BaseQuantity unitCode="EA">1.0</BaseQuantity> <Amount currencyCode="USD">0.0</Amount> <InternalAmount currencyCode="USD">0.0</InternalAmount> <DueCategoryCode>1</DueCategoryCode> <StatisticRelevanceIndicator>true</StatisticRelevanceIndicator> </TransactionCurrencyProductTax> </ItemProductTaxDetails> <ItemProductTaxDetails> <UUID>00163e07-3d68-1ee8-8faa-717e209a6e52</UUID> <TransactionCurrencyProductTax> <CountryCode>US</CountryCode> <RegionCode listID="US">OH</RegionCode> <JurisdictionCode listID="US">OH 77</JurisdictionCode> <EventTypeCode listID="US">1</EventTypeCode> <TypeCode listID="US">1</TypeCode> <BaseAmount currencyCode="USD">20.0</BaseAmount> <BaseQuantity unitCode="EA">1.0</BaseQuantity> <Amount currencyCode="USD">0.0</Amount> <InternalAmount currencyCode="USD">0.0</InternalAmount> <DueCategoryCode>1</DueCategoryCode> <StatisticRelevanceIndicator>true</StatisticRelevanceIndicator> </TransactionCurrencyProductTax> </ItemProductTaxDetails> <ItemTaxationTerms> <UUID>00163e07-3d68-1ee8-8faa-717e2091ce52</UUID> <SellerCountryCode>US</SellerCountryCode> <SellerTaxID schemeID=" ">123-34-4567</SellerTaxID> <SellerTaxIdentificationNumberTypeCode listID="US">1</SellerTaxIdentificationNumberTypeCode> <BuyerCountryCode>US</BuyerCountryCode> <BuyerTaxID schemeID=" ">US6446</BuyerTaxID> <BuyerTaxIdentificationNumberTypeCode listID="US">4</BuyerTaxIdentificationNumberTypeCode> <TaxDate>2018-04-11</TaxDate> </ItemTaxationTerms> </ItemTaxCalculation> </Item> <TextCollection> <UUID>00163e07-3d68-1ee8-8faa-717e20914e52</UUID> <Text> <TypeCode>10029</TypeCode> <TextContent> <Text languageCode="EN">Hellotext</Text> </TextContent> </Text> </TextCollection> <SellerParty> <PartyUUID>00300571-c924-02db-b8e1-37ea328e0e0a</PartyUUID> <PartyTypeCode>266</PartyTypeCode> <AddressReference> <AddressHostUUID>00300571-c924-02db-b8e1-380383e48e34</AddressHostUUID> </AddressReference> <PartyKey> <PartyTypeCode>147</PartyTypeCode> <PartyID>MC2000</PartyID> </PartyKey> </SellerParty> <SystemAdministrativeData> <CreationDateTime>2018-04-11T06:42:49Z</CreationDateTime> <CreationIdentityUUID>00163e07-3d68-1ed7-abc8-e415f02e7d6b</CreationIdentityUUID> <LastChangeDateTime>2018-04-11T06:42:49Z</LastChangeDateTime> <LastChangeIdentityUUID>00163e07-3d68-1ed7-abc8-e415f02e7d6b</LastChangeIdentityUUID> </SystemAdministrativeData> </PurchaseOrder> <Log/> </n0:PurchaseOrderByIDResponse_sync>
The request message of the Read Purchase Order operation contains the following two elements:
ID: Internal ID of the Purchase Order
UUID: UUID of the Purchase Order
The structure of the response message contains all the data from purchase order business object. Following is the structure of response message
The Purchase Order node elements contain all general information such as ID, names, TypeCode and business partners. The data of this node is related to the General Data on the Purchase Order UI.
TypeCode : The type code determines the business object. Purchase Order is identified with type code 001.
PurchaseOrderID is the internal ID with which the Purchase Order can be addressed and found.
CurrencyCode is the currency in which the purchase is made.
Date is the creation date of Purchase Order.
Total Net Value: This is the net value of Purchase Order when the values of all items is added.
At header level of Purchase order 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 Order is raised.
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 delivery Terms node will have the information like incoterms and Incoterms location. This data is useful in case of contractual terms of transportation of goods.
Incoterms values are derived from the contract or the supplier used in the purchase order. The set of values applicable for incoterms are chosen during BC scoping.
The Payment terms information in Purchase Order is maintained in this node. Again the set of Payment terms applicable for the buying company are chosen during the system setup.
The AttachmentFolder node element can be used to add and remove Purchase Order attachments. Data for this node can be found on the Purchase Order 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 |
This node has information relevant for the purchase order items like the product, quantity, price, various item statuses, quantity delivered, quantity invoiced etc. 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 order and is unique.
Following are the type code for items supported.
TypeCode | Description |
---|---|
18 | Material |
19 | Service |
20 | Limit |
84 | Expense |
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. Following are the type codes:
TypeCode | Description |
---|---|
01 | Follow on document required |
05 | Follow on document not required |
Delivered Quantity: This attribute provides the actual quantity that is delivered by the supplier. It is stored in the Item Actual Value node of Purchase Order
Invoiced Quantity: This attribute provides the actual quantity that is invoiced in the system. It is stored in the Item Actual Value node of Purchase Order
There are multiple parties that are relevant at item level. Each item can be delivered to a different address and hence the address is derived from the parties or location at item level. Following parties and type codes are important at item level:
PartyTypeCode | Description| |
---|---|
167 | Requester or Recipient or Service Agent |
159 | End Buyer (Customer) |
Location Codes applicable for Purchase Order are
TypeCode | Description |
---|---|
1 | Ship To Location |
2 | Ship From Location |
3 | Receiving Location |
The delivery address of Purchase Order item is derived from Parties or location based on some priorities. If Ship-To location takes the highest priority. Then the Customer takes precedence and last priority is Recipient party.
Delivery terms on item level maintain the information on how much over or under delivery is allowed. It has three main elements:
UnlimitedOverDelivery : This is an indicator specifying that the PO item can be delivered to any extent.
Under-Delivery Tolerance: it specifies in percentage that how much under delivery can be tolerated.
Over-Delivery Tolerance: it specifies in percentage that how much Over delivery can be tolerated.
The node contains the cost assignment of the Purchase order 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 Purchase Order IDs should be added with leading zeros. You should add zeros until the length of ID field is 35 characters.
Example 1: Read Purchase Order with UUID
<n0:PurchaseOrderByIDQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <PurchaseOrder> <UUID>00163e07-3d68-1ee8-8faa-717e2089ee52</UUID> </PurchaseOrder> </n0:PurchaseOrderByIDQuery_sync>
Release | Change Description | Details |
1808 | Documentation change | Service Interfaces and Operation, Structure of request message and response message, Example of payload updates; Added Product Seller ID (Supplier Part Number) in item product of Read service |
1911 | Response structure enhancement | Added Ship-To-Location Address Host UUID in item of Read service |
Description | Manage purchase order upload |
Name | ManagePurchaseOrderExcelUpload |
Synchronous | yes |
Release Status | Released |
To create, update, or delete Purchase Orders in Business ByDesign system.
The request message of the operation MaintainBundle contains a BasicMessageHeader node element as well as a PurchaseOrder node element that contains the PurchaseOrder data to be created or updated. The detailed structure of the PurchaseOrder node will be explained in the following sub-chapters. The PurchaseOrder node can occur multiple times in the request message – this means that multiple PurchaseOrders can be created and updated through a single web service request.
The response message type of the operation MaintainBundle contains log items, processing information and an PurchaseOrder-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as PurchaseOrder InternalID and UUID.
Example : Create Purchase Order from Excel file
Web service request
<n0:PurchaseOrderUploadRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchaseOrder> <ObjectNodeSenderTechnicalID>1</ObjectNodeSenderTechnicalID> <ChangeStateID>Token 15</ChangeStateID> <BusinessTransactionDocumentTypeCode>001</BusinessTransactionDocumentTypeCode> <CurrencyCode>USD</CurrencyCode> <BuyerParty actionCode="01"> <ObjectNodePartyTechnicalID>2</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <SellerParty actionCode="01"> <ObjectNodePartyTechnicalID>3</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC2000</PartyID> </PartyKey> </SellerParty> <EmployeeResponsibleParty actionCode="01"> <ObjectNodePartyTechnicalID>4</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC0678</PartyID> </PartyKey> </EmployeeResponsibleParty> <BillToParty actionCode="01"> <ObjectNodePartyTechnicalID>5</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC21100</PartyID> </PartyKey> </BillToParty> <Company actionCode="01"> <ObjectNodePartyTechnicalID>6</ObjectNodePartyTechnicalID> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </Company> <ShipToLocation actionCode="01"> <ObjectNodePartyTechnicalID>7</ObjectNodePartyTechnicalID> <LocationID>MC64000</LocationID> </ShipToLocation> <Item ItemImatListCompleteTransmissionIndicator="true" actionCode="01"> <ObjectNodeSenderTechnicalID>8</ObjectNodeSenderTechnicalID> <BusinessTransactionDocumentItemTypeCode>18</BusinessTransactionDocumentItemTypeCode> <Quantity unitCode="EA">1</Quantity> <ListUnitPrice> <Amount currencyCode="USD">100.00</Amount> <BaseQuantity unitCode="EA">5.0</BaseQuantity> </ListUnitPrice> <DeliveryPeriod> <StartDateTime timeZoneCode="EST">2018-07-28T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="EST">2018-07-28T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <DirectMaterialIndicator>false</DirectMaterialIndicator> <ThirdPartyDealIndicator>false</ThirdPartyDealIndicator> <FollowUpPurchaseOrderConfirmation> <RequirementCode>04</RequirementCode> </FollowUpPurchaseOrderConfirmation> <FollowUpDelivery> <RequirementCode>01</RequirementCode> <EmployeeTimeConfirmationRequiredIndicator>true</EmployeeTimeConfirmationRequiredIndicator> </FollowUpDelivery> <FollowUpInvoice> <BusinessTransactionDocumentSettlementRelevanceIndicator>false</BusinessTransactionDocumentSettlementRelevanceIndicator> <RequirementCode>01</RequirementCode> <EvaluatedReceiptSettlementIndicator>false</EvaluatedReceiptSettlementIndicator> <DeliveryBasedInvoiceVerificationIndicator>false</DeliveryBasedInvoiceVerificationIndicator> </FollowUpInvoice> <ItemProduct actionCode="01"> <ObjectNodePartyTechnicalID>9</ObjectNodePartyTechnicalID> <CashDiscountDeductibleIndicator>true</CashDiscountDeductibleIndicator> <ProductKey> <ProductTypeCode>1</ProductTypeCode> <ProductIdentifierTypeCode>1</ProductIdentifierTypeCode> <ProductID>MCF-0001</ProductID> </ProductKey> </ItemProduct> <ShipToLocation actionCode="01"> <ObjectNodePartyTechnicalID>10</ObjectNodePartyTechnicalID> <LocationID>MC64000</LocationID> </ShipToLocation> <ItemAccountingCodingBlockDistribution AccountingCodingBlockAssignmentListCompleteTransmissionIndicator="true" actionCode="01"> <TechnicalID>17</TechnicalID> <AccountingCodingBlockAssignment actionCode="01"> <TechnicalID>18</TechnicalID> <CostCentreID>MC10000</CostCentreID> </AccountingCodingBlockAssignment> </ItemAccountingCodingBlockDistribution> </Item> </PurchaseOrder> </n0:PurchaseOrderUploadRequest_sync>
Web service response
<n0:PurchaseOrderUploadConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAEE2457FC03FF47398A9E2:804"> <PurchaseOrder> <ReferenceObjectNodeSenderTechnicalID>1</ReferenceObjectNodeSenderTechnicalID> <ChangeStateID> 20180411091058.0000000</ChangeStateID> <BusinessTransactionDocumentID>00000000000000000000000000000001409</BusinessTransactionDocumentID> <UUID>00163e07-3d6a-1ee8-8fad-077ea4254f83</UUID> </PurchaseOrder> <Log/> </n0:PurchaseOrderUploadConfirmation_sync>
Structure of the request message has the following nodes and elements
The Purchase Order node elements contain all general information such as ID, names, TypeCode and business partners. The data of this node is related to the General Data on the Purchase Order UI.
TypeCode : The type code determines the business object. Purchase Order is identified with type code 001.
PurchaseOrderID is the internal ID with which the Purchase Order can be addressed and found.
CurrencyCode is the currency in which the purchase is made.
Date is the creation date of Purchase Order.
Order Purchase Order is an indicator and should be set to trigger ‘Order’ action on Purchase Order
Cancel Purchase Order is an indicator and should be set to trigger the cancellation of ordered Purchase Order.
PreventDocumentOutputIndicator is an indicator that specifies whether the purchase order output to supplier shall be prevented or not.
At header level of Purchase order 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 Order is raised.
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 delivery Terms node will have the information like incoterms and Incoterms location. This data is useful in case of contractual terms of transportation of goods.
Incoterms values are derived from the contract or the supplier used in the purchase order. The set of values applicable for incoterms are chosen during BC scoping.
The Payment terms information in Purchase Order is maintained in this node. Again the set of Payment terms applicable for the buying company are chosen during the system setup.
The AttachmentFolder node element can be used to add and remove Purchase Order attachments. Data for this node can be found on the Purchase Order 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 |
This node has information relevant for the purchase order 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 order and is unique.
Following are the type code for items supported.
TypeCode | Description |
---|---|
18 | Material |
19 | Service |
20 | Limit |
84 | Expense |
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. Following are the type codes:
TypeCode | Description |
---|---|
01 | Follow on document required |
05 | Follow on document not required |
There are multiple parties that are relevant at item level. Each item can be delivered to a different address and hence the address is derived from the parties or location at item level. Following parties and type codes are important at item level:
PartyTypeCode | Description| |
---|---|
167 | Requester or Recipient or Service Agent |
159 | End Buyer (Customer) |
Location Codes applicable for Purchase Order are
TypeCode | Description |
---|---|
1 | Ship To Location |
2 | Ship From Location |
3 | Receiving Location |
The delivery address of Purchase Order item is derived from Parties or location based on some priorities. If Ship-To location takes the highest priority. Then the Customer takes precedence and last priority is Recipient party.
Delivery terms on item level maintain the information on how much over or under delivery is allowed. It has three main elements:
UnlimitedOverDelivery : This is an indicator specifying that the PO item can be delivered to any extent.
Under-Delivery Tolerance: it specifies in percentage that how much under delivery can be tolerated.
Over-Delivery Tolerance: it specifies in percentage that how much Over delivery can be tolerated.
The node contains the cost assignment of the Purchase order 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 |
Purchase Order ID and UUID
Change State ID and Sender Technical ID
Log: Containing the error messages from the processing of the request.
Release | Change Description | Details |
1808 | Documentation change | Service Interfaces and Operation, Structure of request message and response message, Example of payload updates |