Description | Manage Purchasing Contract |
Name | ManPurchasingContractInbound |
Namespace | http://sap.com/xi/A1S/Global |
Process Component Description | Purchasing Contract Processing |
Process Component Name | PurchasingContractProcessing |
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 purchasing contract from a source system or file.
The web service Interface Manage Purchasing Contract In enables you to connect external applications to your SAP Business ByDesign system and to create and edit purchasing contract in your system. The web service interface Manage Purchasing Contract In is relevant if your company wants to access and manage purchasing contract data from external applications.
In the Sourcing and Contracting work center and Contracts view, you can create, edit and delete a Purchasing Contract.
The web service interface Manage Purchasing Contract In offers the operations CHECK_MAINTAIN_BUNDLE and MAINTAIN_BUNDLE.
Existence of referenced business documents:
The following business documents are only referenced and will not be created by the service operations. They must exist in the system already at the time the web service is called:
• Business Partners (Supplier, Company Purchasing units)
• Employees (Recipient, Requester, Customer etc)
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 interval (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 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. Also, the service provider does not interpret these values at all, but returns them to the web service consumer instead in the ReferenceObjectNodeSenderTechnicalID elements.
Note: The ObjectNodeSenderTechnicalID is also used to identify failed business document modifications in a mass operation.
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, Update and Delete one or many of Purchasing Contract
• Cancel one or many numbers of Purchasing Contract ByDesign
• Cancel one or many numbers of Purchasing Contract
Description | Check purchasing contract |
Name | ManagePurchasingContractInCheckMaintainBundle |
Synchronous | yes |
Release Status | Released |
To simulate the MAINTAIN_BUNDLE service interface operation of purchasing contract.
The request message of the operation Maintain Bundle contains a BasicMessageHeader node element as well as a purchasing contract node element that contains the purchasing contract data to be created or updated. The detailed structure of the purchasing contract node will be explained in the following sub-chapters. The purchasing contract node can occur multiple times in the request message – this means that multiple purchasing contract 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 a Purchasing Contract-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as Purchasing Contract InternalID and UUID.
Example: Check Purchasing Contract Creation
Web service request
<PurchasingContract actionCode="01"> <ObjectNodeSenderTechnicalID/> <ChangeStateID/> <BusinessTransactionDocumentTypeCode>110</BusinessTransactionDocumentTypeCode> <Name languageCode="EN">A2X TEST 01</Name> <CurrencyCode>USD</CurrencyCode> <ValidityPeriod> <StartDateTime>2018-04-01T12:00:00.1234567Z</StartDateTime> <EndDateTime>2018-04-30T12:00:00.1234567Z</EndDateTime> </ValidityPeriod> <BuyerParty actionCode="01"> <ObjectNodePartyTechnicalID/> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <SellerParty actionCode="01"> <ObjectNodePartyTechnicalID/> <PartyKey> <PartyID>MC4000</PartyID> </PartyKey> </SellerParty> <EmployeeResponsibleParty> <ObjectNodePartyTechnicalID/> <PartyKey> <PartyTypeCode>167</PartyTypeCode> <PartyID>3800</PartyID> </PartyKey> </EmployeeResponsibleParty> <TargetAmount>20</TargetAmount> <Item ActionCode="01"> <TargetQuantity unitCode="EA">100</TargetQuantity> <FollowUpPurchaseOrderConfirmation> <RequirementCode>04</RequirementCode> </FollowUpPurchaseOrderConfirmation> <FollowUpDelivery> <RequirementCode>01</RequirementCode> <EmployeeTimeConfirmationRequiredIndicator>true</EmployeeTimeConfirmationRequiredIndicator> </FollowUpDelivery> <FollowUpInvoice> <BusinessTransactionDocumentSettlementRelevanceIndicator>true</BusinessTransactionDocumentSettlementRelevanceIndicator> <RequirementCode>01</RequirementCode> <EvaluatedReceiptSettlementIndicator/> <DeliveryBasedInvoiceVerificationIndicator>true</DeliveryBasedInvoiceVerificationIndicator> </FollowUpInvoice> <DeliveryTerms> <ObjectNodePartyTechnicalID/> <MaximumLeadTimeDuration/> <IncoTerms> <ClassificationCode/> <TransferLocationName/> </IncoTerms> <QuantityTolerance> <OverPercent>10</OverPercent> <OverPercentUnlimitedIndicator/> <UnderPercent>10</UnderPercent> </QuantityTolerance> </DeliveryTerms> <Product> <ProductKey> <ProductID>MCR-0005</ProductID> </ProductKey> </Product> <TargetAmount>20</TargetAmount> <PriceSpecification> <UUID/> <Status> <ReleaseStatusCode/> <ConsistencyStatusCode/> </Status> <PriceSpecificationElementPropertyDefinitionClassCode/> <PropertyValueSearchText/> <PriceSpecificationElementTypeCode listID="1">01CT</PriceSpecificationElementTypeCode> <ValidityPeriod> <IntervalBoundaryTypeCode/> <StartTimePoint> <TypeCode>1</TypeCode> <Date>2018-04-12</Date> <Time>01:33:45</Time> <DateTime/> </StartTimePoint> <EndTimePoint> <TypeCode>1</TypeCode> <Date>2018-04-20</Date> <Time>01:33:45</Time> <DateTime/> </EndTimePoint> <Duration>P1347M</Duration> </ValidityPeriod> <SystemAdministrativeData> <CreationDateTime/> <CreationIdentityUUID/> <LastChangeDateTime/> <LastChangeIdentityUUID/> </SystemAdministrativeData> <Amount>10</Amount> <ScaleExistsIndicator/> </PriceSpecification> </Item> <actionCode/> </PurchasingContract>
Web service response
<n0:PurchasingContractBundleMaintainConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAE48F0045D2D68D1D4A1E1:804"> <PurchasingContract> <ChangeStateID> 20180412074243.0000000</ChangeStateID> <BusinessTransactionDocumentID>##1</BusinessTransactionDocumentID> <UUID>00163e07-3d62-1ed8-8fc4-a297f6a94d84</UUID> </PurchasingContract> <Log/> </n0:PurchasingContractBundleMaintainConfirmation_sync>
Structure of the request message has the following nodes and elements
The Purchasing Contract 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 Purchasing Contract UI.
TypeCode : The type code determines the business object. Purchasing Contract is identified with type code 110.
PurchasingContractID is the internal ID with which the Purchasing Contract can be addressed and found.
CurrencyCode is the currency in which the purchase is made.
Date is the creation date of purchasing contract.
At header level of purchasing contract 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 purchasing contract 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 DeliveryTerms 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 purchasing Contract. The set of values applicable for incoterms are chosen during BC scoping.
The AttachmentFolder node element can be used to add and remove purchasing contract attachments. Data for this node can be found on the purchasing contract 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 TypeCode differentiates the different types of attachments
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 Purchasing Contract Header or Item Level. There are different types of notes supported in Purchasing Contract:
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 purchasing Contract items like the product, quantity, price, various item statuses. The attributes here can be seen on the Items view of the Purchasing Contract UI.
Following are some of the important attributes on Item node:
Item ID: This is the serial no of the item in purchasing Contract 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 |
04 | Follow on document not expected |
05 | Follow on document forbidden |
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 PCT 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.
Purchasing Contract 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 purchasing contract |
Name | ManagePCTInMaintainBundle |
Synchronous | yes |
Release Status | Released |
To create or update one or more purchasing contract.
The request message of the operation MaintainBundle contains a Basic Message Header node element as well as a Purchasing Contract node element that contains the Purchasing Contract data to be created or updated. The detailed structure of the Purchasing Contract node will be explained in the following sub-chapters. The Purchasing Contract node can occur multiple times in the request message – this means that multiple purchasing contract 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 a Purchasing Contract-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as Purchasing Contract InternalID and UUID.
Example: Create a Purchasing Contract
web service request
<n0:PCTBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchasingContract actionCode="01"> <ObjectNodeSenderTechnicalID/> <ChangeStateID/> <BusinessTransactionDocumentTypeCode>110</BusinessTransactionDocumentTypeCode> <Name languageCode="EN">A2X TEST 01</Name> <CurrencyCode>USD</CurrencyCode> <ValidityPeriod> <StartDateTime>2018-04-01T12:00:00.1234567Z</StartDateTime> <EndDateTime>2018-04-30T12:00:00.1234567Z</EndDateTime> </ValidityPeriod> <BuyerParty actionCode="01"> <ObjectNodePartyTechnicalID/> <PartyKey> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <SellerParty actionCode="01"> <ObjectNodePartyTechnicalID/> <PartyKey> <PartyID>MC4000</PartyID> </PartyKey> </SellerParty> <EmployeeResponsibleParty> <ObjectNodePartyTechnicalID/> <PartyKey> <PartyTypeCode>167</PartyTypeCode> <PartyID>3800</PartyID> </PartyKey> </EmployeeResponsibleParty> <TargetAmount>20</TargetAmount> <Item ActionCode="01"> <TargetQuantity unitCode="EA">100</TargetQuantity> <FollowUpPurchaseOrderConfirmation> <RequirementCode>04</RequirementCode> </FollowUpPurchaseOrderConfirmation> <FollowUpDelivery> <RequirementCode>01</RequirementCode> <EmployeeTimeConfirmationRequiredIndicator>true</EmployeeTimeConfirmationRequiredIndicator> </FollowUpDelivery> <FollowUpInvoice> <BusinessTransactionDocumentSettlementRelevanceIndicator>true</BusinessTransactionDocumentSettlementRelevanceIndicator> <RequirementCode>01</RequirementCode> <EvaluatedReceiptSettlementIndicator/> <DeliveryBasedInvoiceVerificationIndicator>true</DeliveryBasedInvoiceVerificationIndicator> </FollowUpInvoice> <DeliveryTerms> <ObjectNodePartyTechnicalID/> <MaximumLeadTimeDuration/> <IncoTerms> <ClassificationCode/> <TransferLocationName/> </IncoTerms> <QuantityTolerance> <OverPercent>10</OverPercent> <OverPercentUnlimitedIndicator/> <UnderPercent>10</UnderPercent> </QuantityTolerance> </DeliveryTerms> <Product> <ProductKey> <ProductID>MCR-0005</ProductID> </ProductKey> </Product> <TargetAmount>20</TargetAmount> <PriceSpecification> <UUID/> <Status> <ReleaseStatusCode/> <ConsistencyStatusCode/> </Status> <PriceSpecificationElementPropertyDefinitionClassCode/> <PropertyValueSearchText/> <PriceSpecificationElementTypeCode listID="1">01CT</PriceSpecificationElementTypeCode> <ValidityPeriod> <IntervalBoundaryTypeCode/> <StartTimePoint> <TypeCode>1</TypeCode> <Date>2018-04-12</Date> <Time>01:33:45</Time> <DateTime/> </StartTimePoint> <EndTimePoint> <TypeCode>1</TypeCode> <Date>2018-04-20</Date> <Time>01:33:45</Time> <DateTime/> </EndTimePoint> <Duration>P1347M</Duration> </ValidityPeriod> <SystemAdministrativeData> <CreationDateTime/> <CreationIdentityUUID/> <LastChangeDateTime/> <LastChangeIdentityUUID/> </SystemAdministrativeData> <Amount>10</Amount> <ScaleExistsIndicator/> </PriceSpecification> </Item> <actionCode/> </PurchasingContract> </n0:PCTBundleMaintainRequest_sync>
web service response
<n0:PCTBundleMaintainConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAEBA76B7232628AB0F1FD7:804"> <PurchasingContract> <ChangeStateID> 20180412071403.0000000</ChangeStateID> <BusinessTransactionDocumentID>1905</BusinessTransactionDocumentID> <UUID>00163e07-3d62-1ed8-8fc4-228091bcec8e</UUID> </PurchasingContract> <Log/> </n0:PCTBundleMaintainConfirmation_sync>
Structure of the request message has the following nodes and elements
The purchasing contract 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 Purchasing Contract UI.
TypeCode : The type code determines the business object. Purchasing Contract is identified with type code 110.
PurchasingContractID is the internal ID with which the Purchasing Contract can be addressed and found.
CurrencyCode is the currency in which the purchase is made.
Date is the creation date of purchasing contract.
The following four types of parties are important at header level of purchasing contract:
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 purchasing contract 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 DeliveryTerms 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 purchasing contract. The set of values applicable for incoterms are chosen during BC scoping.
The AttachmentFolder node element can be used to add and remove purchasing contract attachments. Data for this node can be found on the purchasing contract 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 TypeCode differentiates the different types of attachments
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 Purchasing Contract Header or Item Level. There are different types of notes supported in Purchasing Contract:
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 purchasing Contract items like the product, quantity, price, various item statuses. The attributes here can be seen on the Items view of the Purchasing Contract UI.
Following are some of the important attributes on item node:
Item ID: This is the serial no of the item in purchasing Contract 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 |
04 | Follow on document not expected |
05 | Follow on document forbidden |
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 PCT 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 following elements can be used for activating or deactivating an item during an update:
ActivateForSourcingActionIndicator: if 'true', the contract item will be activated for sourcing.
DeactivateForSourcingActionIndicator: if 'true', the contract item will be deactivated for sourcing.
Purchasing Contract ID and UUID
Change State ID and Sender Technical ID
Log: Containing the error messages from the processing of the request.
Example 1: Update Prices in Item of Purchasing contract
<n0:PCTBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <PurchasingContract actionCode="02"> <PCTID>2125</PCTID> <BusinessTransactionDocumentTypeCode>110</BusinessTransactionDocumentTypeCode> <TargetAmount>20</TargetAmount> <actionCode/> <Item ActionCode="02"> <ID>1</ID> <UUID>00163E5F-4D8F-1ED9-8F81-6D8024691435</UUID> <TargetQuantity unitCode="EA">100</TargetQuantity> <PriceSpecification ActionCode="02" > <UUID>00163E5F-4D8F-1ED9-8F81-6D80246BD435</UUID> <Amount>10</Amount> <ScaleExistsIndicator/> </PriceSpecification> <ActivateForSourcingActionIndicator>true</ActivateForSourcingActionIndicator> </Item> </PurchasingContract> </n0:PCTBundleMaintainRequest_sync>
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 |
1905 | Activate For Sourcing | ActivateForSourcingActionIndicator element added for activating an item. Deactivate is also supported |
Description | Read purchasing contract |
Name | ManagePCTInRead |
Synchronous | yes |
Release Status | Released |
To read the data of one or more purchasing contract.
The request message of the operation ReadPurcahsingContract contains a PurcahsingContract node element that contains the PurcahsingContract ID and UUID. The PurcahsingContract node can occur multiple times in the request message – this means that multiple PurcahsingContract can be read.
The detailed structure of the PurcahsingContract node response will be explained in the following sub chapters.
Example: Read Purchasing Contract with ID
Web service request
<n0:PCTByIDQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <PurchasingContract> <ID>1905</ID> </PurchasingContract> </n0:PCTByIDQuery_sync>
Web service response
<n0:PCTByIDResponse_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAE2052393BD0C0C8DEB6A3:804"> <PurchasingContract> <ID>1905</ID> <UUID>00163e07-3d62-1ed8-8fc4-228091bcec8e</UUID> <BusinessTransactionDocumentTypeCode>110</BusinessTransactionDocumentTypeCode> <Name languageCode="EN">A2X TEST 01</Name> <CurrencyCode>USD</CurrencyCode> <ValidityPeriod> <StartDateTime>2018-04-01T12:00:00Z</StartDateTime> <EndDateTime>2018-04-30T12:00:00Z</EndDateTime> </ValidityPeriod> <Status> <PurchasingContractLifeCycleStatusCode>1</PurchasingContractLifeCycleStatusCode> <ApprovalStatusCode>1</ApprovalStatusCode> <ClosureStatusCode>1</ClosureStatusCode> <ConsistencyStatusCode>3</ConsistencyStatusCode> <ExpiryStatusCode>1</ExpiryStatusCode> <NegotiationStatusCode>1</NegotiationStatusCode> <ReleaseStatusCode>1</ReleaseStatusCode> <SourcingAvailabilityStatusCode>2</SourcingAvailabilityStatusCode> </Status> <BuyerParty> <PartyKey> <PartyTypeCode>200</PartyTypeCode> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <SellerParty> <PartyKey> <PartyTypeCode>147</PartyTypeCode> <PartyID>MC4000</PartyID> </PartyKey> </SellerParty> <EmployeeResponsibleParty> <PartyKey> <PartyTypeCode>147</PartyTypeCode> <PartyID>3800</PartyID> </PartyKey> </EmployeeResponsibleParty> <TargetAmount currencyCode="USD">10.0</TargetAmount> <DeliveryTerms> <MaximumLeadTimeDuration>P0D</MaximumLeadTimeDuration> <IncoTerms> <ClassificationCode>EXW</ClassificationCode> <TransferLocationName>AMS, AKRON</TransferLocationName> </IncoTerms> </DeliveryTerms> <CashDiscountTerms> <Code>0007</Code> </CashDiscountTerms> <Item> <ID>1</ID> <UUID>00163e07-3d62-1ed8-8fc4-228091c08c8e</UUID> <TypeCode>18</TypeCode> <TargetQuantity unitCode="EA">100.0</TargetQuantity> <Description languageCode="EN">GREY CAST IRON CYLINDER</Description> <MinimumOrderQuantity unitCode="EA">0.0</MinimumOrderQuantity> <TargetAmount currencyCode="USD">20.0</TargetAmount> <FollowUpPurchaseOrderConfirmation> <RequirementCode>04</RequirementCode> </FollowUpPurchaseOrderConfirmation> <FollowUpDelivery> <RequirementCode>01</RequirementCode> <EmployeeTimeConfirmationRequiredIndicator>true</EmployeeTimeConfirmationRequiredIndicator> </FollowUpDelivery> <FollowUpInvoice> <RequirementCode>01</RequirementCode> <DeliveryBasedInvoiceVerificationIndicator>true</DeliveryBasedInvoiceVerificationIndicator> </FollowUpInvoice> <Status> <ExpiryStatusCode>1</ExpiryStatusCode> <NegotiationStatusCode>1</NegotiationStatusCode> <SourcingAvailabilityStatusCode>2</SourcingAvailabilityStatusCode> </Status> <DeliveryTerms> <MaximumLeadTimeDuration>P0D</MaximumLeadTimeDuration> <QuantityTolerance> <OverPercent>10.0</OverPercent> <UnderPercent>10.0</UnderPercent> </QuantityTolerance> </DeliveryTerms> <Product> <ProductSellerID>OMEGOMCR-0005</ProductSellerID> <ProductCategoryIDKey> <ProductCategoryHierarchyID>BASE_PCH</ProductCategoryHierarchyID> <ProductCategoryInternalID>30</ProductCategoryInternalID> </ProductCategoryIDKey> <ProductKey> <ProductID>MCR-0005</ProductID> </ProductKey> </Product> <PriceSpecification> <UUID>00163e07-3d62-1ed8-8fc4-228091c34c8e</UUID> <Status> <ReleaseStatusCode>1</ReleaseStatusCode> <ConsistencyStatusCode>3</ConsistencyStatusCode> </Status> <PriceSpecificationElementPropertyDefinitionClassCode>1</PriceSpecificationElementPropertyDefinitionClassCode> <PriceSpecificationElementTypeCode listID="1">01CT</PriceSpecificationElementTypeCode> <ValidityPeriod> <IntervalBoundaryTypeCode> </IntervalBoundaryTypeCode> <StartTimePoint> <TypeCode>1</TypeCode> <Date>2018-04-12</Date> </StartTimePoint> <EndTimePoint> <TypeCode>1</TypeCode> <Date>2018-04-20</Date> </EndTimePoint> </ValidityPeriod> <SystemAdministrativeData> <CreationDateTime>2018-04-12T07:14:03Z</CreationDateTime> <CreationIdentityUUID>00163e07-3d68-1ed7-abc8-e415f02e7d6b</CreationIdentityUUID> <LastChangeDateTime>2018-04-12T07:38:22Z</LastChangeDateTime> <LastChangeIdentityUUID>00163e07-3d68-1ed7-abc8-e415f02e7d6b</LastChangeIdentityUUID> </SystemAdministrativeData> <Amount currencyCode="USD">100.0</Amount> <ReleasedAmount currencyCode="USD">0.0</ReleasedAmount> <BaseQuantity unitCode="EA">1.0</BaseQuantity> <BaseQuantityTypeCode>EA</BaseQuantityTypeCode> <ScaleExistsIndicator>false</ScaleExistsIndicator> </PriceSpecification> </Item> </PurchasingContract> <Log/> </n0:PCTByIDResponse_sync>
The request message of the Read Purchase Order operation contains the following two elements:
ID: Internal ID of the purchasing contract.
UUID: UUID of the purchasing contract.
The structure of the response message contains all the data from Purchasing Contract business object. Following is the structure of response message
The Purchasing Contract 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 Purchasing Contract UI.
TypeCode : The type code determines the business object. Purchasing Contract is identified with type code 110.
PurchasingContractID is the internal ID with which the Purchasing Contract can be addressed and found.
CurrencyCode is the currency in which the purchase is made.
Date is the creation date of purchasing contract.
Total Net Value: This is the net value of purchasing contract when the values of all items is added.
The following four types of parties are important at header level of purchasing Contract:
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 purchasing contract. The set of values applicable for incoterms are chosen during BC scoping.
The AttachmentFolder node element can be used to add and remove purchasing contract attachments. Data for this node can be found on the Purchasing Contract 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 TypeCode differentiates the different types of attachments
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 Purchasing Contract Header or Item Level. There are different types of notes supported in Purchasing Contract:
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 purchasing Contract items like the product, quantity, price, various item statuses. The attributes here can be seen on the Items view of the Purchasing Contract UI.
Following are some of the important attributes on item node:
Item ID: This is the serial no of the item in purchasing Contract 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 |
04 | Follow on document not expected |
05 | Follow on document forbidden |
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 PCT 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.
Purchasing Contract 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 |