java.lang.Object
de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.strategy.BaseMapper
de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.strategy.HeaderMapper

public class HeaderMapper extends BaseMapper
Responsible to map header attributes from the LO-API response to the header BO representation. Used for reading and writing data to ERP.
  • Field Details

    • OBJECT_ID_HEAD

      public static final String OBJECT_ID_HEAD
      LO-API ID of header segment
      See Also:
    • sapLogger

      public static final Log4JWrapper sapLogger
      Logging instance
    • genericFactory

      protected GenericFactory genericFactory
      Factory to access SAP session beans
    • converter

      protected Converter converter
      Converter BO
  • Constructor Details

    • HeaderMapper

      public HeaderMapper()
  • Method Details

    • setConverter

      public void setConverter(Converter converter)
      Parameters:
      converter -
    • setGenericFactory

      public void setGenericFactory(GenericFactory genericFactory)
      Injected generic factory.
      Parameters:
      genericFactory -
    • init

      public void init()
      Description copied from class: BaseMapper
      Bean initializer.

      Check if all mandatory values injected, else throw runtime error.

      Specified by:
      init in class BaseMapper
    • read

      public void read(com.sap.conn.jco.JCoStructure esHeadComV, com.sap.conn.jco.JCoStructure esHeadComR, com.sap.conn.jco.JCoTable ttHeadCondV, BackendState backendState, TransactionConfiguration shop, Map<String,String> headerPriceAttribs, Map<String,String> itemsPropMap, Map<String,String> headerPropMap, SalesDocument salesDocument, Header header)
      Fill header BOL attributes from the LO-API response
      Parameters:
      esHeadComV - JCO structure
      esHeadComR - JCO structure
      ttHeadCondV - Header condition table
      backendState - Contains backend stateful attributes
      shop - Configuration
      readParams - Read parameters
      headerPriceAttribs -
      itemsPropMap -
      headerPropMap -
      salesDocument - BOL cart or order
      header - BOL header of cart or order
    • readEsHeadComV

      protected void readEsHeadComV(com.sap.conn.jco.JCoStructure esHeadComV, Header header, boolean setIpcPriceAttributes, boolean shippingConditionAsText, SalesDocument businessObjectInterface, BackendState baseR3Lrd, com.sap.conn.jco.JCoStructure esHeadComR)
      Handle output fields of structure ES_HEAD_COMV
      Parameters:
      esHeadComV -
      header -
      setIpcPriceAttributes -
      shippingConditionAsText -
      businessObjectInterface -
      baseR3Lrd -
      esHeadComR -
    • setValidToDateForQuotations

      protected void setValidToDateForQuotations(com.sap.conn.jco.JCoStructure esHeadComV, Header header, DocumentType docType)
      Sets the valid To date, if the document is a Quotation.
      Parameters:
      esHeadComV - the LRD Header structure
      header - the document header
      docType - the document Type
    • readEsHeadComR

      protected void readEsHeadComR(com.sap.conn.jco.JCoStructure esHeadComR, Header header, Map<String,String> ipcHeadPropMap, Map<String,String> ipcHeadAttribMap, Map<String,String> ipcItemPropMap, TransactionConfiguration shop)
      Handle output fields of structure ES_HEAD_COMR
      Parameters:
      esHeadComR -
      header -
      readParams -
      ipcHeadPropMap -
      ipcHeadAttribMap -
      ipcItemPropMap -
      shop -
    • setValidFromDateForQuotations

      protected void setValidFromDateForQuotations(com.sap.conn.jco.JCoStructure esHeadComR, Header header, DocumentType docType)
      Sets the valid From date, if the document is a Quotation.
      Parameters:
      esHeadComR - the LRD Header read only structure
      header - the document header
      docType - the document Type
    • readTtHeadCondV

      protected void readTtHeadCondV(com.sap.conn.jco.JCoTable ttHeadCondV, com.sap.conn.jco.JCoStructure esHeadComR, Header header, String headerCondTypeFreight)
      Handle output fields of structure TT_HEAD_COND_COMV
      Parameters:
      ttHeadCondV -
      esHeadComR -
      header -
      headerCondTypeFreight -
    • calculateValuesWOFreight

      protected void calculateValuesWOFreight(Header header)
      Calculates Net and Gross values without Freight.
      Parameters:
      header - BOL header of sales document
    • write

      protected void write(Header salesDocHeader, BackendState salesDocR3Lrd, com.sap.conn.jco.JCoStructure headComV, com.sap.conn.jco.JCoStructure headComX, TransactionConfiguration config)
      Writes header attributes to prepare the LO-API update call
      Parameters:
      salesDocHeader -
      salesDocR3Lrd -
      headComV -
      headComX -
      config -
    • getCommonI18NService

      public de.hybris.platform.servicelayer.i18n.CommonI18NService getCommonI18NService()
      Returns:
      the commonI18NService
    • setCommonI18NService

      public void setCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService)
      Parameters:
      commonI18NService - the commonI18NService to set