@Named(value="com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultPurchasingSourceService") public class DefaultPurchasingSourceService extends Object implements PurchasingSourceService
This synchronous inbound service enables you to create, update, and delete purchasing source lists. It is based on the OData protocol. The information is sent in the request as a payload. All information is used when creating a purchasing source list, and they are checked for authorizations. Once the purchasing source list has been created, the purchasing source list number is sent in the response. If there are any issues when the purchasing source list is created, the system displays error messages in the response.
Reference: SAP API Business Hub
OData Service: | API_PURCHASING_SOURCE_SRV |
API Version: | 1 |
Communication Scenario: | Purchasing Source Integration (SAP_COM_0162) |
Scope Items: | Purchase Contract (BMD), Purchase Contract (OMD) |
Authentication Methods: | Basic, x509 |
Business Object: | SourcingSupplierList |
DEFAULT_SERVICE_PATH
Constructor and Description |
---|
DefaultPurchasingSourceService()
Creates a service using
PurchasingSourceService.DEFAULT_SERVICE_PATH to send the requests. |
Modifier and Type | Method and Description |
---|---|
DefaultPurchasingSourceServiceBatch |
batch()
Instantiate a new FluentHelper instance for a single OData batch request.
|
PurchasingSourceCreateFluentHelper |
createPurchasingSource(PurchasingSource purchasingSource)
Create a new
PurchasingSource entity and save it to the S/4HANA system. |
PurchasingSourceDeleteFluentHelper |
deletePurchasingSource(PurchasingSource purchasingSource)
Deletes an existing
PurchasingSource entity in the S/4HANA system. |
PurchasingSourceFluentHelper |
getAllPurchasingSource()
Fetch multiple
PurchasingSource entities. |
PurchasingSourceByKeyFluentHelper |
getPurchasingSourceByKey(String material,
String plant,
String sourceListRecord)
Fetch a single
PurchasingSource entity using key fields. |
PurchasingSourceUpdateFluentHelper |
updatePurchasingSource(PurchasingSource purchasingSource)
Update an existing
PurchasingSource entity and save it to the S/4HANA system. |
DefaultPurchasingSourceService |
withServicePath(String servicePath)
Overrides the default service path and returns a new service instance with the specified service path.
|
public DefaultPurchasingSourceService()
PurchasingSourceService.DEFAULT_SERVICE_PATH
to send the requests.@Nonnull public DefaultPurchasingSourceService withServicePath(@Nonnull String servicePath)
PurchasingSourceService
withServicePath
in interface PurchasingSourceService
servicePath
- Service path that will override the default.@Nonnull public DefaultPurchasingSourceServiceBatch batch()
batch
in interface BatchService<PurchasingSourceServiceBatch>
@Nonnull public PurchasingSourceFluentHelper getAllPurchasingSource()
PurchasingSourceService
PurchasingSource
entities.getAllPurchasingSource
in interface PurchasingSourceService
PurchasingSource
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 PurchasingSourceByKeyFluentHelper getPurchasingSourceByKey(String material, String plant, String sourceListRecord)
PurchasingSourceService
PurchasingSource
entity using key fields.getPurchasingSourceByKey
in interface PurchasingSourceService
material
- Alphanumeric key uniquely identifying the material.
Constraints: Not nullable, Maximum length: 40
plant
- Specifies the key for a production facility or branch office within the company (that is, the company
code).
Constraints: Not nullable, Maximum length: 4
sourceListRecord
- Alphanumeric key uniquely identifying the document.
Constraints: Not nullable, Maximum length: 5
PurchasingSource
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 PurchasingSourceCreateFluentHelper createPurchasingSource(@Nonnull PurchasingSource purchasingSource)
PurchasingSourceService
PurchasingSource
entity and save it to the S/4HANA system.createPurchasingSource
in interface PurchasingSourceService
purchasingSource
- PurchasingSource
entity object that will be created in the S/4HANA system.PurchasingSource
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public PurchasingSourceUpdateFluentHelper updatePurchasingSource(@Nonnull PurchasingSource purchasingSource)
PurchasingSourceService
PurchasingSource
entity and save it to the S/4HANA system.updatePurchasingSource
in interface PurchasingSourceService
purchasingSource
- PurchasingSource
entity object that will be updated in the S/4HANA system.PurchasingSource
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public PurchasingSourceDeleteFluentHelper deletePurchasingSource(@Nonnull PurchasingSource purchasingSource)
PurchasingSourceService
PurchasingSource
entity in the S/4HANA system.deletePurchasingSource
in interface PurchasingSourceService
purchasingSource
- PurchasingSource
entity object that will be deleted in the S/4HANA system.PurchasingSource
entity. To perform execution, call the
execute
method on the fluent helper object.Copyright © 2020 SAP SE. All rights reserved.