@Named(value="com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultMaterialDocumentService") public class DefaultMaterialDocumentService extends Object implements MaterialDocumentService
This service enables you to retrieve and create material documents, e.g. 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: | Stock Handling - Rework, Scrap, Blocked Stock (BMC) |
Constructor and Description |
---|
DefaultMaterialDocumentService() |
Modifier and Type | Method and Description |
---|---|
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. |
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.public MaterialDocumentHeaderByKeyFluentHelper getMaterialDocumentHeaderByKey(String materialDocumentYear, String materialDocument)
MaterialDocumentService
MaterialDocumentHeader
entity using key fields.getMaterialDocumentHeaderByKey
in interface MaterialDocumentService
materialDocumentYear
- Material Document YearConstraints: 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.public MaterialDocumentHeaderCreateFluentHelper createMaterialDocumentHeader(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.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.public MaterialDocumentItemByKeyFluentHelper getMaterialDocumentItemByKey(String materialDocumentYear, String materialDocument, String materialDocumentItem)
MaterialDocumentService
MaterialDocumentItem
entity using key fields.getMaterialDocumentItemByKey
in interface MaterialDocumentService
materialDocumentYear
- Material Document YearConstraints: Not nullable, Maximum length: 4
materialDocument
- Alphanumeric key uniquely identifying the document.Constraints: Not nullable, Maximum length: 10
materialDocumentItem
- Material Document ItemConstraints: 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.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. YearConstraints: Not nullable, Maximum length: 4
Original parameter name from the Odata EDM: MaterialDocumentYear
materialDocument
- Material DocumentConstraints: Not nullable, Maximum length: 10
Original parameter name from the Odata EDM: MaterialDocument
postingDate
- Posting DateConstraints: Nullable, Precision: 0
Original parameter name from the Odata EDM: PostingDate
execute
method on the fluent helper object.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. YearConstraints: Not nullable, Maximum length: 4
Original parameter name from the Odata EDM: MaterialDocumentYear
materialDocument
- Material DocumentConstraints: Not nullable, Maximum length: 10
Original parameter name from the Odata EDM: MaterialDocument
materialDocumentItem
- Material Doc.ItemConstraints: Not nullable, Maximum length: 4
Original parameter name from the Odata EDM: MaterialDocumentItem
postingDate
- Posting DateConstraints: Nullable, Precision: 0
Original parameter name from the Odata EDM: PostingDate
execute
method on the fluent helper object.Copyright © 2018 SAP SE. All rights reserved.