Api Material Document
Api Material Document
PUBLIC
Warning
This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product
documentation. The information included in custom documentation may not reflect the arrangement of topics in the SAP Help
Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.
This is custom documentation. For more information, please visit the SAP Help Portal 1
11/8/24, 7:06 PM
In the structure on the left you can find information about the OData and SOAP services that are available for Inventory. Note that
this documentation is available in English only.
OData Services
You can use different services interfaces within Inventory Management and Physical Inventory.
You can use this service to retrieve and create material documents. You can also use this service to cancel existing material
documents or material document items.
You can use this service to retrieve and create physical inventory documents. You can also use this service to count and
recount items and post differences on both document and item level.
Use
The service is based on the OData protocol and can be consumed by external systems and other user interfaces.
This service is published on the SAP Business Accelerator Hub. For more information about APIs, see APIs on SAP Business
Accelerator Hub.
Service Structure
This is custom documentation. For more information, please visit the SAP Help Portal 2
11/8/24, 7:06 PM
The service contains header and item entities. For read operations, filter information must be sent according to the OData
protocol. All filter information is utilized when retrieving material documents, including appropriate checks for restricted values
and authorizations. Depending on the operation, material document header and item detail data is sent in the response. If any
issues arise when the material documents are retrieved, the system displays error messages in the response.
Entities
Service Response
The details that are included in the response vary according to the type of operation. For more information, see Operations for
Material Document API.
Related Events
Material Document Events
Additional Information
The link to the API on the SAP Business Accelerator Hub: Material Documents - Read, Create
Note
For more details about Communication Management, see Communication Management.
Document Header
Use
Properties
This is custom documentation. For more information, please visit the SAP Help Portal 3
11/8/24, 7:06 PM
X = Print is requested
This is custom documentation. For more information, please visit the SAP Help Portal 4
11/8/24, 7:06 PM
Note
To display more information about the properties on the SAP Business Accelerator Hub, open one of the entity's operations and
select Model.
Supported Operations
Document Items
This is custom documentation. For more information, please visit the SAP Help Portal 5
11/8/24, 7:06 PM
Use
Properties
Property Description
Plant Plant that will receive or issue goods depending on the movement
type
GoodsMovementType Goods movement type, for example, goods receipt, goods issue, or
physical inventory difference
InventoryStockType Stock type for which a goods movement has been carried out.
InventorySpecialStockType • IssuingOrReceivingStockType
Specifies in case of special stock, the type of special stock.
Examples are W for customer consignment, Q for project stock, or T
for stock in transit. This field is empty for regular stock.
This is custom documentation. For more information, please visit the SAP Help Portal 6
11/8/24, 7:06 PM
Property Description
SalesOrderScheduleLine Sales order item schedule line number related to the goods
movement
GoodsMovementRefDocType Type of document that constitutes the basis for the movement,
such as purchase or production order
FiscalYear Fiscal year of the posting period. The fiscal year is the period for
which the company creates the inventory and balance sheet. The
fiscal year can be the same as the calendar year, but does not have
to be.
FiscalYearVariant Variant to define the fiscal year. With the fiscal year variant you can
define how many posting periods and special periods are in a fiscal
year.
Note
This is custom documentation. For more information, please visit the SAP Help Portal 7
11/8/24, 7:06 PM
Property Description
Note
Providing this information is relevant in the case of transfer
postings only.
The issuing plant (in the case of a reversal) is the plant that
issues the goods.
Note
Providing this information is relevant in the case of transfer
postings only.
Note
Providing this information is relevant in the case of transfer
postings only.
The issuing valuation type of the transfer batch (in the case
of a reversal) is the valuation type that should be recorded
for issued batches.
Note
Providing this information is relevant in the case of transfer
postings only.
This is custom documentation. For more information, please visit the SAP Help Portal 8
11/8/24, 7:06 PM
Property Description
GoodsRecipientName Recipient for whom the material or the service is destined (goods
recipient or ship-to party)
ShelfLifeExpirationDate Expiration date information for the shelf life expiration or best-
before date.
SpecialStockIdfgSalesOrder Number in sales order that identifies the special stock. Number is
mainly used together with special stock type E (sales order stock).
SpecialStockIdfgSalesOrderItem Item number in sales order that identifies the special stock.
Number is mainly used together with special stock type E sales
order stock.
IsAutomaticallyCreated Indicator for the automatic creation of an item. The following values
are possible:
This is custom documentation. For more information, please visit the SAP Help Portal 9
11/8/24, 7:06 PM
Property Description
IsAutomaticallyCreated is set.
MasterFixedAsset This is the number which, together with the asset sub-number,
identifies a fixed asset in Asset Accounting.
FixedAsset This is the number which, together with the main asset number,
uniquely identifies a fixed asset in Asset Accounting.
Note
Providing this information is relevant in the case of transfer
postings only.
Property Description
Note
Providing this information is relevant in the case of transfer
postings only.
InventoryUsabilityCode Stock type information for goods movements used during posting,
for example:
• Unrestricted-use stock ( )
DebitCreditCode Shows on which side of the account the transaction figures are
updated. Possible values are H and S.
H = Credit
S = Debit
Note
To display more information about the properties on the SAP Business Accelerator Hub, open one of the entity's operations and
select Model.
Supported Operations
The following operations are supported:
Serial Numbers
Technical name: A_SerialNumberMaterialDocument
This is custom documentation. For more information, please visit the SAP Help Portal 11
11/8/24, 7:06 PM
Properties
Property Description
Note
To display more information about the properties on the SAP Business Accelerator Hub, open one of the entity's operations and
select Model.
Supported Operations
Read GET
GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
Material
Documents
Create POST
Material POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
Documents
This is custom documentation. For more information, please visit the SAP Help Portal 12
11/8/24, 7:06 PM
Cancel POST
Material POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/Cancel?MaterialDocumentYear='2
Documents
at Header
Level
Cancel POST
Material POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/CancelItem?MaterialDocumentYea
Documents
at Item
Level
Change Sets
You can combine several operations in a batch call. Within a batch call, you group all write operations by using change sets.
If a change set includes a POST operation to create a material document or to cancel a material document at header level,
no other operation can be added.
If a change set includes more than one POST operation to cancel a material document at item level (function import
CancelItem), all operations within the change set must refer to items that are included in the same material document
and have the same posting date.
Note
Material documents are subject to data aging and might be moved to the historical area of the database when they meet the
requirements for data aging. However, they can still be accessed and retrieved by the OData service. If you want to filter
material documents or items by using system query options, we recommend that you always include a posting date or a
material document year as filter to speed up processing for a large number of documents.
For more information about the parameters that you can include in the URL of the request, see Document Header, Document
Items, and Serial Numbers.
Examples
This is custom documentation. For more information, please visit the SAP Help Portal 13
11/8/24, 7:06 PM
GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader(MaterialDocument='4
GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentItem(MaterialDocument='490
You can use this operation to get a filtered list of material document items, for example, to get material document items by plant or
storage location. To achieve this, the GET request needs to be based on the material document item entity
(A_MaterialDocumentItem).
The following is an example of how to get material document items from storage location 101B. To see the header data of the
results list, you need to expand the header entity.
GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentItem?$expand=to_MaterialDo
GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader(MaterialDocument='4
GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader(MaterialDocument='4
GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader?$filter=PostingDate
Request
The OData call to create a new material document must include both header and item properties in the same request. You can
include the following properties in the body of the request:
Header
This is custom documentation. For more information, please visit the SAP Help Portal 14
11/8/24, 7:06 PM
03 - Goods Issue
04 - Transfer Posting
PostingDate Mandatory -
DocumentDate Optional -
MaterialDocumentHeaderText Optional -
X = Print is requested.
This is custom documentation. For more information, please visit the SAP Help Portal 15
11/8/24, 7:06 PM
Note
If an EWM-managed material is
used and
CtrlPostgForExtWhseMgmtSyst
= 1, a delivery document will be
created instead of a material
document. If you are processing
one document, the delivery
document number will appear in
the header of the API response.
If you are batch processing
documents, the delivery
document number will appear in
the body of the API response.
See SAP Note 3021752 for
more information.
Item
Plant Mandatory -
StorageLocation Optional -
Material Optional -
GoodsMovementType Mandatory -
InventorySpecialStockType Optional -
Supplier Optional -
Customer Optional -
SalesOrder Optional -
This is custom documentation. For more information, please visit the SAP Help Portal 16
11/8/24, 7:06 PM
SalesOrderItem Optional -
SalesOrderScheduleLine Optional -
PurchaseOrder Optional -
PurchaseOrderItem Optional -
WBSElement Optional -
ManufacturingOrder Optional -
ManufacturingOrderItem Optional -
GoodsMovementRefDocType Optional -
GoodsMovementReasonCode Optional -
CostCenter Optional -
CostObject Optional -
ProfitabilitySegment Optional -
ProfitCenter Optional -
QuantityInEntryUnit Optional -
EntryUnit Optional -
GdsMvtExtAmtInCoCodeCrcy Optional -
IssuingOrReceivingPlant Optional -
IssuingOrReceivingStorageLoc Optional -
IssgOrRcvgMaterial Optional -
IssgOrRcvgBatch Optional -
IssuingOrReceivingValType Optional -
IsCompletelyDelivered Optional -
MaterialDocumentItemText Optional -
UnloadingPointName Optional -
ShelfLifeExpirationDate Optional -
ManufactureDate Optional -
Reservation Optional -
ReservationItem Optional -
This is custom documentation. For more information, please visit the SAP Help Portal 17
11/8/24, 7:06 PM
ReservationIsFinallyIssued Optional -
ReferenceDocumentFiscalYear Optional -
GLAccount Optional -
This is custom documentation. For more information, please visit the SAP Help Portal 18
11/8/24, 7:06 PM
Serial Number
SerialNumber Optional -
Note
Depending on the value of the GoodsMovementCode, GoodsMovementType and GoodsMovementRefDocType
properties, the necessity and availability of the other item properties can vary. For example, the
IssuingOrReceivingPlant property is only available if the value of the GoodsMovementCode property is 04 -
Transfer Posting.
For more information about the individual properties, see Document Header, Document Items, and Serial Numbers.
Custom Fields
You can include custom fields in the request to create material documents. For more information, see Extensibility: Material
Documents - Read, Create.
Caution
When using custom fields, you must provide a unique value in the MaterialDocumentLine field for each material document
item. See example below.
Example Requests
Example for reporting a goods receipt for items 10 and 20 in purchase order1000177 for one piece of material Z_MM_IM4_1 and
one piece of material Z_MM_IM4_2.
Sample Code
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEes4N5xtOUYhegA==
{
"PostingDate": "2017-07-01T00:00:00",
"GoodsMovementCode": "01",
"to_MaterialDocumentItem": [{
"Material": " Z_MM_IM4_1",
"Plant": "0001",
"StorageLocation": "0001",
This is custom documentation. For more information, please visit the SAP Help Portal 19
11/8/24, 7:06 PM
"GoodsMovementType": "101",
"PurchaseOrder": "4500005633",
"PurchaseOrderItem": "10",
"GoodsMovementRefDocType": "B",
"EntryUnit": "PC",
"QuantityInEntryUnit": "1"
},
{
"Material": " Z_MM_IM4_2",
"Plant": "0001",
"StorageLocation": "0002",
"GoodsMovementType": "101",
"PurchaseOrder": "4500005633",
"PurchaseOrderItem": "20",
"GoodsMovementRefDocType": "B",
"EntryUnit": "PC",
"QuantityInEntryUnit": "1"
}
]
}
When using custom fields, you must provide a unique value in the MaterialDocumentLine field for each material document
item.
Sample Code
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEes4N5xtOUYhegA==
{
"PostingDate": "2017-07-01T00:00:00",
"GoodsMovementCode": "01",
"to_MaterialDocumentItem": [{
"MaterialDocumentLine" : "1",
"Material": " Z_MM_IM4_1",
"Plant": "0001",
"StorageLocation": "0001",
"GoodsMovementType": "101",
"PurchaseOrder": "4500005633",
"PurchaseOrderItem": "10",
"YY1_YOUR_CUSTOM_FIELD" : "",
"GoodsMovementRefDocType": "B",
"EntryUnit": "PC",
"QuantityInEntryUnit": "1"
},
{
"MaterialDocumentLine" : "2",
"Material": " Z_MM_IM4_2",
"Plant": "0001",
"StorageLocation": "0002",
"GoodsMovementType": "101",
"PurchaseOrder": "4500005633",
"PurchaseOrderItem": "20",
"YY1_YOUR_CUSTOM_FIELD" : "",
"GoodsMovementRefDocType": "B",
"EntryUnit": "PC",
"QuantityInEntryUnit": "1"
}
]
}
Sample Code
This is custom documentation. For more information, please visit the SAP Help Portal 20
11/8/24, 7:06 PM
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEes4N5xtOUYhegA==
{
"VersionForPrintingSlip": "1",
"GoodsMovementCode": "01",
"to_MaterialDocumentItem": [
{
"Plant": "1010",
"StorageLocation": "101A",
"GoodsMovementType": "101",
"Material": "SG22",
"PurchaseOrder" : "4500009016",
"PurchaseOrderItem" : "10",
"Delivery": "180001050",
"DeliveryItem": "10",
"GoodsMovementRefDocType" : "B",
"EntryUnit" : "PC",
"QuantityInEntryUnit" : "20",
"SerialNumbersAreCreatedAutomly" : false
}
]
}
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEes4N5xtOUYhegA==
{
"PostingDate": "2021-07-11T00:00:00",
"GoodsMovementCode": "01",
"CtrlPostgForExtWhseMgmtSyst": "3",
"to_MaterialDocumentItem": [
{
"Material": "Z_MM_IM_EWM_1",
"Plant": "EWM1",
"StorageLocation": "EWM",
"GoodsMovementType": "101",
"MaterialDocumentItemText": "GR Vendor XY",
"ManufacturingOrder": "1000607",
"IsCompletelyDelivered" : true,
"EWMWarehouse": "1050",
"EWMStorageBin": "PR-AREA",
"GoodsMovementRefDocType": "F",
"QuantityInEntryUnit": "10"
}
]
}
JSON
Example for reporting a goods receipt for purchase order 4500225633 for materials Z_MM_IM_SER_1 and
Z_MM_IM_SER_2 in which the serial numbers for the 2 pieces of material Z_MM_IM_SER_1 are provided and the serial
numbers for the 4 pieces of material Z_MM_IM_SER_2 are created automatically.
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEeiu55xtOUYhegA==
{
"PostingDate": "2020-08-01T00:00:00",
"VersionForPrintingSlip": "1",
This is custom documentation. For more information, please visit the SAP Help Portal 21
11/8/24, 7:06 PM
"GoodsMovementCode": "01",
"to_MaterialDocumentItem": [{
"Material": " Z_MM_IM_SER_1",
"Plant": "0001",
"StorageLocation": "0001",
"GoodsMovementType": "101",
"PurchaseOrder": "4500225633",
"PurchaseOrderItem": "10",
"GoodsMovementRefDocType": "B",
"EntryUnit": "PC",
"QuantityInEntryUnit": "2",
"SerialNumbersAreCreatedAutomly": false,
"to_SerialNumbers": [ { "SerialNumber":"2056" },
{ "SerialNumber":"2057" }
]
},
{
"Material": " Z_MM_IM_SER_2",
"Plant": "0001",
"StorageLocation": "0002",
"GoodsMovementType": "101",
"PurchaseOrder": "4500225633",
"PurchaseOrderItem": "20",
"GoodsMovementRefDocType": "B",
"EntryUnit": "PC",
"QuantityInEntryUnit": "4",
"SerialNumbersAreCreatedAutomly": true
} ]
}
XML
Example for reporting a goods receipt without reference for two materials: Item 1 and Item 2. Two pieces of Item 1 are
posted with serial numbers 1 and 2. Two pieces of Item 2 are posted with serial numbers 3 and 4.
This is custom documentation. For more information, please visit the SAP Help Portal 22
11/8/24, 7:06 PM
<content type="application/xml">
<m:properties>
<d:Material>Your_Material</d:Material>
<d:Plant>1010</d:Plant>
<d:StorageLocation>101A</d:StorageLocation>
<d:GoodsMovementType>501</d:GoodsMovementType>
<d:EntryUnit>PC</d:EntryUnit>
<d:QuantityInEntryUnit>2</d:QuantityInEntryUnit>
<d:SerialNumbersAreCreatedAutomly>false</d:SerialNumbersAreCreatedAutomly>
</m:properties>
</content>
</entry>
<entry>
<category term="API_MATERIAL_DOCUMENT_SRV.A_MaterialDocumentItemType" scheme="http://sch
<link href="Item 2" rel="self" title="A_MaterialDocumentItemType"/>
<link href="Item 2)/to_MaterialDocumentHeader" rel="http://schemas.microsoft.com/ado/200
<link href="Item_2/to_SerialNumbers" rel="http://schemas.microsoft.com/ado/2007/08/
<m:inline>
<feed xml:base="https://Your_Server/sap/opu/odata/SAP/API_MATERIAL_DOCUMENT_SRV/">
<link href="Item_2/to_SerialNumbers" rel="self" title="A_SerialNumberMaterialDocument
<entry>
<category term="API_MATERIAL_DOCUMENT_SRV.A_SerialNumberMaterialDocumentType" scheme
<link href="Serial Number 3" rel="self" title="A_SerialNumberMaterialDocumentType"/>
<content type="application/xml">
<m:properties>
<d:SerialNumber>SERIALNUMBER_3</d:SerialNumber>
</m:properties>
</content>
</entry>
<entry>
<category term="API_MATERIAL_DOCUMENT_SRV.A_SerialNumberMaterialDocumentType" scheme
<link href="Serial Number 4" rel="self" title="A_SerialNumberMaterialDocumentType"/>
<content type="application/xml">
<m:properties>
<d:SerialNumber>SERIALNUMBER_4</d:SerialNumber>
</m:properties>
</content>
</entry>
</feed>
</m:inline>
</link>
<content type="application/xml">
<m:properties>
<d:Material>Your_Material</d:Material>
<d:Plant>1010</d:Plant>
<d:StorageLocation>101A</d:StorageLocation>
<d:GoodsMovementType>501</d:GoodsMovementType>
<d:EntryUnit>PC</d:EntryUnit>
<d:QuantityInEntryUnit>2</d:QuantityInEntryUnit>
<d:SerialNumbersAreCreatedAutomly>false</d:SerialNumbersAreCreatedAutomly>
</m:properties>
</content>
</entry>
</feed>
</m:inline>
</link>
<content type="application/xml">
<m:properties>
<d:GoodsMovementCode>05</d:GoodsMovementCode>
<d:MaterialDocumentHeaderText>This is Text</MaterialDocumentHeaderText>
</m:properties>
</content>
</entry>
Create a Goods Receipt for a Purchase Order with Recursive Serial Numbers
Example for ensuring that material AF_HAWA_SER_ERR will keep the same serial number even if one of the components is
repaired via subcontracting.
This is custom documentation. For more information, please visit the SAP Help Portal 23
11/8/24, 7:06 PM
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEes4N5xtOUYhegA==
{
"PostingDate": "2024-07-26T00:00:00",
"GoodsMovementCode": "01",
"to_MaterialDocumentItem": [
{
"Material": "AF_HAWA_SER_ERROR",
"Plant": "1010",
"StorageLocation": "101A",
"GoodsMovementType": "101",
"PurchaseOrder": "4500040451",
"PurchaseOrderItem": "10",
"GoodsMovementRefDocType": "B",
"EntryUnit": "PC",
"QuantityInEntryUnit": "1",
"MaterialDocumentLine": "1",
"to_SerialNumbers": [
{
"SerialNumber":"11",
"SerialNumberIsRecursive": "X"
}
]
},
{
"MaterialDocumentLine": "2",
"MaterialDocumentParentLine": "1",
"Material": "AF_HAWA_SER_ERROR",
"Plant": "1010",
"GoodsMovementType": "543",
"PurchaseOrder": "4500040451",
"PurchaseOrderItem": "10",
"EntryUnit": "PC",
"QuantityInEntryUnit": "1",
"InventorySpecialStockType": "O",
"Supplier": "0010300001",
"to_SerialNumbers": [
{
"SerialNumber":"11",
"SerialNumberIsRecursive": "X"
}
]
}
]
}
Example for creating a stock transfer for two pieces of material Z_MM_IM4 from storage location 0001 to storage location 0002 in
plant 0001.
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEes4N5xtOUYhegA==
{
"PostingDate": "2017-07-01T00:00:00",
"GoodsMovementCode": "04",
"to_MaterialDocumentItem": [{
"Plant": "0001",
"StorageLocation": "0001",
"Material": "Z_MM_IM4",
"GoodsMovementType": "349",
"QuantityInEntryUnit": "2",
"IssuingOrReceivingPlant": "0001",
"IssuingOrReceivingStorageLoc": "0002"
}]
}
This is custom documentation. For more information, please visit the SAP Help Portal 24
11/8/24, 7:06 PM
Create Goods Issue for Cost Center
Example for reporting a consumption of material Z_MM_IM4 from storage location 0001 in plant 0001. The costs of this
consumption are charged to cost center 10101201.
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEes4N5xtOUYhegA==
{
"PostingDate": "2017-07-01T00:00:00",
"GoodsMovementCode": "03",
"to_MaterialDocumentItem": [{
"Material": "Z_MM_IM4",
"Plant": "0001",
"StorageLocation": "0001",
"GoodsMovementType": "201",
"CostCenter": "10101201",
"EntryUnit": "PC",
"QuantityInEntryUnit": "1"
}]
}
Example for creating a goods issue for scrapping one piece (unit of measure: PC) of material Z_MM_IM4.
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEes4N5xtOUYhegA==
{
"PostingDate": "2017-08-10T00:00:00",
"GoodsMovementCode": "03",
"to_MaterialDocumentItem": [{
"Material": "Z_MM_IM4",
"Plant": "1010",
"StorageLocation": "101A",
"GoodsMovementType": "551",
"EntryUnit": "PC",
"QuantityInEntryUnit": "1",
"CostCenter": "10101101"
}]
}
Reverse a Reservation
Sample Code
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEes4N5xtOUYhegA==
{
"GoodsMovementCode": "05",
"VersionForPrintingSlip": "1",
"to_MaterialDocumentItem": [
{
"Plant": "1010",
"StorageLocation": "101B",
"GoodsMovementType": "262",
"Material": "SG21",
"QuantityInEntryUnit": "1",
"ManufacturingOrder": "1003284",
"Reservation": "34228",
"ReservationItem": "1",
"MaterialDocumentPostingType": "1",
This is custom documentation. For more information, please visit the SAP Help Portal 25
11/8/24, 7:06 PM
"SerialNumbersAreCreatedAutomly": true
}
]
}
To create a material document and an Extended Warehouse Management (EWM) document synchronously in an integrated EWM
System, use the HTTP method POST on the A_MaterialDocumentHeader entity and enter "3" as the value for the
CtrlPostgForExtWhseMgmtSyst property.
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEes4N5xtOUYhegA==
{
"PostingDate": "2020-11-17T00:00:00",
"GoodsMovementCode": "01",
"CtrlPostgForExtWhseMgmtSyst": "3",
"to_MaterialDocumentItem": [
{
"Material": "Z_MM_IM_EWM_1",
"Plant": "EWM1",
"StorageLocation": "EWM",
"GoodsMovementType": "101",
"PurchaseOrder": "4500251700",
"PurchaseOrderItem": "20",
"EWMWarehouse": "EW01",
"EWMStorageBin": "GR-ZONE",
"GoodsMovementRefDocType": "B",
"EntryUnit": "PAL",
"QuantityInEntryUnit": "1"
}
]
}
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: qJGSQ2oEes4N5xtOUYhegA==
{
"GoodsMovementCode": "05",
"CtrlPostgForExtWhseMgmtSyst":"2",
"ReferenceDocument":"3PL01",
"to_MaterialDocumentItem": [{
"Plant": "{{plant}}",
"StorageLocation": "{{storagelocation}}",
"Batch": "{{batch}}",
This is custom documentation. For more information, please visit the SAP Help Portal 26
11/8/24, 7:06 PM
"Material": "{{material}}",
"GoodsMovementType": "711",
"QuantityInEntryUnit": "{{materialstockdiff}}"
}
]
}
Response
For all of the examples provided, the operation returns new material document header information.
Request
You can include the following properties in the request's URL:
MaterialDocumentYear Mandatory -
MaterialDocument Mandatory -
For more information about the individual properties, see Document Header.
Response
The operation creates a new material document based on the canceled document and returns its header data.
Example
Request
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/Cancel?MaterialDocumentYear='2017'&Material
HTTP/1.1
X-CSRF-Token kGKAO9_KrvjNGGjN3-R2Bw==
Response
status_code: 200
status_reason: OK
sap-processing-info: ODataBEP=,crp=,st=,MedCacheHub=,codeployed=X,softstate=
server_protocol: HTTP/1.1
content-type: application/json; charset=utf-8
content-length: 882
dataserviceversion: 2.0
{
"d": {
This is custom documentation. For more information, please visit the SAP Help Portal 27
11/8/24, 7:06 PM
"__metadata": {
"id": "https://<host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHea
"uri": "https://<host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHe
"type": "API_MATERIAL_DOCUMENT_SRV.A_MaterialDocumentHeaderType"
},
"MaterialDocumentYear": "2017",
"MaterialDocument": "5000021256",
"InventoryTransactionType": "WE",
"GoodsMovementCode": "",
"DocumentDate": "/Date(1498946400000)/",
"PostingDate": "/Date(1498946400000)/",
"CreationDate": "/Date(1501545600000)/",
"CreationTime": "PT09H53M30S",
"CreatedByUser": "XYZ123",
"ReferenceDocument": "",
"to_MaterialDocumentItem": {
"__deferred": {
"uri": "https://<host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocume
}
}
}
}
Request
You can include the following properties in the request's URL:
MaterialDocumentYear Mandatory -
MaterialDocument Mandatory -
MaterialDocumentItem Mandatory -
For more information about the individual properties, see Document Header and Document Items.
Response
The operation creates a new material document based on the canceled document and returns the item data for the item specified
in the request. The new material document includes the ReversedMaterialDocument, ReversedMaterialYear and
ReversedMaterialItem properties to refer to the material document item that was canceled.
Example
Request
POST <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/CancelItem?MaterialDocumentYear='2017'&Mate
HTTP/1.1
X-CSRF-Token kGKAO9_KrvjNGGjN3-R2Bw==
This is custom documentation. For more information, please visit the SAP Help Portal 28
11/8/24, 7:06 PM
Response
status_code: 200
status_reason: OK
sap-processing-info: ODataBEP=,crp=,st=,MedCacheHub=,codeployed=X,softstate=
server_protocol: HTTP/1.0
content-type: application/json; charset=utf-8
content-length: 834
dataserviceversion: 2.0
{
"d": {
"__metadata": {
"id": "https://<host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentIte
"uri": "https://<host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentIt
"type": "API_MATERIAL_DOCUMENT_SRV.A_MaterialDocumentItemType"
},
"MaterialDocumentYear": "2017",
"MaterialDocument": "5000021260",
"MaterialDocumentItem": "1",
"Material": "Z_MM_IM4",
"Plant": "0001",
"StorageLocation": "0001",
"Batch": "",
"GoodsMovementType": "502",
"InventoryStockType": "01",
"InventoryValuationType": "",
"InventorySpecialStockType": "",
"Supplier": "",
"Customer": "",
"SalesOrder": "",
"SalesOrderItem": "0",
"SalesOrderScheduleLine": "0",
"PurchaseOrder": "",
"PurchaseOrderItem": "0",
"WBSElement": "",
"ManufacturingOrder": "",
"ManufacturingOrderItem": "0",
"GoodsMovementRefDocType": "",
"GoodsMovementReasonCode": "0",
"AccountAssignmentCategory": "",
"CostCenter": "",
"ControllingArea": "0001",
"CostObject": "",
"ProfitabilitySegment": "0",
"ProfitCenter": "",
"GLAccount": "",
"FunctionalArea": "",
"MaterialBaseUnit": "EA",
"QuantityInBaseUnit": "10",
"EntryUnit": "EA",
"QuantityInEntryUnit": "10",
"CompanyCodeCurrency": "EUR",
"GdsMvtExtAmtInCoCodeCrcy": "0.00",
"SlsPrcAmtInclVATInCoCodeCrcy": "0.00",
"FiscalYear": "2017",
"FiscalYearPeriod": "00072017",
"FiscalYearVariant": "K4",
"IssgOrRcvgMaterial": "",
"IssgOrRcvgBatch": "",
"IssuingOrReceivingPlant": "",
"IssuingOrReceivingStorageLoc": "",
"IssuingOrReceivingStockType": "",
"IssgOrRcvgSpclStockInd": "",
"IssuingOrReceivingValType": "",
"IsCompletelyDelivered": false,
"MaterialDocumentItemText": "",
"UnloadingPointName": "",
"ShelfLifeExpirationDate": null,
"ManufactureDate": null,
"Reservation": "0",
"ReservationItem": "0",
"ReservationIsFinallyIssued": false,
"SpecialStockIdfgSalesOrder": "",
This is custom documentation. For more information, please visit the SAP Help Portal 29
11/8/24, 7:06 PM
"SpecialStockIdfgSalesOrderItem": "0",
"SpecialStockIdfgWBSElement": "",
"IsAutomaticallyCreated": "",
"MaterialDocumentLine": "1",
"MaterialDocumentParentLine": "0",
"HierarchyNodeLevel": "0",
"GoodsMovementIsCancelled": false,
"ReversedMaterialDocumentYear": "2017",
"ReversedMaterialDocument": "5000021259",
"ReversedMaterialDocumentItem": "1",
"to_MaterialDocumentHeader": {
"__deferred": {
"uri": "https://<host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocume
}
}
}
}
Batch Requests
You can use batch requests with the Material Documents - Read, Create API.
With $batch OData requests you can combine multiple operations in multiple changesets in a single request.
For more information about $batch requests in general, see $batch Processing.
Examples
This 2 step operation allows you to retrieve all material documents since a specific date and time. The date must be at least one
day in the past.
The first request retrieves documents based on the specified time of a specified day.
The second request retrieves all documents from the specified day.
POST <host>/sap/opu/odata/SAP/API_MATERIAL_DOCUMENT_SRV/$batch
HTTP/1.1
Content-Type: multipart/mixed;boundary=batch
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
GET A_MaterialDocumentHeader?$expand=to_MaterialDocumentItem&$filter=(CreationDate%20ge%20datetime
Content-Type: application/json
Accept: application/json
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
GET A_MaterialDocumentHeader?$expand=to_MaterialDocumentItem&$filter=(CreationDate%20ge%20datetime
Content-Type: application/json
Accept: application/json
--batch--
This is custom documentation. For more information, please visit the SAP Help Portal 30
11/8/24, 7:06 PM
Features
Key users can extend the OData Service in the Custom Fields app using the following business contexts:
You can enable usage of your custom fields in the OData APIs section of the custom field maintenance and publish your custom
fields.
Caution
When using custom fields in this API for the creation of material documents, you must provide a unique value in the
MaterialDocumentLine field for each material document item. For an example, see Create a Goods Receipt for a Purchase
Order with Custom Fields listed here: Create Material Documents.
Custom Logic
With the Custom Logic app, you can create and maintain implementations of custom logic that can be used to enhance
applications and change application behavior. You can implement custom logic for the following Business Add-Ins (BAdIs):
Check Item Data in Material Document Material Document Item You can use this BAdI to check the data in
(BADI_MMIM_CHECK_MATDOC_ITEM) (MATERIALDOCUMENTITEM) the material document header and material
document item for different processes. You
can then create corresponding custom
messages.
Custom Logic
For more information about the individual BAdIs, check the BAdI-specific documentation: Custom Logic <your
implementation > BAdI Documentation View BAdI Documentation
See Also
For more information, see the SAP Business Accelerator Hub (https://api.sap.com/ ).
Related Information
Custom Fields App and Custom Logic App
This is custom documentation. For more information, please visit the SAP Help Portal 31
11/8/24, 7:06 PM
This service enables you to retrieve material stock information using the OData protocol with filter data provided in the payload. It
can be consumed by external warehouse applications.
This service is published on the SAP Business Accelerator Hub. For more information about APIs, see APIs on SAP Business
Accelerator Hub.
Service Structure
The API service read material stock quantity for following stock types:
Unrestricted-Use Stock
Returns
Stock in Transit
Blocked Stock
Restricted-Use Stock
Tied Empties
The API service can read material stocks only. The CUD operations are not supported by this API service.
Entities
Serial Numbers with Material With this entity, you can read Optional Serial Numbers with Material
Stock serial number information from Stock
(A_MaterialSerialNumber) material stock accounting data.
Conversely, you can also read
This is custom documentation. For more information, please visit the SAP Help Portal 32
11/8/24, 7:06 PM
Service Response
The details that are included in the response vary according to the type of operation. For more information, see Operations for
Material Stock AP.
Constraints
With this service it is not possible to:
Only authorized roles can be used to retrieve material stock via API calls (authorization objects M_MATE_MAN and M_MATE_WRK).
Additional Information
The link to the API on the SAP Business Accelerator Hub: Material Stock - Read
Note
For more details about Communication Management, see Communication Management.
Material Master
Technical name:A_MaterialStock
Properties
Note
To display more information about the properties on the SAP Business Accelerator Hub, open one of the entity's operations and
select Model.
Supported Operations
The following operations are supported:
This is custom documentation. For more information, please visit the SAP Help Portal 33
11/8/24, 7:06 PM
Material Stock
Technical name:A_MatlStkInAcctMod
Properties
Note
WBSElementExternalID has more
descriptive values than
WBSElementInternalID. Therefore,
we recommend that you switch to
WBSElementExternalID.
This is custom documentation. For more information, please visit the SAP Help Portal 34
11/8/24, 7:06 PM
Note
To display more information about the properties on the SAP Business Accelerator Hub, open one of the entity's operations and
select Model.
Supported Operations
The following operations are supported:
Properties
Property Description
Plant Plant that will receive or issue goods depending on the movement
type.
InventorySpecialStockType IssuingOrReceivingStockType
InventoryStockType Stock type for which a goods movement has been carried out.
Note
To display more information about the properties on the SAP Business Accelerator Hub, choose Schema View.
Supported Operations
This is custom documentation. For more information, please visit the SAP Help Portal 35
11/8/24, 7:06 PM
The following operations are supported:
Retrieve GET
GET <host>/sap/opu/odata/sap/API_MATERIAL_STOCK/A_MaterialStock(‘<MaterialID>’)/to_MatS
stock
quantity
for a
material
Retrieve GET
GET <host>/sap/opu/odata/SAP/API_MATERIAL_STOCK_SRV/A_MaterialSerialNumber?$filter=Mate
stock
accounting
data such
as the
customer,
sales
order, etc.
from a
material
number
and a
specific
serial
number.
Retrieve GET
GET <host>/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/A_MaterialSerialNumber?$filter=Mate
serial
number
directly
from the
serial
number
entity.
This is custom documentation. For more information, please visit the SAP Help Portal 36
11/8/24, 7:06 PM
Examples
The following example is available for the Retrieve material for which stock exist operation:
The following examples are available for the Retrieve stock quantity for a material operation:
Example: Get stock for a certain material and stock type on level of storage location
Request
GET <host>/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/A_MaterialStock?%24top=2&%24orderby=Material
Response
{
"d": {
"results": [
{
"__metadata": {
"id": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/A
"uri": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/
"type": "API_MATERIAL_STOCK_SRV.A_MaterialStockType"
},
"Material": "CM-FL-V00",
"MaterialBaseUnit": "PC",
"to_MatlStkInAcctMod": {
"__deferred": {
"uri": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SR
}
}
},
{
"__metadata": {
"id": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/A
"uri": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/
"type": "API_MATERIAL_STOCK_SRV.A_MaterialStockType"
},
"Material": "D2C_C_104",
"MaterialBaseUnit": "L",
"to_MatlStkInAcctMod": {
"__deferred": {
"uri": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SR
}
}
}
]
}
}
This is custom documentation. For more information, please visit the SAP Help Portal 37
11/8/24, 7:06 PM
Request
GET <host>/sap/opu/odata/sap/API_MATERIAL_STOCK/A_MaterialStock('D2C_C_106')/to_MatlStkInAcctMod?%2
Response
{
"d": {
"results": [
{
"__metadata": {
"id": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/A
"uri": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/
"type": "API_MATERIAL_STOCK_SRV.A_MatlStkInAcctModType"
},
"Material": "D2C_C_106",
"Plant": "1010",
"StorageLocation": "101C",
"Batch": "0000000138",
"Supplier": "",
"Customer": "",
"WBSElementInternalID": "000000000000000000000000",
"SDDocument": "",
"SDDocumentItem": "0",
"InventorySpecialStockType": "",
"InventoryStockType": "01",
"WBSElementExternalID ": "",
"MaterialBaseUnit": "L",
"MatlWrhsStkQtyInMatlBaseUnit": "10000.000",
"to_MaterialStock": {
"__deferred": {
"uri": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SR
}
}
}
]
}
}
Request
GET <host>/sap/opu/odata/sap/API_MATERIAL_STOCK/A_MatlStkInAcctMod?%24top=2&%24orderby=Material
Response
"d": {
"results": [
{
"__metadata": {
"id": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/A
"uri": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/
"type": "API_MATERIAL_STOCK_SRV.A_MatlStkInAcctModType"
},
"Material": "CM-FL-V00",
"Plant": "1710",
"StorageLocation": "171A",
"Batch": "",
"Supplier": "",
"Customer": "",
"WBSElementInternalID": "000000000000000000000000",
This is custom documentation. For more information, please visit the SAP Help Portal 38
11/8/24, 7:06 PM
"SDDocument": "49186",
"SDDocumentItem": "10",
"InventorySpecialStockType": "E",
"InventoryStockType": "01",
"WBSElementExternalID ": "",
"MaterialBaseUnit": "PC",
"MatlWrhsStkQtyInMatlBaseUnit": "0",
"to_MaterialStock": {
"__deferred": {
"uri": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SR
}
}
},
{
"__metadata": {
"id": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/A
"uri": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/
"type": "API_MATERIAL_STOCK_SRV.A_MatlStkInAcctModType"
},
"Material": "D2C_C_104",
"Plant": "1010",
"StorageLocation": "101C",
"Batch": "0000000136",
"Supplier": "",
"Customer": "",
"WBSElementInternalID": "000000000000000000000000",
"SDDocument": "",
"SDDocumentItem": "0",
"InventorySpecialStockType": "",
"InventoryStockType": "01",
"WBSElementExternalID ": "",
"MaterialBaseUnit": "L",
"MatlWrhsStkQtyInMatlBaseUnit": "10000.000",
"to_MaterialStock": {
"__deferred": {
"uri": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SR
}
}
}
]
}
}
Example: Get stock for a certain material and stock type on level
of storage location
Request
GET <host>/sap/opu/odata/sap/API_MATERIAL_STOCK/A_MatlStkInAcctMod?%24top=2&%24filter=Material%20eq
Response
{
"d": {
"results": [
{
"__metadata": {
"id": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/A
"uri": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/
"type": "API_MATERIAL_STOCK_SRV.A_MatlStkInAcctModType"
},
"Material": "D2C_C_104",
"Plant": "1010",
"StorageLocation": "101C",
"InventoryStockType": "01",
This is custom documentation. For more information, please visit the SAP Help Portal 39
11/8/24, 7:06 PM
"WBSElementExternalID ": "",
"MaterialBaseUnit": "L",
"MatlWrhsStkQtyInMatlBaseUnit": "10000.000"
}
]
}
}
The physical inventory document is the central element of physical inventory management.
This service enables the following operations for physical inventory documents:
Count physical inventory document items and change physical inventory counts
The service is based on the OData protocol, and can be consumed by external systems and user interfaces.
For more information about the inventory count and adjustment process, see https://rapid.sap.com/bp/#/BP_CLD_ENTPR
under Supply Chain Inventory Physical Inventory - Inventory Count and Adjustment (BML) .
This service is published on the SAP Business Accelerator Hub. For more information about APIs, see APIs on SAP Business
Accelerator Hub.
Service Structure
The service contains header, item and serial number entities. For read operations, filter information must be sent according to the
OData protocol. All filter information is utilized when retrieving physical inventory documents, including appropriate checks for
plant-related restriction values and authorizations. The physical inventory document header, item and serial number detail data is
sent in the response. If any issues arise when the physical inventory documents are retrieved, the system displays error messages
in the response.
Entities
This is custom documentation. For more information, please visit the SAP Help Portal 40
11/8/24, 7:06 PM
Service Response
The details that are included in the response vary according to the type of operation. For more information, see Operations for
Physical Inventory Document API.
Constraints
The number of serial numbers that you can assign at a time in a physical inventory document is limited to 1,000. Due to
performance reasons, SAP recommends for serialized materials processing less than 1.000 physical inventory items and to
not read more than 10.000 physical inventory items at once.
The number of inventory document items is restricted to 999 due to technical restrictions (3-digit line number) to
dependencies to accounting documents. If you create a physical inventory document that contains more than 999 items,
an error is returned.
Only authorized roles can be used to retrieve, create, and process physical inventory documents via API calls.
Additional Information
https://api.sap.com/api/API_PHYSICAL_INVENTORY_DOC_SRV/resource
Document Header
Technical name:A_PhysInventoryDocHeader
Properties
Property Description
FiscalYear Fiscal year of the posting period. Note that the fiscal year can be
the same as the calendar year, but does not have to be. The fiscal
year must match with the planned and actual count date as well as
the posting date.
InventoryTransactionType Documents the transaction or event that was used to create the
physical inventory document
This is custom documentation. For more information, please visit the SAP Help Portal 41
11/8/24, 7:06 PM
Property Description
DocumentDate Date on which a document becomes valid. The document date can
deviate from the creation date and from the posting date.
PhysInventoryPlannedCountDate Planned count date that determines the fiscal year in which the
physical inventory document is posted. All other postings involving
this document must be for this fiscal year.
PhysicalInventoryLastCountDate Date of the last counted item. The date of the first entry of count
results for a physical inventory document determines the posting
period in which all further count results must be posted. This also
applies to the inventory differences relating to this physical
inventory document.
PostingIsBlockedForPhysInvtry Posting block due to physical inventory: This indicator is set when
the posting is blocked. The indicator is set for the affected stocks in
each case (storage location stock, batch stock, or special stock) for
all associated stock types and is not canceled until the count
results are posted.
PhysicalInventoryCountStatus Count status for a physical inventory. The status values are:
This is custom documentation. For more information, please visit the SAP Help Portal 42
11/8/24, 7:06 PM
Property Description
This indicator has the effect that the current book inventory
balance is recorded in the physical inventory document. The
system compares the counted stock with the frozen book inventory
balance to determine any inventory differences. If the count results
are not entered immediately after the stock has been counted, it is
useful to set this indicator so that any goods movements that may
take place in the meantime will not change the book inventory
balance relevant to the physical inventory.
With mass creation, you can create documents in which all items in
this document have one common characteristic. The type defines
the characteristic. Possible options are:
01 (Material group)
02 (Storage bin)
PhysicalInventoryNumber Number of the physical inventory that can be used to group several
documents, for example documents created by mass creation
PhysInventoryReferenceNumber Reference number for physical inventory that can be used to group
several documents, for example, documents created by mass
creation.
For cycle counting the value is 1 or blank. You can use this
differentiation, for example, in the traditional method of valuation
by delivered price (retail method of accounting), to exclude cycle
counting inventories when determining shrinkage.
Note
To display more information about the properties on the SAP Business Accelerator Hub, open one of the entity's operations and
select Model.
Supported Operations
The following operations are supported:
This is custom documentation. For more information, please visit the SAP Help Portal 43
11/8/24, 7:06 PM
Retrieve Physical Inventory Documents
Document Items
Technical name: A_PhysInventoryDocItem
Item entity that contains the physical inventory document item properties.
Properties
Property Description
FiscalYear Fiscal year of the posting period. The fiscal year must match with
the planned and actual count date as well as the posting date
SalesOrder Sales order number that identifies the stock. It is mainly used
together with special stock type E (sales order stock).
This is custom documentation. For more information, please visit the SAP Help Portal 44
11/8/24, 7:06 PM
Property Description
SalesOrderItem Item number in sales order that identifies the stock. It is mainly
used together with special stock type E (sales order stock).
LastChangeUser ID of the user who last changed this physical inventory item
CountedByUser ID of the user who last entered the count results for this physical
inventory item
The actual count date must be in the same fiscal year as the
planned count date. The date of the first entry of count results for a
physical inventory document determines the posting period in
which all further count results as well as the inventory differences
relating to this physical inventory document must be posted.
AdjustmentPostingMadeByUser ID of the user who made the adjustment posting for this item
PostingDate Posting date of the item. Date when the document was entered in
financial accounting or controlling. The posting date can differ from
both the count date and the document date.
PhysicalInventoryItemIsCounted Indicates that the count results have already been entered for the
item
PhysInvtryItemIsRecounted Indicates that the item has been included in another physical
inventory document for the purposes of a recount
Note
Before the count takes place, the field has the value zero (0).
Note
Set this indicator if the quantity of the material counted is 0. If
you do not enter this indicator in the event of a zero count, the
item will be treated as uncounted.
This is custom documentation. For more information, please visit the SAP Help Portal 45
11/8/24, 7:06 PM
Property Description
CycleCountType Type code for cycle counting. Indicates that the given material is
subject to the cycle counting method of inventory.
BookQtyAmountInCoCodeCrcy The value of the book quantity (excluding value-added tax) at the
time the count was entered
This is custom documentation. For more information, please visit the SAP Help Portal 46
11/8/24, 7:06 PM
Note
To display more information about the properties on the SAP Business Accelerator Hub, open one of the entity's operations and
select Model.
Supported Operations
Serial Numbers
Technical name: A_SerialNumberPhysInventoryDoc
Serial number entity that contains the serial number properties of a physical inventory document item.
Properties
Property Description
FiscalYear Fiscal year of the posting period. The fiscal year has to match with
the planned and actual count date as well as the posting date.
SerialNumberPhysicalInvtryType Serial number physical inventory type, for serial number in book
inventory or serial number in counted stock.
Note
To display more information about the properties on the SAP Business Accelerator Hub, choose Schema View.
This is custom documentation. For more information, please visit the SAP Help Portal 47
11/8/24, 7:06 PM
Supported Operations
The following operations are supported:
Retrieve GET
Physical GET <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader/?
Inventory
Documents
Create POST
Physical POST <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader
Inventory
Documents
Count PATCH
PATCH <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem(F
Physical
Inventory
Document
Items
Post POST
POST <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/PostDifferences?FiscalYea
Differences
at Header
Level
Post POST
POST <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/PostDifferencesOnItem?Fis
Differences
at Item
Level
Initiate POST
POST <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/InitiateRecount?PhysicalI
Recount at
Header
Level
Initiate POST
POST <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/InitiateRecountOnItem?Fis
Recount at
Item Level
Change Sets
You can combine several operations in a batch call. Within a batch call, you group all write operations by using change sets.
This is custom documentation. For more information, please visit the SAP Help Portal 48
11/8/24, 7:06 PM
However, the following restrictions apply:
A change set can include only one type of operation (http method POST or PATCH). If more than one POST operation is
included in a change set, all POST operations must call the same function import.
If a change set includes a POST operation to create a physical inventory document, no other operation can be added.
If a change set includes a POST operation to post differences at header level (function import PostDifferences) or to
initiate a recount at header level (function import InitiateRecount), no other operation can be added.
If a change set includes more than one PATCH operation to count physical inventory document items, all operations within
the change set must refer to items that are included in the same physical inventory document and have the same counting
date.
If a change set includes more than one POST operation to post differences at item level (function import
PostDifferencesOnItem), all operations within the change set must have the same posting date and refer to items
that are included in the same physical inventory document.
If a change set includes more than one POST operation to initiate a recount at item level (function import
InitiateRecountOnItem), all operations within the change set must have the same parameters and refer to items that
are included in the same physical inventory document.
ETags
The API uses entity tags (ETags) for optimistic concurrency control. That is, if a client requests a modification of a resource on the
back-end server, the ETags of the resource on the client server and on the back-end server are compared to determine whether
any changes were made to the resource on the back-end server. For this API, the If-Match header must be set for all change
operations.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a004b815-e3bd-3210-f787-8c0b3c7c6d4c?
QuickLink=index&overridelayout=true&60125247183608 .
With this operation, you can retrieve physical inventory documents as follows:
Use system query options to filter a collection of physical inventory documents or items
For more information about the parameters that you can include in the URL of the request, see Document Header and Document
Items.
Examples
GET <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader(PhysicalInvent
This is custom documentation. For more information, please visit the SAP Help Portal 49
11/8/24, 7:06 PM
Retrieve Single Item
GET <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem(PhysicalInventor
GET <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader(PhysicalInvent
GET <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem(FiscalYear='2016
GET <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader(FiscalYear='20
GET <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem?$filter=PostingD
Request
The OData call to create a new physical inventory document must include both header and item properties in the same request.
You can include the following properties in the body of the request:
Header
Property Necessity
DocumentDate Optional
InventorySpecialStockType Optional
InventoryTransactionType Optional
PhysInventoryPlannedCountDate Optional
PostingIsBlockedForPhysInvtry Optional
PhysInventoryReferenceNumber Optional
PhysicalInventoryGroupType Optional
PhysicalInventoryNumber Optional
PhysicalInventoryDocumentDesc Optional
PhysInvtryDocHasQtySnapshot Optional
PhysicalInventoryType Optional
This is custom documentation. For more information, please visit the SAP Help Portal 50
11/8/24, 7:06 PM
Property Necessity
Plant Mandatory
StorageLocation Mandatory
Item
Batch Optional -
PhysicalInventoryStockType Optional -
IsHandledInAltvUnitOfMsr Optional -
Material Mandatory -
For more information about the individual properties, see Document Header and Document Items.
Response
The operation returns a new header.
Restrictions
The number of inventory document items is restricted to 999. If you create a physical inventory document that contains more than
999 items, an error is returned.
Example
Request
{
"Plant": "0001",
"StorageLocation": "0001",
"DocumentDate": "2017-04-25T00:00:00",
"PhysInventoryPlannedCountDate": "2017-04-25T00:00:00",
"to_PhysicalInventoryDocumentItem": [
{
"Material": "Z_MM_IM4_09553520170427_3"
},
{
"Material": "Z_MM_IM4_09553520170427_4"
This is custom documentation. For more information, please visit the SAP Help Portal 51
11/8/24, 7:06 PM
}]
}
Response
Request
You can include the following parameters in the URL of the request:
This is custom documentation. For more information, please visit the SAP Help Portal 52
11/8/24, 7:06 PM
Item
You can include the following properties in the body of the request:
Item
Material Mandatory -
For more information about the individual properties and parameters, see Document Items.
Response
For successful counts, the system returns the http status code 204 No Content and the new ETag. The changed item entities
are not returned.
Request
--batch_seperator
Content-Type: multipart/mixed; boundary=changeset_seperator
--changeset_seperator
Content-Type: application/http
Content-Transfer-Encoding: binary
PATCH A_PhysInventoryDocItem(FiscalYear='2017',PhysicalInventoryDocument='100004413',PhysicalInvent
Content-Type: application/json
This is custom documentation. For more information, please visit the SAP Help Portal 53
11/8/24, 7:06 PM
If-Match: W/"datetimeoffset'2017-05-12T12%3A29%3A00.7968870Z'"
{
"QuantityInUnitOfEntry" : "45",
"UnitOfEntry" : "EA",
"Material" : "Z_MM_IM4_09553520170427_3"
}
--changeset_seperator
Content-Type: application/http
Content-Transfer-Encoding: binary
PATCH A_PhysInventoryDocItem(FiscalYear='2017',PhysicalInventoryDocument='100004413',PhysicalInvent
Content-Type: application/json
If-Match: W/"datetimeoffset'2017-05-12T12%3A29%3A00.7968870Z'"
{
"QuantityInUnitOfEntry" : "46",
"UnitOfEntry" : "EA",
"Material" : "Z_MM_IM4_09553520170427_4"
}
--changeset_seperator--
--batch_seperator--
Response
--89C8A5667FD9DC475E7E059E39202FB50
Content-Type: multipart/mixed; boundary=89C8A5667FD9DC475E7E059E39202FB51
Content-Length: 559
--89C8A5667FD9DC475E7E059E39202FB51
Content-Type: application/http
Content-Length: 131
content-transfer-encoding: binary
--89C8A5667FD9DC475E7E059E39202FB51
Content-Type: application/http
Content-Length: 131
content-transfer-encoding: binary
--89C8A5667FD9DC475E7E059E39202FB51--
--89C8A5667FD9DC475E7E059E39202FB50—
Request
--batch_seperator
Content-Type: multipart/mixed; boundary=changeset_seperator
--changeset_seperator
Content-Type: application/http
Content-Transfer-Encoding: binary
PATCH /sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem(FiscalYear='2021',Ph
Content-Type: application/json
If-Match: W/"datetimeoffset'2021-06-14T13%3A33%3A37.3144770Z'"
{
"QuantityInUnitOfEntry" : "2",
"UnitOfEntry" : "PC",
"Material" : "FG011_SN1"
}
--changeset_seperator
Content-Type: application/http
Content-Transfer-Encoding: binary
PATCH /sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_SerialNumberPhysInventoryDoc(FiscalYear=
Content-Type: application/json
If-Match: W/"datetimeoffset'2021-06-14T13%3A33%3A37.3144770Z'"
{
"SerialNumber" : "S3"
}
--changeset_seperator
Content-Type: application/http
Content-Transfer-Encoding: binary
PATCH /sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_SerialNumberPhysInventoryDoc(FiscalYear=
Content-Type: application/json
If-Match: W/"datetimeoffset'2021-06-14T13%3A33%3A37.3144770Z'"
{
"SerialNumber" : "S4"
}
--changeset_seperator--
--batch_seperator--
Response
--BF0220B744DCE3890D2C7456B83E8E5D0
Content-Type: multipart/mixed; boundary=BF0220B744DCE3890D2C7456B83E8E5D1
Content-Length: 697
--BF0220B744DCE3890D2C7456B83E8E5D1
Content-Type: application/http
Content-Length: 131
content-transfer-encoding: binary
--BF0220B744DCE3890D2C7456B83E8E5D1
Content-Type: application/http
Content-Length: 71
content-transfer-encoding: binary
This is custom documentation. For more information, please visit the SAP Help Portal 55
11/8/24, 7:06 PM
--BF0220B744DCE3890D2C7456B83E8E5D1
Content-Type: application/http
Content-Length: 71
content-transfer-encoding: binary
--BF0220B744DCE3890D2C7456B83E8E5D1--
--BF0220B744DCE3890D2C7456B83E8E5D0--
Request
You can include the following parameters in the URL of the request:
PhysicalInventoryDocument Mandatory -
FiscalYear Mandatory -
For more information about the individual parameters, see Document Header.
Response
Note
If posting the differences runs into errors, the items including errors are ignored, all other items are posted anyway. If, for
example, you set the threshold parameter to a certain value, items with a value above the threshold are ignored and a warning is
displayed. In the system response, you can check the posting status.
Example
Request
POST <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/PostDifferences?FiscalYear='2017'&Phys
If-Match: W/"datetimeoffset'2017-05-19T11%3A28%3A46.9413630Z'"
Response
This is custom documentation. For more information, please visit the SAP Help Portal 56
11/8/24, 7:06 PM
status_code 200 OK
content-type: application/atom+xml;type=entry; charset=utf-8
content-length: 2553
etag: W/"datetimeoffset'2017-05-26T12%3A42%3A51.8641190Z'"
dataserviceversion: 2.0
Request
You can include the following parameters in the URL of the request:
PhysicalInventoryDocument Mandatory -
FiscalYear Mandatory -
PhysicalInventoryDocumentItem Mandatory -
This is custom documentation. For more information, please visit the SAP Help Portal 57
11/8/24, 7:06 PM
Material Mandatory -
For more information about the individual parameters, see Document Items.
Response
The operation returns all changed items.
Note
When you post more than one item in a change set, all inventory differences are included in one material document. Each item
to be processed is specified explicitly within this document. In contrast to posting differences at header level, the complete
change set fails, if one of the specified items cannot be posted.
Example
Request
--batch_seperator
Content-Type: multipart/mixed; boundary=changeset_seperator
--changeset_seperator
Content-Type: application/http
Content-Transfer-Encoding: binary
POST PostDifferencesOnItem?FiscalYear='2017'&PhysicalInventoryDocument='100004413'&PhysicalInventor
Content-Type: application/json
If-Match: W/"datetimeoffset'2017-05-12T14%3A17%3A33.9908870Z'"
--changeset_seperator
Content-Type: application/http
Content-Transfer-Encoding: binary
POST PostDifferencesOnItem?FiscalYear='2017'&PhysicalInventoryDocument='100004413'&PhysicalInventor
Content-Type: application/json
If-Match: W/"datetimeoffset'2017-05-12T14%3A17%3A33.9908870Z'"
--changeset_seperator--
--batch_seperator--
Response
--1D1CFD08D93AE8206AD165EC48D989E01
Content-Type: application/http
Content-Length: 4052
content-transfer-encoding: binary
HTTP/1.1 200 OK
Content-Type: application/atom+xml;type=entry
Content-Length: 3669
dataserviceversion: 2.0
location: <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem(FiscalYear
etag: W/"datetimeoffset'2017-05-12T15%3A20%3A16.1199720Z'"
This is custom documentation. For more information, please visit the SAP Help Portal 59
11/8/24, 7:06 PM
</entry>
--1D1CFD08D93AE8206AD165EC48D989E01
Content-Type: application/http
Content-Length: 4052
content-transfer-encoding: binary
HTTP/1.1 200 OK
Content-Type: application/atom+xml;type=entry
Content-Length: 3669
dataserviceversion: 2.0
location: <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem(FiscalYear
etag: W/"datetimeoffset'2017-05-12T15%3A20%3A16.1199720Z'"
This is custom documentation. For more information, please visit the SAP Help Portal 60
11/8/24, 7:06 PM
--1D1CFD08D93AE8206AD165EC48D989E00--
Request
You can include the following parameters in the URL of the request:
PhysicalInventoryDocument Mandatory -
FiscalYear Mandatory -
The PostingThresholdValue parameter is used to restrict the number of items that are included in the recount. All items with
a counting difference below the threshold value are ignored.
For more information about the other parameters, see Document Header.
Response
The operation creates a recount document based on an already counted document and returns its header data. The recount
document includes all items of the original count document that are in status counted and, if a threshold is specified, have a
counting difference that is above the threshold value.
Note
If recounting an item runs into errors, the item is ignored. All other items are recounted anyway.
Example
This is custom documentation. For more information, please visit the SAP Help Portal 61
11/8/24, 7:06 PM
Request
POST host/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/InitiateRecount?PhysicalInventoryDocumen
If-Match: W/"datetimeoffset'2017-06-28T11%3A00%3A16.4675150Z'"
Response
Status: 200 OK
content-length: 829
content-type: application/atom+xml
etag: W/"datetimeoffset'2017-06-29T14%3A41%3A33.0295530Z'"
Request
You can include the following parameters in the URL of the request:
This is custom documentation. For more information, please visit the SAP Help Portal 62
11/8/24, 7:06 PM
PhysicalInventoryDocument Mandatory -
FiscalYear Mandatory -
PhysicalInventoryDocumentItem Mandatory -
For more information about the individual parameters, see Document Header and Document Items.
Response
The operation creates a recount document based on an already counted document and returns the item data for all items
specified in the request.
Note
If you use a change set to group the recount of several items, all items are included in a single recount document. Each item to
be processed is specified explicitly within this document. In contrast to recounting items at header level, the complete change
set fails, if one of the specified items cannot be posted.
Example
Request
--batch_seperator
Content-Type: multipart/mixed; boundary=changeset_seperator
--changeset_seperator
Content-Type: application/http
Content-Transfer-Encoding: binary
POST InitiateRecountOnItem?FiscalYear='2017'&PhysicalInventoryDocument='100003378'&PhysicalInventor
Content-Type: application/json
If-Match:W/"datetimeoffset'2017-03-31T12%3A00%3A00.0000000Z'"
--changeset_seperator
Content-Type: application/http
Content-Transfer-Encoding: binary
This is custom documentation. For more information, please visit the SAP Help Portal 63
11/8/24, 7:06 PM
POST InitiateRecountOnItem?FiscalYear='2017'&PhysicalInventoryDocument='100003378'&PhysicalInventor
Content-Type: application/json
If-Match:W/"datetimeoffset'2017-03-31T12%3A00%3A00.0000000Z'"
--changeset_seperator--
--batch_seperator--
Response
--6B9DA33A84C3CEEF63E27F3E284494DF0
Content-Type: multipart/mixed; boundary=6B9DA33A84C3CEEF63E27F3E284494DF1
Content-Length: 8119
--6B9DA33A84C3CEEF63E27F3E284494DF1
Content-Type: application/http
Content-Length: 3910
content-transfer-encoding: binary
HTTP/1.1 200 OK
Content-Type: application/atom+xml;type=entry
Content-Length: 3527
dataserviceversion: 2.0
location: host/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem(FiscalYear=
etag: W/"datetimeoffset'2017-06-29T14%3A52%3A41.4846950Z'"
HTTP/1.1 200 OK
Content-Type: application/atom+xml;type=entry
Content-Length: 3527
dataserviceversion: 2.0
location: host/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem(FiscalYear=
etag: W/"datetimeoffset'2017-06-29T14%3A52%3A41.4846950Z'"
--6B9DA33A84C3CEEF63E27F3E284494DF0--
This service enables you to create a reservation for a material with a quantity and assign that reserved material to a cost center,
sales order, or asset. A reservation can also be created for a transfer posting from one plant to another. For an existing reservation,
you can change the updatable fields of the items. The service also allows you to delete existing reservation documents. It can be
consumed by external systems and user interfaces.
This service is published on the SAP Business Accelerator Hub. For more information about APIs, see APIs on SAP Business
Accelerator Hub.
This is an OData version 4 service. This version aims to improve processing time and resource consumption of clients and servers.
This includes a lightweight JSON format that reduces the size of every response.
This is custom documentation. For more information, please visit the SAP Help Portal 64
11/8/24, 7:06 PM
Technical Details
A service group contains services belonging to the same business object model and so it shares similar environment conditions.
This means the configuration and administration of a service group apply to all services in a service group, that is, routing,
authorization, and so on, so you only have to do them once.
In the OData version 4 (V4) runtime implementation of the SAP Gateway Foundation, framework services originate from
repositories.
Service Structure
Service Header
Entities
Related Events
Reservation Document Events
Additional Information
The link to the API on the SAP Business Accelerator Hub: Reservation Document (A2X)
Note
For more details about Communication Management, see Communication Management.
Properties
This is custom documentation. For more information, please visit the SAP Help Portal 65
11/8/24, 7:06 PM
Note
To display more information about the properties on the SAP Business Accelerator Hub, choose Schema View.
Supported Operations
This is custom documentation. For more information, please visit the SAP Help Portal 66
11/8/24, 7:06 PM
The following operations are supported:
Properties
This is custom documentation. For more information, please visit the SAP Help Portal 67
11/8/24, 7:06 PM
Note
To display more information about the properties on the SAP Business Accelerator Hub, choose Schema View.
Supported Operations
The following operations are supported:
This is custom documentation. For more information, please visit the SAP Help Portal 68
11/8/24, 7:06 PM
Update Reservation Document
Retrieve GET
Reservation GET <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdocu
Document
Create POST
Reservation POST <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdoc
Document
Update PATCH
Reservation PATCH <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdo
Document
Delete DELETE
Reservation DELETE <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationd
Document
ETags
The API uses entity tags (ETags) for optimistic concurrency control. That is, if a client requests a modification of a resource on the
back-end server, the ETags of the resource on the client server and on the back-end server are compared to determine whether
any changes were made to the resource on the back-end server. For this API, the If-Match header must be set for all change
operations.
Note
ETag values need to be extracted and passed for update and delete operations. They need to be sent in headers as "If-Match."
Response
To retrieve a reservation document, you use the http method GET on any of the service nodes.
Examples
Retrieve Header
GET <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdocument/0001/Res
This is custom documentation. For more information, please visit the SAP Help Portal 69
11/8/24, 7:06 PM
Retrieve Items with Header
GET <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdocument/0001/Res
Request
You can include the following properties in the request's URL:
You can include the following properties in the URL of the request:
This is custom documentation. For more information, please visit the SAP Help Portal 70
11/8/24, 7:06 PM
EntryUnit Mandatory
Examples
Request
POST <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdocument/0001/re
HTTP/1.1
Content-Type: application/json
{
"GoodsMovementType": "201",
"ReservationDate": "{{ReservationDate}}",
"CostCenter": "10101040",
"_ReservationDocumentItem": [
{
"Plant": "1010",
"StorageLocation": "101A",
"Product": "TG11",
"MatlCompRequirementDate": "{{MatlCompRequirementDate}}",
"EntryUnit": "PC",
"ResvnItmRequiredQtyInEntryUnit": 1
}
]
}
Response
This is custom documentation. For more information, please visit the SAP Help Portal 71
11/8/24, 7:06 PM
status_code: 201
Status_reason: created
content-type: application/json;odata.metadata=minimal;charset=utf-8
server_protocol: HTTP/1.1
content-length: 654
etag: W/\"SADL-202208111148054488890C~20220811114805.4488890\
location: ReservationDocument('124108')
{
"@odata.context": "$metadata#ReservationDocument(_ReservationDocumentItem())/$entity",
"@odata.metadataEtag": "W/\"20220809212923\"",
"@odata.etag": "W/\"SADL-202208111148054488890C~20220811114805.4488890\"",
"Reservation": "124108",
"GoodsMovementType": "201",
"CostCenter": "10101040",
"AssetNumber": "",
"AssetSubNumber": "",
"IssuingOrReceivingPlant": "",
"IssuingOrReceivingStorageLoc": "",
"SalesOrder": "",
"SalesOrderItem": "0",
"SalesOrderScheduleLine": "0",
"ReservationDate": "2022-08-11",
"IsCheckedAgainstFactoryCal": false,
"WBSElement": "",
"ControllingArea": "A000",
"OrderID": "",
"UserID": "CC0000000022",
"CreationDateTime": "2022-08-11T11:48:05.448889Z",
"LastChangedByUser": "CC0000000022",
"LastChangeDateTime": "2022-08-11T11:48:05.448889Z",
"ResvnVerificationCompanyCode": "1010",
"SAP__Messages": [],
"_ReservationDocumentItem": [
{
"@odata.etag": "W/\"SADL-202208111148054488890C~20220811114805.4488890\"",
"Reservation": "124108",
"ReservationItem": "1",
"RecordType": "",
"Product": "TG11",
"RequirementType": "MR",
"MatlCompRequirementDate": "2022-08-11",
"Plant": "1010",
"GoodsMovementIsAllowed": false,
"StorageLocation": "101A",
"Batch": "",
"ValuationType": "",
"DebitCreditCode": "H",
"BaseUnit": "PC",
"GLAccount": "51600000",
"ResvnAccountIsEnteredManually": false,
"GoodsMovementType": "201",
"EntryUnit": "PC",
"Supplier": "",
"ResvnItmRequiredQtyInBaseUnit": 1,
"ReservationItemIsFinallyIssued": false,
"ReservationItmIsMarkedForDeltn": false,
"ResvnItmRequiredQtyInEntryUnit": 1,
"ResvnItmWithdrawnQtyInBaseUnit": 0,
"GoodsRecipientName": "",
"UnloadingPointName": "",
"ReservationItemText": "",
"ConfdQtyForATPInBaseUoM": 1
}
]
}
Example of creating reservations as a batch operation. Here is a sample request in a batch POST call.
Request
This is custom documentation. For more information, please visit the SAP Help Portal 72
11/8/24, 7:06 PM
POST <host>sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdocument/0001/$ba
HTTP/1.1
Content-Type: multipart/mixed;boundary=batch
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
{
"GoodsMovementType": "501",
"ReservationDate": "2022-06-10",
"_ReservationDocumentItem": [
{
"Product": "KTJ-RES",
"ResvnItmRequiredQtyInEntryUnit": 1,
"EntryUnit": "PC",
"Plant":"0001",
"StorageLocation":"0001"
}]
}
--batch--
Response
--246CA8E9EAE68ADDDBDED4AE720C604E0
Content-Type: application/http
Content-Length: 1877
content-transfer-encoding: binary
{"@odata.context":"$metadata#ReservationDocument(_ReservationDocumentItem())/$entity","@odata.metad
--246CA8E9EAE68ADDDBDED4AE720C604E0--
Create a Reservation for a Material with Split Valuation and No Batch Management
Example of creating a reservation for a material with split valuation but that is not batch managed. In this scenario, the valuation
type field must be manually enterered. (If the material is also batch managed, the valuation type is automatically taken from the
batch info and does not need to be maintained. See example below.) In this example, the ValuationType field was maintained
with "Land 1" in the request.
Request
POST <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdocument/0001/re
HTTP/1.1
Content-Type: application/json
{
"GoodsMovementType": "501",
"ReservationDate": "{{ReservationDate}}",
"_ReservationDocumentItem": [
{
"Plant": "1010",
"StorageLocation": "101A",
"Product": "RAW-VAL",
This is custom documentation. For more information, please visit the SAP Help Portal 73
11/8/24, 7:06 PM
"MatlCompRequirementDate": "{{MatlCompRequirementDate}}",
"EntryUnit": "PC",
"ResvnItmRequiredQtyInEntryUnit": 1,
"ValuationType": "LAND 1"
}
]
}
Response
{
"@odata.context": "$metadata#ReservationDocument(_ReservationDocumentItem())/$entity",
"@odata.metadataEtag": "W/\"20220809212923\"",
"@odata.etag": "W/\"SADL-202208111121039815370C~20220811112103.9815370\"",
"Reservation": "124036",
"GoodsMovementType": "501",
"CostCenter": "",
"AssetNumber": "",
"AssetSubNumber": "",
"IssuingOrReceivingPlant": "",
"IssuingOrReceivingStorageLoc": "",
"SalesOrder": "",
"SalesOrderItem": "0",
"SalesOrderScheduleLine": "0",
"ReservationDate": "2022-08-11",
"IsCheckedAgainstFactoryCal": false,
"WBSElement": "",
"ControllingArea": "A000",
"OrderID": "",
"UserID": "CC0000000022",
"CreationDateTime": "2022-08-11T11:21:03.981537Z",
"LastChangedByUser": "CC0000000022",
"LastChangeDateTime": "2022-08-11T11:21:03.981537Z",
"ResvnVerificationCompanyCode": "1010",
"SAP__Messages": [],
"_ReservationDocumentItem": [
{
"@odata.etag": "W/\"SADL-202208111121039815370C~20220811112103.9815370\"",
"Reservation": "124036",
"ReservationItem": "1",
"RecordType": "",
"Product": "RAW-VAL",
"RequirementType": "MR",
"MatlCompRequirementDate": "2022-08-11",
"Plant": "1010",
"GoodsMovementIsAllowed": false,
"StorageLocation": "101A",
"Batch": "",
"ValuationType": "LAND 1",
"DebitCreditCode": "S",
"BaseUnit": "PC",
"GLAccount": "54070000",
"ResvnAccountIsEnteredManually": false,
"GoodsMovementType": "501",
"EntryUnit": "PC",
"Supplier": "",
"ResvnItmRequiredQtyInBaseUnit": 1,
"ReservationItemIsFinallyIssued": false,
"ReservationItmIsMarkedForDeltn": false,
"ResvnItmRequiredQtyInEntryUnit": 1,
"ResvnItmWithdrawnQtyInBaseUnit": 0,
"GoodsRecipientName": "",
"UnloadingPointName": "",
"ReservationItemText": "",
"ConfdQtyForATPInBaseUoM": 0
}
]
}
Create a Reservation for a Material with Split Valuation and No Batch Management but Wrong Valuation Type
This is custom documentation. For more information, please visit the SAP Help Portal 74
11/8/24, 7:06 PM
Example of creating a reservation for a material with split valuation and no batch management, but where the valuation type
entered in the request does not exist.
Request
POST <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdocument/0001/re
HTTP/1.1
Content-Type: application/json
{
"GoodsMovementType": "501",
"ReservationDate": "{{ReservationDate}}",
"_ReservationDocumentItem": [
{
"Plant": "1010",
"StorageLocation": "101A",
"Product": "RAW-VAL",
"MatlCompRequirementDate": "{{MatlCompRequirementDate}}",
"EntryUnit": "PC",
"ResvnItmRequiredQtyInEntryUnit": 1,
"ValuationType": "LAND 2"
}
]
}
Response
{
"error": {
"code": "CM_IMRS/019",
"message": "Valuation record RAW-VAL 1010 LAND 2 does not exist",
"target": "_ReservationDocumentItem(Reservation='124107',ReservationItem='1',RecordType='')
"@SAP__common.longtextUrl": "../../../../default/iwbep/common/0001/T100Longtexts(MessageCla
"@SAP__common.ExceptionCategory": "Provider_Application_Error",
"details": [
{
"code": "M7/090",
"message": "Accounting data not yet maintained for material 1010 RAW-VAL",
"target": "_ReservationDocumentItem(Reservation='124107',ReservationItem='1',Record
"@SAP__common.longtextUrl": "../../../../default/iwbep/common/0001/T100Longtexts(Me
"@SAP__common.Severity": "error",
"@SAP__common.numericSeverity": 4
}
],
"innererror": {
"ErrorDetails": {
"@SAP__common.Application": {
"ComponentId": "MM-IM-VDM-RSV",
"ServiceRepository": "SRVD_A2X",
"ServiceId": "API_RESERVATION_DOCUMENT_2",
"ServiceVersion": "0001"
},
"@SAP__common.TransactionId": "39A4A1C852230470E0062F4D58D27B83",
"@SAP__common.Timestamp": "20220811112220.430532",
"@SAP__common.ErrorResolution": {
"Analysis": "Use ADT feed reader \"SAP Gateway Error Log\" or run transaction /
"Note": "See SAP Note 1797736 for error analysis (https://service.sap.com/sap/s
}
}
}
}
}
Create a Reservation for a Material with Split Valuation and Batch Management
Example of creating a reservation for a material with both split valuation and batch management. In the request, you must provide
the batch. In the response, the correct valuation type will be created.
This is custom documentation. For more information, please visit the SAP Help Portal 75
11/8/24, 7:06 PM
Note
The batch number is mandatory. If no batch number is provided, no valuation type will be assigned.
Request
POST <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdocument/0001/re
HTTP/1.1
Content-Type: application/json
{
"GoodsMovementType": "501",
"ReservationDate": "{{ReservationDate}}",
"_ReservationDocumentItem": [
{
"Plant": "1010",
"StorageLocation": "101A",
"Product": "RAW-BVAL",
"MatlCompRequirementDate": "{{MatlCompRequirementDate}}",
"EntryUnit": "PC",
"Batch":"0000000070",
"ResvnItmRequiredQtyInEntryUnit": 1
}
]
}
Response
{
"@odata.context": "$metadata#ReservationDocument(_ReservationDocumentItem())/$entity",
"@odata.metadataEtag": "W/\"20220809212923\"",
"@odata.etag": "W/\"SADL-202208111039579357460C~20220811103957.9357460\"",
"Reservation": "124030",
"GoodsMovementType": "501",
"CostCenter": "",
"AssetNumber": "",
"AssetSubNumber": "",
"IssuingOrReceivingPlant": "",
"IssuingOrReceivingStorageLoc": "",
"SalesOrder": "",
"SalesOrderItem": "0",
"SalesOrderScheduleLine": "0",
"ReservationDate": "2022-08-11",
"IsCheckedAgainstFactoryCal": false,
"WBSElement": "",
"ControllingArea": "A000",
"OrderID": "",
"UserID": "CC0000000022",
"CreationDateTime": "2022-08-11T10:39:57.935746Z",
"LastChangedByUser": "CC0000000022",
"LastChangeDateTime": "2022-08-11T10:39:57.935746Z",
"ResvnVerificationCompanyCode": "1010",
"SAP__Messages": [],
"_ReservationDocumentItem": [
{
"@odata.etag": "W/\"SADL-202208111039579357460C~20220811103957.9357460\"",
"Reservation": "124030",
"ReservationItem": "1",
"RecordType": "",
"Product": "RAW-BVAL",
"RequirementType": "MR",
"MatlCompRequirementDate": "2022-08-11",
"Plant": "1010",
"GoodsMovementIsAllowed": false,
"StorageLocation": "101A",
"Batch": "0000000070",
"ValuationType": "LAND 1",
"DebitCreditCode": "S",
"BaseUnit": "PC",
"GLAccount": "54070000",
This is custom documentation. For more information, please visit the SAP Help Portal 76
11/8/24, 7:06 PM
"ResvnAccountIsEnteredManually": false,
"GoodsMovementType": "501",
"EntryUnit": "PC",
"Supplier": "",
"ResvnItmRequiredQtyInBaseUnit": 1,
"ReservationItemIsFinallyIssued": false,
"ReservationItmIsMarkedForDeltn": false,
"ResvnItmRequiredQtyInEntryUnit": 1,
"ResvnItmWithdrawnQtyInBaseUnit": 0,
"GoodsRecipientName": "",
"UnloadingPointName": "",
"ReservationItemText": "",
"ConfdQtyForATPInBaseUoM": 0
}
]
ETags
ETag values need to be extracted and passed for update operations.
Request
PATCH <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdocument/0001/R
Response
Response code should be 200 (OK)
Response
Operation Response
Delete To cancel a reservation document, you use http method DELETE on A_ReservationDocumentHeader_2 entity.
Reservation
Request
Document
You need to pass the reservation document number in the request URL.
ETags
ETag values need to be extracted and passed for delete operations.
This is custom documentation. For more information, please visit the SAP Help Portal 77
11/8/24, 7:06 PM
Examples
Request
DELETE <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdocument/0001/
Response
Features
Key users can extend the OData Service in the Custom Fields app using the following business contexts:
RESERVATIONDOCUMENTHEADER
RESERVATIONDOCUMENTITEM
You can enable usage of your custom fields in the OData APIs section of the custom field maintenance and publish your custom
fields.
See Also
For more information, see the SAP Business Accelerator Hub (https://api.sap.com/ ).
Related Information
Custom Fields App and Custom Logic App
Reservation Document
Technical name: API_RESERVATION_DOCUMENT
This is custom documentation. For more information, please visit the SAP Help Portal 78
11/8/24, 7:06 PM
Update Reservation Document
This service is based on OData protocol and can be consumed by external systems and other interfaces.
This service is published on the SAP Business Accelerator Hub. For more information about APIs, see APIs on SAP Business
Accelerator Hub.
Service Structure
This service contains header and item entities. For read operations, filter information must be sent according to the OData
protocol. All filter information is utilized when retrieving reservation documents, including appropriate checks for restricted values
and authorization. Depending on the operation, reservation document header and item detail data is sent in the response. If any
issue arises when the reservation documents are retrieved, the system displays error message in response.
Service Header
The service message header contains information about the service, the involved sender and receiver as well as date and time.
Entities
The service nodes contain the business data of the service.
Service Response
The details that are included in the response vary according to the type of operation. For more information, see Operations for
Reservation Document API.
Restrictions
This following restrictions apply:
Only authorized roles can be used to retrieve, create and delete reservation documents via API calls.
BATCH operation is allowed only when using the Create and Update functions, and is not applicable to the other functions
such as Read and Delete.
The header node that contains the header information of the reservation document.
This is custom documentation. For more information, please visit the SAP Help Portal 79
11/8/24, 7:06 PM
Properties
Property Description
Note
To display more information about the properties on the SAP Business Accelerator Hub, open one of the entity's operations and
select Model.
Supported Operations
The following operations are supported:
The item entity that contains the reservation document item properties.
Properties
Property Description
Plant Plant that will receive or issue goods based on movement type
ResvnAccountIsEnteredManually If “true”, future goods movements will take the GLAccount from the
reservation.
This is custom documentation. For more information, please visit the SAP Help Portal 81
11/8/24, 7:06 PM
Property Description
ResvnItmRequiredQtyInEntryUnit Specifies the quantity to be moved in the unit of entry. The quantity
is automatically converted to the stock keeping unit (base unit of
measure).
Note
To display more information about the properties on the SAP Business Accelerator Hub, open one of the entity's operations and
select Model.
Supported Operations
The following operations are supported:
Retrieve GET
GET <host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentHeader
Reservation
Document
Create POST
POST <host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentHeade
Reservation
Document
Update POST
PUT A_ReservationDocumentItem(Reservation='66979',ReservationItem='2',RecordType='')…
Reservation
Document
This is custom documentation. For more information, please visit the SAP Help Portal 82
11/8/24, 7:06 PM
Delete DELETE
DELETE <host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentHead
Reservation
Document
Response
Operation Response
Retrieve Reservation Document To retrieve Reservation Document, you use the http method GET on
any of the service nodes.
Examples
Retrieve Header
GET <host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentHeader(‘1002809’)
GET <host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentHeader(‘1002809’)?$e
Response
You can include the following properties in the URL of the request:
This is custom documentation. For more information, please visit the SAP Help Portal 83
11/8/24, 7:06 PM
You can include the following properties in the URL of the request:
Examples
Request
Creating a reservation document with material TEST_SUH for movement type 201 with mandatory parameter CostCenter
POST <host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentHeader
HTTP/1.1
Content-Type: application/json
X-CSRF-Token: VbocqSpsPPIWJgMkykDkfA==
{
"GoodsMovementType": "201",
"CostCenter": "SAP-DUMMY",
"to_ReservationDocumentItem":
This is custom documentation. For more information, please visit the SAP Help Portal 84
11/8/24, 7:06 PM
[
{
"Product": "TEST_SUH",
"Plant": "0001",
"ResvnItmRequiredQtyInEntryUnit": "5"
}
]
}
Response
Status_code : 201
Status_reason: created
Sap-procesing-info: ODataBEP=,crp=,st=,MedCacheHub=SHM,codeployed=X,softstate=
server_protocol: HTTP/1.0
content-type: application/json; charset=utf-8
location: https://<host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentHeader
{
"d" : {
"__metadata" : {
"id" : "https://<host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentHe
"uri" : "https://<host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentH
"type" : "API_RESERVATION_DOCUMENT_SRV.A_ReservationDocumentHeaderType"
},
"Reservation" : "1002809",
"OrderID" : "",
"GoodsMovementType" : "201",
"CostCenter" : "SAP-DUMMY",
"GoodsRecipientName" : "",
"ReservationDate" : "\/Date(1519603200000)\/",
"IsCheckedAgainstFactoryCal" : false,
"Customer" : "",
"ControllingArea" : "0001",
"WBSElement" : "",
"SalesOrder" : "",
"SalesOrderItem" : "0",
"SalesOrderScheduleLine" : "0",
"AssetNumber" : "",
"AssetSubNumber" : "",
"NetworkNumberForAcctAssgmt" : "",
"IssuingOrReceivingPlant" : "",
"IssuingOrReceivingStorageLoc" : "",
"to_ReservationDocumentItem" : {
"__deferred" : {
"uri" : "https://<host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentH
}
}
}
}
Create Reservation Operation is also available as a batch operation. Following is a sample request for create reservation in a batch
POST call.
Request
Creating a reservation document with material TEST_SUH for movement type 201 with mandatory parameter CostCenter 1000.
Sample Code
--batch
Content-Type: multipart/mixed; boundary=changeset
--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary
This is custom documentation. For more information, please visit the SAP Help Portal 85
11/8/24, 7:06 PM
{
"GoodsMovementType": "201",
"CostCenter": "1000",
"ReservationDate":"2020-07-21T00:00:00" ,
"to_ReservationDocumentItem" :
[
{
"ReservationItem": "",
"Product": "TEST_SUH",
"Plant": "0001",
"ResvnItmRequiredQtyInEntryUnit": "5"
},
{
"ReservationItem": "",
"Product": "TEST_SUH",
"Plant": "0001",
"ResvnItmRequiredQtyInEntryUnit": "5"
}
]
}
--changeset--
--batch—
Response
Sample Code
--74AE722A5B233860CABAF76E4CB550030
Content-Type: multipart/mixed; boundary=74AE722A5B233860CABAF76E4CB550031
Content-Length: 2645
--74AE722A5B233860CABAF76E4CB550031
Content-Type: application/http
Content-Length: 2476
content-transfer-encoding: binary
This is custom documentation. For more information, please visit the SAP Help Portal 86
11/8/24, 7:06 PM
<d:ReservationDate>2020-07-21T00:00:00</d:ReservationDate>
<d:IsCheckedAgainstFactoryCal>false</d:IsCheckedAgainstFactoryCal>
<d:Customer/>
<d:WBSElement/>
<d:ControllingArea/>
<d:SalesOrder/>
<d:SalesOrderItem>0</d:SalesOrderItem>
<d:SalesOrderScheduleLine>0</d:SalesOrderScheduleLine>
<d:AssetNumber/>
<d:AssetSubNumber/>
<d:NetworkNumberForAcctAssgmt/>
<d:IssuingOrReceivingPlant/>
<d:IssuingOrReceivingStorageLoc/>
</m:properties>
</content>
</entry>
--74AE722A5B233860CABAF76E4CB550031--
--74AE722A5B233860CABAF76E4CB550030--
Response
Operation Response
Update You can update a reservation document using either of the following methods:
Reservation
Create a new item using http POST method on the A_ReservationDocumentItem entity
Document
Update an existing item using http PUT method on the A_ReservationDocumentItem entity
Storage location
Batch number
Item text
Goods recepient
Unloading point
Request
Reservation
Product
This is custom documentation. For more information, please visit the SAP Help Portal 87
11/8/24, 7:06 PM
Operation Response
Plant
Reservation
Reservation Item
Restrictions:
Batch update calls provide only POST (create new item) and PUT (change all fields that can be updated) operations
on reservation items.
During batch update, POST call does not return the created Reservation Item number.
PUT operation updates all fields that can be updated. Fill all the required parameter fields before making the PUT
call.
Examples
Request
Example
POST – Create New Item
Request
Creating a reservation document with Material QM005 for existing Reservation 66979 with mandatory parameter Plant is
1010.
Sample Code
--batch
Content-Type: multipart/mixed; boundary=changeset
--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary
{
"Reservation": "66979",
"Product": "QM005",
"Plant": "1010",
"MatlCompRequirementDate": "2020-03-10T00:00:00",
"ResvnItmRequiredQtyInEntryUnit": "20"
}
--changeset--
This is custom documentation. For more information, please visit the SAP Help Portal 88
11/8/24, 7:06 PM
--batch--
Response
Sample Code
--D5DCA8C0E46CE1C2A49FB4E1FC356F980
Content-Type: multipart/mixed; boundary=D5DCA8C0E46CE1C2A49FB4E1FC356F981
Content-Length: 3277
--D5DCA8C0E46CE1C2A49FB4E1FC356F981
Content-Type: application/http
Content-Length: 3108
content-transfer-encoding: binary
--D5DCA8C0E46CE1C2A49FB4E1FC356F980--
Request
Update the required quantity in Entry Unit in an existing Reservation 66979 with Reservation Item 2.
Sample Code
--batch
Content-Type: multipart/mixed; boundary=changeset
--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary
This is custom documentation. For more information, please visit the SAP Help Portal 90
11/8/24, 7:06 PM
PUT A_ReservationDocumentItem(Reservation='66979',ReservationItem='2',RecordType='') HTTP/1.1
Content-Type:application/json
{
"Reservation": "66979",
"ReservationItem": "2",
"ResvnItmRequiredQtyInEntryUnit": "40"
}
--changeset--
--batch—
Response
Response
Sample Code
--9E7FFB9B3A96D26F21C6B399C70F06EB0
Content-Type: multipart/mixed; boundary=9E7FFB9B3A96D26F21C6B399C70F06EB1
Content-Length: 896
--9E7FFB9B3A96D26F21C6B399C70F06EB1
Content-Type: application/http
Content-Length: 728
content-transfer-encoding: binary
--9E7FFB9B3A96D26F21C6B399C70F06EB1--
--9E7FFB9B3A96D26F21C6B399C70F06EB0--
This is custom documentation. For more information, please visit the SAP Help Portal 91
11/8/24, 7:06 PM
Response
Operation Response
Delete To cancel a reservation document, you use http method DELETE on A_ReservationDocumentHeader entity.
Reservation
Request
Document
You need to pass the reservation document number in the request URI.
Examples
Request
DELETE <host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentHeader(‘1002809’)
HTTP/1.1
X-CSRF-Token: VbocqSpsPPIWJgMkykDkfA==
Response
Status_code: 204
Status_reason: no content
sap-processing-info: ODataBEP=,crp=,st=,MedCacheHub=Table,codeployed=X,softstate=
server_protocol: HTTP/1.0
Batch Management
You can find the documentation for the OData Services available for Batch Management under APIs for Logistics Cross Topics.
SOAP Services
This service enables you to communicate with an external customer system that triggers a request to your SAP S/4HANA system
to create a material document.
This communication between the systems is based on the Simple Object Access Protocol (SOAP).
Note
This is custom documentation. For more information, please visit the SAP Help Portal 92
11/8/24, 7:06 PM
This service is the counterpart of the service Material Document - Receive Confirmation
(MaterialDocumentCreateConfirmation_Async_Out). The confirmation is sent back to the system from where the Material
Document Create service has been called.
This service is published on the SAP Business Accelerator Hub. For more information about APIs, see APIs on SAP Business
Accelerator Hub.
Service Request
Service Message Header
The service message header contains information about the service, the unique identifier of the message, the sender and receiver
involved as well as date and time.
Header entity that contains the material document properties. The following header fields are the most important once:
Note
This field is not supported for this
service. Input is not considered during
internal request processing.
Service Nodes
This is custom documentation. For more information, please visit the SAP Help Portal 93
11/8/24, 7:06 PM
Sample Payload
Sample Code
<MessageHeader>
<ID></ID>
<UUID>12345689-90AB-CDEF-0123-456789ABCDEF</UUID>
<ReferenceID></ReferenceID>
<ReferenceUUID>12345678-90AB-CDEF-0123-456789ABCDEF</ReferenceUUID>
<CreationDateTime>2019-08-2800:00:00.00000000</CreationDateTime>
<TestDataIndicator>false</TestDataIndicator>
<ReconciliationIndicator>false</ReconciliationIndicator>
<SenderBusinessSystemID>GREG_ER6</SenderBusinessSystemID>
<RecipientBusinessSystemID>CC2_715</RecipientBusinessSystemID>
</MessageHeader>
<MaterialDocument>
<GoodsMovementCode>1</GoodsMovementCode>
<PostingDate>2020-08-12</PostingDate>
<DocumentDate>2019-08-12</DocumentDate>
<BillOfLading></BillOfLading>
<ReferenceDocument>GregWever1</ReferenceDocument>
<Description>Greg Wever Aug 20</Description>
<ManualPrintIsTriggered>X</ManualPrintIsTriggered>
<VersionForPrintingSlip>2</VersionForPrintingSlip>
<MaterialDocumentItem>
<GoodsMovementType>101</GoodsMovementType>
<GoodsRecipientName></GoodsRecipientName>
<MaterialDocumentLine>1</MaterialDocumentLine>
<ParentMaterialDocumentLine>0</ParentMaterialDocumentLine>
<Material>TG0001</Material>
<GlobalTradeItemNumber></GlobalTradeItemNumber>
<Batch></Batch>
<SerialIDCreateAutomaticIndicator>false</SerialIDCreateAutomaticIndicator>
<Plant>1010</Plant>
<StorageLocation>101A</StorageLocation>
<ShelfLifeExpirationDate>2020-09-27</ShelfLifeExpirationDate>
<ManufactureDate>2020-07-27</ManufactureDate>
<BatchBySupplier></BatchBySupplier>
<StockType></StockType>
<InventorySpecialStockType></InventorySpecialStockType>
<QuantityInEntryUnit unitCode="PCE">1</QuantityInEntryUnit>
<QuantityInBaseUnit unitCode="PCE">1</QuantityInBaseUnit>
<InventoryValuationType></InventoryValuationType>
<Customer></Customer>
<Supplier>10300001</Supplier>
<PurchaseOrder>4500003825</PurchaseOrder>
<PurchaseOrderItem>10</PurchaseOrderItem>
<SalesOrder></SalesOrder>
<SalesOrderItem></SalesOrderItem>
<SalesOrderItemScheduleLine></SalesOrderItemScheduleLine>
<ManufacturingOrder></ManufacturingOrder>
<ManufacturingOrderItem></ManufacturingOrderItem>
<Delivery></Delivery>
<DeliveryItem></DeliveryItem>
<IsCompeletelyDelivered>false</IsCompeletelyDelivered>
<Reservation></Reservation>
<ReservationItem></ReservationItem>
<ReservationItemRecordType></ReservationItemRecordType>
<ReservationIsFinallyIssued>false</ReservationIsFinallyIssued>
<ProjectNetwork></ProjectNetwork>
<GLAccount></GLAccount>
<CostCenter></CostCenter>
<CostObject></CostObject>
<ProfitCenter></ProfitCenter>
<ProfitabilitySegment></ProfitabilitySegment>
<FunctionalArea></FunctionalArea>
This is custom documentation. For more information, please visit the SAP Help Portal 94
11/8/24, 7:06 PM
<WBSElement></WBSElement>
<UnloadingPointName></UnloadingPointName>
<MaterialDocumentItemText></MaterialDocumentItemText>
<GoodsMovementRefDocType></GoodsMovementRefDocType>
<GoodsMovementReasonCode></GoodsMovementReasonCode>
<IssgOrRcvgMaterial></IssgOrRcvgMaterial>
<IssgOrRcvgBatch></IssgOrRcvgBatch>
<IssuingOrReceivingPlant></IssuingOrReceivingPlant>
<IssuingOrReceivingStorageLoc></IssuingOrReceivingStorageLoc>
<IssuingOrReceivingValType></IssuingOrReceivingValType>
<MasterFixedAsset></MasterFixedAsset>
<FixedAsset></FixedAsset>
<FundsManagementCenter></FundsManagementCenter>
<FundsManagementFund></FundsManagementFund>
<CommitmentItem></CommitmentItem>
<Grant></Grant>
<SerialNumbers></SerialNumbers>
<SerialNumbers></SerialNumbers>
</MaterialDocumentItem>
</MaterialDocument>
Service Response
The service response is the material document receive confirmation service as described above.
Namespace: /MMIM
To assign recipients to users, use the Assign Recipients to Users app from the Communication Management – Message
Monitoring Configuration (SAP_CA_BC_COM_CONF_PC) business catalog. For more information, see:
Communication Management
To monitor messages, use the Message Dashboard app from the Communication Management - Message Monitoring and Error
Handling (SAP_CA_BC_COM_ERR_PC) business catalog.
To view and filter error logs related to SOAP and OData web services, use the Communication Management - Technical Message
Monitoring (SAP_CA_BC_COM_TECH_ERR_PC) business catalog.
Message Dashboard
Message Monitoring
The business role template Configuration Expert – Business Network Integration (SAP_BR_CONF_EXPERT_BUS_NET_INT)
contains both of these business catalogs.
Authentication Method
This is custom documentation. For more information, please visit the SAP Help Portal 95
11/8/24, 7:06 PM
The authentication is via User ID/password of the inbound user.
Related Events
Material Document Events
Additional Information
The link to the API on the SAP Business Accelerator Hub: Material Document - Create
MaterialDocumentCreateRequest_Async_In - MaterialDocument
Note
In the following table, field attributes are marked in blue.
X = Print is requested
This is custom documentation. For more information, please visit the SAP Help Portal 96
11/8/24, 7:06 PM
Note
At least one material item is
mandatory. The following fields are
related to material document items
and have to be maintained for every
material document item.
Note
The value of this field must be
greater than or equal to 1. This value
must be increased by 1 for every
further item.
Note
If you want to do a non-transfer
posting for a material item, you have
to fill
ParentMaterialDocumentLine
with the value 0 or delete this
element from the payload.
corresponding
ParentMaterialDocumentLine.
Note
This is custom documentation. For more information, please visit the SAP Help Portal 98
11/8/24, 7:06 PM
Note
If a ManufacturingOrder is
provided this field is mandatory.
Note
If a Delivery is provided this field
is mandatory
This is custom documentation. For more information, please visit the SAP Help Portal 99
11/8/24, 7:06 PM
Note
You need to provide leading zeros
here.
Note
You need to provide leading zeros
here.
Note
To display more information about the service node on the SAP Business Accelerator Hub, select the operation.
This is custom documentation. For more information, please visit the SAP Help Portal 100
11/8/24, 7:06 PM
Features
With the Custom Fields app, you can create and maintain custom fields that you can use to enhance applications and APIs.
Key users can extend this SOAP Service with custom fields using the business context: Material Document Item
(MATERIALDOCUMENTITEM)
You can enable usage of your custom fields in the SOAP APIs section of the custom field maintenance.
Custom Logic
With the Custom Logic app, you can create and maintain implementations of custom logic that can be used to enhance
applications and change application behavior. You can implement custom logic for the following Business Add-Ins (BAdIs):
Check Item Data in Material Document Material Document Item You can use this BAdI to check the data in
(BADI_MMIM_CHECK_MATDOC_ITEM) (MATERIALDOCUMENTITEM) the material document header and material
document item for different processes. You
can then create corresponding custom
messages.
Custom Logic
For more information about the individual BAdIs, check the BAdI-specific documentation: Custom Logic <your
implementation > BAdI Documentation View BAdI Documentation
Custom Fields
https://api.sap.com/
Related Information
Extensibility
This service enables you to communicate with an external customer system. Your SAP S/4HANA system triggers a notification to
an external system to inform the external system about the presence of a new material document.
This communication between the systems is based on the Simple Object Access Protocol (SOAP).
Note
This is custom documentation. For more information, please visit the SAP Help Portal 101
11/8/24, 7:06 PM
The determination of the external system is based on the supplier business partner of the material document.
This service is published on the SAP Business Accelerator Hub. For more information about APIs, see APIs on SAP Business
Accelerator Hub.
Service Request
The service message header contains information about the message header data, such as the involved sender and receiver, as
well as the date and time.
Service Nodes
Sample Payload
Sample Code
-n0:MaterialDocumentCreateNotification_Async
->xmlns:prx urn:sap.com:proxy:QJ5:/1SAI/TAS9669128CAD13E28FCC54:782
->xmlns:n0 http://sap.com/xi/APPL/Global2
--MessageHeader
---ID 248A07FC88301EDAB8F8D6DE77B2D0D2
---CreationDateTime 2020-08-21T15:55:20.0000000Z
---TestDataIndicator false
---ReconciliationIndicator false
---SenderBusinessSystemID 0LELAMA
--MaterialDocument
---MaterialDocument 5000005479
---MaterialDocumentYear 2020
---PostingDate 2020-08-11
---DocumentDate 2020-08-11
---MaterialDocumentItem
----MaterialDocumentItem 0001
----MaterialDocumentParentLine 0000
----ReversedMaterialDocumentItem 0000
----GoodsMovementType 101
----StockType 0
----Material TG0001
----Plant 1010
This is custom documentation. For more information, please visit the SAP Help Portal 102
11/8/24, 7:06 PM
----StorageLocation 101A
----QuantityInEntryUnit 1.0
---->unitCode PCE
---->SAPunitCode ST
----QuantityInBaseUnit 1.0
---->unitCode PCE
---->SAPunitCode ST
----Supplier 0010300001
----PurchaseOrder 4500006369
----PurchaseOrderItem 00010
----SalesOrderItem 000000
----SalesOrderItemScheduleLine 0000
----ManufacturingOrderItem 0000
----DeliveryItem 000000
----IsCompletelyDelivered false
----Reservation 0000000000
----ReservationItem 0000
----ProfitabilitySegment 0000000000
----WBSElement 00000000
----GoodsMovementRefDocType B
----GoodsMovementReasonCode 0000
----DebitCreditCode S
----MasterFixedAsset
----IsReversalMovementType false
Namespace: /MMIM
To assign recipients to users, use the Assign Recipients to Users app from the Communication Management – Message
Monitoring Configuration (SAP_CA_BC_COM_CONF_PC) business catalog. For more information, see:
Communication Management
To monitor messages, use the Message Dashboard app from the Communication Management - Message Monitoring and Error
Handling (SAP_CA_BC_COM_ERR_PC) business catalog.
To view and filter error logs related to SOAP and OData web services, use the Communication Management - Technical Message
Monitoring (SAP_CA_BC_COM_TECH_ERR_PC) business catalog.
Message Dashboard
Message Monitoring
The business role template Configuration Expert – Business Network Integration (SAP_BR_CONF_EXPERT_BUS_NET_INT)
contains both of these business catalogs.
Additional Information
The link to the API on the SAP Business Accelerator Hub: Material Document - Receive Notification
This is custom documentation. For more information, please visit the SAP Help Portal 103
11/8/24, 7:06 PM
MaterialDocumentCreateNotification_Async_Out -
MaterialDocument
Note
In the following table, field attributes are marked in blue.
This is custom documentation. For more information, please visit the SAP Help Portal 104
11/8/24, 7:06 PM
This is custom documentation. For more information, please visit the SAP Help Portal 105
11/8/24, 7:06 PM
This is custom documentation. For more information, please visit the SAP Help Portal 106
11/8/24, 7:06 PM
Note
This field is only
available for
movement types that
don't refer to a
specific stock type.
This service enables you to communicate with an external customer system to send back a corresponding confirmation message.
This is the reaction from your SAP S/4HANA system that was triggered by a request from an external customer system to create a
material document.
This communication between the systems is based on the Simple Object Access Protocol (SOAP).
Note
This service is the counterpart of the service Material Document - Create
(MaterialDocumentCreateRequest_Async_In). It is sent only when an external customer system has triggered a
request successfully to your SAP S/4HANA system to create a material document that you are able to send back a
corresponding confirmation message with this service.
This service is published on the SAP Business Accelerator Hub. For more information about APIs, see APIs on SAP Business
Accelerator Hub.
Service Request
Service Message Header
The service message header contains information about the service, the sender and receiver involved as well as date and time.
Service Nodes
This is custom documentation. For more information, please visit the SAP Help Portal 107
11/8/24, 7:06 PM
Sample Payload
Sample Code
--MessageHeader
---ID 98039B5BCA701EEABA8C8DB6C7950BA0
---ReferenceUUID 12345689-90AB-CDEF-0123-456789A2CDEF
---CreationDateTime 2020-08-27T12:54:23.0000000Z
---TestDataIndicator false
---ReconciliationIndicator false
---SenderBusinessSystemID 0MB85VI
---RecipientBusinessSystemID ER9_003
--MaterialDocument 4900012749
--MaterialDocumentYear 2020
To monitor messages transferred by this service, you need to assign the following recipient to the users:
Namespace: /MMIM
To assign recipients to users, use the Assign Recipients to Users app from the Communication Management – Message
Monitoring Configuration (SAP_CA_BC_COM_CONF_PC) business catalog. For more information, see:
Communication Management
To monitor messages, use the Message Dashboard app from the Communication Management - Message Monitoring and Error
Handling (SAP_CA_BC_COM_ERR_PC) business catalog.
To view and filter error logs related to SOAP and OData web services, use the Communication Management - Technical Message
Monitoring (SAP_CA_BC_COM_TECH_ERR_PC) business catalog.
Message Dashboard
Message Monitoring
The business role template Configuration Expert – Business Network Integration (SAP_BR_CONF_EXPERT_BUS_NET_INT)
contains both of these business catalogs.
Additional Information
The link to the API on the SAP Business Accelerator Hub: Material Document - Receive Confirmation
This is custom documentation. For more information, please visit the SAP Help Portal 108
11/8/24, 7:06 PM
MaterialDocumentCreateConfirmation_Async_Out -
MaterialDocument
Note
To display more information about the service node on the SAP Business Accelerator Hub, select the operation.
This service enables you to receive a SOAP Confirmation via SOAP service Material Document - Create. The SOAP Confirmation
contains the success message or, in case of an error, the error details of the material document creation. The service returns
information within the payload which contains three nodes: MaterialDocument, MaterialDocumentYear, and
MaterialDocumentFailed. The MaterialDocumentFailed node contains information only if an error occurred during the creation of
the material document.
This service is the counterpart of the service Material Document - Create (MaterialDocumentCreateRequest_Async_In).
This service is published on the SAP Business Accelerator Hub. For more information about APIs, see APIs on SAP Business
Accelerator Hub.
Service Request
Service Message Header
The service message header contains information about the message header data, such as the involved sender and receiver, as
well as the date and time. The following table explains the most important fields in the message header:
CreationDateTime Date and time (timestamp) at which the message was created
This is custom documentation. For more information, please visit the SAP Help Portal 109
11/8/24, 7:06 PM
Service Nodes
Information
Warning
Error
Sample Payload
Sample Code
<?xml version="1.0"?>
<n0:MaterialDocumentCreateConfirmation_Async xmlns:prx="urn:sap.com:proxy:QS9:/1SAI/TASF819A4277
<MessageHeader>
<ID>42010AEF4C8D1EEDB3DB033291077956</ID>
<ReferenceID>42010AEF4C961EEDB3DB0233AB5C6528</ReferenceID>
<CreationDateTime>2023-03-30T08:51:46.0000000Z</CreationDateTime>
<TestDataIndicator>false</TestDataIndicator>
<ReconciliationIndicator>false</ReconciliationIndicator>
<SenderBusinessSystemID>0LEU0U5</SenderBusinessSystemID>
<RecipientBusinessSystemID>TESTSYSTEM</RecipientBusinessSystemD>
</MessageHeader>
<MaterialDocument></MaterialDocument>
<MaterialDocumentYear>0000</MaterialDocumentYear>
<MaterialDocumentFailed>
<log>
<BusinessDocumentProcessingResultCode>5</BusinessDocumentProcessingResul
<MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
<Item>
<TypeID>017(M_)</TypeID>
<SeverityCode>3</SeverityCode>
<Note>Provided data does not fulfill length criteria in material
</Item>
<Item>
<TypeID>030(MMIM_SOA_MATDOC)</TypeID>
<SeverityCode>3</SeverityCode>
<Note>The customer number is too long (more than 10 digits)</Not
</Item>
<Item>
<TypeID>031(MMIM_SOA_MATDOC)</TypeID>
This is custom documentation. For more information, please visit the SAP Help Portal 111
11/8/24, 7:06 PM
<SeverityCode>3</SeverityCode>
<Note>The supplier number is too long (more than 10 digits)</Not
</Item>
</log>
</MaterialDocumentFailed>
</n0:MaterialDocumentCreateConfirmation_Async>
To use this service, you must configure the following communication scenario: SAP_COM_0108.
Namespace: http://sap.com/xi/APPL/Global2
To assign recipients to users, use the Assign Recipients to Users app from the Communication Management – Message
Monitoring Configuration (SAP_CA_BC_COM_CONF_PC) business catalog. For more information, see:
Communication Management
To monitor messages, use the Message Dashboard app from the Communication Management - Message Monitoring and Error
Handling (SAP_CA_BC_COM_ERR_PC) business catalog.
To view and filter error logs related to SOAP and OData web services, use the Communication Management - Technical Message
Monitoring (SAP_CA_BC_COM_TECH_ERR_PC) business catalog.
Message Dashboard
Message Monitoring
The business role template Configuration Expert – Business Network Integration (SAP_BR_CONF_EXPERT_BUS_NET_INT)
contains both of these business catalogs.
Additional Information
The link to the API on the SAP Business Accelerator Hub: Material Document - Receive Confirmation
Note
For more details about Communication Management, see Communication Management.
This service is published on the SAP Business Accelerator Hub. For more information about APIs, see APIs on SAP Business
Accelerator Hub.
The message can contain multiple records one for each stock type that fulfills the given filter criteria. The records contain the
stock identifying fields of Inventory Management, along with quantity and unit of measure.
Note
In order to be able to replicate stock quantity information, you need the authorization to display it. To get this authorization,
assign the Warehouse Clerk or Inventory Manager to your business user.
Note
Currently, only complete replication of the stock quantity information defined by the filter criteria is supported. No delta
management is available.
Service Request
Service Message Header
The service message header contains information about the message header data, for example, the involved sender and receiver,
as well as the date and time.
Service Nodes
This node contains the stock information (stock identifying fields with quantity and unit of measure) as read from the Inventory
Management table (MATDOC).
Note
In the following table, field attributes are marked in blue.
This is custom documentation. For more information, please visit the SAP Help Portal 113
11/8/24, 7:06 PM
Sample Payload
Sample Code
-<MATERIAL_STOCK>
-<MMIM_MATERIAL_STOCK_GFN>
<MATERIAL>MATROH0002BX</MATERIAL>
<PLANT>M101</PLANT>
<STORAGE_LOCATION>M101</STORAGE_LOCATION>
<BATCH>0000000004</BATCH>
<WBSELEMENT_INTERNAL_ID>00000000</WBSELEMENT_INTERNAL_ID>
<SDDOCUMENT_ITEM>000000</SDDOCUMENT_ITEM>
<INVENTORY_STOCK_TYPE>01</INVENTORY_STOCK_TYPE>
-<MATL_WRHS_STK_QTY_IN_MATL_BASE>
<UNIT_CODE>EA</UNIT_CODE>
<SAPUNIT_CODE>EA</SAPUNIT_CODE>
<CONTENT>10.0</CONTENT>
</MATL_WRHS_STK_QTY_IN_MATL_BASE>
</MMIM_MATERIAL_STOCK_GFN>
-<MMIM_MATERIAL_STOCK_GFN>
This is custom documentation. For more information, please visit the SAP Help Portal 114
11/8/24, 7:06 PM
<MATERIAL>MATROH0002BX</MATERIAL>
<PLANT>M101</PLANT>
<STORAGE_LOCATION>M101</STORAGE_LOCATION>
<BATCH>0000000005</BATCH>
<WBSELEMENT_INTERNAL_ID>00000000</WBSELEMENT_INTERNAL_ID>
<SDDOCUMENT_ITEM>000000</SDDOCUMENT_ITEM>
<INVENTORY_STOCK_TYPE>01</INVENTORY_STOCK_TYPE>
-<MATL_WRHS_STK_QTY_IN_MATL_BASE>
<UNIT_CODE>EA</UNIT_CODE>
<SAPUNIT_CODE>EA</SAPUNIT_CODE>
<CONTENT>10.0</CONTENT>
</MATL_WRHS_STK_QTY_IN_MATL_BASE>
</MMIM_MATERIAL_STOCK_GFN>
</MATERIAL_STOCK>
To be able to use this service, you have to configure communication scenario SAP_COM_0447.
For more information, see the setup guides attached to scope item BMC (Core Inventory Management) in the SAP Best Practices
Explorer under https://rapid.sap.com/bp SAP Best Practices for SAP S/4HANA Cloud Supply Chain Inventory .
To be able to monitor messages transferred by this service, you need to assign the following recipient to the users:
Namespace: /MMIM
To assign recipients to users, use the Assign Recipients to Users app from the Communication Management – Message
Monitoring Configuration (SAP_CA_BC_COM_CONF_PC) business catalog.
For message monitoring, use the Message Dashboard app from the Communication Management - Message Monitoring and
Error Handling (SAP_CA_BC_COM_ERR_PC) business catalog.
Both business catalogs are contained in the business role template Configuration Expert – Business Network Integration
(SAP_BR_CONF_EXPERT_BUS_NET_INT).
Additional Information
For more information about how to use the Data Replication Framework, see http://help.sap.com/s4hana_cloud <Choose your
SAP S/4HANA Cloud release> Product Assistance Manage Your SAP S/4HANA Cloud Data Management Data
Replication Framework .
For more information about the Communication Management, see http://help.sap.com/s4hana_cloud <Choose your SAP
S/4HANA Cloud release> Product Assistance Extend and Integrate Your SAP S/4HANA Cloud Integration
Communication Management Communication Arrangements .
The link to the API on the SAP Business Accelerator Hub: Material Stock - Replicate
This is custom documentation. For more information, please visit the SAP Help Portal 115
11/8/24, 7:06 PM
Created This event Example payload for the creation of a material document with 3 items:
MaterialDocument.Created.v1 is triggered
when a {
material "type":"sap.s4.beh.materialdocument.v1.MaterialDocument.Create
document "specversion":"1.0",
has been "source":"/default/sap.s4.beh/ER9CLNT001",
created. "id":"42010aef-4c96-1edd-a3a1-5ca13cc0b3d4",
"time":"2023-01-05T15:09:05Z",
"datacontenttype":"application/json",
"data":
{
"MaterialDocumentYear":"2023",
"MaterialDocument":"4900188107",
"AccountingDocumentType":"WA",
"InventoryTransactionType":"WA",
"TransactionCode":"MIGO_GI",
"_MaterialDocumentItemCreated":
[
{
"MaterialDocumentItem":"1",
"GoodsMovementType":"501",
"Plant":"0001",
"StorageLocation":"0001"
},
{
"MaterialDocumentItem":"2",
"GoodsMovementType":"501",
"Plant":"0001",
"StorageLocation":"0001"
},
{
"MaterialDocumentItem":"3",
"GoodsMovementType":"501",
"Plant":"0001",
"StorageLocation":"0001"
}
]
}
}
Canceled This event Example payload for the cancellation of item 2 and 3 of the material document 490
MaterialDocument.Canceled.v1 is triggered
when a {
material "type":"sap.s4.beh.materialdocument.v1.MaterialDocument.Cancel
document "specversion":"1.0",
or material "source":"/default/sap.s4.beh/ER9CLNT001",
document "id":"42010aef-4c96-1edd-a3a1-66a6e839d4e1",
item has "time":"2023-01-05T15:11:20Z",
been "datacontenttype":"application/json",
canceled. "data":
{
"MaterialDocumentYear":"2023",
"MaterialDocument":"4900188107",
"AccountingDocumentType":"WA",
"InventoryTransactionType":"WA",
This is custom documentation. For more information, please visit the SAP Help Portal 116
11/8/24, 7:06 PM
"TransactionCode":"MIGO_GI",
"_MaterialDocumentItemCanceled":
[
{
"MaterialDocumentItem":"2",
"GoodsMovementType":"501",
"Plant":"0001",
"StorageLocation":"0001"
},
{
"MaterialDocumentItem":"3",
"GoodsMovementType":"501",
"Plant":"0001",
"StorageLocation":"0001"
}
]
}
}
Business events are published on the SAP Business Accelerator Hub. For more information about business events, see Events on
SAP Business Accelerator Hub.
Related APIs
For more information about Material Document Events on the SAP Business Accelerator Hub, see Material Document Events .
PLANT: Plant
INVENTORYSPECIALSTOCKTYPE: Special
Stock Indicator
PLANT: Plant
INVENTORYSPECIALSTOCKTYPE: Special
Stock Indicator
This is custom documentation. For more information, please visit the SAP Help Portal 117
11/8/24, 7:06 PM
PLANT: Plant
INVENTORYSPECIALSTOCKTYPE: Special
Stock Indicator
PLANT: Plant
INVENTORYSPECIALSTOCKTYPE: Special
Stock Indicator
PLANT: Plant
INVENTORYSPECIALSTOCKTYPE: Special
Stock Indicator
Business events are published on the SAP Business Accelerator Hub. For more information about business events, see Events on
SAP Business Accelerator Hub.
Related APIs
Retrieve Physical Inventory Documents
Events Table
This is custom documentation. For more information, please visit the SAP Help Portal 118
11/8/24, 7:06 PM
Business events are published on the SAP Business Accelerator Hub. For more information about business events, see Events on
SAP Business Accelerator Hub.
Related APIs
Reservation Document (A2X)
This event is available on the SAP Business Accelerator Hub Reservation Document Events .
This is custom documentation. For more information, please visit the SAP Help Portal 119