Interface BackendState
- All Known Implementing Classes:
BasketERP,IsaBackendBusinessObjectBaseSalesERP,OrderBaseERP,OrderERP,OrderHistoryERP,SalesDocumentERP
public interface BackendState
Represents the state of a sales document
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddErroneousItem(Item item) Stores an erroneous item to be later able to restore its attrtibutesvoidClear list of erroneous itemsReturns the previously stored information about the erroneous header.Returns the previously stored information about erroneous items.com.sap.conn.jco.JCoTableReturns the docflow of the headerReturns the Header price attribute map If not yet present, creates the mapReturns the header property map If not yet present, creates the mapcom.sap.conn.jco.JCoTableReturns the docflow of the itemsReturns the item price attribute map If not yet present, creates the mapReturns the item property map If not yet present, creates the mapReturns the map, to store item variant informationgetMessageList(TechKey techKey) Returns the MessageList for the given key, if one exits, null elseReturns the MessageList for the given key, if one exits, if not create oneReturns stored shipping condition.Returns the map, which stores the header resp.booleanIn case an order has just been created, or just been saved, we do not expect certain data to be present already.booleanFor performance reasons DocFlow should only be read when necessary.booleanvoidremoveErroneousItems(TechKey[] itemsToDelete) Remove entries from list of error restore information .voidremoveMessageFromMessageList(TechKey techKey, String resourceKey) Removes the given message from the MessageList in the MessageBufferMap for the given key, if presentvoidsetDocflowRead(boolean b) Sets the flag dowflowReadvoidsetDocumentInitial(boolean isInitial) Sales document is initial.voidsetErroneous(boolean b) Set the error state read from the backendvoidsetErroneousHeader(Header header) Sets erroneous header.voidsetHeaderDocFlow(com.sap.conn.jco.JCoTable table) Sets the header docflow in the table buffervoidsetItemDocFlow(com.sap.conn.jco.JCoTable table) Sets the items docflow in the table buffervoidsetPayerHandle(String payer) Sets handle of payervoidsetShippingCondition(String currentShippingCondition) Sets stored shipping condition.voidsetSoldToHandle(String soldTo) Sets handle of soldTo partner
-
Method Details
-
getLoadState
LoadOperation getLoadState()- Returns:
- Current Load state of the document
-
isDocflowRead
boolean isDocflowRead()For performance reasons DocFlow should only be read when necessary. Typically + DocFlow will not change when one changes or displays an order within one session. So it is sufficient to read it once.- Returns:
- true, if docflow has been read
-
isCreateProcess
boolean isCreateProcess()In case an order has just been created, or just been saved, we do not expect certain data to be present already. For Example DocFlow data. So for performance reasons it makes sense not to request those data.- Returns:
- true, if the salesdocument is just created
-
setHeaderDocFlow
void setHeaderDocFlow(com.sap.conn.jco.JCoTable table) Sets the header docflow in the table buffer- Parameters:
table- header docflow table
-
setItemDocFlow
void setItemDocFlow(com.sap.conn.jco.JCoTable table) Sets the items docflow in the table buffer- Parameters:
table- JCoTable item docflow
-
setDocflowRead
void setDocflowRead(boolean b) Sets the flag dowflowRead- Parameters:
b- docflowread
-
getHeaderDocFlow
com.sap.conn.jco.JCoTable getHeaderDocFlow()Returns the docflow of the header- Returns:
- JCoTable docflow of the header
-
getItemDocFlow
com.sap.conn.jco.JCoTable getItemDocFlow()Returns the docflow of the items- Returns:
- HashMap doc flow of the items
-
getItemsPriceAttribMap
Returns the item price attribute map If not yet present, creates the map- Returns:
- HashMap, map for the item price attributes
-
getHeaderPriceAttribs
Returns the Header price attribute map If not yet present, creates the map- Returns:
- HashMap, map for the header price attributes
-
getItemsPropMap
Returns the item property map If not yet present, creates the map- Returns:
- HashMap, map for the item properties
-
getHeaderPropMap
Returns the header property map If not yet present, creates the map- Returns:
- HashMap, map for the header properties
-
getMessageList
Returns the MessageList for the given key, if one exits, null else- Parameters:
techKey- Technical key identifying head or item object- Returns:
- the MessageList for the given TechKey or a default MessageList, if the key is null or initial, if existing else null
-
getItemVariantMap
Returns the map, to store item variant information- Returns:
- HashMap, map of item variants
-
getShipToMap
Returns the map, which stores the header resp. item vs. shipToKey relation- Returns:
- Map
-
getSavedItemsMap
- Returns:
- List of saved (already existing) items of the order
-
removeMessageFromMessageList
Removes the given message from the MessageList in the MessageBufferMap for the given key, if present- Parameters:
techKey- technical of the business object the message belongs toresourceKey- resource key of the message
-
getOrCreateMessageList
Returns the MessageList for the given key, if one exits, if not create one- Parameters:
key- technical key identifying head or item object- Returns:
- the MessageList for the given TechKey or a default MessageList, if the key is null or initial
-
setErroneous
void setErroneous(boolean b) Set the error state read from the backend- Parameters:
b- true if ERRKZ is 'X', otherwise false
-
setSoldToHandle
Sets handle of soldTo partner- Parameters:
soldTo- handle of the soldto partner function
-
setPayerHandle
Sets handle of payer- Parameters:
payer- handle of the payer partner function
-
getSoldToHandle
String getSoldToHandle()- Returns:
- handle of the soldTo partner
-
getPayerHandle
String getPayerHandle()- Returns:
- handle of the payer
-
setDocumentInitial
void setDocumentInitial(boolean isInitial) Sales document is initial. The first update might need to do specific shipto handling- Parameters:
isInitial- true if document is initial
-
isDocumentInitial
boolean isDocumentInitial()- Returns:
- Sales document is initial
-
getShippingCondition
String getShippingCondition()Returns stored shipping condition. We need this to decide whether a pricing update is necessary.- Returns:
- Shipping condition
-
setShippingCondition
Sets stored shipping condition. We need this to decide whether a pricing update is necessary.- Parameters:
currentShippingCondition- Shipping condition
-
addErroneousItem
Stores an erroneous item to be later able to restore its attrtibutes- Parameters:
item- The item (including message list, productId which we need to restore
-
getErroneousItems
Returns the previously stored information about erroneous items. Even if the sales document items are technically ok and can be sent via LO-API, this list holds the information which causes the trouble, and which needs to be put to the items after read to persist the user entry- Returns:
- Map for all erroneous items
-
getErroneousHeader
Header getErroneousHeader()Returns the previously stored information about the erroneous header.- Returns:
- Sales document header
-
setErroneousHeader
Sets erroneous header.- Parameters:
header- Sales document header
-
clearErroneousItems
void clearErroneousItems()Clear list of erroneous items -
removeErroneousItems
Remove entries from list of error restore information .- Parameters:
itemsToDelete-
-