Class SapProductAvailabilityBackendERP
java.lang.Object
de.hybris.platform.sap.core.bol.backend.BackendBusinessObjectBase
de.hybris.platform.sap.core.bol.backend.jco.BackendBusinessObjectBaseJCo
de.hybris.platform.sap.sapproductavailability.backend.impl.SapProductAvailabilityBackendERP
- All Implemented Interfaces:
BackendBusinessObject,BackendBusinessObjectJCo,SapProductAvailabilityBackend
public class SapProductAvailabilityBackendERP
extends BackendBusinessObjectBaseJCo
implements SapProductAvailabilityBackend
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static StringConstant for the RFC enabled FM name used to retrieve the plant from the customer material.protected static StringConstant for the RFC enabled FM name used to retrieve the plant from the customer.protected static StringConstant for the RFC enabled FM name used to perform product availability check in the ERP system.protected static StringConstant for the RFC enabled FM name used to verify whether the material is available in the given plantprotected static StringConstant for successful return of the RFC enabled FMs.Fields inherited from class de.hybris.platform.sap.core.bol.backend.BackendBusinessObjectBase
genericFactory, moduleConfigurationAccess -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetProperty(String name) protected booleanisMaterialAvailableInPlant(String material, String plant) Checks if a material is available in the plant given.protected SapProductAvailabilityprocessResultTable(ProductModel product, String plant, com.sap.conn.jco.JCoFunction bapiMatAvail, String material, Long stockLevelDecimal, com.sap.conn.jco.JCoTable resultTable) readPlant(ProductModel product, String customerId) Returns the plant name given information about a product.protected StringreadPlantForCustomer(String material, String customerId) Gets the customer's plant by calling BAPI_CUSTOMER_GETDETAIL1, only possible with releases from 4.5b onwards.readPlantForCustomerMaterial(String material, String customerId) Gets the plant from the customer material record.readProductAvailability(ProductModel product, String customerId, String plant, Long requestedQuantity) Reads availability information given the search criteria.voidsetManagedConnectionFactory(JCoManagedConnectionFactory managedConnectionFactory) Methods inherited from class de.hybris.platform.sap.core.bol.backend.jco.BackendBusinessObjectBaseJCo
getDefaultConnectionName, getDefaultDestinationName, getDefaultJCoConnection, getJCoConnection, getJCoConnection, getModuleId, setDefaultConnectionName, setDefaultDestinationName, setManagedConnectionContainer, toStringMethods inherited from class de.hybris.platform.sap.core.bol.backend.BackendBusinessObjectBase
destroyBackendObject, getModuleConfigurationAccess, initBackendObject, setGenericFactory, setModuleConfigurationAccessMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.hybris.platform.sap.core.bol.backend.BackendBusinessObject
destroyBackendObject, initBackendObject
-
Field Details
-
BAPI_MATERIAL_AVAILABILITY
Constant for the RFC enabled FM name used to perform product availability check in the ERP system. -
BAPI_CUSTMATINFO_GETDETAILM
Constant for the RFC enabled FM name used to retrieve the plant from the customer material. -
BAPI_MATERIAL_GET_DETAIL
Constant for the RFC enabled FM name used to verify whether the material is available in the given plant -
BAPI_CUSTOMER_GETDETAIL1
Constant for the RFC enabled FM name used to retrieve the plant from the customer. -
BAPI_RETURN_SUCCESS
Constant for successful return of the RFC enabled FMs.
-
-
Constructor Details
-
SapProductAvailabilityBackendERP
public SapProductAvailabilityBackendERP()
-
-
Method Details
-
getCachedBackend
-
getConfigAccess
-
readProductAvailability
public SapProductAvailability readProductAvailability(ProductModel product, String customerId, String plant, Long requestedQuantity) throws BackendException Description copied from interface:SapProductAvailabilityBackendReads availability information given the search criteria. (Might return '0 for current date available, 1 for tomorrow').- Specified by:
readProductAvailabilityin interfaceSapProductAvailabilityBackend- Returns:
- Throws:
BackendException
-
processResultTable
protected SapProductAvailability processResultTable(ProductModel product, String plant, com.sap.conn.jco.JCoFunction bapiMatAvail, String material, Long stockLevelDecimal, com.sap.conn.jco.JCoTable resultTable) -
readPlant
Description copied from interface:SapProductAvailabilityBackendReturns the plant name given information about a product.- Specified by:
readPlantin interfaceSapProductAvailabilityBackend- Returns:
- String plant
- Throws:
BackendException
-
readPlantForCustomerMaterial
public String readPlantForCustomerMaterial(String material, String customerId) throws BackendException Description copied from interface:SapProductAvailabilityBackendGets the plant from the customer material record. Uses RFC BAPI_CUSTMATINFO_GETDETAILM.- Specified by:
readPlantForCustomerMaterialin interfaceSapProductAvailabilityBackend- Returns:
- Plant
- Throws:
BackendException
-
isMaterialAvailableInPlant
Checks if a material is available in the plant given. Uses BAPI_MATERIAL_GET_DETAIL.- Parameters:
material- the R/3 material noplant- the R/3 plant- Returns:
trueif material exists in plant,falseotherwise- Throws:
BackendException- exception from backend
-
readPlantForCustomer
Gets the customer's plant by calling BAPI_CUSTOMER_GETDETAIL1, only possible with releases from 4.5b onwards. Checks return segments PE_OPT_PERSONALDATA and PE_OPT_COMPANYDATA for the delivery plant.- Parameters:
material-customerId-- Returns:
- cutomer's plant
- Throws:
BackendException
-
getManagedConnectionFactory
- Returns:
- the managedConnectionFactory
-
setManagedConnectionFactory
- Parameters:
managedConnectionFactory- the managedConnectionFactory to set
-
getProperty
-