Class LrdActionsStrategyERP
java.lang.Object
de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.strategy.BaseStrategyERP
de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.strategy.LrdActionsStrategyERP
- All Implemented Interfaces:
ConstantsR3Lrd,LrdActionsStrategy
- Direct Known Subclasses:
LrdActionsStrategyERP605
public class LrdActionsStrategyERP
extends BaseStrategyERP
implements LrdActionsStrategy, ConstantsR3Lrd
ERP implementation of LrdActionsStrategy and ConstantsR3Lrd.
- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.strategy.BaseStrategyERP
BaseStrategyERP.ReturnValue -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<SetActiveFieldsListEntry>Field list which fields will be checked in create or change modeprotected static final StringLO-API should not trigger ERP conversion exitsprotected static StringIn case setting to 'X': Deactivating of switch for check of open documents (contracts, quotations): no error message should be returned when a open contract or quotation exists for the entered product of the orderprotected StringThe condition type which should be used to determine the freight valuestatic final Stringprotected ModuleConfigurationAccessAllows access to configuration settingsstatic final Stringstatic final Stringconstant naming the key referenced in factory-config.xml where the strategy class is specifiedprotected StringThe subtotal for the item freight valueFields inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.strategy.BaseStrategyERP
ERP_CURRENCY_DEFAULT_DECIMAL_DIGITS, FALSE, genericFactory, HIDE_MESSAGE, sapLogger, XFLAGFields inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.interf.erp.ConstantsR3Lrd
ABAP_TRUE, BAPI_RETURN_ABORT, BAPI_RETURN_ERROR, BAPI_RETURN_INFO, BAPI_RETURN_WARNING, DATE_INITIAL, FIELD_HANDLE, FIELD_HANDLE_ITEM, FIELD_HANDLE_PARENT, FIELD_ID, FIELD_OBJECT_ID, FIELD_POSNR, FIELD_SPRAS_ISO, FIELD_TEXT_STRING, FM_LO_API_CLOSE, FM_LO_API_COPY, FM_LO_API_DO_ACTIONS, FM_LO_API_LOAD, FM_LO_API_SAVE, FM_LO_API_SET, FM_LO_API_SET_ACTIVE_FIELDS, FM_LO_API_SET_VCFG_ALL, FM_LO_API_WEC_ORDER_GET, FM_WEC_API_GET_VCFG_ALL, LF, MESSAGE_IGNORE_VARS, ROLE_BILLPARTY, ROLE_CONTACT, ROLE_PAYER, ROLE_SHIPTO, ROLE_SOLDTO, scenario_LO_API_WEC, SEPARATOR, UI_ELEMENT_DELIVERY_REGION, UI_ELEMENT_DELIVERY_TYPE, UI_ELEMENT_DISCOUNTS, UI_ELEMENT_EXT_REF_OBJECTS, UI_ELEMENT_HEADER_TEXT, UI_ELEMENT_HEADER_USERSTATUS, UI_ELEMENT_ITEM_CONFIG, UI_ELEMENT_ITEM_DELIVERTO, UI_ELEMENT_ITEM_DELIVPRIO, UI_ELEMENT_ITEM_DESCRIPTION, UI_ELEMENT_ITEM_LATESTDELIVDATE, UI_ELEMENT_ITEM_OVERALLSTATUS, UI_ELEMENT_ITEM_PAYTERMS, UI_ELEMENT_ITEM_PRODUCT, UI_ELEMENT_ITEM_PRODUCT_ID, UI_ELEMENT_ITEM_QTY, UI_ELEMENT_ITEM_REQDELIVDATE, UI_ELEMENT_ITEM_TEXT, UI_ELEMENT_ITEM_UNIT, UI_ELEMENT_ITEM_USERSTATUS, UI_ELEMENT_PURCHASE_ORDER_EXT, UI_ELEMENT_RECALL_ID, UI_ELEMENT_REFERENCES, UI_ELEMENT_SHIPPING_COUNTRY, UI_ELEMENT_SHIPPING_METHOD, UI_GROUP_ITEM, UI_GROUP_ORDERFields inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.interf.erp.strategy.LrdActionsStrategy
ITEMS, SHIPTO_PARTNER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidChecks if following attributes have been provided: process type, soldTo, sales organisation, distribution channel, division (Mandatory fields for LOAD-call).protected static voiddeleteItems(com.sap.conn.jco.JCoTable itAction, TechKey[] itemsToDelete) Registers the items for deletion.executeLrdDoActionsDelete(TransactionConfiguration shop, SalesDocument salesDoc, JCoConnection cn, String objectName, TechKey[] itemsToDelete) Standard constructor.voidexecuteLrdDoActionsDocumentPricing(SalesDocument salesDocument, JCoConnection cn, TransactionConfiguration transConf) Executes ERP_LORD_DO_ACTIONS with PRICING action on header level.voidexecuteLrdDoActionsDocumentPricing(SalesDocument salesDocument, String pricingType, JCoConnection cn, TransactionConfiguration transConf) Executes ERP_LORD_DO_ACTIONS with PRICING action on header level.executeLrdLoad(SalesDocument posd, BackendState erpDocument, JCoConnection cn, LoadOperation loadState) Strategy for ERP_LORD_LOAD.executeLrdSave(SalesDocument posd, boolean commit, JCoConnection cn) Strategy for ERP_LORD_SAVE.protected voidexecuteRfc(JCoConnection theConnection, com.sap.conn.jco.JCoFunction theFunction) Wrapper for the remote function call.Strategy for ERP_LORD_SET_ACTIVE_FIELDS.protected voidfillControlAttributes(com.sap.conn.jco.JCoStructure isLogicSwitch) protected voidsetActiveFieldsListCreateChange(List<SetActiveFieldsListEntry> activeFieldsListCreateChange) Fill active fields listvoidsetModuleConfigurationAccess(ModuleConfigurationAccess moduleConfigurationAccess) Methods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.strategy.BaseStrategyERP
checkAttributeEmpty, dispatchMessages, getCustExit, getGenericFactory, getMessageMapper, hasMessage, hasMessage, invalidateSalesDocument, isRecoverableHeaderError, logCall, logCall, setCustExit, setGenericFactory, setMessageMapper
-
Field Details
-
FIELD_NO_MESSAGES_DOC
In case setting to 'X': Deactivating of switch for check of open documents (contracts, quotations): no error message should be returned when a open contract or quotation exists for the entered product of the order -
FIELD_NO_CONVERSION
LO-API should not trigger ERP conversion exits- See Also:
-
STRATEGY_FACTORY_ERP
constant naming the key referenced in factory-config.xml where the strategy class is specified- See Also:
-
PARTY
- See Also:
-
ITEM
- See Also:
-
activeFieldsListCreateChange
Field list which fields will be checked in create or change mode -
headerCondTypeFreight
The condition type which should be used to determine the freight value -
subTotalItemFreight
The subtotal for the item freight value -
moduleConfigurationAccess
Allows access to configuration settings
-
-
Constructor Details
-
LrdActionsStrategyERP
public LrdActionsStrategyERP()
-
-
Method Details
-
setModuleConfigurationAccess
- Parameters:
moduleConfigurationAccess- Allows access to configuration settings
-
executeLrdDoActionsDelete
public BaseStrategyERP.ReturnValue executeLrdDoActionsDelete(TransactionConfiguration shop, SalesDocument salesDoc, JCoConnection cn, String objectName, TechKey[] itemsToDelete) throws BackendException Standard constructor.- Specified by:
executeLrdDoActionsDeletein interfaceLrdActionsStrategy- Parameters:
shop- The shop objectsalesDoc- The sales document (e.g. basket, order, ...)cn- Connection to useobjectName- Object type to delete, one ofDoActionsStrategy.CREDIT_CARD,DoActionsStrategy.ITEMSorDoActionsStrategy.SHIP_TO_PARTNER.itemsToDelete- Array ofTechKeysof the items to delete. UseDoActionsStrategy.NO_ITEMSif no items are to be deleted.- Returns:
- Object containing messages of call and (if present) the return code generated by the function module.
- Throws:
BackendException- in case of a back-end or communication error
-
deleteItems
Registers the items for deletion. This is done by generating entries in theitActiontable.- Parameters:
itAction- the JCoTable, that is filled with the items to be deleted.itemsToDelete- theTechKeys of the items to be deleted.
-
executeLrdSave
public BackendCallResult executeLrdSave(SalesDocument posd, boolean commit, JCoConnection cn) throws BackendException Description copied from interface:LrdActionsStrategyStrategy for ERP_LORD_SAVE.- Specified by:
executeLrdSavein interfaceLrdActionsStrategy- Parameters:
posd- The sales document (e.g. basket, order, ...)commit- Specifies if the save should be committed alsocn- Connection to use- Returns:
- Object containing messages of call and (if present) the return code generated by the function module.
- Throws:
BackendException- in case of a back-end or communication error
-
checkAttributesLrdLoad
Checks if following attributes have been provided: process type, soldTo, sales organisation, distribution channel, division (Mandatory fields for LOAD-call).- Parameters:
posd-- Throws:
BackendExceptionECOERP
-
executeLrdLoad
public BackendCallResult executeLrdLoad(SalesDocument posd, BackendState erpDocument, JCoConnection cn, LoadOperation loadState) throws BackendException Description copied from interface:LrdActionsStrategyStrategy for ERP_LORD_LOAD.- Specified by:
executeLrdLoadin interfaceLrdActionsStrategy- Parameters:
posd- The sales document (e.g. basket, order, ...)erpDocument- back-end layer representation of ERP sales documentcn- Connection to useloadState- operation with should be performed, create, display or- Returns:
- Object containing messages of call and (if present) the return code generated by the function module.
- Throws:
BackendException- in case of a back-end error
-
executeSetActiveFields
Description copied from interface:LrdActionsStrategyStrategy for ERP_LORD_SET_ACTIVE_FIELDS. Allows to instruct LRD API to perform only checks on fields which are actually in use (performance).
The "ActiveFieldsList" should be filled as follows:
ArrayList activFieldList = new ArrayList();
SetActiveFieldsListEntry aflE = new SetActiveFieldsListEntry("HEAD", "BSTKD");
activeFieldList.add(aflE);
- Specified by:
executeSetActiveFieldsin interfaceLrdActionsStrategy- Parameters:
cn- Connection to use- Returns:
- Object containing messages of call and (if present) the return code generated by the function module.
- Throws:
BackendException- in case of a back-end or communication error
-
setActiveFieldsListCreateChange
protected void setActiveFieldsListCreateChange(List<SetActiveFieldsListEntry> activeFieldsListCreateChange) Fill active fields list- Parameters:
activeFieldsListCreateChange- List of active fields which we setup with this call
-
executeRfc
protected void executeRfc(JCoConnection theConnection, com.sap.conn.jco.JCoFunction theFunction) throws BackendException Wrapper for the remote function call. This can be used for performance measurement instrumentation, additional logging a.o. as well as for unit tests to get independent from the ERP backend- Parameters:
theConnection- JCO connectiontheFunction- JCO Function- Throws:
BackendException
-
executeLrdDoActionsDocumentPricing
public void executeLrdDoActionsDocumentPricing(SalesDocument salesDocument, JCoConnection cn, TransactionConfiguration transConf) throws BackendException Description copied from interface:LrdActionsStrategyExecutes ERP_LORD_DO_ACTIONS with PRICING action on header level. Updates the freights, i.e. runs with pricing type 'H'- Specified by:
executeLrdDoActionsDocumentPricingin interfaceLrdActionsStrategy- Parameters:
salesDocument- Sales documentcn- JCO connection to ERPtransConf- Sales transaction specific customizing- Throws:
BackendException- in case of a back-end or communication error
-
executeLrdDoActionsDocumentPricing
public void executeLrdDoActionsDocumentPricing(SalesDocument salesDocument, String pricingType, JCoConnection cn, TransactionConfiguration transConf) throws BackendException Description copied from interface:LrdActionsStrategyExecutes ERP_LORD_DO_ACTIONS with PRICING action on header level.- Specified by:
executeLrdDoActionsDocumentPricingin interfaceLrdActionsStrategy- Parameters:
salesDocument- Sales documentpricingType- Pricing type. SeeAdditionalPricing.getPriceType()cn- JCO connection to ERPtransConf- Sales transaction specific customising- Throws:
BackendException- in case of a back-end or communication error
-
fillControlAttributes
protected void fillControlAttributes(com.sap.conn.jco.JCoStructure isLogicSwitch) - Parameters:
isLogicSwitch-
-