IBM Support

changeOrder leads to error ITEM_DESC is disallowed because none of the statuses are set to 'allow'

Troubleshooting


Problem

Attempts to add the cancelled item again with different item description in an order, leads to the error YFS: Order cannot be modified in current status.

Symptom

Simulation step:
  1. createOrder with two items 0001 and 0002
    ==================================
    <Order DocumentType="0001" EnterpriseCode="DEFAULT" OrderNo=""> <OrderLines> <OrderLine DeliveryMethod="PICK"
    OrderedQty="1" PrimeLineNo="1" ShipNode="0801" SubLineNo="1"> <Item ItemDesc="Yellow Onions" ItemShortDesc="Yellow
    Onions" ItemID="0001" UnitOfMeasure="EACH" /> </OrderLine> <OrderLine DeliveryMethod="PICK" OrderedQty="1"
    PrimeLineNo="2" ShipNode="0801" SubLineNo="1"> <Item ItemDesc="Red Apples" ItemShortDesc="Red Apples" ItemID="0002"
    UnitOfMeasure="EACH" /> </OrderLine> </OrderLines> <PersonInfoBillTo Country="US" /> <PersonInfoShipTo Country="US"
    ZipCode="40876"/> </Order>
    ==================================

     
  2. Cancel order line 1 for item 0001.


     
  3. Run changeOrder to MODIFY line1 and add the item 0001 with modified item desc:
    ==================================
    <Order DocumentType="0001" EnterpriseCode="DEFAULT" OrderNo="Y100010022" SearchCriteria1="PICK"
    SellerOrganizationCode="DEFAULT" ShipNode="0801" > <OrderLines> <OrderLine Action="MODIFY"
    OrderLineKey="20180323145111385640" DeliveryMethod="PICK" OrderedQty="1" PrimeLineNo="1" ShipNode="0801" SubLineNo="1">
    <Item ItemDesc="Yellow Onions-Modified" ItemShortDesc="Yellow Onions-modified" ItemID="0001" UnitOfMeasure="EACH" />
    </OrderLine> </OrderLines> <PersonInfoBillTo Country="US" /> <PersonInfoShipTo Country="US" ZipCode="40876"/> </Order>
    ==================================


    Below is the sample error message:

    =========================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <Errors>
       <Error ErrorCode="YFS10137"
           ErrorDescription="YFS: Order cannot be modified in current
    status"
           ErrorRelatedMoreInfo="" ErrorUniqueExceptionId="
    10.2.178.1215210368585670000000022478">
           <Attribute Name="ErrorCode" Value="YFS10137"/>
           <Attribute Name="ErrorDescription" Value="YFS: Order cannot be
    modified in current status"/>
           <Attribute Name="OrderHeaderKey" Value="
    201803140019596714541652"/>
           <Attribute Name="ModificationLevel" Value="ORDER_LINE"/>
           <Attribute Name="ProcessType" Value="ORDER_FULFILLMENT"/>
           <Attribute Name="Override" Value="N"/>
           <Attribute Name="EnterpriseCode" Value="DEFAULT"/>
           <Attribute Name="OrderNo" Value="12345"/>
           <Attribute Name="PrimeLineNo" Value="9"/>
           <Attribute Name="DocumentType" Value="0001"/>
           <Attribute Name="SubLineNo" Value="1"/>
           <Attribute Name="ModificationType" Value="ITEM_DESC is
    disallowed because none of the statuses are set to 'allow'"/>
           <Attribute Name="OrderLineKey" Value="45678"
    />
           <Attribute Name="ErrorUniqueExceptionId" Value="
    11.21.17.1223456788"/>
           <Stack>com.yantra.yfc.util.YFCException
    at com.yantra.omp.business.order.manage.YFSManageOrderUtils.
    throwModCheckFailError(YFSManageOrderUtils.java:1479)
    at com.yantra.omp.business.order.manage.YFSManageOrderUtils.
    validateOrderLineChangesBasedOnStatus(YFSManageOrderUtils.java:303)
    at com.yantra.omp.business.order.manage.YFSOrderValidationIterator.
    endOrderLines(YFSOrderValidationIterator.java:1740)
    at com.yantra.omp.business.order.manage.YFSOrderValidationIterator.
    iteratorOrderLines

    =========================================================

Cause

This is working as designed.

Resolving The Problem

This is working as designed since the modification rules for 'Change Item Description' do not contain the 'Cancel' status. Hence, item descriptions should not be modified in cancelled status.

Workaround:

  1. Call changeOrder without the ItemDesc attribute to move the status to 'Created' then call changeOrder to modify the ItemDesc

    NOTE: You do not need the original description, you just need to exclude the attribute in the first changeOrder

     
  2. Add an order line with the new item description instead of changing the existing cancelled line.

[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"ARM Category":[{"code":"a8m0z000000cy00AAA","label":"Orders"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.0.0;9.3.0;9.4.0;9.5.0"}]

Document Information

Modified date:
09 July 2021

UID

swg22016767