IBM Support

Creating a purchase order chained from an existing sales order failes with error Invalid Transaction

Troubleshooting


Problem

Attempts to create a purchase order chained from an existing sales order using createOrder API fails with Invalid Transaction error in IBM Sterling Order Management.

Symptom

Steps to reproduce:

  1. Create a Vendor ship node VENDOR1 with requires chained order checked.

  2. Set Distribution group DG1 to source from the VENDOR1.

  3. Create SO with following XML

    <?xml version="1.0"?>
    <Order EnterpriseCode="XXXXX" DocumentType="0001">
       <OrderLines>
           <OrderLine OrderedQty="1" DistributionRuleId="DG1">
               <Item ItemID="ITEM1" UnitOfMeasure="EACH"/>
               <PersonInfoShipTo Country="US"/>
           </OrderLine>
       </OrderLines>
       <PersonInfoBillTo Country="XX"/>
    </Order>


  4. Schedule the above created SO.

  5. Now try creating PO using the following XML using createOrder API

    <Order DocumentType="0005" EnterpriseCode="XXXXX">
    <OrderLines>
     <OrderLine OrderedQty="1">
      <Item ItemID="ITEM1" UnitOfMeasure="EACH"/>
      <ChainedFrom DocumentType="0001" EnterpriseCode="XXXXX" OrderNo="XXXXXXXXX" PrimeLineNo="1" SubLineNo="1"/>
      <PersonInfoShipTo Country="XX"/>
     </OrderLine>
    </OrderLines>
    <PersonInfoBillTo Country="XX"/>
    </Order>


    As a result, the following ERROR is thrown:

    <Errors>
       <Error ErrorCode="YCP0063" ErrorDescription="Invalid Transaction"  ErrorRelatedMoreInfo=""  ErrorUniqueExceptionId="XX.XX.XX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX">
           <Attribute Name="ErrorCode" Value="YCP0063"/>
           <Attribute Name="ErrorDescription" Value="Invalid Transaction"/>
           <Attribute Name="BaseTransactionKey" Value="INCLUDE_IN_CHAINED_ORDER"/>
           <Attribute Name="ChainedDocumentType" Value="0005"/>
           <Attribute Name="ProcessTypeKey" Value="ORDER_FULFILLMENT"/>
          ...
      <Error>
    </Errors>

Cause

Out of the box DROP_SHIP pipeline was not used.

Diagnosing The Problem

Since createChainedOrder API was not used for creating chained orders, OOB DROP_SHIP pipeline was not used. The logs showed the CHAIN_TYPE attribute's value as OTHER, which selected a different pipeline that didn't have any transaction extending INCLUDE_IN_CHAINED_ORDER base transaction. The logs showed following SQL returning no rows :

SELECT YFS_TRANSACTION.* FROM YFS_TRANSACTION YFS_TRANSACTION WHERE PROCESS_TYPE_KEY = 'ORDER_FULFILLMENT' AND CHAINED_DOCUMENT_TYPE = '0005' AND BASE_TRANSACTION_KEY = 'INCLUDE_IN_CHAINED_ORDER';

Resolving The Problem

Create a new transaction extending INCLUDE_IN_CHAINED_ORDER base transaction and use it in the pipeline.

[{"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Maintenance","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.3","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg21677623