• WIP 投料报 Invalid Serial Number


    1.接口表数据检查无误
    2.同样数据界面能正常完成

    界面做trace

    SQL ID: b2mw8gjyv7guh Plan Hash: 2015965341

    DELETE FROM MTL_SERIAL_NUMBERS_TEMP 
    WHERE
    TRANSACTION_TEMP_ID =  :b1


    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        0      0.00       0.00          0          0          0           0
    Execute      2      0.00       0.00          0          4          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        2      0.00       0.00          0          4          0           0

    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 173 

    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      SQL*Net message from client                     2        0.00          0.00
    ********************************************************************************

    SQL ID: 9mq64qp6s994x Plan Hash: 0

    INSERT INTO MTL_SERIAL_NUMBERS_TEMP ( TRANSACTION_TEMP_ID , LAST_UPDATE_DATE ,
       LAST_UPDATED_BY , CREATION_DATE , CREATED_BY , LAST_UPDATE_LOGIN ,
      REQUEST_ID , PROGRAM_APPLICATION_ID , PROGRAM_ID , PROGRAM_UPDATE_DATE ,
      VENDOR_SERIAL_NUMBER , VENDOR_LOT_NUMBER , FM_SERIAL_NUMBER ,
      TO_SERIAL_NUMBER , SERIAL_PREFIX , ERROR_CODE , GROUP_HEADER_ID ,
      PARENT_SERIAL_NUMBER , PRODUCT_TRANSACTION_ID , PRODUCT_CODE ,
      PARENT_OBJECT_ID , PARENT_OBJECT_TYPE , PARENT_OBJECT_ID2 ,
      PARENT_OBJECT_TYPE2 ) 
    VALUES
    ( :b1 , :b2 , :b3 , :b4 , :b5 , :b6 , :b7 , :b8 , :b9 , :b10 , :b11 , :b12 ,
      :b13 , :b14 , :b15 , :b16 , :b17 , :b18 , :b19 , :b20 , :b21 , :b22 , :b23 ,
       :b24 )


    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        0      0.00       0.00          0          0          0           0
    Execute      2      0.02       0.02          0          0         10           2
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        2      0.02       0.02          0          0         10           2

    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 173 

    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      SQL*Net message from client                     2        0.00          0.01
      SQL*Net more data from client                   2        0.00          0.00
    ********************************************************************************

    发现界面走的是temp 表跳过验证,详情参见 http://blog.csdn.net/cai_xingyun/article/details/38071713

    没办法做程序trace
    API  :inv_txn_manager_pub.process_transactions
    打开相关调试配置文件

    先备份;重写 日志生成包  inv_log_util  将日志插入 log_test 表

    CREATE OR REPLACE PACKAGE BODY inv_log_util AS
    /* $Header: INVLOGUB.pls 120.2 2006/10/13 16:41:35 rambrose noship $ */

    /** Globals to hold Logging attributs **/
    g_fd utl_file.file_type;         -- Log file descriptor
    g_trace_on number := NULL;          -- Log ON state
    g_dbg_lvl number := 0;
    g_cp_flag number := 0;
    g_file_init boolean := false;
    g_dbgpath varchar2( 256) := '_' ;
    g_invfile  varchar2( 256) := NULL ;

    g_conc_request_id number := FND_GLOBAL.CONC_REQUEST_ID;


    --
    -- ***** trace ****
    -- Looks up the profile values INV_DEBUG_LEVEL, INV_DEBUG_TRACE, and
    -- INV_DEBUG_FILE and red1irects the log-output based on the profile values.
    -- If this is invoked in the context of a concurrent program, then
    -- the output is also redirected to the concurrent program's log file
    --
    PROCEDURE trace(p_message VARCHAR2 ,
                    p_module  VARCHAR2,
                    p_level   NUMBER := 9 ) IS

      l_dbgfile        varchar2(256 ) ;
      l_errmsg         varchar2(256 );
      l_timestamp      varchar2(256 );
      l_dbgpath        varchar2(128 );
      l_ndx            number;
      l_strlen         number;
      l_dbgdir         varchar2(256 );
      l_dir_separator  varchar2(1 );
      l_session     varchar2(256 );
      l_message     VARCHAR2(2000 );
      --Bug 3559334 fix. Variable not used in code, but resulting in
      --extra calls to fnd api.
      --l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
    BEGIN
      -- Since the forms-server and MWA server recycles database connections
      -- we need to always check for debug profiles values and see if they
      -- are different from the values with which it was initialized earlier. If
      -- different then reinitialize the debug variables
     CUX_DEBUG.test_log( '1',p_module,p_message);
    END trace;
    END inv_log_util;


    获取出错信息定位

    找到对应程序包 INV_TRX_MGR 发现调用java
    FUNCTION PROCESS_TRX_BATCH(p_header_id IN   NUMBER,
                               p_commit    IN  NUMBER ,
                               p_atomic    IN  NUMBER ,
                               p_business_flow_code IN NUMBER ,
                               x_proc_msg  OUT NOCOPY VARCHAR2  RETURN NUMBER AS
        LANGUAGE JAVA NAME 'oracle.apps.inv.transaction.server.TrxProcessor.processTrxBatch(java.lang.Long,
                            java.lang.Integer,
                            java.lang.Integer,
                            java.lang.Integer,
                            java.lang.String[]) return java.lang.Integer' ;


    上服务器找到java包

    猜测是在验证序列里出错 查找文件 SerialNumber.class 找到出错方法

        public static int validateStatus(int i, int j, boolean flag, int k, int l, long l1, int i1,
                long l2, long l3)
            throws InvTrxException
        {
            int j1 = getGroupId(i, j);
            int k1 = l;
            Object obj = null;
            int i2 = -1;
            if(TrxUtil.isTraceEnabled)
            {
                TrxUtil.log("Came here inside of validate serial status", 1);
                TrxUtil.log("SrcTypeId = " + i + ",ActId=" + j + ",SerCtrl+" + k + ",CurStatus=" + l + ",TrxGroup=" + j1 + " ,LstTxnSrcTypId=" + l1 + ",xfrSerCtrl=" + i1 + ",mOrigWipEntId=" + l2 + ",TrxSrcId=" + l3);
            }
            switch(j1)
            {
            default:
                break;

            case 1: // '01'
                if(flag)
                {
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("validate_status:SO_RMA_GROUP. isIssue true");
                    if(k == 2 || k == 3 || k == 5)
                    {
                        if(i == 8 && j == 21)
                        {
                            if(l == 3)
                            {
                                if(i1 == 1)
                                    k1 = 4;
                                else
                                    k1 = 5;
                            } else
                            {
                                if(TrxUtil.isTraceEnabled)
                                    TrxUtil.log("Invalid status for Int. Order Intransit ship1 :" + l, 1);
                                TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                                throw new InvTrxException("Invalid status in SO_RMA_GROUP");
                            }
                        } else
                        if(l == 3)
                        {
                            if(i == 8 && j == 3 && i1 == 6)
                                k1 = 1;
                            else
                                k1 = 4;
                        } else
                        {
                            if(TrxUtil.isTraceEnabled)
                                TrxUtil.log("Invalid status in RMA_GRP/Issue1 :" + l, 1);
                            TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                            throw new InvTrxException("Invalid status in SO_RMA_GROUP");
                        }
                    } else
                    if(k == 6)
                        if(i == 8 && j == 21)
                        {
                            if(l == 1 || l == 3 || l == 6)
                            {
                                if(i1 == 1)
                                    k1 = 4;
                                else
                                    k1 = 5;
                            } else
                            {
                                if(TrxUtil.isTraceEnabled)
                                    TrxUtil.log("Invalid status for Int. Order Intransit ship2 :" + l, 1);
                                TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                                throw new InvTrxException("Invalid status in RMA_GRP");
                            }
                        } else
                        if(l == 1 || l == 3)
                        {
                            if(i == 8 && j == 3 && i1 == 6)
                                k1 = 1;
                            else
                                k1 = 4;
                        } else
                        {
                            if(TrxUtil.isTraceEnabled)
                                TrxUtil.log("Invalid status in RMA_GRP/Issue2 :" + l, 1);
                            TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                            throw new InvTrxException("Invalid status in RMA_GRP");
                        }
                    break;
                }
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("validate_status:SO_RMA_GROUP. isIssue false");
                if(k == 2 || k == 3)
                {
                    if(l == 1 || l == 4)
                    {
                        k1 = 3;
                        break;
                    }
                    if((i == 12 || i == 7) && (l == 5 || l == 7))
                    {
                        k1 = 3;
                        break;
                    }
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("Invalid status in RMA_GRP/Rcpt :" + l, 1);
                    TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                    throw new InvTrxException("Invalid status in RMA_GRP");
                }
                if(k == 5)
                {
                    if(l == 1 || l == 4)
                    {
                        k1 = 3;
                        break;
                    }
                    if((i == 12 || i == 7) && (l == 5 || l == 7))
                    {
                        k1 = 3;
                        break;
                    }
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("Invalid status in RMA_GRP/Rcpt2 :" + l, 1);
                    TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                    throw new InvTrxException("Invalid status in RMA_GRP");
                }
                if(k != 6)
                    break;
                if(l1 == 12L && l == 1 && TrxUtil.restrictRcptSerial)
                {
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("Invalid status in RMA_GRP- Trying to receive the SerialNumber that is already received thro RMA :" + l, 1);
                    TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                    throw new InvTrxException("Invalid status in RMA_GRP");
                }
                if((i == 7 || j == 12) && (l == 5 || l == 7))
                {
                    k1 = 1;
                    break;
                }
                if(l == 1 || l == 4 || l == 5 || l == 7)
                {
                    k1 = 1;
                    break;
                }
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("Invalid status in RMA_GRP/Rcpt3 :" + l, 1);
                TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                throw new InvTrxException("Invalid status in RMA_GRP");

            case 2: // '02'
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("validate_status:SUB_XFER_GROUP:Came here inside", 1);
                if(k != 2 && k != 3 && k != 5)
                    break;
                if(flag && l == 3)
                {
                    k1 = 4;
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("validatestaus CurStatus=" + l, 1);
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("validatestaus Newstatus= " + k1, 1);
                    break;
                }
                if(!flag && (l == 4 || l == 3))
                {
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("validatestaus CurStatus=" + l, 1);
                    k1 = 3;
                    break;
                }
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("Invalid status in SUBXFER_GRP :" + l, 1);
                TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                throw new InvTrxException("Invalid status in SuvXfer_Grp");

            case 3: // '03'
                if(flag)
                {
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("validate_status:INTRANS_GROUP. isIssue true");
                    if(k != 2 && k != 3 && k != 5)
                        break;
                    if(l == 3)
                    {
                        if(TrxUtil.isTraceEnabled)
                            TrxUtil.log("-----> Inside isIssue of INTRANS_GROUP");
                        if(i1 == 1)
                            k1 = 4;
                        else
                            k1 = 5;
                        break;
                    }
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("Invalid status in INTRAN group: curstat=" + l, 1);
                    TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                    throw new InvTrxException("Invalid status in INTRAN ");
                }
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("validate_status:INTRANS_GROUP. isIssue false");
                if(k == 2 || k == 3)
                {
                    if(l == 1 || l == 4 || l == 5 || l == 7)
                    {
                        k1 = 3;
                        break;
                    }
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("Invalid status in INTRAN Group:", 1);
                    TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                    throw new InvTrxException("Invalid status in INTRAN ");
                }
                if(k == 5)
                {
                    if(l == 1 || l == 4 || l == 5 || l == 7)
                    {
                        k1 = 3;
                        break;
                    }
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("Invalid status in INTRAN Group:", 1);
                    TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                    throw new InvTrxException("Invalid status in INTRAN ");
                }
                if(k != 6)
                    break;
                if((l == 5 || l == 7) && (i == 7 || j == 12))
                {
                    k1 = 1;
                    break;
                }
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("Invalid status in INTRAN Group:", 1);
                TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                throw new InvTrxException("Invalid status in INTRAN ");

            case 4: // '04'
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("validate_status:PACKUNPACK_GROUP.");
                if(flag && l == 3)
                {
                    k1 = 4;
                    break;
                }
                if(!flag && (l == 4 || l == 3))
                {
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("validatestaus CurStatus=" + l, 1);
                    k1 = 3;
                    break;
                }
                if(l == 3 || l == 5 && l1 == 5L)
                    break;
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("Invalid status in PACKUNPACK_GROUP :" + l, 1);
                TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                throw new InvTrxException("Invalid status in PACKUNPACK_GROUP ");

            case 6: // '06'
                if(flag)
                {
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("validate_status:LOT_TRX_GROUP. isIssue true");
                    if(j == 40 || j == 41)
                    {
                        if(l != 3)
                        {
                            if(TrxUtil.isTraceEnabled)
                                TrxUtil.log("Invalid status in LOT_TRX_GROUP :" + l, 1);
                            TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                            throw new InvTrxException("Invalid status in LOT_TRX_GROUP ");
                        }
                        k1 = 3;
                        break;
                    }
                    if(j != 42)
                        break;
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("CASE LOT_TRX_GROUP:Issue:TA_LOTTRANS");
                    if(l != 3)
                    {
                        if(TrxUtil.isTraceEnabled)
                            TrxUtil.log("Invalid status in LOT_TRX_GROUP for lot trans :" + l, 1);
                        TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                        throw new InvTrxException("Invalid status in LOT_TRX_GROUP ");
                    }
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("CASE LOT_TRX_GROUP:Issue:TA_LOTTRANS: newStatus SN_NOTUSED");
                    k1 = 1;
                    break;
                }
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("validate_status:LOT_TRX_GROUP. isIssue false");
                if(j == 40 || j == 41)
                {
                    if(l != 3)
                    {
                        if(TrxUtil.isTraceEnabled)
                            TrxUtil.log("Invalid status in LOT_TRX_GROUP :" + l, 1);
                        TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                        throw new InvTrxException("Invalid status in LOT_TRX_GROUP ");
                    }
                    k1 = 3;
                    break;
                }
                if(j != 42)
                    break;
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("CASE LOT_TRX_GROUP:!Issue:TA_LOTTRANS:CurSTatus=> " + l);
                if(l == 1 || l == 6 || l == 3)
                {
                    k1 = 3;
                    break;
                }
                if(l != 4)
                    break;
                if(TrxUtil.restrictRcptSerial)
                {
                    if(TrxUtil.isTraceEnabled)
                    {
                        TrxUtil.log("CASE LOT_TRX_GROUP:Receipt of Issued Out Serials Not allowed :CurSTatus=> " + l);
                        TrxUtil.log("Invalid status due to RESTRICT_RCPT_SER :" + l, 1);
                    }
                    TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                    throw new InvTrxException("Invalid status in STD_GRP");
                }
                k1 = 3;
                break;

            case 5: // '05'
                if(i == 5)
                {
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("validate_status:STD_GROUP. srcType WIP, action:" + j);
                    if(j == 31 || j == 32)
                        try
                        {
                            PSChkWipEtyTyp.setLong(1, l3);
                            ResultSet resultset = PSChkWipEtyTyp.executeQuery();
                            if(resultset.next())
                                i2 = resultset.getInt(1);
                            resultset.close();
                        }
                        catch(Exception exception)
                        {
                            if(TrxUtil.isTraceEnabled)
                                TrxUtil.log(" Ex. in getting wip entity id" + exception);
                        }
                    if((j == 31 && l != 1 && l1 != 5L || j == 32 && l1 == 5L) && l2 == -1L)
                    {
                        if(TrxUtil.isTraceEnabled)
                            TrxUtil.log("Error: Wip entity id is null", 1);
                        if(i2 != 6 && i2 != 7)
                        {
                            if(TrxUtil.isTraceEnabled)
                                TrxUtil.log("Error: Not an EAM job and Wip entity id is null", 1);
                            TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                            throw new InvTrxException("Invalid status in STD_GROUP ");
                        }
                        if(TrxUtil.isTraceEnabled)
                            TrxUtil.log("EAM job and Wip entity id is null, it is ok!!", 1);
                    }
                    if(j == 31 && l == 4 && l1 == 5L && l2 != 0L && l3 != 0L && i2 == 1 && l2 != l3 && TrxUtil.restrictRcptSerial)
                    {
                        if(TrxUtil.isTraceEnabled)
                            TrxUtil.log("Error: This serial was returned through some other job and can not be used for the current job ", 1);
                        TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                        throw new InvTrxException("Invalid status in STD_GROUP ");
                    }
                }
                if(flag)
                {
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("validate_status:STD_GROUP. isIssue true");
                    if(k != 2 && k != 3 && k != 5)
                        break;
                    if(l == 3)
                    {
                        k1 = 4;
                        break;
                    }
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("Invalid status in STD_GRP/Issue1 :" + l, 1);
                    TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                    throw new InvTrxException("Invalid status in STD_GRP");
                }
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("validate_status:STD_GROUP. isIssue false");
                if(k == 2 || k == 3)
                {
                    if(i == 5)
                    {
                        if(TrxUtil.restrictRcptSerial && j == 27 && l == 4 && l1 != 1L && l1 != 5L)
                        {
                            if(TrxUtil.isTraceEnabled)
                                TrxUtil.log("Invalid status due to RESTRICT_RCPT_SER :" + l, 1);
                            TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                            throw new InvTrxException("Invalid status in STD_GRP");
                        }
                    } else
                    if(TrxUtil.restrictRcptSerial && j == 27 && l == 4 && l1 != 1L)
                    {
                        if(TrxUtil.isTraceEnabled)
                            TrxUtil.log("Invalid status due to RESTRICT_RCPT_SER :" + l, 1);
                        TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                        throw new InvTrxException("Invalid status in STD_GRP");
                    }
                    if(TrxUtil.restrictRcptSerial && j == 31 && l == 4 && l1 != 5L)
                    {
                        if(TrxUtil.isTraceEnabled)
                            TrxUtil.log("Invalid status due to RESTRICT_RCPT_SER  :" + l, 1);
                        TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                        throw new InvTrxException("Invalid status in STD_GRP");
                    }
                    if(l == 1 || l == 4)
                    {
                        if(j == 3 && i1 == 6)
                            k1 = 1;
                        else
                            k1 = 3;
                        break;
                    }
                    if(i == 1 && l == 5 && l1 != 8L && l1 != 13L || i == 5 && l == 5 && l1 != 8L && l1 != 13L || i == 1 && l == 7)
                    {
                        k1 = 3;
                        break;
                    }
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("Invalid status in STD_GRP/Rcpt1 :" + l, 1);
                    TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                    throw new InvTrxException("Invalid status in STD_GRP");
                }
                if(k != 5)
                    break;
                if(i == 5)
                {
                    if(TrxUtil.restrictRcptSerial && j == 27 && l == 4 && l1 != 1L && l1 != 5L)
                    {
                        if(TrxUtil.isTraceEnabled)
                            TrxUtil.log("Invalid status due to RESTRICT_RCPT_SER :" + l, 1);
                        TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                        throw new InvTrxException("Invalid status in STD_GRP");
                    }
                } else
                if(TrxUtil.restrictRcptSerial && j == 27 && l == 4 && l1 != 1L)
                {
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("Invalid status due to RESTRICT_RCPT_SER :" + l, 1);
                    TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                    throw new InvTrxException("Invalid status in STD_GRP");
                }
                if(TrxUtil.restrictRcptSerial && j == 31 && l == 4 && l1 != 5L)
                {
                    if(TrxUtil.isTraceEnabled)
                        TrxUtil.log("Invalid status due to RESTRICT_RCPT_SER  :" + l, 1);
                    TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                    throw new InvTrxException("Invalid status in STD_GRP");
                }
                if(l == 1 || l == 4)
                {
                    if(j == 3 && i1 == 6)
                        k1 = 1;
                    else
                        k1 = 3;
                    break;
                }
                if(i == 1 && l == 5 && l1 != 8L && l1 != 13L || i == 5 && l == 5 && l1 != 8L && l1 != 13L || i == 1 && l == 7)
                {
                    k1 = 3;
                    break;
                }
                if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("Invalid status in STD_GRP/Rcpt2 :" + l, 1);
                TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                throw new InvTrxException("Invalid status in STD_GRP");
            }
            return k1;
        }


    发现是对一系列设置组合校验
      TrxUtil.log("Came here inside of validate serial status", 1);
                TrxUtil.log("SrcTypeId = " + i + ",ActId=" + j + ",SerCtrl+" + k + ",CurStatus=" + l + ",TrxGroup=" + j1 + " ,LstTxnSrcTypId=" + l1 + ",xfrSerCtrl=" + i1 + ",mOrigWipEntId=" + l2 + ",TrxSrcId=" + l3);

    分析后程序最后没有找到组合最后抛出异常
     if(TrxUtil.isTraceEnabled)
                    TrxUtil.log("Invalid status in STD_GRP/Rcpt2 :" + l, 1);
                TrxUtil.addMessage("INV", "INV_INVALID_SERIAL");
                throw new InvTrxException("Invalid status in STD_GRP");

    检查上面组合系统设置
    'SrcTypeId = 5  i   l_iface_rec.transaction_source_type_id := 5; --mtl_txn_source_types--生产管理

    ,ActId=27,  j   事物处理类型决定

    SerCtrl+5  k   物料序列号控制 :接收时控制

    ,CurStatus=3, l  当前状态有现有量

    TrxGroup=5 , j1  java程序根据 i 和 j 获取

    LstTxnSrcTypId=13 l1 该物料上一次事物处理类型,序列表里

    ,xfrSerCtrl=-1, i1
    mOrigWipEntId=-1, l2
    TrxSrcId=265059' l3


  • 相关阅读:
    Python3学习笔记(五):列表和元组
    Python3学习笔记(四):序列
    python3学习笔记(二):Python初识
    三种存储类型比较-文件、块、对象存储(转)
    PostgreSQL copy命令使用记录
    pg_bulkload使用记录
    git clone 提示输入git@xxx的密码
    UNIX发展史(BSD,GNU,linux)(转)
    PostgreSQL基于时间点故障恢复PITR( point-in-time recovery )
    recovery.conf文件详解
  • 原文地址:https://www.cnblogs.com/wanghang/p/6299304.html
Copyright © 2020-2023  润新知