Description | Manage Return To Supplier In |
Name | ManageReturnToSupplierIn |
Namespace | http://sap.com/xi/A1S/Global |
Process Component Description | Return to supplier processing |
Process Component Name | ReturnToSupplier |
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 read the data of selected fields of a Return to Supplier document or to maintain one or more Returns To Supplier.
The Manage Returns to Supplier In inbound service interface contains an operation that reads the data of selected fields of a Returns to Supplier and prepares this data for a specific data consumer.
The inbound service interface enables you to create one or more Returns to Supplier and to read data of selected fields of a Returns to Supplier.
The web service interface Manage Returns To Supplier In offers the operations CHECK_MAINTAIN_BUNDLE and MAINTAIN_BUNDLE.
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:
• Party(Buyer Party,Employee Responsible Party,End Buyer Party,Requester Part,Seller Party, etc.)
• Location (Receiving Site)
• Products
• Purchase Order
• Inbound Delivery(Inbound Delivery Notification)
• Delivery Terms
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.
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.
Code | Description |
---|---|
1 | Replacement Quantity |
2 | Credit Memo Quantity |
3 | Partial Credit Memo & Replacement Quantity |
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.
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 un-interpretable string that is provided by query and read operations and can be utilized by all modifying operations. If the change state identifier is provided when calling a modifying operation, the system does not perform the operation if the state of the business document instance has changed since the change state ID was computed. If the change state ID is not provided by the web service consumer, the system performs the web service operation without checking the state of the business document.
The web service consumer (external application) is responsible for preventing accidental changes to business documents.
Request node elements with cardinality > 1 contain an object node sender technical identifier to relate response message elements and log items to corresponding node elements in the request message.
The object node sender technical identifiers are provided as ObjectNodeSenderTechnicalID in request message types and referred to as ReferenceObjectNodeSenderTechnicalID in corresponding response message types.
If the object node sender technical ID is initial, the object node sender technical ID of the parent node element in the request is returned as the reference object node sender technical ID. If the object node sender technical IDs of all parent node elements are initial, the reference object node sender technical ID is returned as initial as well.
Note: The values specified in the ObjectNodeSenderTechnicalID are transient values that establish the correspondence between elements for only a single call. The web service consumer is not required to specify them or to use the same values for different calls. In addition, the service provider does not interpret these values at all, but returns them to the web service consumer instead in the ReferenceObjectNodeSenderTechnicalID elements.
Note: The ObjectNodeSenderTechnicalID is also used to identify failed business document modifications in a mass operation.
Request
<Child> <ObjectNodeSenderTechnicalID>999_A<ObjectNodeSenderTechnicalID> <Content>Child A: Some correct content</Content> </Child> <Child> <ObjectNodeSenderTechnicalID>999_B<ObjectNodeSenderTechnicalID> <Content>Child B: Some erroneous content</Content> </Child>
Response:
<Log> <Item> <ReferenceObjectNodeSenderTechnicalID>999_B </ReferenceObjectNodeSenderTechnicalID> <Note>Error message for Child B</Note> </Item> </Log>
The structure of the response message consists of two parts:
• A business document-specific part containing information about IDs and UUIDs of the created and changed business documents
• Log items containing system messages including errors, warnings, and information messages raised by the system during processing of the web service request
Many external applications consuming web services have special requirements and restrictions regarding the format of WSDLs. Some external applications require service definition WSDLs describing the web service signature. This is normally sufficient for the creation of static client-side proxies. Other external applications, normally those that do not create static client-side proxies, require binding WSDLs including the endpoint definition and authentication policy information.
In both cases, it may be the case that the external application imposes special restrictions on the structure or the size of WSDLs.
Microsoft InfoPath requires binding WSDLs and considers elements with the attribute "minOccurs=0" as "mandatory". However "minOccurs=0" means "optional" in SAP web services. In order to circumvent this problem, the WSDL must be saved locally and an additional attribute "nillable=true" must be added to make a query parameter optional for Microsoft InfoPath.
For very small clients such as mobile devices, the size of the WSDL itself may become a problem. In most cases the client only requires a very small part of the signature, but due to the complexity of the WSDL they may end up with long runtime during serialization of the request or deserialization of the response. In order to circumvent this problem, the WSDL must be saved locally and the optional parts of the signature have to be removed before the WSDL is imported or static client-side proxies are generated.
External applications have to take into account that web service request and response message types can be enhanced with additional elements and attributes. Enhancements can be created by SAP, SAP partners, and key users. Enhancements of request message types are always optional elements or attributes. The SAP system does not require the external application to provide values in the request. Enhancements of response message types can contain mandatory elements or attributes. The external application must be able to process the extended response successfully.
XML element and attribute names are always stable. Technical definitions of data types can be enhanced in a compatible way. This may result in changed data type names. External applications can rely on XML element names and attribute names, but should not rely on data type names.
Note: You can download the WSDL file for any web service here:
• Application and User Management work center -> Input Output Management -> Communication Arrangement.
• User Management work center -> Service Explorer view.
You can find the documentation of the global data types in the SAP Community Network: Go to http://scn.sap.com/docs/DOC-17516 and click View Document.
You can find general information about Web services, their structure and consumption in the Web Services documentation.
Possible scenarios include the following:
• Create one or many Return to Supplier
Description | Manage return to supplier |
Name | MaintainBundle |
Synchronous | yes |
Release Status | Released |
To create Return To Supplier in Business ByDesign system.
The request message of the operation MaintainBundle contains a BasicMessageHeader node element as well as a RTS node element that contains the RTS data to be created. The detailed structure of the RTS node will be explained in the following sub-chapters. The RTS node can occur multiple times in the request message – this means that multiple RTS 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 RTS-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as RTS InternalID and UUID.
Example: Create a Returns to Supplier refer to Inbound Delivery ID 27
web service request
<n0:ReturnToSupplierMaintainBundleRequest xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <ReturnToSupplierMaintBundle actionCode="01"> <BuyerParty actionCode="01"> <PartyKey> <PartyTypeCode>200</PartyTypeCode> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <Item> <ItemID>1</ItemID> <BusinessTransactionDocumentItemTypeCode>18</BusinessTransactionDocumentItemTypeCode> <Quantity unitCode="EA">1</Quantity> <DeliveryPeriod> <StartDateTime timeZoneCode="UTC-8">2018-04-16T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="UTC-8">2018-04-16T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <ItemInboundDeliveryReference ActionCode="01"> <BusinessTransactionDocumentReference> <ID>27</ID> <TypeCode>24</TypeCode> <ItemID>10</ItemID> <ItemTypeCode>14</ItemTypeCode> </BusinessTransactionDocumentReference> </ItemInboundDeliveryReference> </Item> </ReturnToSupplierMaintBundle> </n0:ReturnToSupplierMaintainBundleRequest>
web service response
<n0:ReturnToSupplierMaintainBundleResponse xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:QCH:/1SAI/TAE472D2E2CE827E2431130:804"> <ReturnToSupplier> <ChangeStateID> 20180416084906.0000000</ChangeStateID> <BusinessTransactionDocumentID>2</BusinessTransactionDocumentID> <UUID>00163e06-58ba-1ee8-90aa-6081dabd77a9</UUID> </ReturnToSupplier> <Log/> </n0:ReturnToSupplierMaintainBundleResponse>
Structure of the request message has the following nodes and elements:
The RTS node elements contain all general information such as ID, Business Partners. The data of this node is related to the General Data on the RTS UI.
RTS ID is the internal ID with which the RTS can be addressed and found.
Receiving Site: Received from which site
At header level of GSA following four types of parties are important:
BuyerParty: This is the buying company
FreightForwarderParty: Freight Forwarder
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 |
This node is used to maintain Notes on RTS Header or Item Level. There are different types of notes supported in RTS:
TypeCode | Description |
---|---|
10011 | Internal comment |
This node has information relevant for the RTS items like the item id, quantity, shipment date. The attributes here can be seen on the Items view of the RTS UI.
Following are some of the important attributes on Item node:
Item ID: This is the serial no of the item in RTS and is unique.
Delivery Quantity: This is the Quantity which the goods must be delivered
RTS 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 |
1808 | Reference Field Bundle | RFB created for extension enablement |
Description | Check return to supplier |
Name | CheckMaintainBundle |
Synchronous | yes |
Release Status | Released |
To simulate create and update (only actions Cancel and Reopen) on Return To Supplier in Business ByDesign system.
The request message of the operation MaintainBundle contains a BasicMessageHeader node element as well as a RTS node element that contains the RTS data to be created. The detailed structure of the RTS node will be explained in the following sub-chapters. The RTS node can occur multiple times in the request message – this means that multiple RTS 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 RTS-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as RTS InternalID and UUID.
Example: Create a Returns to Supplier refer to Inbound Delivery ID 27
web service request
<n0:ReturnToSupplierMaintainBundleRequest xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <ReturnToSupplierMaintBundle actionCode="01"> <BuyerParty actionCode="01"> <PartyKey> <PartyTypeCode>200</PartyTypeCode> <PartyID>MC10000</PartyID> </PartyKey> </BuyerParty> <Item> <ItemID>1</ItemID> <BusinessTransactionDocumentItemTypeCode>18</BusinessTransactionDocumentItemTypeCode> <Quantity unitCode="EA">1</Quantity> <DeliveryPeriod> <StartDateTime timeZoneCode="UTC-8">2018-04-16T12:00:00.1234567Z</StartDateTime> <EndDateTime timeZoneCode="UTC-8">2018-04-16T12:00:00.1234567Z</EndDateTime> </DeliveryPeriod> <ItemInboundDeliveryReference ActionCode="01"> <BusinessTransactionDocumentReference> <ID>27</ID> <TypeCode>24</TypeCode> <ItemID>10</ItemID> <ItemTypeCode>14</ItemTypeCode> </BusinessTransactionDocumentReference> </ItemInboundDeliveryReference> </Item> </ReturnToSupplierMaintBundle> </n0:ReturnToSupplierMaintainBundleRequest>
web service response
<n0:ReturnToSupplierMaintainBundleResponse xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:QCH:/1SAI/TAE472D2E2CE827E2431130:804"> <ReturnToSupplier> <ChangeStateID> 20180416084906.0000000</ChangeStateID> <BusinessTransactionDocumentID>##1</BusinessTransactionDocumentID> <UUID>00163e06-58ba-1ee8-90aa-6081dabd77a9</UUID> </ReturnToSupplier> <Log/> </n0:ReturnToSupplierMaintainBundleResponse>
Structure of the request message has the following nodes and elements:
The RTS node elements contain all general information such as ID, Business Partners. The data of this node is related to the General Data on the RTS UI.
RTS ID is the internal ID with which the RTS can be addressed and found.
Receiving Site: Received from which site
At header level of GSA following four types of parties are important:
BuyerParty: This is the buying company
FreightForwarderParty: Freight Forwarder
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 |
This node is used to maintain Notes on RTS Header or Item Level. There are different types of notes supported in RTS:
TypeCode | Description |
---|---|
10011 | Internal comment |
This node has information relevant for the RTS items like the item id, quantity, shipment date. The attributes here can be seen on the Items view of the RTS UI.
Following are some of the important attributes on Item node:
Item ID: This is the serial no of the item in RTS and is unique.
Delivery Quantity: This is the Quantity which the goods must be delivered
RTS 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 |
1808 | Reference Field Bundle | RFB created for extension enablement |