• PO接收产生分录总结


    1,发运行的接收应计(PO_LINE_LOCATIONS_ALL.ACCRUE_ON_RECEIPT_FLAG)控制接收时是否产生分录.
    2,分配行的接收应计(PO_DISTRIBUTION_ALL.ACCRUE_ON_RECEIPT_FLAG)控制发票匹配PO时,分配行的科目取PO charge account,还是取暂估科目.
    3,强制接收时产生分录:
      3.1,update PO_LINE_LOCATIONS_ALL set ACCRUE_ON_RECEIPT_FLAG='Y' where ...
      3.2,update PO_DISTRIBUTION_ALL set ACCRUE_ON_RECEIPT_FLAG='Y' where ...
      3.3,删除delete from RCV_ACCOUNTING_EVENTS WHERE rcv_transaction_id = 9430(一般情况是RCV_ACCOUNTING_EVENTS有, RCV_RECEIVING_SUB_LEDGER 没有)
      3.4,调用产生分录的API,传入transaction id
        RCV_AccEvents_PVT.Create_DeliverEvents(p_api_version => 1.0,
                                               p_commit             => FND_API.G_TRUE,
                                               x_return_status      => l_return_status,
                                               x_msg_count          => l_msg_count,
                                               x_msg_data           => l_msg_data,
                                               p_rcv_transaction_id => 9430)
          1.RCV_AccEvents_PVT.Create_DeliverEvents-->
            RCV_SeedEvents_PVT.Seed_RAEEvent
            --2. insert RCV_ACCOUNTING_EVENTS
            2.RCV_SeedEvents_PVT.Insert_RAEEvents-->
              -- Call Account generation API to create accounting entries
               -- insert RCV_RECEIVING_SUB_LEDGER
              3.RCV_CreateAccounting_PVT.Create_AccountingEntry-->
                  4.CST_XLA_PVT.Create_RCVXLAEvent-->
                    XLA_EVENTS_PUB_PKG.create_event
                    PSA_BC_XLA_PUB.Budgetary_Control
                    5.xla_accounting_pub_pkg.accounting_program_events
                              (p_application_id       => 707
                               ,p_accounting_mode      => 'FINAL'
                               ,p_gl_posting_flag      => 'Y'
                                ...
                        -->6.xla_accounting_pkg.accounting_program_events-->
                             events_processor
                             xla_balances_pkg.massive_update
                             xla_transfer_pkg.gl_transfer_main
                             xla_accounting_pub_pkg.accounting_program_document-->
                             fnd_request.submit_request(application     => 'XLA'
                                                     ,program         => 'XLAACCPB'
                             ...
                            7.xla_accounting_pkg.accounting_program_document-->
                              xla_accounting_pkg.accounting_program_events
      3.5,查看错误信息:xla_accounting_err_pkg.insert_errors;
        select * from xla_accounting_errors;
    
    ------------------------------
    Select aeh.ae_header_id,
           ael.ae_line_num,
           ael.accounting_class_code,
           ael.accounted_dr,
           ael.accounted_cr,
           rt.transaction_id,
           rt.shipment_header_id
      from xla_ae_headers           aeh,
           xla_ae_lines             ael,
           rcv_transactions         rt,
           XLA_DISTRIBUTION_LINKS   xdl,
           rcv_receiving_sub_ledger rrsl
     where aeh.ae_header_id = xdl.ae_header_id
       and aeh.ae_header_id = ael.ae_header_id
       and ael.ae_header_id = xdl.ae_header_id
       and ael.ae_line_num = xdl.ae_line_num
       and xdl.source_distribution_type = 'RCV_RECEIVING_SUB_LEDGER'
       and xdl.SOURCE_DISTRIBUTION_ID_NUM_1 = rrsl.RCV_SUB_LEDGER_ID
       and rrsl.rcv_transaction_id = rt.transaction_id
       and rrsl.set_of_books_id = 2045
       and rt.transaction_id = 14449
    /*  and rt.shipment_header_id IN
    (SELECT shipment_header_id
       FROM rcv_shipment_headers
      WHERE receipt_num = '&RECEIPT_NUM')*/
     order by rt.transaction_id, ael.ae_header_id, ael.ae_line_num;
    

    http://skyz.blog.35.cn/?paged=2

  • 相关阅读:
    cookie标准话
    thinkphp关联查询
    jq获取表单值与赋值代码
    Github使用.gitignore文件忽略不必要上传的文件 (转)
    python 库 Numpy 中如何求取向量范数 np.linalg.norm(求范数)(向量的第二范数为传统意义上的向量长度),(如何求取向量的单位向量)
    word 使用中 上标符号的实现
    python 编程中的一个关于图片的库 imageio (读取照片RGB内容,转换照片格式)
    交叉熵代价函数(作用及公式推导) ------转载
    cousera 深度学习 吴恩达 第一课 第二周 学习率对优化结果的影响
    python3 读入一个jpg格式的图片,并转换长宽像素个数,然后进行绘制
  • 原文地址:https://www.cnblogs.com/benio/p/2490046.html
Copyright © 2020-2023  润新知