@Named(value="com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultMaterialDocumentService") public class DefaultMaterialDocumentService extends Object implements MaterialDocumentService
Example - to post a goods receipt for a purchase order or to document the transfer of materials between two storage locations. Additionally, the service allows to cancel existing material documents or single items. It can be consumed by external systems and user interfaces.
Reference: SAP API Business Hub
OData Service: | API_MATERIAL_DOCUMENT_SRV |
API Version: | 1 |
Communication Scenario: | Material Document Integration (SAP_COM_0108) |
Scope Items: | Core Inventory Management (BMC) |
Authentication Methods: | Basic, x509 |
DEFAULT_SERVICE_PATH
Constructor and Description |
---|
DefaultMaterialDocumentService()
Creates a service using
MaterialDocumentService.DEFAULT_SERVICE_PATH to send the requests. |
Modifier and Type | Method and Description |
---|---|
DefaultMaterialDocumentServiceBatch |
batch()
Instantiate a new FluentHelper instance for a single OData batch request.
|
CancelFluentHelper |
cancel(String materialDocumentYear,
String materialDocument,
LocalDateTime postingDate)
Creates a fluent helper for the Cancel OData function import.
|
CancelItemFluentHelper |
cancelItem(String materialDocumentYear,
String materialDocument,
String materialDocumentItem,
LocalDateTime postingDate)
Creates a fluent helper for the CancelItem OData function import.
|
MaterialDocumentHeaderCreateFluentHelper |
createMaterialDocumentHeader(MaterialDocumentHeader materialDocumentHeader)
Create a new
MaterialDocumentHeader entity and save it to the S/4HANA system. |
MaterialDocumentHeaderFluentHelper |
getAllMaterialDocumentHeader()
Fetch multiple
MaterialDocumentHeader entities. |
MaterialDocumentItemFluentHelper |
getAllMaterialDocumentItem()
Fetch multiple
MaterialDocumentItem entities. |
MaterialDocumentHeaderByKeyFluentHelper |
getMaterialDocumentHeaderByKey(String materialDocumentYear,
String materialDocument)
Fetch a single
MaterialDocumentHeader entity using key fields. |
MaterialDocumentItemByKeyFluentHelper |
getMaterialDocumentItemByKey(String materialDocumentYear,
String materialDocument,
String materialDocumentItem)
Fetch a single
MaterialDocumentItem entity using key fields. |
DefaultMaterialDocumentService |
withServicePath(String servicePath)
Overrides the default service path and returns a new service instance with the specified service path.
|
public DefaultMaterialDocumentService()
MaterialDocumentService.DEFAULT_SERVICE_PATH
to send the requests.@Nonnull public DefaultMaterialDocumentService withServicePath(@Nonnull String servicePath)
MaterialDocumentService
withServicePath
in interface MaterialDocumentService
servicePath
- Service path that will override the default.@Nonnull public DefaultMaterialDocumentServiceBatch batch()
batch
in interface BatchService<MaterialDocumentServiceBatch>
@Nonnull public MaterialDocumentHeaderFluentHelper getAllMaterialDocumentHeader()
MaterialDocumentService
MaterialDocumentHeader
entities.getAllMaterialDocumentHeader
in interface MaterialDocumentService
MaterialDocumentHeader
entities. This fluent helper allows methods which modify the underlying query to
be called before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public MaterialDocumentHeaderByKeyFluentHelper getMaterialDocumentHeaderByKey(String materialDocumentYear, String materialDocument)
MaterialDocumentService
MaterialDocumentHeader
entity using key fields.getMaterialDocumentHeaderByKey
in interface MaterialDocumentService
materialDocumentYear
- Material Document Year
Constraints: Not nullable, Maximum length: 4
materialDocument
- Alphanumeric key uniquely identifying the document.
Constraints: Not nullable, Maximum length: 10
MaterialDocumentHeader
entity using key fields. This fluent helper allows methods which modify the
underlying query to be called before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public MaterialDocumentHeaderCreateFluentHelper createMaterialDocumentHeader(@Nonnull MaterialDocumentHeader materialDocumentHeader)
MaterialDocumentService
MaterialDocumentHeader
entity and save it to the S/4HANA system.createMaterialDocumentHeader
in interface MaterialDocumentService
materialDocumentHeader
- MaterialDocumentHeader
entity object that will be created in the S/4HANA system.MaterialDocumentHeader
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public MaterialDocumentItemFluentHelper getAllMaterialDocumentItem()
MaterialDocumentService
MaterialDocumentItem
entities.getAllMaterialDocumentItem
in interface MaterialDocumentService
MaterialDocumentItem
entities. This fluent helper allows methods which modify the underlying query to be
called before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public MaterialDocumentItemByKeyFluentHelper getMaterialDocumentItemByKey(String materialDocumentYear, String materialDocument, String materialDocumentItem)
MaterialDocumentService
MaterialDocumentItem
entity using key fields.getMaterialDocumentItemByKey
in interface MaterialDocumentService
materialDocumentYear
- Material Document Year
Constraints: Not nullable, Maximum length: 4
materialDocument
- Alphanumeric key uniquely identifying the document.
Constraints: Not nullable, Maximum length: 10
materialDocumentItem
- Material Document Item
Constraints: Not nullable, Maximum length: 4
MaterialDocumentItem
entity using key fields. This fluent helper allows methods which modify the
underlying query to be called before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public CancelFluentHelper cancel(String materialDocumentYear, String materialDocument, LocalDateTime postingDate)
MaterialDocumentService
Creates a fluent helper for the Cancel OData function import.
cancel
in interface MaterialDocumentService
materialDocumentYear
- Material Doc. Year
Constraints: Not nullable, Maximum length: 4
Original parameter name from the Odata EDM: MaterialDocumentYear
materialDocument
- Material Document
Constraints: Not nullable, Maximum length: 10
Original parameter name from the Odata EDM: MaterialDocument
postingDate
- Posting Date
Constraints: Nullable, Precision: 0
Original parameter name from the Odata EDM: PostingDate
execute
method on the fluent helper object.@Nonnull public CancelItemFluentHelper cancelItem(String materialDocumentYear, String materialDocument, String materialDocumentItem, LocalDateTime postingDate)
MaterialDocumentService
Creates a fluent helper for the CancelItem OData function import.
cancelItem
in interface MaterialDocumentService
materialDocumentYear
- Material Doc. Year
Constraints: Not nullable, Maximum length: 4
Original parameter name from the Odata EDM: MaterialDocumentYear
materialDocument
- Material Document
Constraints: Not nullable, Maximum length: 10
Original parameter name from the Odata EDM: MaterialDocument
materialDocumentItem
- Material Doc.Item
Constraints: Not nullable, Maximum length: 4
Original parameter name from the Odata EDM: MaterialDocumentItem
postingDate
- Posting Date
Constraints: Nullable, Precision: 0
Original parameter name from the Odata EDM: PostingDate
execute
method on the fluent helper object.Copyright © 2019 SAP SE. All rights reserved.