2018年8月28日 星期二

Oracle ASCP: ASCP執行Planning Data Pull時error (Staging tables' data is not collected)

Error message:

  Staging tables' data is not collected.  Please submit the request - Planning ODS LOAD.

原因: 可能先前的data collection失敗造成


解決方式: 執行[Planning Data Collection - Purge Staging Tables], 參數Validation設定為No.




Ref:
Error Data Collection "Staging tables' data is not collected" (Doc ID 1531482.1)

2018年8月15日 星期三

Oracle EBS: 輸入SO line耗時過久問題

狀況:
1.輸入銷退資料時, 一個line耗時近一分鐘, 嚴重時超過三分鐘
2.trace發現有段SQL執行20秒

解決方法: 更改profile設定:
  QP: Debug = Request Viewer Off
  OM: Debug Level = 0

備註: 原先[OM: Debug Level]是設定為5.


Ref:
Pricing Sql Statement Running Long (Doc ID 950810.1)

2018年8月5日 星期日

Oracle EBS: PO approval API


     SELECT  i_po_header_id
           || '-' || TO_CHAR(PO_WF_ITEMKEY_S.NEXTVAL)
      --INTO V_ITEM_KEY
      FROM DUAL;

 
     mo_global.init('PO');
     mo_global.set_policy_context('S', V_ORG_ID);
 
 
      PO_REQAPPROVAL_INIT1.START_WF_PROCESS(ItemType               => V_ITEM_TYPE, --'POAPPRV',
                                            ItemKey                => V_ITEM_KEY,
                                            WorkflowProcess        => 'POAPPRV_TOP',
                                            ActionOriginatedFrom   => 'PO_FORM',
                                            DocumentID             => I_HEADER_ID,
                                            DocumentNumber         => V_SEGMENT1, -- Purchase Order Number
                                            PreparerID             => V_PREPARER_ID, -- Buyer/Preparer_id
                                            DocumentTypeCode       => V_DOCUMENT_TYPE_CODE,
                                            DocumentSubtype        => V_DOCUMENT_SUBTYPE,
                                            SubmitterAction        => 'APPROVE',
                                            forwardToID            => NULL,
                                            forwardFromID          => NULL,
                                            DefaultApprovalPathID  => NULL,
                                            Note                   => NULL,
                                            PrintFlag              => 'N',
                                            FaxFlag                => 'N',
                                            FaxNumber              => NULL,
                                            EmailFlag              => 'N',
                                            EmailAddress           => NULL,
                                            CreateSourcingRule     => 'N',
                                            ReleaseGenMethod       => 'N',
                                            UpdateSourcingRule     => 'N',
                                            MassUpdateReleases     => 'N',
                                            RetroactivePriceChange => 'N',
                                            OrgAssignChange        => 'N',
                                            CommunicatePriceChange => 'N',
                                            p_Background_Flag      => 'N', --N:標準APICOMMIT
                                            p_Initiator            => NULL,
                                            p_xml_flag             => NULL) --,
                                            --FpdsngFlag             => 'N',   --12.0.6無此參數
                                            --p_source_type_code     => NULL); --12.0.6無此參數


備註: 執行API時不可開著PO, 否則雖然狀態變為IN PROCESS, 但workflow會有exception.

Ref:
Oracle ERP R12. - Approval PO By API
http://doggww.blogspot.com/2012/12/oracle-erp-r12-approval-po-by-api.html


依官方說法, 不提供此API:
Is There An API To Submit Incomplete PO's, Releases And Requisitions For Approval? (Doc ID 1326541.1)