@Named(value="com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultCustomerMaterialService") public class DefaultCustomerMaterialService extends Object implements CustomerMaterialService
The service contains one entity only for customer material. If there are any issues when creating, reading, updating, or deleting the customer material, the system displays error messages in the response.
Reference: SAP API Business Hub
OData Service: | API_CUSTOMER_MATERIAL_SRV |
API Version: | 1 |
Communication Scenario: | Customer Material Info Record Integration (SAP_COM_0134) |
Scope Items: | Sell from Stock (BD9) |
Authentication Methods: | Basic, x509 |
Business Object: | CustomerMaterial |
DEFAULT_SERVICE_PATH
Constructor and Description |
---|
DefaultCustomerMaterialService()
Creates a service using
CustomerMaterialService.DEFAULT_SERVICE_PATH to send the requests. |
Modifier and Type | Method and Description |
---|---|
DefaultCustomerMaterialServiceBatch |
batch()
Instantiate a new FluentHelper instance for a single OData batch request.
|
CustomerMaterialCreateFluentHelper |
createCustomerMaterial(CustomerMaterial customerMaterial)
Create a new
CustomerMaterial entity and save it to the S/4HANA system. |
CustomerMaterialDeleteFluentHelper |
deleteCustomerMaterial(CustomerMaterial customerMaterial)
Deletes an existing
CustomerMaterial entity in the S/4HANA system. |
CustomerMaterialFluentHelper |
getAllCustomerMaterial()
Fetch multiple
CustomerMaterial entities. |
CustomerMaterialByKeyFluentHelper |
getCustomerMaterialByKey(String salesOrganization,
String distributionChannel,
String customer,
String material)
Fetch a single
CustomerMaterial entity using key fields. |
CustomerMaterialUpdateFluentHelper |
updateCustomerMaterial(CustomerMaterial customerMaterial)
Update an existing
CustomerMaterial entity and save it to the S/4HANA system. |
DefaultCustomerMaterialService |
withServicePath(String servicePath)
Overrides the default service path and returns a new service instance with the specified service path.
|
public DefaultCustomerMaterialService()
CustomerMaterialService.DEFAULT_SERVICE_PATH
to send the requests.@Nonnull public DefaultCustomerMaterialService withServicePath(@Nonnull String servicePath)
CustomerMaterialService
withServicePath
in interface CustomerMaterialService
servicePath
- Service path that will override the default.@Nonnull public DefaultCustomerMaterialServiceBatch batch()
batch
in interface BatchService<CustomerMaterialServiceBatch>
@Nonnull public CustomerMaterialFluentHelper getAllCustomerMaterial()
CustomerMaterialService
CustomerMaterial
entities.getAllCustomerMaterial
in interface CustomerMaterialService
CustomerMaterial
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 CustomerMaterialByKeyFluentHelper getCustomerMaterialByKey(String salesOrganization, String distributionChannel, String customer, String material)
CustomerMaterialService
CustomerMaterial
entity using key fields.getCustomerMaterialByKey
in interface CustomerMaterialService
salesOrganization
- An organizational unit responsible for the sale of certain products or services. The responsibility of
a sales organization may include legal liability for products and customer claims.
Constraints: Not nullable, Maximum length: 4
distributionChannel
- The way in which products or services reach the customer. Typical examples of distribution channels
are wholesale, retail, or direct sales.
Constraints: Not nullable, Maximum length: 2
customer
- The customer to whom the condition or the customer-material info record applies.
Constraints: Not nullable, Maximum length: 10
material
- Alphanumeric key uniquely identifying the material.
Constraints: Not nullable, Maximum length: 40
CustomerMaterial
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 CustomerMaterialCreateFluentHelper createCustomerMaterial(@Nonnull CustomerMaterial customerMaterial)
CustomerMaterialService
CustomerMaterial
entity and save it to the S/4HANA system.createCustomerMaterial
in interface CustomerMaterialService
customerMaterial
- CustomerMaterial
entity object that will be created in the S/4HANA system.CustomerMaterial
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public CustomerMaterialUpdateFluentHelper updateCustomerMaterial(@Nonnull CustomerMaterial customerMaterial)
CustomerMaterialService
CustomerMaterial
entity and save it to the S/4HANA system.updateCustomerMaterial
in interface CustomerMaterialService
customerMaterial
- CustomerMaterial
entity object that will be updated in the S/4HANA system.CustomerMaterial
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public CustomerMaterialDeleteFluentHelper deleteCustomerMaterial(@Nonnull CustomerMaterial customerMaterial)
CustomerMaterialService
CustomerMaterial
entity in the S/4HANA system.deleteCustomerMaterial
in interface CustomerMaterialService
customerMaterial
- CustomerMaterial
entity object that will be deleted in the S/4HANA system.CustomerMaterial
entity. To perform execution, call the
execute
method on the fluent helper object.Copyright © 2020 SAP SE. All rights reserved.