0% found this document useful (0 votes)
620 views119 pages

Api Material Document

This document provides an overview of APIs for Inventory in SAP S/4HANA Cloud, specifically detailing OData and SOAP services available for managing material documents and physical inventory. It outlines the operations supported by these APIs, including creating, retrieving, and canceling material documents, as well as the structure and properties of the relevant entities. The document serves as a custom reference and is not a complete version of the official SAP product documentation.

Uploaded by

guilhermedm1986
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
620 views119 pages

Api Material Document

This document provides an overview of APIs for Inventory in SAP S/4HANA Cloud, specifically detailing OData and SOAP services available for managing material documents and physical inventory. It outlines the operations supported by these APIs, including creating, retrieving, and canceling material documents, as well as the structure and properties of the relevant entities. The document serves as a custom reference and is not a complete version of the official SAP product documentation.

Uploaded by

guilhermedm1986
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 119

11/8/24, 7:06 PM

APIs for Inventory


Generated on: 2024-11-08 19:06:17 GMT+0000

SAP S/4HANA Cloud | 2408 Latest

PUBLIC

Original content: https://help.sap.com/docs/SAP_S4HANA_CLOUD/3f57e7df4a114edabffe8b2d581a59ed?locale=en-


US&state=PRODUCTION&version=2408.500

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.

For more information, please visit the https://help.sap.com/docs/disclaimer.

This is custom documentation. For more information, please visit the SAP Help Portal 1
11/8/24, 7:06 PM

APIs for Inventory


You can use APIs to connect business processes across your system landscape.

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.

The following service interfaces are available:

OData Service for Material Document API

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.

OData Service for Material Stock API

You can use this service to retrieve material stock information.

OData Service for Physical Inventory Document API

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.

Material Documents - Read, Create

Use

Technical name: API_MATERIAL_DOCUMENT

The material document is evidence of one or more material movements.

This service enables the following operations for material documents:

Retrieve material documents

Create material documents

Cancel material documents at header level

Cancel material documents at item level

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

The entities contain the service's business data.

Entity Description Necessity Link to Details

A_MaterialDocumentHeader Header information for Mandatory Document Header


material document

A_MaterialDocumentItem Item information for material Mandatory Document Items


document

A_SerialNumberMaterialDocument Serial number information Optional Serial Numbers


for the material document

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

Technical name: A_MaterialDocumentHeader

Header entity that contains the material document header properties.

Properties

Property Description Necessity

MaterialDocumentYear Calendar year in which the material


document was posted.

This is custom documentation. For more information, please visit the SAP Help Portal 3
11/8/24, 7:06 PM

Property Description Necessity

MaterialDocument Alphanumeric unique number to identify


together with the
MaterialDocumentYear, the material
document that was used to post a goods
movement.

InventoryTransactionType Documents the transaction or event that


was used to create the material document

GoodsMovementCode Type of goods movement used to create


material documents

DocumentDate Date of the actual physical movement. This


date can deviate from the creation date and
from the posting date.

PostingDate Date on which the document was entered in


financial accounting or controlling. Fiscal
year and period are derived from this date.

CreationDate Date on which the material document was


entered.

CreationTime Time at which the material document was


entered.

CreatedByUser ID of the user who created the material


document.

MaterialDocumentHeaderText Header text of the material document.

ReferenceDocument Reference for the document number of


customer or supplier.

ManualPrintIsTriggered Indicates whether a print is triggered Optional


manually:

X = Print is requested

<blank> = Print is not requested

This is custom documentation. For more information, please visit the SAP Help Portal 4
11/8/24, 7:06 PM

Property Description Necessity

VersionForPrintingSlip Version for Printing Goods Receipt/Goods Optional


Issue Slip. Must only be set if
ManualPrintIsTriggered = X.

1 = Individual slip: In this case, one


GR/GI slip is printed out for each
item.

2 = Individual slip with inspection


text: In this case, one GR/GI slip is
printed out for each item. In
addition, a quality inspection text is
printed if there is one in the
material master record.

3 = Collective slip: In this case, a


collective slip including all the items
in a document is printed.

CtrlPostgForExtWhseMgmtSyst Control posting for external WMS. Optional

Since the item in this material document


concerns an external warehouse
management system, it is not included. In
its place, the system will generate a delivery
item:

1 = Create delivery and transmit to


WM

2 = Execute stock change in


S/4HANA

3 = Post goods movement


synchronously to Extended
Warehouse Management (EWM )

 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:

Read Material Documents

Create Material Documents

Cancel Material Documents at Header Level

Cancel Material Documents at Item Level

Document Items
This is custom documentation. For more information, please visit the SAP Help Portal 5
11/8/24, 7:06 PM

Use

Technical name: A_MaterialDocumentItem

Item entity that contains the material document item properties.

Properties

Property Description

MaterialDocumentYear Calendar year in which the material document was posted

MaterialDocument Alphanumeric unique number to identify, together with the


MaterialDocumentYear, the material document that was used
to post a goods movement

MaterialDocumentItem Item number that is assigned consecutively when the document is


created

Material Material number used as a stock separator

Plant Plant that will receive or issue goods depending on the movement
type

StorageLocation Stock separator to identify the location of the stock in case it is


relevant according to the special stock type

Batch Batch number as stock separator

GoodsMovementType Goods movement type, for example, goods receipt, goods issue, or
physical inventory difference

InventoryValuationType Identifies separately valuated stocks of a material

InventoryStockType Stock type for which a goods movement has been carried out.

Possible values are, for example:

Unrestricted-use stock (1)

Stock in quality inspection (2)

Blocked stock (7)

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.

Supplier Supplier’s account number that identifies the stock. It is mainly


used together with special stock type K for supplier consignment.

Customer Account number of customer that identifies the stock. It is mainly


used together with special stock type W for customer consignment.

SalesOrder Sales order number related to the goods movement

SalesOrderItem Sales order item number related to the goods movement

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

PurchaseOrder Purchase order number related to the goods movement.

PurchaseOrderItem Purchase order item number related to the goods movement

WBSElement Work breakdown structure (WBS) element related to the goods


movement containing account assignment. The WBS element is
mainly used with special stock type Q (project stock).

CostCenter Cost center used as accounting information

ManufacturingOrder Manufacturing order number related to the goods movement

ManufacturingOrderItem Manufacturing order item number related to the goods movement

GoodsMovementRefDocType Type of document that constitutes the basis for the movement,
such as purchase or production order

GoodsMovementReasonCode Reason code for goods movement, such as return delivery

CostObject Cost object ID used as accounting information

ProfitabilitySegment Number of the profitability segment used as accounting


information

ProfitCenter Profit center used as accounting information

MaterialBaseUnit Unit of measure in which stocks of the material are managed

QuantityInBaseUnit Quantity moved in base unit of measure

EntryUnit Unit of measure in which the goods movement is entered

QuantityInEntryUnit Quantity to be moved in unit of entry. The system automatically


converts the quantity into the stockkeeping unit.

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.

FiscalYearPeriod Period of the fiscal year

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.

IssgOrRcvgMaterial Material information for the issuing or receiving of a material:

The receiving material is the material number under which


the quantity to be transferred is now to be recorded.

The issuing material (in the case of a reversal) is the


material from whose stock a certain quantity is to be
deducted.

 Note

This is custom documentation. For more information, please visit the SAP Help Portal 7
11/8/24, 7:06 PM

Property Description

Providing this information is relevant in the case of transfer


postings only.

IssgOrRcvgBatch Batch information for the issuing or receiving of a batch:

The receiving batch is the number of the batch under which


the quantity to be transferred is now to be recorded.

The issuing batch (in the case of a reversal) is the number


of the batch from which a quantity is to be deducted.

 Note
Providing this information is relevant in the case of transfer
postings only.

IssuingOrReceivingPlant Plant information for the issuing or receiving of a plant.

The receiving plant is the plant that is to receive the goods.

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.

IssuingOrReceivingStorageLoc Storage location information for the issuing or receiving of a


storage location:

The receiving storage location is the storage location that is


to receive the goods.

The issuing storage location is the storage location that


issues the goods.

 Note
Providing this information is relevant in the case of transfer
postings only.

IssuingOrReceivingValType Valuation type information for the receiving or issuing valuation


type of transfer batch

The receiving valuation type is the valuation type of the


transfer batch that should be recorded for received
materials.

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.

CompanyCodeCurrency Company currency code

This is custom documentation. For more information, please visit the SAP Help Portal 8
11/8/24, 7:06 PM

Property Description

GdsMvtExtAmtInCoCodeCrcy Currency information for the externally entered posting amount in


local currency

SlsPrcAmtInclVATInCoCodeCrcy Currency information for the amount at sales prices including


value-added tax in company code currency

IsCompletelyDelivered Indicator specifies whether a material document item is considered


closed

MaterialDocumentItemText Explanatory text on item level of a material document

GoodsRecipientName Recipient for whom the material or the service is destined (goods
recipient or ship-to party)

UnloadingPointName Point at which the material is to be unloaded such as ramp 1

ShelfLifeExpirationDate Expiration date information for the shelf life expiration or best-
before date.

ManufactureDate Date of manufacture

Reservation Number of reservation requirements

ReservationItem Number of reservation or dependent requirements. This


alphanumeric key uniquely identifies the document.

ReservationIsFinallyIssued Indicator specifies whether a reservation item is completed.


Further goods movements in respect of this reservation item are
not anticipated, although they are still possible.

ReservationItemRecordType Discontinuation indicator for the material of a production order


reservation.

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.

SpecialStockIdfgWBSElement Work breakdown structure (WBS) element that identifies the


special stock. Element is mainly used with special stock type Q
project stock.

IsAutomaticallyCreated Indicator for the automatic creation of an item. The following values
are possible:

X specifies the issuing or receiving line of a transfer

S specifies the component of a structured article

U specifies the combination of X and S

MaterialDocumentLine Unique identification of a material document line. In contrast to the


item number, it is ordered by the creation sequence.

MaterialDocumentParentLine Material document line of the parent

HierarchyNodeLevel Hierarchy level of line in document. It reflects the nesting level of


automatically created lines where the field

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.

GoodsMovementIsCancelled Indicator specifies whether a specific material document (goods


movement) has been canceled.

ReversedMaterialDocumentYear Calendar year in which the material document was reversed

ReversedMaterialDocument Number of reversed material document

ReversedMaterialDocumentItem Item number of reversed material document

SerialNumbersAreCreatedAutomly Indicator for the automatic creation of serial numbers

Delivery Delivery number related to the goods movement

DeliveryItem Delivery item number related to the goods movement

InvtryMgmtReferenceDocument Reference document number

InvtryMgmtRefDocumentItem Reference document item number

ReferenceDocumentFiscalYear Reference document fiscal year

AccountAssignmentCategory Account assignment category

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.

Using the asset sub-number, you can:

Provide for separate management of later acquisitions to


assets.

Represent complex fixed assets with their component


parts.

In contrast to the main asset number, the asset sub-number must


be numerical.

ControllingArea Controlling area

FunctionalArea Functional area

IssuingOrReceivingStockType Issuing or receiving stock type

The receiving stock type is the stock type that should be


recorded for received materials.

The issuing stock type (in the case of a reversal) is the


stock type that should be recorded for issued materials.

 Note
Providing this information is relevant in the case of transfer
postings only.

IssgOrRcvgSpclStockInd Issuing or receiving special stock indicator

The receiving special stock indicator is the special stock


indicator that should be recorded for received materials.
This is custom documentation. For more information, please visit the SAP Help Portal 10
11/8/24, 7:06 PM

Property Description

The issuing special stock indicator (in the case of a


reversal) is the special stock indicator that should be
recorded for issued materials.

 Note
Providing this information is relevant in the case of transfer
postings only.

EWMWarehouse Extended Warehouse Management warehouse identifier

EWMStorageBin Extended Warehouse Management storage bin

MaterialDocumentPostingType Indicator for the return of a reservation in movement type 262 or


262 equivalent

InventoryUsabilityCode Stock type information for goods movements used during posting,
for example:

• Unrestricted-use stock ( )

• Stock in Quality inspection (2)

• Blocked stock (3)

GLAccount General ledger account

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:

Read Material Documents

Create Material Documents

Cancel Material Documents at Header Level

Cancel Material Documents at Item Level

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

Material Material number used as a stock separator.

MaterialDocument Alphanumeric unique number to identify - together with the


MaterialDocumentYear - the material document that was used to
post a goods movement.

MaterialDocumentItem Item number that is assigned consecutively when the document is


created.

MaterialDocumentYear Calendar year in which the material document was posted.

SerialNumber Identifier that distinguishes individual items of a material or


product.

ManufacturerSerialNumber Manufacturer Serial Number

SerialNumberIsRecursive Indicator for a serial number that is recursive.

 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:

Read Material Documents

Create Material Documents

Cancel Material Documents at Header Level

Cancel Material Documents at Item Level

Operations for Material Document API


Different operations are available for the Material Document API.

The Material Document API offers these operations:

Operation HTTP Sample URL


Method

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

Operation HTTP Sample URL


Method

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.

However, the following restrictions apply:

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.

Read Material Documents


To read material documents, you use the http method GET on the A_MaterialDocumentHeader or the
A_MaterialDocumentItem entity.

With this operation, you can retrieve material documents as follows:

Request material documents or items by using their keys

Use system query options to filter a collection of material documents or items

 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

Read Single Header

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

Read Single Item

GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentItem(MaterialDocument='490

Read Material Document Items with a Filter

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

Read all Items for Document Key

GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader(MaterialDocument='4

Read all Items and Serial Numbers for Document Key

GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader(MaterialDocument='4

Query Headers by Posting Date

GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_MaterialDocumentHeader?$filter=PostingDate

Query Serial Numbers by Material Document and Material Document Year

GET <host>/sap/opu/odata/sap/API_MATERIAL_DOCUMENT_SRV/A_SerialNumberMaterialDocument?$filter= Mate

Create Material Documents


To create material documents, you use the HTTP method POST on the A_MaterialDocumentHeader entity.

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

Property Necessity Comment

GoodsMovementCode Mandatory The following values are supported for the


GoodsMovementCode property:

01 - Goods Receipt for Purchase


Order

This is custom documentation. For more information, please visit the SAP Help Portal 14
11/8/24, 7:06 PM

Property Necessity Comment

02 - Goods Receipt for Production


Order

03 - Goods Issue

04 - Transfer Posting

05 - Other Goods Receipt

06 - Reversal of Goods Movements

07 - Subsequent Adjustment with


Regard to a Subcontract Order

PostingDate Mandatory -

DocumentDate Optional -

MaterialDocumentHeaderText Optional -

ReferenceDocument Optional Reference for the document number of


customer or supplier.

ManualPrintIsTriggered Optional The following values are supported for the


ManualPrintIsTriggered property,
which specifies whether a print is triggered:

X = Print is requested.

(blank) = Print is not requested.

VersionForPrintingSlip Optional Version for Printing Goods Receipt/Goods


Issue Slip

The following values are supported for the


VersionForPrintingSlip property:

1 = Individual slip: In this case, one


GR/GI slip is printed out for each
item.

2 = Individual slip with inspection


text: In this case, one GR/GI slip is
printed out for each item.

In addition, a quality inspection text


is printed if there is one in the
material master record.

3 = Collective slip: In this case, a


collective slip, including all the
items in a document is printed.

(blank) = The initial value is


accepted if the indicator, which
specifies whether a print is
triggered, is also initial.

CtrlPostgForExtWhseMgmtSyst Optional Control posting for external WM

This is custom documentation. For more information, please visit the SAP Help Portal 15
11/8/24, 7:06 PM

Property Necessity Comment

The following values are supported for the


CtrlPostgForExtWhseMgmtSyst
property:

1 = Create delivery and transmit


WM.

 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.

2 = Execute stock change in


S/4HANA.

3 = Post goods movement


synchronously to Extended
Warehouse Management (EWM )

(blank) = The blank value is the


default if the field is not used.

Item

Property Necessity Comment

Plant Mandatory -

StorageLocation Optional -

Material Optional -

Batch Optional Mandatory, if material is managed in


batches and batches are not determined
automatically

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

Property Necessity Comment

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 -

ReservationItemRecordType Optional In the case of a discontinued material in a


reservation from a production order, the
value you provide here indicates whether
the discontinued material or the follow-up
material should be consumed.

This is custom documentation. For more information, please visit the SAP Help Portal 17
11/8/24, 7:06 PM

Property Necessity Comment

“ ” = The discontinued material


should be consumed.

“1” = The follow-up material should


be consumed

ReservationIsFinallyIssued Optional -

SpecialStockIdfgSalesOrder Optional Number in sales order that identifies the


special stock. Number is mainly used
together with special stock type E (sales
order stock).

SpecialStockIdfgSalesOrderItem Optional Item number in sales order that identifies


the special stock. Number is mainly used
together with special stock type E (sales
order stock).

MaterialDocumentLine Optional Unique identification of a material


document line. In contrast to the item
number, it is ordered by the creation
sequence.

MaterialDocumentParentLine Optional Material document line of the parent.

SerialNumbersAreCreatedAutomly Optional Indicator for the automatic creation of


serial numbers.

Delivery Optional Delivery number related to the goods


movement

DeliveryItem Optional Delivery item number related to the goods


movement

InvtryMgmtReferenceDocument Optional Reference Document Number

InvtryMgmtRefDocumentItem Optional Reference Document Item Number

ReferenceDocumentFiscalYear Optional -

EWMWarehouse Optional Mandatory if the value of the property


CtrlPostgForExtWhseMgmtSyst is 3

EWMStorageBin Optional Mandatory if the value of the property


CtrlPostgForExtWhseMgmtSyst is 3

MaterialDocumentPostingType Optional Must enter 1 for the return of a reservation


in movement type 262 or 262 equivalent.

InventoryUsabilityCode Optional This field is only available for movement


types that don't refer to a specific stock
type.

GLAccount Optional -

StockSegment Optional Stock Segment

IssgOrRcvgStockSegment Optional Receiving or Issuing Stock Segment

This is custom documentation. For more information, please visit the SAP Help Portal 18
11/8/24, 7:06 PM

Property Necessity Comment

MasterFixedAsset Optional Mandatory for goods movement types:

241 Goods Issue to Fixed Asset

242 Reversal Goods Issue to Fixed


Asset)

FixedAsset Optional Mandatory depending on the


MasterFixedAsset configuration.

Serial Number

Property Necessity Comment

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

Create a Goods Receipt for a Purchase Order

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"
}
]
}

Create a Goods Receipt for a Purchase Order with Custom Fields

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"
}
]
}

Create a Goods Receipt for a Purchase Order with Deliveries

 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
}
]
}

Create a Goods Receipt for a Production Order

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"
}
]
}

Create a Goods Receipt with Serial Numbers

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.

<?xml version="1.0" encoding="utf-8"?>


<entry xml:base="https://Your_Server/sap/opu/odata/SAP/API_MATERIAL_DOCUMENT_SRV/" xmlns="htt
<category term="API_MATERIAL_DOCUMENT_SRV.A_MaterialDocumentHeaderType" scheme="http://schem
<link href="A_MaterialDocumentHeader" rel="self" title="A_MaterialDocumentHeaderType"/>
<link href="A_MaterialDocumentHeader/to_MaterialDocumentItem" rel="http://schemas.microsoft.
<m:inline>
<feed xml:base="https://Your_Server/sap/opu/odata/SAP/API_MATERIAL_DOCUMENT_SRV/">
<link href="Item" rel="self" title="A_MaterialDocumentItem"/>
<entry>
<category term="API_MATERIAL_DOCUMENT_SRV.A_MaterialDocumentItemType" scheme="http://sch
<link href="Item 1" rel="self" title="A_MaterialDocumentItemType"/>
<link href="Item 1)/to_MaterialDocumentHeader" rel="http://schemas.microsoft.com/ado/200
<link href="Item_1/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_1/to_SerialNumbers" rel="self" title="A_SerialNumberMaterialDocument
<entry>
<category term="API_MATERIAL_DOCUMENT_SRV.A_SerialNumberMaterialDocumentType" scheme
<link href="Serial Number 1" rel="self" title="A_SerialNumberMaterialDocumentType"/>
<content type="application/xml">
<m:properties>
<d:SerialNumber>SERIALNUMBER_1</d:SerialNumber>
</m:properties>
</content>
</entry>
<entry>
<category term="API_MATERIAL_DOCUMENT_SRV.A_SerialNumberMaterialDocumentType" scheme
<link href="Serial Number 2" rel="self" title="A_SerialNumberMaterialDocumentType"/>
<content type="application/xml">
<m:properties>
<d:SerialNumber>SERIALNUMBER_2</d:SerialNumber>
</m:properties>
</content>
</entry>
</feed>
</m:inline>
</link>

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"
}
]
}
]
}

Create Stock Transfer from Blocked Stock to Inspection Stock

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"
}]
}

Create Goods Issue for Scrapping

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
}
]
}

Create a Material Document and Extended Warehouse Management Document Synchronously

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.

You can include the following properties in the request's URL:

Property Necessity Comment

CtrlPostgForExtWhseMgmtSyst Mandatory Must = "3"

EWMWarehouse Mandatory Extended Warehouse Management


warehouse identifier

EWMStorageBin Mandatory Extended Warehouse Management storage


bin identifier

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"
}
]
}

Inventory Stock Corrections via Third Party Warehouse Management

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.

Cancel Material Documents at Header Level


When you cancel a material document at header level, all items of the material document are canceled. To cancel a material
document at header level, you use the http method POST to call the Cancel function import.

Request
You can include the following properties in the request's URL:

Parameter Necessity Comment

MaterialDocumentYear Mandatory -

MaterialDocument Mandatory -

PostingDate Optional If not provided, the current system date is


used as a default value

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
}
}
}
}

Cancel Material Documents at Item Level


When you cancel material documents at item level, only the specified items are canceled. To cancel a material document at item
level, you use the http method POST to call the CancelItem function import.

Request
You can include the following properties in the request's URL:

Parameter Necessity Comment

MaterialDocumentYear Mandatory -

MaterialDocument Mandatory -

MaterialDocumentItem Mandatory -

PostingDate Optional If not provided, the current system date is


used as a default value

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

Retrieve All Material Documents since a Specific Date and Time

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

Extensibility: Material Documents - Read, Create


You can extend the OData Service API_MATERIAL_DOCUMENT according to your business needs.

Features
Key users can extend the OData Service in the Custom Fields app using the following business contexts:

Material Document Item (MATERIALDOCUMENTITEM)

You can enable usage of your custom fields in the OData APIs section of the custom field maintenance and publish your custom
fields.

You can add fields to the following entities:

Entity Business Context

Material Document Items (OData API) Material Document Item (MATERIALDOCUMENTITEM)

 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):

BAdI Description Business Context Business Use

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.

For more information, see:

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

Material Stock - Read


Technical name: API_MATERIAL_STOCK

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

Stock in Quality Inspection

Returns

Stock Transfer (Storage Location)

Stock Transfer (Plant)

Stock in Transit

Blocked Stock

Restricted-Use Stock

Tied Empties

Valuated Goods Receipt Blocked Stock

The API service can read material stocks only. The CUD operations are not supported by this API service.

Entities

The entities contain the service's business data.

Entity Descriptions Necessity Link to Details

Material Master Information about the material Mandatory API_MATERIAL_STOCK -


(A_MaterialStock) and the base unit of measure A_MaterialStock
for this material for which stock
has been created.

Material Stock Within this entity the stock Mandatory API_MATERIAL_STOCK -


(A_MatlStkInAcctMod) quantity information is provided A_MatlStkInAcctMod
in an account model. That
means that the stock quantity
in the base unit of measure is
returned for a set of stock
identifying key fields

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

Entity Descriptions Necessity Link to Details

material stock information from


material serial numbers.

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:

Change, post or delete a material stock

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

Property Description Necessity

Material Material number for which stock is Mandatory


managed.

MaterialBaseUnit Base unit of measure in which the stocks of Optional


a material are managed.

 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:

Operations for Material Stock API

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

Property Description Necessity

Batch Subset of a material in stock, managed Optional


separately from other subsets of the same
material.

Customer Business partner with whom a business Optional


relationship exists and who has
consignment stock.

InventorySpecialStockType Special type of a material stock type. Optional

InventoryStockType Type of a material stock. Optional

Material Material number for which stock is Mandatory


managed.

MaterialBaseUnit Base unit of measure in which the stocks of Optional


a material are managed.

MatlWrhsStkQtyInMatlBaseUnit Material Stock quantity in base unit of Optional


measure.

Plant Place where materials are produced, or Optional


goods and services are provided.

SDDocument Sale order document for which stock of a Optional


material is managed.

SDDocumentItem Sale order document item for which stock Optional


of a material is managed.

StorageLocation Organizational unit allowing differentiation Optional


between the various stocks of a material in
a plant.

Supplier Business partner with whom a business Optional


relationship exists and from whom
consignment stock is managed.

WBSElementInternalID Internal ID of a WBS element. Optional

 Note
WBSElementExternalID has more
descriptive values than
WBSElementInternalID. Therefore,
we recommend that you switch to
WBSElementExternalID.

WBSElementExternalID Formatted External ID of a WBS Optional


Element

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:

Operations for Material Stock API

Serial Numbers with Material Stock


Technical name: A_MaterialSerialNumber

Properties

Property Description

Material Material number used as a stock separator.

Plant Plant that will receive or issue goods depending on the movement
type.

StorageLocation Stock separator to identify the location of the stock in case it is


relevant according to the special stock type.

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.

Batch Batch number as stock separator

InventoryStockType Stock type for which a goods movement has been carried out.

Possible values are, for example:

Unrestricted-use stock (1)

Stock in quality inspection (2)

Blocked stock (7)

Equipment Unique alphanumeric key of an equipment.

Serial Number Identifier that distinguishes individual items of a material or


product.

 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:

Operations for Material Stock API

Operations for Material Stock API


The Material Stock API offers this operation:

Operation HTTP Sample URL


Method

Retrieve all GET


GET <host>/sap/opu/odata/sap/API_MATERIAL_STOCK_SRV/A_MaterialStock
material
stock data

Retrieve GET
GET <host>/sap/opu/odata/sap/API_MATERIAL_STOCK/A_MaterialStock(‘<MaterialID>’)/to_MatS
stock
quantity
for a
material

Retrieve all GET


GET <host>/sap/opu/odata/SAP/API_MATERIAL_STOCK_SRV/A_MatlStkInAcctMod?$filter=Material
serial
numbers
from the
material
stock
accounting
data of 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:

Example: Get top 2 list of material ID for which stock is managed

The following examples are available for the Retrieve stock quantity for a material operation:

Example: Get stock of a certain material ID

Example: Get stock list for materials

Example: Get stock for a certain material and stock type on level of storage location

Example: Get top 2 list of material ID for which stock is managed

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
}
}
}
]
}
}

Example: Get stock of a certain material ID

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
}
}
}
]
}
}

Example: Get stock list for materials

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"
}
]
}
}

Physical Inventory Documents - Read, Create


Technical name: API_PHYSICAL_INVENTORY_DOC

The physical inventory document is the central element of physical inventory management.

This service enables the following operations for physical inventory documents:

Retrieve physical inventory documents

Create physical inventory documents

Count physical inventory document items and change physical inventory counts

Post differences at header level

Post differences at item level

Initiate a recount of physical inventory document items at header level

Initiate a recount of physical inventory document items at item level

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

The entities contain the business data of the service.

Entity Description Necessity Link to Details

Document Header Header information for Mandatory Document Header


(A_PhysInventoryDocHeader) physical inventory
document

This is custom documentation. For more information, please visit the SAP Help Portal 40
11/8/24, 7:06 PM

Entity Description Necessity Link to Details

Document Item Item information for Mandatory Document Items


(A_PhysInventoryDocItem) physical inventory
document

Serial Numbers Serial numbers for physical Optional Serial Numbers


(A_SerialNumberPhysInventoryDoc) inventory document items

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

With this service, it is not possible to do the following:

Delete a physical inventory document or item

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

PhysicalInventoryDocument Unique alphanumeric key of the physical inventory document


together with the fiscal year

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

Plant Identifies the location of the stock as stock separator

StorageLocation Identifies the location of the stock as stock separator in case it is


relevant according to the special stock type

InventorySpecialStockType Specifies in case of special stock, the type of special stock.


Examples are W for customer consignment, or Q for project stock.
This property is empty for regular stock.

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.

PostingDate Posting date of the last posted item

LastChangeDateTime Time of the last change to the physical inventory document

FiscalPeriod Period of the difference posting

CreatedByUser ID of the user who created the physical inventory

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.

The indicator remains in the physical document header even if the


stock is unblocked through the posting of inventory differences.
Then the indicator only indicates that a posting block was set for
the documents.

PhysicalInventoryCountStatus Count status for a physical inventory. The status values are:

blank for no counted items

A for partly counted items

X for fully counted items

PhysInvtryAdjustmentPostingSts Status of adjustment posting. The values are:

blank for no adjusted items

A for partly adjusted items

X for fully adjusted items

PhysInvtryDeletionStatus Status of deletion. The values are:

blank for no deleted items

This is custom documentation. For more information, please visit the SAP Help Portal 42
11/8/24, 7:06 PM

Property Description

A for partly deleted items

X for fully deleted items

PhysInvtryDocHasQtySnapshot Freeze of the book inventory.

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.

PhysicalInventoryGroupType Type of grouping criteria.

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)

PhysicalInventoryGroup Grouping criteria of physical inventory document item

The storage bin or material group depending on the grouping type

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.

If you process several physical inventory documents in a physical


inventory transaction together, you can use the physical inventory
number as an additional selection criterion to access the various
processing lists.

PhysicalInventoryDocumentDesc Description of physical inventory document.

PhysicalInventoryType Type of the physical inventory.

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

Create Physical Inventory Documents

Count Physical Inventory Document Items

Post Differences at Header Level

Post Differences at Item Level

Initiate Recount at Header Level

Initiate Recount at Item Level

Document Items
Technical name: A_PhysInventoryDocItem

Item entity that contains the physical inventory document item properties.

Properties

Property Description

PhysicalInventoryDocument Unique alphanumeric key of the physical inventory document item


together with the fiscal year and item number

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

PhysicalInventoryDocumentItem Item number of the physical inventory document that is assigned


consecutively when the document is created

Plant Identifies the location of the stock as stock separator

StorageLocation Identifies the location of the stock as stock separator in case it is


relevant according to the special stock type

Material Material number as stock separator

Batch Batch number as stock separator

InventorySpecialStockType Specifies in case of special stock, the type of special stock.


Examples are W for customer consignment, or Q for project stock.
This property is empty for regular stock.

InventoryStockType Stock type for which a physical inventory is to be carried out.


Possible values are

Unrestricted use (1)

Quality inspection (2)

Blocked stock (4)

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).

Supplier Supplier’s account number that identifies the stock. It is mainly


used together with special stock type K for supplier consignment.

Customer Account number of customer that identifies the stock. It is mainly


used together with special stock type W for customer consignment.

LastChangeUser ID of the user who last changed this physical inventory item

LastChangeDate Date of the last change to the physical inventory item

LastChangeDateTime Time of the last change to the physical inventory document

CountedByUser ID of the user who last entered the count results for this physical
inventory item

PhysicalInventoryLastCountDate Date of last count.

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

PhysInvtryDifferenceIsPosted Indicates that the difference has been posted

PhysInvtryItemIsRecounted Indicates that the item has been included in another physical
inventory document for the purposes of a recount

PhysInvtryItemIsDeleted Indicates that the item is deleted

IsHandledInAltvUnitOfMsr Indicates that an alternative unit of measure is used: The system


proposes the unit of entry as a default value for the entry of
physical inventory count results.

BookQtyBfrCountInMatlBaseUnit Book quantity immediately prior to count

 Note
Before the count takes place, the field has the value zero (0).

PhysicalInventoryItemIsZero Indicator for zero count.

 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

Quantity Quantity counted in base unit of measure

MaterialBaseUnit Unit of measure in which stocks of the material are managed

QuantityInUnitOfEntry Quantity counted in unit of entry and automatically converted to


stock keeping unit

UnitOfEntry Specifies the unit of measure in which the inventory count is


entered

MaterialDocument Number of material document that updates inventory once the


differences have been posted

MaterialDocumentYear Year of the material document

MaterialDocumentItem Item number of the material document

PhysInvtryRecountDocument Number of physical inventory recount document if recount was


initiated.

DifferenceAmountInCoCodeCrcy Value of the difference quantity in company currency: The


difference quantity is valuated at the following price:

Valuation price from the material master record if the


material is not subject to split valuation and is not part of
consignment stock.

Valuation price from the valuation record if the material is


subject to split valuation.

Valuation price from the consignment record if the material


is part of consignment stock.

Currency Company currency code

CycleCountType Type code for cycle counting. Indicates that the given material is
subject to the cycle counting method of inventory.

WBSElement Work breakdown structure element that identifies the stock. It is


mainly used with special stock type Q project stock.

EnteredSlsAmtInCoCodeCrcy Externally entered value based on sales price. If sales price


valuation is active, you can enter the sales value of the material
here. The sales value is the price including taxes.

SlsPriceAmountInCoCodeCrcy Book value based on sales prices at time of count

IsValueOnlyMaterial Indicates that the current material is a value-only material

PhysInvtryCtAmtInCoCodeCrcy Value of physical inventory count

BookQtyAmountInCoCodeCrcy The value of the book quantity (excluding value-added tax) at the
time the count was entered

ReasonForPhysInvtryDifference Reason code for inventory difference

PhysInventoryReferenceNumber Reference number for physical inventory header to group several


documents such as physical inventory documents created by mass
creation

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

The following operations are supported:

Retrieve Physical Inventory Documents

Create Physical Inventory Documents

Count Physical Inventory Document Items

Post Differences at Header Level

Post Differences at Item Level

Initiate Recount at Header Level

Initiate Recount at Item Level

Serial Numbers
Technical name: A_SerialNumberPhysInventoryDoc

Serial number entity that contains the serial number properties of a physical inventory document item.

Properties

Property Description

Equipment Unique alphanumeric key of an equipment.

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.

PhysicalInventoryDocument Unique alphanumeric key of the physical inventory document item


together with the fiscal year and item number.

PhysicalInventoryDocumentItem Item number of the physical inventory document that is assigned


consecutively when the document is created.

SerialNumberPhysicalInvtryType Serial number physical inventory type, for serial number in book
inventory or serial number in counted stock.

Material Material number as stock separator.

SerialNumber Identifier that distinguishes individual items of a material or


product.

 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 Physical Inventory Documents

Count Physical Inventory Document Items

Operations for Physical Inventory Document API


Different operations are available for the Physical Inventory Document API.

The Physical Inventory Document API offers these operations:

Operation HTTP Sample URL


Method

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.

Both header and items have ETags assigned.

For more information about ETags, see

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a004b815-e3bd-3210-f787-8c0b3c7c6d4c?
QuickLink=index&overridelayout=true&60125247183608 .

Retrieve Physical Inventory Documents


To retrieve physical inventory documents, you use the http method GET to update the A_PhysInventoryDocHeader or the
A_PhysInventoryDocItem entity.

With this operation, you can retrieve physical inventory documents as follows:

Request physical inventory documents or items by using their keys

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

Retrieve Single Header

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

Retrieve all Items for Document Key

GET <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader(PhysicalInvent

Retrieve all Serial Numbers for a Single Item

GET <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem(FiscalYear='2016

Retrieve all Items with Serial Numbers for Document Key

GET <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader(FiscalYear='20

Query Headers by Posting Date

GET <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem?$filter=PostingD

Create Physical Inventory Documents


To create physical inventory documents, you use the http method POST to update the A_PhysInventoryDocHeader entity.

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

Property Necessity Comment

Batch Optional -

Customer Optional Mandatory if


InventorySpecialStockType = W

PhysicalInventoryStockType Optional -

IsHandledInAltvUnitOfMsr Optional -

Material Mandatory -

SalesOrder Optional Mandatory if


InventorySpecialStockType = E

SalesOrderItem Optional Mandatory if


InventorySpecialStockType = E

Supplier Optional Mandatory if


InventorySpecialStockType = K

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

POST <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader HTTP/1.1


Content-Type: application/json

{
"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

Status: 201 Created


content-type: application/atom+xml;type=entry; charset=utf-8
content-length: 2445
location: <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader(FiscalYe
etag: W/"datetimeoffset'2017-05-12T12%3A29%3A00.7968870Z'"
dataserviceversion: 2.0

<?xml version="1.0" encoding="utf-8"?>


<entry m:etag="W/&quot;datetimeoffset'2017-05-12T12%3A29%3A00.7968870Z'&quot;"
xml:base="<host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/"
xmlns="http://www.w3.org/2005/Atom"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<id> <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader(FiscalYear=
<title type="text">A_PhysInventoryDocHeader(FiscalYear='2017',PhysicalInventoryDocument='10000441
<updated>2017-05-12T12:29:00Z</updated>
<category term="API_PHYSICAL_INVENTORY_DOC_SRV.A_PhysInventoryDocHeaderType" scheme="http://schem
<link href="A_PhysInventoryDocHeader(FiscalYear='2017',PhysicalInventoryDocument='100004413')" re
<link href="A_PhysInventoryDocHeader(FiscalYear='2017',PhysicalInventoryDocument='100004413')/to_
<m:inline/>
</link>
<content type="application/xml">
<m:properties>
<d:FiscalYear>2017</d:FiscalYear>
<d:PostingDate m:null="true"/>
<d:FiscalPeriod>0</d:FiscalPeriod>
<d:CreatedByUser><XYZ123></d:CreatedByUser>
<d:PostingIsBlockedForPhysInvtry>false</d:PostingIsBlockedForPhysInvtry>
<d:PhysicalInventoryCountStatus/>
<d:PhysInvtryAdjustmentPostingSts/>
<d:PhysInvtryDeletionStatus/>
<d:PhysInvtryDocHasQtySnapshot>false</d:PhysInvtryDocHasQtySnapshot>
<d:PhysicalInventoryGroupType/>
<d:PhysicalInventoryGroup/>
<d:PhysicalInventoryDocument>100004413</d:PhysicalInventoryDocument>
<d:PhysicalInventoryNumber/>
<d:PhysInventoryReferenceNumber/>
<d:PhysicalInventoryDocumentDesc/>
<d:PhysicalInventoryType/>
<d:LastChangeDateTime>2017-05-12T12:29:00.7968870Z</d:LastChangeDateTime>
<d:InventoryTransactionType>IB</d:InventoryTransactionType>
<d:Plant>0001</d:Plant>
<d:StorageLocation>0001</d:StorageLocation>
<d:InventorySpecialStockType/>
<d:DocumentDate>2017-04-25T00:00:00</d:DocumentDate>
<d:PhysInventoryPlannedCountDate>2017-04-25T00:00:00</d:PhysInventoryPlannedCountDate>
<d:PhysicalInventoryLastCountDate m:null="true"/>
</m:properties>
</content>
</entry>

Count Physical Inventory Document Items


During inventory count, the inventory stock count results are stored in the system. To store count results in the system or to
change a physical inventory count, you use the http method PATCH to update the A_PhysInventoryDocItem entity. For
serialized materials, you can also update the A_SerialNumberPhysInventoryDoc entity.

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

Parameter Necessity Comment

FiscalYear Mandatory Provide as key in URL

PhysicalInventoryDocument Mandatory Provide as key in URL

PhysicalInventoryDocumentItem Mandatory Provide as key in URL

You can include the following properties in the body of the request:

Item

Property Necessity Comment

Batch Optional Mandatory if stock is managed in batches

Material Mandatory -

PhysicalInventoryItemIsZero Optional Mandatory if QuantityInUnitOfEntry


is 0

PhysicalInventoryLastCountDate Optional Must be the same for all items included in a


change set

QuantityInUnitOfEntry Optional Mandatory if not 0

UnitOfEntry Optional Mandatory if not 0

For more information about the individual properties and parameters, see Document Items.

Serial Numbers (optional)

Property Necessity Comment

SerialNumber Mandatory Mandatory if stock is managed in batches.

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.

Example (without Serial Numbers)

Request

POST <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/$batch HTTP/1.1


Content-Type multipart/mixed; boundary=batch_seperator
X-CSRF-Token kGKAO9_KrvjNGGjN3-R2Bw==

--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

status_code: 202 Accepted


content-type: multipart/mixed; boundary=89C8A5667FD9DC475E7E059E39202FB50
content-length: 741
dataserviceversion: 2.0

--89C8A5667FD9DC475E7E059E39202FB50
Content-Type: multipart/mixed; boundary=89C8A5667FD9DC475E7E059E39202FB51
Content-Length: 559

--89C8A5667FD9DC475E7E059E39202FB51
Content-Type: application/http
Content-Length: 131
content-transfer-encoding: binary

HTTP/1.1 204 No Content


Content-Length: 0
dataserviceversion: 2.0
etag: W/"datetimeoffset'2017-05-12T14%3A17%3A33.9908870Z'"

--89C8A5667FD9DC475E7E059E39202FB51
Content-Type: application/http
Content-Length: 131
content-transfer-encoding: binary

HTTP/1.1 204 No Content


Content-Length: 0
dataserviceversion: 2.0
etag: W/"datetimeoffset'2017-05-12T14%3A17%3A33.9908870Z'"

--89C8A5667FD9DC475E7E059E39202FB51--

--89C8A5667FD9DC475E7E059E39202FB50—

Example (with Serial Numbers)

Request

POST <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/$batch HTTP/1.1


Content-Type multipart/mixed; boundary=batch_seperator
X-CSRF-Token kGKAO9_KrvjNGGjN3-R2Bw==
This is custom documentation. For more information, please visit the SAP Help Portal 54
11/8/24, 7:06 PM

--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

HTTP/1.1 204 No Content


Content-Length: 0
dataserviceversion: 2.0
etag: W/"datetimeoffset'2021-06-14T13%3A45%3A15.1012670Z'"

--BF0220B744DCE3890D2C7456B83E8E5D1
Content-Type: application/http
Content-Length: 71
content-transfer-encoding: binary

HTTP/1.1 204 No Content


Content-Length: 0
dataserviceversion: 2.0

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

HTTP/1.1 204 No Content


Content-Length: 0
dataserviceversion: 2.0

--BF0220B744DCE3890D2C7456B83E8E5D1--

--BF0220B744DCE3890D2C7456B83E8E5D0--

Post Differences at Header Level


When you post differences at header level, the differences for a whole inventory document are added. To post differences at header
level, you use the http method POST to call the PostDifferences function import.

Request
You can include the following parameters in the URL of the request:

Parameter Necessity Comment

PhysicalInventoryDocument Mandatory -

FiscalYear Mandatory -

PostingDate Optional If not provided , the current date is used as


default value

Threshold Optional If 0 or not provided, no threshold is set

For more information about the individual parameters, see Document Header.

Response

The operation returns a changed header.

 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

<?xml version="1.0" encoding="utf-8"?>


<entry m:etag="W/&quot;datetimeoffset'2017-05-26T12%3A42%3A51.8641190Z'&quot;" xml:base="<host>/sap
<id><host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader(FiscalYear=
<title type="text">A_PhysInventoryDocHeader(FiscalYear='2017',PhysicalInventoryDocument='10000527
<updated>2017-05-26T12:42:52Z</updated>
<category term="API_PHYSICAL_INVENTORY_DOC_SRV.A_PhysInventoryDocHeaderType" scheme="http://schem
<link href="A_PhysInventoryDocHeader(FiscalYear='2017',PhysicalInventoryDocument='100005272')" re
<link href="A_PhysInventoryDocHeader(FiscalYear='2017',PhysicalInventoryDocument='100005272')/to_
<content type="application/xml">
<m:properties>
<d:FiscalYear>2017</d:FiscalYear>
<d:PostingDate>2017-05-28T00:00:00</d:PostingDate>
<d:FiscalPeriod>5</d:FiscalPeriod>
<d:CreatedByUser><XYZ123></d:CreatedByUser>
<d:PostingIsBlockedForPhysInvtry>false</d:PostingIsBlockedForPhysInvtry>
<d:PhysicalInventoryCountStatus>X</d:PhysicalInventoryCountStatus>
<d:PhysInvtryAdjustmentPostingSts>X</d:PhysInvtryAdjustmentPostingSts>
<d:PhysInvtryDeletionStatus/>
<d:PhysInvtryDocHasQtySnapshot>false</d:PhysInvtryDocHasQtySnapshot>
<d:PhysicalInventoryGroupType/>
<d:PhysicalInventoryGroup/>
<d:PhysicalInventoryDocument>100005272</d:PhysicalInventoryDocument>
<d:PhysicalInventoryNumber/>
<d:PhysInventoryReferenceNumber/>
<d:PhysicalInventoryDocumentDesc/>
<d:PhysicalInventoryType/>
<d:LastChangeDateTime>2017-05-26T12:42:51.8641190Z</d:LastChangeDateTime>
<d:InventoryTransactionType>IB</d:InventoryTransactionType>
<d:Plant>0001</d:Plant>
<d:StorageLocation>0001</d:StorageLocation>
<d:InventorySpecialStockType/>
<d:DocumentDate>2017-05-19T00:00:00</d:DocumentDate>
<d:PhysInventoryPlannedCountDate>2017-05-19T00:00:00</d:PhysInventoryPlannedCountDate>
<d:PhysicalInventoryLastCountDate>2017-05-19T00:00:00</d:PhysicalInventoryLastCountDate>
</m:properties>
</content>
</entry>

Post Differences at Item Level


When you post differences at item level, the counting differences are posted at material/batch level. To post differences at item
level, you use the http method POST to call the PostDifferencesOnItem function import.

Request
You can include the following parameters in the URL of the request:

Parameter Necessity Comment

PhysicalInventoryDocument Mandatory -

FiscalYear Mandatory -

PhysicalInventoryDocumentItem Mandatory -

PostingDate Optional If provided, all items within the same


change set must have the same posting
date.

This is custom documentation. For more information, please visit the SAP Help Portal 57
11/8/24, 7:06 PM

Parameter Necessity Comment

If not provided, the current date is used as


default value.

Material Mandatory -

Batch Optional Mandatory if material is managed in


batches

ReasonForPhysInvtryDifferences Optional Can be empty

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

POST <host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/$batch HTTP/1.1


Content-Type: multipart/mixed; boundary=batch_seperator
X-CSRF-Token: XDrIxU4CD5Xn4hya9DgFCQ==

--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

status_code: 202 Accepted


content-type: multipart/mixed; boundary=1D1CFD08D93AE8206AD165EC48D989E00
content-length: 8585
dataserviceversion: 2.0
This is custom documentation. For more information, please visit the SAP Help Portal 58
11/8/24, 7:06 PM
--1D1CFD08D93AE8206AD165EC48D989E00
Content-Type: multipart/mixed; boundary=1D1CFD08D93AE8206AD165EC48D989E01
Content-Length: 8403

--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'"

<?xml version="1.0" encoding="utf-8"?>


<entry m:etag="W/&quot;datetimeoffset'2017-05-12T15%3A20%3A16.1199720Z'&quot;" xml:base="<host>/sap
<id><host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem(FiscalYear='20
<title type="text">A_PhysInventoryDocItem(FiscalYear='2017',PhysicalInventoryDocument='100004413
<updated>2017-05-12T15:22:00Z</updated>
<category term="API_PHYSICAL_INVENTORY_DOC_SRV.A_PhysInventoryDocItemType" scheme="http://schemas
<link href="A_PhysInventoryDocItem(FiscalYear='2017',PhysicalInventoryDocument='100004413',Physic
<link href="A_PhysInventoryDocItem(FiscalYear='2017',PhysicalInventoryDocument='100004413',Physic
<content type="application/xml">
<m:properties>
<d:FiscalYear>2017</d:FiscalYear>
<d:SalesOrder/>
<d:SalesOrderItem>0</d:SalesOrderItem>
<d:Supplier/>
<d:Customer/>
<d:WBSElement/>
<d:LastChangeUser/>
<d:LastChangeDate m:null="true"/>
<d:CountedByUser><XYZ123></d:CountedByUser>
<d:PhysicalInventoryLastCountDate>2017-05-12T00:00:00</d:PhysicalInventoryLastCountDate>
<d:AdjustmentPostingMadeByUser><XYZ123></d:AdjustmentPostingMadeByUser>
<d:PhysicalInventoryDocument>100004413</d:PhysicalInventoryDocument>
<d:PostingDate>2017-05-10T00:00:00</d:PostingDate>
<d:PhysicalInventoryItemIsCounted>true</d:PhysicalInventoryItemIsCounted>
<d:PhysInvtryDifferenceIsPosted>true</d:PhysInvtryDifferenceIsPosted>
<d:PhysInvtryItemIsRecounted>false</d:PhysInvtryItemIsRecounted>
<d:PhysInvtryItemIsDeleted>false</d:PhysInvtryItemIsDeleted>
<d:IsHandledInAltvUnitOfMsr>true</d:IsHandledInAltvUnitOfMsr>
<d:CycleCountType/>
<d:IsValueOnlyMaterial>false</d:IsValueOnlyMaterial>
<d:PhysInventoryReferenceNumber/>
<d:MaterialDocument/>
<d:PhysicalInventoryDocumentItem>1</d:PhysicalInventoryDocumentItem>
<d:MaterialDocumentYear>0000</d:MaterialDocumentYear>
<d:MaterialDocumentItem>0</d:MaterialDocumentItem>
<d:PhysInvtryRecountDocument/>
<d:PhysicalInventoryItemIsZero>false</d:PhysicalInventoryItemIsZero>
<d:ReasonForPhysInvtryDifference>0</d:ReasonForPhysInvtryDifference>
<d:MaterialBaseUnit>EA</d:MaterialBaseUnit>
<d:BookQtyBfrCountInMatlBaseUnit>100</d:BookQtyBfrCountInMatlBaseUnit>
<d:Quantity>45</d:Quantity>
<d:UnitOfEntry>EA</d:UnitOfEntry>
<d:QuantityInUnitOfEntry>45</d:QuantityInUnitOfEntry>
<d:Plant>0001</d:Plant>
<d:Currency>EUR</d:Currency>
<d:DifferenceAmountInCoCodeCrcy>550.00</d:DifferenceAmountInCoCodeCrcy>
<d:EnteredSlsAmtInCoCodeCrcy>0.00</d:EnteredSlsAmtInCoCodeCrcy>
<d:SlsPriceAmountInCoCodeCrcy>0.00</d:SlsPriceAmountInCoCodeCrcy>
<d:PhysInvtryCtAmtInCoCodeCrcy>450.00</d:PhysInvtryCtAmtInCoCodeCrcy>
<d:BookQtyAmountInCoCodeCrcy>1000.00</d:BookQtyAmountInCoCodeCrcy>
<d:LastChangeDateTime>2017-05-12T15:20:16.1199720Z</d:LastChangeDateTime>
<d:StorageLocation>0001</d:StorageLocation>
<d:Material>Z_MM_IM4_09553520170427_3</d:Material>
<d:Batch/>
<d:InventorySpecialStockType/>
<d:PhysicalInventoryStockType>1</d:PhysicalInventoryStockType>
</m:properties>
</content>

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'"

<?xml version="1.0" encoding="utf-8"?>


<entry m:etag="W/&quot;datetimeoffset'2017-05-12T15%3A20%3A16.1199720Z'&quot;" xml:base="<host>/sap
<id><host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocItem(FiscalYear='20
<title type="text">A_PhysInventoryDocItem(FiscalYear='2017',PhysicalInventoryDocument='100004413
<updated>2017-05-12T15:22:00Z</updated>
<category term="API_PHYSICAL_INVENTORY_DOC_SRV.A_PhysInventoryDocItemType" scheme="http://schemas
<link href="A_PhysInventoryDocItem(FiscalYear='2017',PhysicalInventoryDocument='100004413',Physic
<link href="A_PhysInventoryDocItem(FiscalYear='2017',PhysicalInventoryDocument='100004413',Physic
<content type="application/xml">
<m:properties>
<d:FiscalYear>2017</d:FiscalYear>
<d:SalesOrder/>
<d:SalesOrderItem>0</d:SalesOrderItem>
<d:Supplier/>
<d:Customer/>
<d:WBSElement/>
<d:LastChangeUser/>
<d:LastChangeDate m:null="true"/>
<d:CountedByUser><XYZ123></d:CountedByUser>
<d:PhysicalInventoryLastCountDate>2017-05-12T00:00:00</d:PhysicalInventoryLastCountDate>
<d:AdjustmentPostingMadeByUser><XYZ123></d:AdjustmentPostingMadeByUser>
<d:PhysicalInventoryDocument>100004413</d:PhysicalInventoryDocument>
<d:PostingDate>2017-05-10T00:00:00</d:PostingDate>
<d:PhysicalInventoryItemIsCounted>true</d:PhysicalInventoryItemIsCounted>
<d:PhysInvtryDifferenceIsPosted>true</d:PhysInvtryDifferenceIsPosted>
<d:PhysInvtryItemIsRecounted>false</d:PhysInvtryItemIsRecounted>
<d:PhysInvtryItemIsDeleted>false</d:PhysInvtryItemIsDeleted>
<d:IsHandledInAltvUnitOfMsr>true</d:IsHandledInAltvUnitOfMsr>
<d:CycleCountType/>
<d:IsValueOnlyMaterial>false</d:IsValueOnlyMaterial>
<d:PhysInventoryReferenceNumber/>
<d:MaterialDocument/>
<d:PhysicalInventoryDocumentItem>2</d:PhysicalInventoryDocumentItem>
<d:MaterialDocumentYear>0000</d:MaterialDocumentYear>
<d:MaterialDocumentItem>0</d:MaterialDocumentItem>
<d:PhysInvtryRecountDocument/>
<d:PhysicalInventoryItemIsZero>false</d:PhysicalInventoryItemIsZero>
<d:ReasonForPhysInvtryDifference>0</d:ReasonForPhysInvtryDifference>
<d:MaterialBaseUnit>EA</d:MaterialBaseUnit>
<d:BookQtyBfrCountInMatlBaseUnit>100</d:BookQtyBfrCountInMatlBaseUnit>
<d:Quantity>46</d:Quantity>
<d:UnitOfEntry>EA</d:UnitOfEntry>
<d:QuantityInUnitOfEntry>46</d:QuantityInUnitOfEntry>
<d:Plant>0001</d:Plant>
<d:Currency>EUR</d:Currency>
<d:DifferenceAmountInCoCodeCrcy>540.00</d:DifferenceAmountInCoCodeCrcy>
<d:EnteredSlsAmtInCoCodeCrcy>0.00</d:EnteredSlsAmtInCoCodeCrcy>
<d:SlsPriceAmountInCoCodeCrcy>0.00</d:SlsPriceAmountInCoCodeCrcy>
<d:PhysInvtryCtAmtInCoCodeCrcy>460.00</d:PhysInvtryCtAmtInCoCodeCrcy>
<d:BookQtyAmountInCoCodeCrcy>1000.00</d:BookQtyAmountInCoCodeCrcy>
<d:LastChangeDateTime>2017-05-12T15:20:16.1199720Z</d:LastChangeDateTime>
<d:StorageLocation>0001</d:StorageLocation>
<d:Material>Z_MM_IM4_09553520170427_4</d:Material>
<d:Batch/>
<d:InventorySpecialStockType/>
<d:PhysicalInventoryStockType>1</d:PhysicalInventoryStockType>
</m:properties>
</content>
</entry>
--1D1CFD08D93AE8206AD165EC48D989E01--

This is custom documentation. For more information, please visit the SAP Help Portal 60
11/8/24, 7:06 PM
--1D1CFD08D93AE8206AD165EC48D989E00--

Initiate Recount at Header Level


When you initiate a recount at header level, a recount is performed for all items of a physical inventory document that has already
been counted. To initiate a recount at header level, you use the http method POST to call the InitiateRecount function import.

Request
You can include the following parameters in the URL of the request:

Parameter Necessity Comment

PhysicalInventoryDocument Mandatory -

FiscalYear Mandatory -

PostingThresholdValue Optional If 0 or not provided, no threshold is set

PhysInventoryPlannedCountDate Optional Used for the new recount document.

If not provided, the current date is used as


default value.

DocumentDate Optional Used for the new recount document

PhysicalInventoryNumber Optional Used for the new recount document

PhysInventoryReferenceNumber Optional Used for the new recount document

PhysicalInventoryDocumentDesc Optional Used for the new recount document

PhysInvtryDocHasQtySnapshot Optional Used for the new recount document

PostingIsBlockedForPhysInvtry Optional Used for the new recount document

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'"

<?xml version="1.0" encoding="utf-8"?>


<entry m:etag="W/&quot;datetimeoffset'2017-06-29T14%3A41%3A33.0295530Z'&quot;" xml:base="<host>/sap
<id><host>/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/A_PhysInventoryDocHeader(FiscalYear
<title type="text">A_PhysInventoryDocHeader(FiscalYear='2017',PhysicalInventoryDocument='100005
<updated>2017-06-29T14:41:33Z</updated>
<category term="API_PHYSICAL_INVENTORY_DOC_SRV.A_PhysInventoryDocHeaderType" scheme="http://sch
<link href="A_PhysInventoryDocHeader(FiscalYear='2017',PhysicalInventoryDocument='100005751')"
<link href="A_PhysInventoryDocHeader(FiscalYear='2017',PhysicalInventoryDocument='100005751')/t
<content type="application/xml">
<m:properties>
<d:FiscalYear>2017</d:FiscalYear>
<d:PostingDate m:null="true"/>
<d:FiscalPeriod>0</d:FiscalPeriod>
<d:CreatedByUser><XYZ123></d:CreatedByUser>
<d:PostingIsBlockedForPhysInvtry>false</d:PostingIsBlockedForPhysInvtry>
<d:PhysicalInventoryCountStatus/>
<d:PhysInvtryAdjustmentPostingSts/>
<d:PhysInvtryDeletionStatus/>
<d:PhysInvtryDocHasQtySnapshot>false</d:PhysInvtryDocHasQtySnapshot>
<d:PhysicalInventoryGroupType/>
<d:PhysicalInventoryGroup/>
<d:PhysicalInventoryDocument>100005751</d:PhysicalInventoryDocument>
<d:PhysicalInventoryNumber/>
<d:PhysInventoryReferenceNumber/>
<d:PhysicalInventoryDocumentDesc/>
<d:PhysicalInventoryType/>
<d:LastChangeDateTime>2017-06-29T14:41:33.0295530Z</d:LastChangeDateTime>
<d:InventoryTransactionType>IN</d:InventoryTransactionType>
<d:Plant>0001</d:Plant>
<d:StorageLocation>0001</d:StorageLocation>
<d:InventorySpecialStockType/>
<d:DocumentDate>2017-06-29T00:00:00</d:DocumentDate>
<d:PhysInventoryPlannedCountDate>2017-06-29T00:00:00</d:PhysInventoryPlannedCountDate>
<d:PhysicalInventoryLastCountDate m:null="true"/>
</m:properties>
</content>
</entry>

Initiate Recount at Item Level


When you initiate a recount at item level, a recount is performed only for specific items of a physical inventory document that has
already been counted. To initiate a recount at item level, you use the http method POST to call the InitiateRecountOnItem
function import.

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

Parameter Necessity Comment

PhysicalInventoryDocument Mandatory -

FiscalYear Mandatory -

PhysicalInventoryDocumentItem Mandatory -

PhysInventoryPlannedCountDate Optional Used for the new recount document.

If not provided, the current date is used as


default value.

DocumentDate Optional Used for the new recount document

PhysicalInventoryNumber Optional Used for the new recount document

PhysInventoryReferenceNumber Optional Used for the new recount document

PhysicalInventoryDocumentDesc Optional Used for the new recount document

PhysInvtryDocHasQtySnapshot Optional Used for the new recount document

PostingIsBlockedForPhysInvtry Optional Used for the new recount document

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

POST host/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/$batch HTTP/1.1


Content-Type: multipart/mixed; boundary=batch_seperator

--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

Status: 202 Accepted


Content-Length: 1319
content-type: multipart/mixed; boundary= 6B9DA33A84C3CEEF63E27F3E284494DF0

--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'"

<?xml version="1.0" encoding="utf-8"?><entry m:etag="W/&quot;datetimeoffset'2017-06-29T14%3A52%3A41


--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'"

<?xml version="1.0" encoding="utf-8"?><entry m:etag="W/&quot;datetimeoffset'2017-06-29T14%3A52%3A41


--6B9DA33A84C3CEEF63E27F3E284494DF1--

--6B9DA33A84C3CEEF63E27F3E284494DF0--

Reservation Document (A2X)


Use this synchronous inbound service to retrieve, create, update and delete reservation documents

Service name: API_RESERVATION_DOCUMENT

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 Group (incl. Namespace Repository ID Service Name (incl. Version


if Existent) Namespace if Existent)

API_RESERVATION_DOCUMENT srvd_a2x APIReservationDocument 0001

Service Structure
Service Header

The service header contains information about the service.

Entities

The entities contain the business data of the service.

Entity Description Necessity Link to Details

Reservation Document Header Header information Mandatory Reservation Document


(A_ReservationDocumentHeader_2) Header

Reservation Document Item Item information Mandatory Reservation Document Item


(A_ReservationDocumentItem_2)

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.

Reservation Document Header


Technical name: A_ReservationDocumentHeader_2

Properties

This is custom documentation. For more information, please visit the SAP Help Portal 65
11/8/24, 7:06 PM

Property Description Necessity

AssetNumber Main asset number Mandatory if the GoodsMovementType is


241 or 242

AssetSubNumber Asset sub-number Optional

ControllingArea Controlling area Read-only

CostCenter Cost center Mandatory if the GoodsMovementType is


201 or 202

CreationDateTime Creation Date and Time Read-only

Customer Account number of customer Optional

GoodsMovementType Goods movement type (Inventory Mandatory


Management)

GoodsRecipientName Goods recipient Optional

IsCheckedAgainstFactoryCal Check date against factory calendar Optional

IssuingOrReceivingPlant Receiving/issuing plant Mandatory if the GoodsMovementType is


301 or 302

IssuingOrReceivingStorageLoc Receiving/issuing storage location Mandatory if the GoodsMovementType is


301, 302, 311, or 312

LastChangedByUser Last Changed by User Read-only

LastChangeDateTime Last Change Date and Time Read-only

OrderID Order number Mandatory if the GoodsMovementType is


261 or 262

Reservation Number of reservation Read-only

ReservationDate Base date for reservation Mandatory

ResvnVerificationCompanyCode Reservation Verification Company Code Read-only

SalesOrder Sales order number Mandatory if the GoodsMovementType is


231 or 232

SalesOrderItem Item number in sales order Mandatory if the GoodsMovementType is


231 or 232

SalesOrderScheduleLine Delivery schedule for sales order Optional

UserID User Identification Read-only

WBSElement Work Breakdown Structure Element Mandatory if the GoodsMovementType is


221 or 222

 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:

Retrieve Reservation Document

Create Reservation Document

Update Reservation Document

Delete Reservation Document

Reservation Document Item


Technical name: A_ReservationDocumentItem_2

Properties

Property Description Necessity

BaseUnit Base unit of measure Optional

Batch Batch number Optional

CompanyCodeCurrency Currency key Optional

ConfdQtyForATPInBaseUoM Confirmed Quantity for ATP in Base Unit of Optional


Measure

DebitCreditCode Debit / credit indicator Optional

EntryUnit Entry Unit Mandatory

GLAccount G/L account number Optional

GoodsMovementIsAllowed Goods movement for reservation allowed Optional

GoodsMovementType Goods movement type, example goods Optional


receipt, goods issue.

GoodsRecipientName Goods recipient Optional

IssuingOrReceivingPlant Receiving plant/issuing plant Optional

IssuingOrReceivingStorageLoc Receiving/issuing storage location Optional

ManufacturingOrderOperation Operation/activity number Optional

MatlCompRequirementDate Requirement date for the component Optional

Plant Plant that will receive or issue goods based Mandatory


on movement type

Product Material number Mandatory

PurchasingDocument Purchasing document number Optional

PurchasingDocumentItem Item number of purchasing document Optional

QuantityIsFixed Quantity is fixed Optional

This is custom documentation. For more information, please visit the SAP Help Portal 67
11/8/24, 7:06 PM

Property Description Necessity

RecordType Record type Optional

RequiredQtyInEntryUnit Required Quantity in Entry Unit Mandatory

RequirementType Requirement type Optional

Reservation Number of reservation/dependent Optional


requirements

ReservationItem Item number of reservation/dependent Optional


requirements

ReservationItemIsFinallyIssued Final issue of reservation Optional

ReservationItmIsMarkedForDeltn Reservation Item is marked for deletion Optional

ReservationItemText Item text Optional

ReservationItmIsMarkedForDeltn Item is deleted Optional

ResvnAccountIsEnteredManually If “true”, future goods movements will take Optional


the GLAccount from the reservation.

If “false” or not maintained, future goods


movements will use the GLAccount that is
determined by the account determination
settings.

ResvnItmRequiredQtyInBaseUnit This field is automatically updated. Optional

ResvnItmRequiredQtyInEntryUnit Specifies the quantity to be moved in the Optional


unit of entry. The quantity is automatically
converted to the stock keeping unit (base
unit of measure).

ResvnItmWithdrawnAmtInCCCrcy Value withdrawn Optional

ResvnItmWithdrawnQtyInBaseUnit Quantity withdrawn Optional

StorageLocation Storage location Optional

Supplier Supplier’s account number Optional

UnloadingPointName Unloading point Optional

ValuationType Valuation type Optional

 Note
To display more information about the properties on the SAP Business Accelerator Hub, choose Schema View.

Supported Operations
The following operations are supported:

Retrieve Reservation Document

Create Reservation Document

This is custom documentation. For more information, please visit the SAP Help Portal 68
11/8/24, 7:06 PM
Update Reservation Document

Delete Reservation Document

Operations for Reservation Document (A2X)


The Reservation Document (A2X) API offers these operations:

Operation HTTP Sample URL


Method

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."

Retrieve Reservation Document

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

Create Reservation Document


To create reservation documents, you use the http POST method on the A_ReservationDocumentHeader_2 entity.

Request
You can include the following properties in the request's URL:

Reservation Document Header

Property Necessity Comment

GoodsMovementType Mandatory The mandatory parameters at header level


are based on the GoodsMovementType
value.

ReservationDate Mandatory Base date for reservation

CostCenter Mandatory if the GoodsMovementType is


201 or 202

WBSElement Mandatory if the GoodsMovementType is


221 or 222

SalesOrder Mandatory if the GoodsMovementType is


231 or 232
SalesOrderItem

AssetNumber Mandatory if the GoodsMovementType is


241 or 242

OrderId Mandatory if the GoodsMovementType is


261 or 262

NetworkNumberForAcctAssgmt Mandatory if the GoodsMovementType is


281 or 282

IssuingOrReceivingPlant Mandatory if the GoodsMovementType is


301 or 302
IssuingOrReceivingStorageLoc

IssuingOrReceivingStorageLoc Mandatory if the GoodsMovementType is


311 or 312

You can include the following properties in the URL of the request:

Reservation Document Item

Property Necessity Comment

Product Mandatory Material number

This is custom documentation. For more information, please visit the SAP Help Portal 70
11/8/24, 7:06 PM

Property Necessity Comment

Plant Mandatory Plant that will receive or issue goods based


on movement type

ResvnItmRequiredQtyInEntryUnit Mandatory 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).

EntryUnit Mandatory

ResvnAccountIsEnteredManually Optional If “true”, future goods movements will take


the GLAccount from the reservation.

If “false” or not maintained, future goods


movements will use the GLAccount that is
determined by the account determination
settings.

Batch Mandatory if the material has split


valuation or is batch-managed

Valuation Type Optional If you create a reservation for a material


with split valuation that is also batch
managed, the Valuation Type field
corresponds with the entry in the Batch
field. The Batch field must be maintained
first in order for the valuation type to be
assigned.

See examples below for more info.

Examples

Create a Reservation with Mandatory Cost Center (Movement Type 201)

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
}
]
}

Batch Create Reservations

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

POST ReservationDocument HTTP/1.1


Content-Type: application/json
prefer: return=representation

{
"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

HTTP/1.1 201 Created


Content-Type: application/json;odata.metadata=minimal;charset=utf-8
Content-Length: 1542
location: ReservationDocument('19029672')
odata-version: 4.0
etag: W/"SADL-202209231133591162800C~20220923113359.1162800"
cache-control: no-cache, no-store, must-revalidate
preference-applied: return=representation

{"@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
}
]

Update Reservation Document


Create a new item using http POST method.

Update an existing item using http PATCH method.

ETags
ETag values need to be extracted and passed for update operations.

ETag values need to be sent in headers as “If-Match”

Request

PATCH <host>/sap/opu/odata4/sap/api_reservation_document/srvd_a2x/sap/apireservationdocument/0001/R

Response
Response code should be 200 (OK)

Delete Reservation Document

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.

ETag values need to be sent in headers as “If-Match”

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

Response code: 204

Extensibility: Reservation Document (A2X)


You can extend the OData Service API_RESERVATION_DOCUMENT according to your business needs.

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.

You can add fields to the following entities:

Entity Business Context

Reservation Document Header (OData API) Reservation Document Item (RESERVATIONDOCUMENTHEADER)

Reservation Document Items (OData API) Reservation Document Item (RESERVATIONDOCUMENTITEM)

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

With this service, you can:

Read Reservation Document

Create 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

Delete 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.

Entity Descriptions Necessity Link to Details

Reservation Document Header Header information Mandatory Reservation Document


(A_ReservationDocumentHeader) Header

Reservation Document Item Item information Mandatory Reservation Document Item


(A_ReservationDocumentItem)

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.

Reservation Document Header


Technical name:A_ReservationDocumentHeader

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

AssetNumber Main asset number

AssetSubNumber Asset sub-number

ControllingArea Controlling area

CostCenter Cost center

Customer Account number of customer

GoodsMovementType Goods movement type (Inventory Management)

GoodsRecipientName Goods recipient

IsCheckedAgainstFactoryCal Check date against factory calendar

IssuingOrReceivingPlant Receiving/issuing plant

IssuingOrReceivingStorageLoc Receiving/issuing storage location

NetworkNumberForAcctAssgmt Network number for account assignment

OrderID Order number

Reservation Number of reservation

ReservationDate Base date for reservation

SalesOrder Sales order number

SalesOrderItem Item number in sales order

SalesOrderScheduleLine Delivery schedule for sales order

WBSElement Work Breakdown Structure Element

 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 Reservation Document

Create Reservation Document

Update Reservation Document

Delete Reservation Document

Reservation Document Item


This is custom documentation. For more information, please visit the SAP Help Portal 80
11/8/24, 7:06 PM
Technical name:A_ReservationDocumentItem

The item entity that contains the reservation document item properties.

Properties

Property Description

BaseUnit Base unit of measure

Batch Batch number

CompanyCodeCurrency Currency key

DebitCreditCode Debit / credit indicator

GLAccount G/L account number

GoodsMovementIsAllowed Goods movement for reservation allowed

GoodsMovementType Goods movement type, example goods receipt, goods issue.

GoodsRecipientName Goods recipient

IssuingOrReceivingPlant Receiving plant/issuing plant

IssuingOrReceivingStorageLoc Receiving/issuing storage location

ManufacturingOrderOperation Operation/activity number

MatlCompRequirementDate Requirement date for the component

Plant Plant that will receive or issue goods based on movement type

Product Material number

PurchasingDocument Purchasing document number

PurchasingDocumentItem Item number of purchasing document

QuantityIsFixed Quantity is fixed

RecordType Record type

RequirementType Requirement type

Reservation Number of reservation/dependent requirements

ReservationItem Item number of reservation/dependent requirements

ReservationItemIsFinallyIssued Final issue of reservation

ReservationItemText Item text

ReservationItmIsMarkedForDeltn Item is deleted

ResvnAccountIsEnteredManually If “true”, future goods movements will take the GLAccount from the
reservation.

If “false” or not maintained, future goods movements will use the


GLAccount that is determined by the account determination
settings.

This is custom documentation. For more information, please visit the SAP Help Portal 81
11/8/24, 7:06 PM

Property Description

ResvnItmRequiredQtyInBaseUnit This field is automatically updated.

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).

ResvnItmWithdrawnAmtInCCCrcy Value withdrawn

ResvnItmWithdrawnQtyInBaseUnit Quantity withdrawn

StorageLocation Storage location

Supplier Supplier’s account number

UnloadingPointName Unloading point

 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 Reservation Document

Create Reservation Document

Update Reservation Document

Delete Reservation Document

Operations for Reservation Document API


The Reservation Document API offers these operations:

Operation HTTP Sample URL


Method

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

Operation HTTP Sample URL


Method

Delete DELETE
DELETE <host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentHead
Reservation
Document

Retrieve 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’)

Retrieve Items with Header

GET <host>/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentHeader(‘1002809’)?$e

Create Reservation Document


To create reservation documents, you use the http POST method on the A_ReservationDocumentHeader entity.

Response
You can include the following properties in the URL of the request:

Reservation Document Header

Property Necessity Comment

GoodsMovementType Mandatory The mandatory parameters at header level


are based on the GoodsMovementType
value.

ReservationDate Mandatory Base date for reservation

CostCenter Mandatory if the GoodsMovementType is


201 or 202

WBSElement Mandatory if the GoodsMovementType is


221 or 222

This is custom documentation. For more information, please visit the SAP Help Portal 83
11/8/24, 7:06 PM

Property Necessity Comment

SalesOrder Mandatory if the GoodsMovementType is


231 or 232
SalesOrderItem

AssetNumber Mandatory if the GoodsMovementType is


241 or 242

OrderId Mandatory if the GoodsMovementType is


261 or 262

NetworkNumberForAcctAssgmt Mandatory if the GoodsMovementType is


281 or 282

IssuingOrReceivingPlant Mandatory if the GoodsMovementType is


301 or 302
IssuingOrReceivingStorageLoc

IssuingOrReceivingStorageLoc Mandatory if the GoodsMovementType is


311 or 312

You can include the following properties in the URL of the request:

Reservation Document Item

Property Necessity Comment

Product Mandatory Material number

Plant Mandatory Plant that will receive or issue goods based


on movement type

ResvnItmRequiredQtyInEntryUnit Mandatory 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).

ResvnAccountIsEnteredManually Optional If “true”, future goods movements will take


the GLAccount from the reservation.

If “false” or not maintained, future goods


movements will use the GLAccount that is
determined by the account determination
settings.

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

POST A_ReservationDocumentHeader HTTP/1.1


Content-Type: application/json

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

HTTP/1.1 201 Created


Content-Type: application/atom+xml;type=entry
Content-Length: 2224
location: https://ldai1er9.wdf.sap.corp:44300/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_R
dataserviceversion: 2.0

<?xml version="1.0" encoding="utf-8"?>


<entry xml:base="https://ldai1er9.wdf.sap.corp:44300/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_
<id>https://ldai1er9.wdf.sap.corp:44300/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_Reserva
<title type="text">A_ReservationDocumentHeader('15619322')</title>
<updated>2020-07-16T09:25:10Z</updated>
<category term="API_RESERVATION_DOCUMENT_SRV.A_ReservationDocumentHeaderType" scheme="http://sch
<link href="A_ReservationDocumentHeader('15619322')" rel="self" title="A_ReservationDocumentHead
<link href="A_ReservationDocumentHeader('15619322')/to_ReservationDocumentItem" rel="http://sche
<m:inline>
<feed xml:base="https://ldai1er9.wdf.sap.corp:44300/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_S
<id>https://ldai1er9.wdf.sap.corp:44300/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_Reserva
<title type="text">A_ReservationDocumentItem</title>
<updated>2020-07-16T09:25:10Z</updated>
<author>
<name/>
</author>
<link href="A_ReservationDocumentHeader('15619322')/to_ReservationDocumentItem" rel="self" title
</feed>
</m:inline>
</link>
<content type="application/xml">
<m:properties>
<d:Reservation>15619322</d:Reservation>
<d:OrderID/>
<d:GoodsMovementType>201</d:GoodsMovementType>
<d:CostCenter>1000</d:CostCenter>
<d:GoodsRecipientName/>

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--

Update Reservation Document

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

You can modify the following parameters at item level:

Storage location

Batch number

Quantity in unit of entry

Requirement date of component

Item text

Goods recepient

Unloading point

Set the quantity is fixed indicator

Set the goods movement for reservation allowed indicator

Set the item is deleted indicator

Set the final issue for this reservation indicator

Request

The mandatory parameters at item level are as follows:

Item - POST 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

Item - PUT request:

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.

POST <host> /sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/$batch

 Sample Code

--batch
Content-Type: multipart/mixed; boundary=changeset

--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary

POST A_ReservationDocumentItem HTTP/1.1


Content-Type:application/json

{
"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

HTTP/1.1 201 Created


Content-Type: application/atom+xml;type=entry
Content-Length: 2161
Content-Type: application/http
Content-Length: 3108
content-transfer-encoding: binary
HTTP/1.1 201 Created
Content-Type: application/atom+xml;type=entry
Content-Length: 2161
location: https://<host> /sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_ReservationDocumentIt
dataserviceversion: 2.0
sap-message:
<notification xmlns:sap="http://www.sap.com/Protocols/SAPData">
<code>M7/070</code>
<message>Document 0000066979 has been changed</message>
<longtext_url>/sap/opu/odata/iwbep/message_text;o=LOCAL/T100_longtexts(MSGID='M7',MSGNO='070
<target>Reservation</target>
<severity>success</severity>
<transition>false</transition>
<details>
<detail>
<code>BAPI/002</code>
<message>Instance 0000066979 of object type BUS2093 has been changed.</message>
<target>Reservation</target>
<severity>success</severity>
<transition>false</transition>
</detail>
</details>
</notification>
<?xml version="1.0" encoding="utf-8"?>
<entry xml:base="https://cc2-715-api.wdf.sap.corp/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV
<id>https://cc2-715-api.wdf.sap.corp/sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/A_Reserv
<title type="text">A_ReservationDocumentItem(Reservation='66979',ReservationItem='0',RecordT
<updated>2020-03-10T10:48:17Z</updated>
<category term="API_RESERVATION_DOCUMENT_SRV.A_ReservationDocumentItemType" scheme="http://s
<link href="A_ReservationDocumentItem(Reservation='66979',ReservationItem='0',RecordType='')
<content type="application/xml">
<m:properties>
This is custom documentation. For more information, please visit the SAP Help Portal 89
11/8/24, 7:06 PM
<d:Reservation>66979</d:Reservation>
<d:ReservationItem>0</d:ReservationItem>
<d:RecordType/>
<d:Product>QM005</d:Product>
<d:RequirementType/>
<d:MatlCompRequirementDate>2020-03-10T00:00:00</d:MatlCompRequirementDate>
<d:Plant>1010</d:Plant>
<d:ManufacturingOrderOperation/>
<d:GoodsMovementIsAllowed>false</d:GoodsMovementIsAllowed>
<d:StorageLocation/>
<d:Batch/>
<d:DebitCreditCode/>
<d:BaseUnit/>
<d:GLAccount/>
<d:GoodsMovementType/>
<d:EntryUnit/>
<d:QuantityIsFixed>false</d:QuantityIsFixed>
<d:CompanyCodeCurrency/>
<d:IssuingOrReceivingPlant/>
<d:IssuingOrReceivingStorageLoc/>
<d:PurchasingDocument/>
<d:PurchasingDocumentItem>0</d:PurchasingDocumentItem>
<d:Supplier/>
<d:ResvnItmRequiredQtyInBaseUnit>0.000</d:ResvnItmRequiredQtyInBaseUnit>
<d:ReservationItemIsFinallyIssued>false</d:ReservationItemIsFinallyIssued>
<d:ReservationItmIsMarkedForDeltn>false</d:ReservationItmIsMarkedForDeltn>
<d:ResvnItmRequiredQtyInEntryUnit>20.000</d:ResvnItmRequiredQtyInEntryUnit>
<d:ResvnItmWithdrawnQtyInBaseUnit>0.000</d:ResvnItmWithdrawnQtyInBaseUnit>
<d:ResvnItmWithdrawnAmtInCCCrcy>0.00</d:ResvnItmWithdrawnAmtInCCCrcy>
<d:GoodsRecipientName/>
<d:UnloadingPointName/>
<d:ReservationItemText/>
</m:properties>
</content>
</entry>
--D5DCA8C0E46CE1C2A49FB4E1FC356F981--

--D5DCA8C0E46CE1C2A49FB4E1FC356F980--

PUT – Update Existing Item

Request

Update the required quantity in Entry Unit in an existing Reservation 66979 with Reservation Item 2.

POST <host> /sap/opu/odata/sap/API_RESERVATION_DOCUMENT_SRV/$batch

 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

HTTP/1.1 204 No Content


Content-Length: 0
dataserviceversion: 2.0
sap-message:
<notification xmlns:sap="http://www.sap.com/Protocols/SAPData">
<code>M7/070</code>
<message>Document 0000066979 has been changed</message>
<longtext_url>/sap/opu/odata/iwbep/message_text;o=LOCAL/T100_longtexts(MSGID='M7',MSGNO='070
<target>Reservation</target>
<severity>success</severity>
<transition>false</transition>
<details>
<detail>
<code>BAPI/002</code>
<message>Instance 0000066979 of object type BUS2093 has been changed.</message>
<target>Reservation</target>
<severity>success</severity>
<transition>false</transition>
</detail>
</details>
</notification>

--9E7FFB9B3A96D26F21C6B399C70F06EB1--

--9E7FFB9B3A96D26F21C6B399C70F06EB0--

This is custom documentation. For more information, please visit the SAP Help Portal 91
11/8/24, 7:06 PM

Delete Reservation Document

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

Material Document - Create


Technical name: MaterialDocumentCreateRequest_Async_In

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:

Node or Field Description Necessity

ID Identity (ID), used as reference ID in Optional


confirmation

UUID Universal Unique Identifier (UUID), used as Optional


reference UUID in confirmation

CreationDateTime Creation Date Time, determines the Optional


creation date of the material document

TestDataIndicator Test Data Indicator, sets true or false Optional


depending on your business purpose

ReconcilationIndicator Reconcilation Indicator, sets true or false Optional


depending on your business purpose

 Note
This field is not supported for this
service. Input is not considered during
internal request processing.

SenderBusinessSystemID Sender Business System ID Optional

Note, that the sender business system is


the business system defined in the
configuration of the communication
system. If you leave this field blank, the
material document is created but no
confirmation is sent.

RecipientBusinessSystemID Recipient Business System ID, used as a Optional


free text field

Service Nodes

The service nodes contain the service's business data.

This is custom documentation. For more information, please visit the SAP Help Portal 93
11/8/24, 7:06 PM

Service Node Description Link to Details

MaterialDocument Contains all the necessary information to MaterialDocumentCreateRequest_Async_In


create a material document - MaterialDocument

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.

Message Monitoring and Error Handling


To monitor messages transferred by this service, you need to assign the following recipient to the users:

Namespace: /MMIM

Recipient for Alert: MMIM_SOAP_MONITOR

Assign Recipients and Monitor Messages

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:

Assign Recipients to Users

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.

For more information, see:

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

Nodes and Fields

 Note
In the following table, field attributes are marked in blue.

Node or Fields Description Cardinality Necessity

GoodsMovementCode Goods Movement Code 0..1 Mandatory

There are the following types of


transactions/events:

1. GM_Code 01: Goods receipt for


purchase order

2. GM_Code 02: Goods receipt for


production order

3. GM_Code 03: Goods issue

4. GM_Code 04: Transfer posting

5. GM_Code 05: Other goods


receipt

PostingDate Posting Date 0..1 Mandatory

DocumentDate Document Date 0..1 Optional

BillOfLading Bill of Lading 0..1 Optional

ReferenceDocument Reference Document 0..1 Optional

InvtryMgmtReferenceDocument Reference Document Number 0..1 Optional

InvtryMgmtRefDocumentItem Reference Document Item Number 0..1 Optional

ReferenceDocumentFiscalYear Reference Document Fiscal Year 0..1 Optional

Description Description 0..1 Optional

ManualPrintIsTriggered Indicates whether a print is triggered 0..1 Optional


manually.

X = Print is requested

This is custom documentation. For more information, please visit the SAP Help Portal 96
11/8/24, 7:06 PM

Node or Fields Description Cardinality Necessity

(Blank) = Print is not requested

VersionForPrintingSlip Version for Printing Goods 0..1 Optional


Receipt/Goods Issue Slip. Must only be
set if ManualPrintIsTriggered = X.

1 = Individual slip: In his case, one


GR/GI slip is printed out for each item.

2 = Individual slip with inspection text:


In this case, one GR/GI slip is printed
out for each item. In addition, a quality
inspection text is printed if there is one
in the material master record.

3 = Collective slip: In this case, a


collective slip including all the items in a
document is printed.

MaterialDocumentItem Material Document Item 0..1 Mandatory

 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.

GoodsMovementType Goods Movement Type 0..1 Mandatory

GoodsRecipientName Goods Recipient Name 0..1 Optional

MaterialDocumentLine Material Document Line 0..1 Mandatory

 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.

ParentMaterialDocumentLine Parent Material Document Line 0..1 Optional

 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.

If you want to do a transfer posting


for a material item, you have to fill
ParentMaterialDocumentLine
with a value that is not 0. In order to
map the correct transfer posting
relationship, you also have to assign
MaterialDocumentLine to the
This is custom documentation. For more information, please visit the SAP Help Portal 97
11/8/24, 7:06 PM

Node or Fields Description Cardinality Necessity

corresponding
ParentMaterialDocumentLine.

Material Material 0..1 Optional

GlobalTradeItemNumber Global Trade Item Number 0..1 Optional

Batch Batch 0..1 Optional

SerialIDCreateAutomaticIndicator Serial ID Create Automatic Indicator 0..1 Optional

Plant Plant 0..1 Optional

StorageLocation Storage Location 0..1 Optional

ShelfLifeExpirationDate Shelf Life Expiration Date 0..1 Optional

ManufactureDate Manufacture Date 0..1 Optional

BatchBySupplier Batch by Supplier 0..1 Optional

StockType Stock Type 0..1 Optional

InventorySpecialStockType Specifies in case of special stock, the 0..1 Optional


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.

SpecialStockIdfgWBSElement Work breakdown structure (WBS) 0..1 Optional


element that identifies the special
stock. Element is mainly used with
special stock type Q project stock.

QuantityInEntryUnit Quantity in Entry Unit 0..1 Mandatory

unitCode ISO code for unit of measure 0..1 Optional

SAPunitCode SAP code for unit of measure 0..1 Optional

QuantityInBaseUnit Quantity in Base Unit 0..1 Optional

unitCode ISO code for unit of measure 0..1 Optional

SAPunitCode SAP code for unit of measure 0..1 Optional

InventoryValuationType Inventory Valuation Type 0..1 Optional

Customer Customer 0..1 Optional

Supplier Supplier 0..1 Optional

PurchaseOrder Purchase Order 0..1 Optional

PurchaseOrderItem Purchase Order Item 0..1 Optional

SalesOrder Sales Order 0..1 Optional

SalesOrderItem Sales Order Item 0..1 Optional

 Note
This is custom documentation. For more information, please visit the SAP Help Portal 98
11/8/24, 7:06 PM

Node or Fields Description Cardinality Necessity

If a SalesOrder is provided this


field is mandatory.

SalesOrderItemScheduleLine Sales Order Item Schedule Line 0..1 Optional

ManufacturingOrder Manufacturing Order 0..1 Optional

ManufacturingOrderItem Manufacturing Order Item 0..1 Optional

 Note
If a ManufacturingOrder is
provided this field is mandatory.

Delivery Delivery 0..1 Optional

DeliveryItem Delivery Item 0..1 Optional

 Note
If a Delivery is provided this field
is mandatory

IsCompeletelyDelivered Indicator for a complete delivery 0..1 Optional

Reservation Reservation 0..1 Optional

ReservationItem Reservation Item 0..1 Optional

ReservationItemRecordType In the case of a discontinued material in 0..1 Optional


a reservation from a production order,
the value you provide here indicates
whether the discontinued material or
the follow-up material should be
consumed.

“(blank) ” = The discontinued


material should be consumed.

“1” = The follow-up material


should be consumed

ReservationIsFinallyIssued Reservation is finally issued 0..1 Optional

ProjectNetwork Project Network 0..1 Optional

GLAccount G/L Account 0..1 Optional

CostCenter Cost Center 0..1 Optional

CostObject Cost Object 0..1 Optional

ProfitCenter Profit Center 0..1 Optional

ProfitabilitySegment Profitability Segment 0..1 Optional

FunctionalArea Functional Area 0..1 Optional

WBSElement WBS Element 0..1 Optional

This is custom documentation. For more information, please visit the SAP Help Portal 99
11/8/24, 7:06 PM

Node or Fields Description Cardinality Necessity

UnloadingPointName Unloading Point Name 0..1 Optional

MaterialDocumentItemText Material Document Item Text 0..1 Optional

GoodsMovementRefDocType Goods Movement Reference Document 0..1 Optional


Type

GoodsMovementReasonCode Goods Movement Reason Code 0..1 Optional

IssgOrRcvgMaterial Issuing or Receiving Material 0..1 Optional

IssgOrRcvgBatch Issuing or Receiving Batch 0..1 Optional

IssuingOrReceivingPlant Issuing or Receiving Plant 0..1 Optional

IssuingOrReceivingStorageLoc Issuing or Receiving Storage Location 0..1 Optional

IssuingOrReceivingValType Issuing or Receiving Valuation Type of 0..1 Optional


Transfer Batch

MasterFixedAsset Master Fixed Asset 0..1 Optional

 Note
You need to provide leading zeros
here.

FixedAsset Fixed Asset 0..1 Optional

 Note
You need to provide leading zeros
here.

FundsManagementCenter Funds Management Center 0..1 Optional

FundsManagementFund Funds Management Fund 0..1 Optional

CommitmentItem Commitment Item 0..1 Optional

Grant Grant 0..1 Optional

SerialNumbers Serial Numbers 0..1 Optional

MaterialDocumentPostingType Reverse posting indicator for a 0..1 Optional


reservation in movement type 262

 Note
To display more information about the service node on the SAP Business Accelerator Hub, select the operation.

Extensibility: Material Document - Create


You can extend the the SOAP service Material Document - Create (MaterialDocumentCreateRequest_Async_In)
according to your business needs.

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.

Data Source XML Namespace

MaterialDocumentCreateRequest_Async_In For example: http://SAPCustomFields.com/YY1_

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):

BAdI Description Business Context Business Use

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.

For more information, see:

Custom Logic

For more information about the individual BAdIs, check the BAdI-specific documentation: Custom Logic <your
implementation > BAdI Documentation View BAdI Documentation

For more information, see:

Custom Fields

https://api.sap.com/

Related Information
Extensibility

Material Document - Receive Notification


Technical name: MaterialDocumentCreateNotification_Async_Out

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

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.

Node or Field Description Necessity

ID Unique identifier of message Mandatory

CreationDateTime Date and time Mandatory

TestDataIndicator Flag for test mode has been set Optional

ReconciliationIndicator Reconciliation indicator Optional

SenderBusinessSystemID ID of the external system Optional

Service Nodes

The service nodes contain the business data of the service.

Service Node Description Link to Details

MaterialDocument Contains the information for the external MaterialDocumentCreateNotification_Async_Out


customer system about the presence of - MaterialDocument
a new material document

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

Message Monitoring and Error Handling


To monitor messages transferred by this service, you need to assign the following recipient to the users:

Namespace: /MMIM

Recipient for Alert: MMIM_SOAP_MONITOR

Assign Recipients and Monitor Messages

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:

Assign Recipients to Users

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.

For more information, see:

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

Nodes and Fields

 Note
In the following table, field attributes are marked in blue.

Nodes and Fields Description Cardinality Necessity

MaterialDocument Material Document 0..1 Mandatory

MaterialDocumentYear Material Document Year 0..1 Mandatory

PostingDate Posting Date 0..1 Mandatory

DocumentDate Document Date 0..1 Mandatory

ReferenceDocument Reference Document 0..1 Optional

InvtryMgmtReferenceDocument Reference Document 0..1 Optional


Number

InvtryMgmtRefDocumentItem Reference Document 0..1 Optional


Item Number

ReferenceDocumentFiscalYear Reference Document 0..1 Optional


Fiscal Year

Description Description 0..1 Optional

GoodsIssueOrReceiptSlipNr Goods Issue or Receipt 0..1 Optional


Slip Number

MaterialDocumentItem Material Document Item 0..1 Mandatory

MaterialDocumentParentLine Material Document 0..1 Optional


Parent Line

ReversedMaterialDocument Reversed Material 0..1 Optional


Document

ReversedMaterialDocumentItem Reversed Material 0..1 Optional


Document Item

GoodsMovementType Goods Movement Type 0..1 Mandatory

StockType Stock Type 0..1 Optional

GoodsRecipientName Goods Recipient Name 0..1 Optional

Material Material 0..1 Optional

GlobalTradeItemNumber Global Trade Item 0..1 Optional


Number

StorageLocation Storage Location 0..1 Optional

This is custom documentation. For more information, please visit the SAP Help Portal 104
11/8/24, 7:06 PM

Nodes and Fields Description Cardinality Necessity

Batch Batch 0..1 Optional

ShelfLifeExpirationDate Shelf Life Expiration 0..1 Optional


Date

ManufactureDate Manufacture Date 0..1 Optional

InventorySpecialStockType Inventory Special Stock 0..1 Optional


Type

SpecialStockIdfgWBSElement Work breakdown 0..1 Optional


structure (WBS) element
that identifies the special
stock. Element is mainly
used with special stock
type Q project stock.

QuantityInEntryUnit Quantity in Entry Unit 0..1 Optional

unitCode ISO code for unit of 0..1 Optional


measure

SAPunitCode SAP code for unit of 0..1 Optional


measure

QuantityInBaseUnit Quantity in Base Unit 0..1 Optional

unitCode ISO code for unit of 0..1 Optional


measure

SAPunitCode SAP code for unit of 0..1 Optional


measure

Customer Customer 0..1 Optional

Supplier Supplier 0..1 Mandatory

PurchaseOrder Purchase Order 0..1 Optional

PurchaseOrderItem Purchase Order Item 0..1 Optional

SalesOrder Sales Order 0..1 Optional

SalesOrderItem Sales Order Item 0..1 Optional

SalesOrderItemScheduleLine Sales Order Item 0..1 Optional


Schedule Line

ManufacturingOrder Manufacturing Order 0..1 Optional

ManufacturingOrderItem Manufacturing Order 0..1 Optional


Item

Delivery Delivery 0..1 Optional

DeliveryItem Delivery Item 0..1 Optional

IsCompletelyDelivered Indicator for a complete 0..1 Optional


delivery

This is custom documentation. For more information, please visit the SAP Help Portal 105
11/8/24, 7:06 PM

Nodes and Fields Description Cardinality Necessity

Reservation Reservation 0..1 Optional

ReservationItem Reservation Item 0..1 Optional

ProjectNetwork Project Network 0..1 Optional

GLAccount G/L Account 0..1 Optional

CostCenter Cost Center 0..1 Optional

CostObject Cost Object 0..1 Optional

ProfitCenter Profit Center 0..1 Optional

FundsManagementCenter Funds Management 0..1 Optional


Center

FundsManagementFund Funds Management 0..1 Optional


Fund

CommitmentItem Commitment Item 0..1 Optional

Grant Grant 0..1 Optional

ProfitabilitySegment Profitability Segment 0..1 Optional

FunctionalArea Functional Area 0..1 Optional

WBSElement WBS Element 0..1 Optional

MaterialDocumentItemText Material Document Item 0..1 Optional


Text

GoodsMovementRefDocType Goods Movement 0..1 Optional


Reference Document
Type

GoodsMovementReasonCode Goods Movement 0..1 Optional


Reason Code

DebitCreditCode Debit/Credit Code 0..1 Optional

IssgOrRcvgMaterial Issuing or Receiving 0..1 Optional


Material

IssgOrRcvgBatch Issuing or Receiving 0..1 Optional


Batch

IssuingOrReceivingPlant Issuing or Receiving 0..1 Optional


Plant

IssuingOrReceivingStorageLoc Issuing or Receiving 0..1 Optional


Storage Location

IssuingOrReceivingValType Issuing or Receiving 0..1 Optional


Valuation Type of
Transfer Batch

MasterFixedAsset Master Fixed Asset 0..1 Optional

This is custom documentation. For more information, please visit the SAP Help Portal 106
11/8/24, 7:06 PM

Nodes and Fields Description Cardinality Necessity

FixedAsset Fixed Asset 0..1 Optional

SerialNumber Serial Number 0..1 Optional

IsReversalMovementType Indicator for a Reversal 0..1 Optional


Movement Type

InventoryUsabilityCode Inventory Usability Code 0..1 Optional

 Note
This field is only
available for
movement types that
don't refer to a
specific stock type.

InventoryStockType Inventory Stock Type 0..1 Optional

Material Document - Receive Confirmation (Deprecated)


Technical name: MaterialDocumentCreateConfirmation_Async_Out

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

The service nodes contain the business data of the service.

This is custom documentation. For more information, please visit the SAP Help Portal 107
11/8/24, 7:06 PM

Service Node Description Link to Details

MaterialDocument Contains all the necessary information MaterialDocumentCreateConfirmation_Async_Out


to create a confirmation - MaterialDocument

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

Message Monitoring and Error Handling

To monitor messages transferred by this service, you need to assign the following recipient to the users:

Namespace: /MMIM

Recipient for Alert: MMIM_SOAP_MONITOR

Assign Recipients and Monitor Messages

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:

Assign Recipients to Users

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.

For more information, see:

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

Nodes and Fields

Nodes or Fields Description Cardinality Necessity

MaterialDocument When you use the create SOAP 0...1 Mandatory


request, this field is filled with
the newly created material
document number.

MaterialDocumentYear When you use the create SOAP 0...1 Mandatory


request, this field is filled with
the current year of the newly
created material document.

 Note
To display more information about the service node on the SAP Business Accelerator Hub, select the operation.

Material Document - Receive Confirmation


Technical name: MaterialDocumentCreateConfirmation_Async_Out_V2

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:

Node or Field Description

ID ID of the SOAP message

ReferenceID ID of the SOAP message of the material document create request

CreationDateTime Date and time (timestamp) at which the message was created

ReconciliationIndicator Field not supported

This is custom documentation. For more information, please visit the SAP Help Portal 109
11/8/24, 7:06 PM

Node or Field Description

SenderBusinessSystemID ID of the system that is sending the message

RecipientBusinessSystemID ID of the system that is receiving the message

Service Nodes

The service nodes contain the service's business data.

Nodes or Fields Description Cardinalit

MaterialDocument When you use the 1


create SOAP request,
this field is filled with
the newly created
material document
number.

MaterialDocumentYear When you use the 0..1


create SOAP request,
this field is filled with
the current year of the
newly created material
document.

MaterialDocumentFailed log BusinessDocumentProcessingResultCode The result code of the 0..1


material document
When you use the create This
creation process.
SOAP request and an error subnode
Possible values:
occurs, this node contains the provides
log information for the error. information 3: OK
about
5: Material Document
whether the
creation failed. For
respective
example, specified
material
material document or
document
item doesn't exist.
was
successfully
MaximumLogItemSeverityCode A coded representation 0..1
created or
of the maximum
failed. It has
severity of a log (that is,
additional
system) message in a
information
given log. Possible
such as the
values:
severity of
the error 1
and the
Information
content of
any 2
returned
system Warning
messages.
3
Cardinality:
Error
1

Item TypeID Unique identification of 0..1


the type of a log entry.
The log item type ID
This is custom documentation. For more information, please visit the SAP Help Portal 110
11/8/24, 7:06 PM

Nodes or Fields Description Cardinalit

must not be confused


with the sequential
numbering for the
messages in a log.

The field contains the


system message
number and ID, for
example 030
(MMIM_SOA_MATDOC).

SeverityCode The severity of the log 0..1


(system) message.
Possible values:

Information

Warning

Error

Note Contains the actual 1


system message text
returned by the system
and written to the log.

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>

Required Communication Scenario

To use this service, you must configure the following communication scenario: SAP_COM_0108.

Message Monitoring and Error Handling


To monitor messages transferred by this service, you need to assign the following recipient to the users:

Namespace: http://sap.com/xi/APPL/Global2

Recipient Name: MMIM_SOAP_MONITOR

Assign Recipients and Monitor Messages

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:

Assign Recipients to Users

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.

For more information, see:

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.

Material Stock – Replicate


Technical name: MaterialStockReplicateOut
This is custom documentation. For more information, please visit the SAP Help Portal 112
11/8/24, 7:06 PM
This asynchronous outbound service enables you to replicate material stock quantity information for external systems such as
SAP Hybris Commerce.

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.

Data replication uses the Data Replication Framework (DRF).

 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 can contain one service message header (MessageHeader).

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

One or more Material Stocks (MaterialStock)

This node contains the stock information (stock identifying fields with quantity and unit of measure) as read from the Inventory
Management table (MATDOC).

The following table lists the node's fields and subnodes.

 Note
In the following table, field attributes are marked in blue.

Service Node Description Cardinality

Material Goods that are the subject of 1


business activity. The material
can be traded, used in
manufacture, consumed, or
produced.

Plant Place where materials are 0...1


produced, or goods and
services are provided.

This is custom documentation. For more information, please visit the SAP Help Portal 113
11/8/24, 7:06 PM

Service Node Description Cardinality

StorageLocation Organizational unit allowing 0...1


differentiation between the
various stocks of a material in a
plant.

Batch Subset of a material in stock, 0...1


managed separately from other
subsets of the same material.

Supplier Source in or outside a company 0...1


or group's organization from
which materials or services are
procured.

Customer Business partner with whom a 0...1


business relationship exists,
involving the issue of goods or
services.

WBSElementInternalID Internal ID of a WBS element. 0...1

SDDocument Database document for 0...1


displaying sales and distribution
transactions.

SDDocumentItem Database document item for 0...1


displaying sales and distribution
transactions.

InventorySpecialStockType Special type of a material stock 0...1


type.

InventoryStockType Type of a material stock. 0...1

MatlWrhsStkQtyInMatlBaseUnit Material stock quantity in the 0...1


base unit of measure.

unitCode ISO code for unit of measure 0...1

SAPunitCode SAP code for unit of measure 0...1

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>

Required Communication Scenario

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 .

Message Monitoring and Error Handling

To be able to monitor messages transferred by this service, you need to assign the following recipient to the users:

Namespace: /MMIM

Recipient Name: MMIM_SOAP_MONITOR

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

Material Document Events


The Material Document business object triggers the following events:

This is custom documentation. For more information, please visit the SAP Help Portal 115
11/8/24, 7:06 PM

Event Description Payload

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

Event Description Payload

"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

Retrieve Material Documents

Events on SAP Business Accelerator Hub

For more information about Material Document Events on the SAP Business Accelerator Hub, see Material Document Events .

Physical Inventory Document Events


The Physical Inventory Document business object triggers the following events: Events Table

Event Description Payload

PhysInvtryDoc.Created This event is triggered when a physical INVENTORYTRANSACTIONTYPE:


inventory document has been created. Transaction/Event Type

PLANT: Plant

STORAGELOCATION: Storage Location

INVENTORYSPECIALSTOCKTYPE: Special
Stock Indicator

PhysInvtryDoc.Changed This event is triggered when a physical INVENTORYTRANSACTIONTYPE:


inventory document has been changed. Transaction/Event Type

PLANT: Plant

STORAGELOCATION: Storage Location

INVENTORYSPECIALSTOCKTYPE: Special
Stock Indicator

This is custom documentation. For more information, please visit the SAP Help Portal 117
11/8/24, 7:06 PM

Event Description Payload

PhysInvtryDoc.StockCounted This event is triggered when a physical INVENTORYTRANSACTIONTYPE:


inventory document has been counted. Transaction/Event Type

PLANT: Plant

STORAGELOCATION: Storage Location

INVENTORYSPECIALSTOCKTYPE: Special
Stock Indicator

PhysInvtryDoc.Posted This event is triggered when a physical INVENTORYTRANSACTIONTYPE:


inventory document has been posted. Transaction/Event Type

PLANT: Plant

STORAGELOCATION: Storage Location

INVENTORYSPECIALSTOCKTYPE: Special
Stock Indicator

PhysInvtryDoc.Deleted This event is triggered when a physical INVENTORYTRANSACTIONTYPE:


inventory document has been deleted. Transaction/Event Type

PLANT: Plant

STORAGELOCATION: Storage Location

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

Create Physical Inventory Documents

Count Physical Inventory Document Items

Post Differences at Header Level

Post Differences at Item Level

Initiate Recount at Header Level

Initiate Recount at Item Level

Events on SAP Business Accelerator Hub


For more information about Physical Inventory Document Events, see Physical Inventory Document Events .

Reservation Document Events


The Reservation Document business object triggers the following events:

Events Table
This is custom documentation. For more information, please visit the SAP Help Portal 118
11/8/24, 7:06 PM

Event Description Payload

DocumentReservation.Created This event is triggered when a reservation ReservationNumber


document has been created.

DocumentReservation.Changed This event is triggered when a reservation ReservationNumber


document has been changed.

DocumentReservation.Deleted This event is triggered when a reservation ReservationNumber


document has been deleted.

DocumentReservation.ItemCreated This event is triggered when a reservation ReservationNumber


document item has been created.
ReservationItemNumber

DocumentReservation.ItemChanged This event is triggered when a reservation ReservationNumber


document item has been changed.
ReservationItemNumber

DocumentReservation.ItemDeleted This event is triggered when a reservation ReservationNumber


document item has been deleted.
ReservationItemNumber

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)

Events on SAP Business Accelerator Hub

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

You might also like