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:
  • Field Details

    • FIELD_NO_MESSAGES_DOC

      protected static String 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

      protected static final String FIELD_NO_CONVERSION
      LO-API should not trigger ERP conversion exits
      See Also:
    • STRATEGY_FACTORY_ERP

      public static final String STRATEGY_FACTORY_ERP
      constant naming the key referenced in factory-config.xml where the strategy class is specified
      See Also:
    • PARTY

      public static final String PARTY
      See Also:
    • ITEM

      public static final String ITEM
      See Also:
    • activeFieldsListCreateChange

      protected final List<SetActiveFieldsListEntry> activeFieldsListCreateChange
      Field list which fields will be checked in create or change mode
    • headerCondTypeFreight

      protected String headerCondTypeFreight
      The condition type which should be used to determine the freight value
    • subTotalItemFreight

      protected String subTotalItemFreight
      The subtotal for the item freight value
    • moduleConfigurationAccess

      protected ModuleConfigurationAccess moduleConfigurationAccess
      Allows access to configuration settings
  • Constructor Details

    • LrdActionsStrategyERP

      public LrdActionsStrategyERP()
  • Method Details

    • setModuleConfigurationAccess

      public void setModuleConfigurationAccess(ModuleConfigurationAccess moduleConfigurationAccess)
      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:
      executeLrdDoActionsDelete in interface LrdActionsStrategy
      Parameters:
      shop - The shop object
      salesDoc - The sales document (e.g. basket, order, ...)
      cn - Connection to use
      objectName - Object type to delete, one of DoActionsStrategy.CREDIT_CARD, DoActionsStrategy.ITEMS or DoActionsStrategy.SHIP_TO_PARTNER.
      itemsToDelete - Array of TechKeys of the items to delete. Use DoActionsStrategy.NO_ITEMS if 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

      protected static void deleteItems(com.sap.conn.jco.JCoTable itAction, TechKey[] itemsToDelete)
      Registers the items for deletion. This is done by generating entries in the itAction table.
      Parameters:
      itAction - the JCoTable, that is filled with the items to be deleted.
      itemsToDelete - the TechKeys of the items to be deleted.
    • executeLrdSave

      public BackendCallResult executeLrdSave(SalesDocument posd, boolean commit, JCoConnection cn) throws BackendException
      Description copied from interface: LrdActionsStrategy
      Strategy for ERP_LORD_SAVE.
      Specified by:
      executeLrdSave in interface LrdActionsStrategy
      Parameters:
      posd - The sales document (e.g. basket, order, ...)
      commit - Specifies if the save should be committed also
      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
    • checkAttributesLrdLoad

      protected void checkAttributesLrdLoad(SalesDocument posd) throws BackendExceptionECOERP
      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: LrdActionsStrategy
      Strategy for ERP_LORD_LOAD.
      Specified by:
      executeLrdLoad in interface LrdActionsStrategy
      Parameters:
      posd - The sales document (e.g. basket, order, ...)
      erpDocument - back-end layer representation of ERP sales document
      cn - Connection to use
      loadState - 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

      public BaseStrategyERP.ReturnValue executeSetActiveFields(JCoConnection cn) throws BackendException
      Description copied from interface: LrdActionsStrategy
      Strategy 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:
      executeSetActiveFields in interface LrdActionsStrategy
      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 connection
      theFunction - JCO Function
      Throws:
      BackendException
    • executeLrdDoActionsDocumentPricing

      public void executeLrdDoActionsDocumentPricing(SalesDocument salesDocument, JCoConnection cn, TransactionConfiguration transConf) throws BackendException
      Description copied from interface: LrdActionsStrategy
      Executes ERP_LORD_DO_ACTIONS with PRICING action on header level. Updates the freights, i.e. runs with pricing type 'H'
      Specified by:
      executeLrdDoActionsDocumentPricing in interface LrdActionsStrategy
      Parameters:
      salesDocument - Sales document
      cn - JCO connection to ERP
      transConf - 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: LrdActionsStrategy
      Executes ERP_LORD_DO_ACTIONS with PRICING action on header level.
      Specified by:
      executeLrdDoActionsDocumentPricing in interface LrdActionsStrategy
      Parameters:
      salesDocument - Sales document
      pricingType - Pricing type. See AdditionalPricing.getPriceType()
      cn - JCO connection to ERP
      transConf - 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 -