Oracle EBS Interface/API(3)--采购订单审批

来源:互联网 发布:手机 惯性导航算法 编辑:程序博客网 时间:2022/08/16 18:27

修改完采购订单明细以后,需求要审批。经查调用代码如下:

Declare  ActionOriginatedFrom  varchar2(30) := 'PO_FORM';  DocumentID            Number := 63556;  DocumentNumber        Varchar2(30) := '211000024751';  PreparerID            Number := 273; --采购员的员工ID  DocumentTypeCode      varchar2(30) := 'PA';  DocumentSubtype       varchar2(60) := 'BLANKET';  DocumentStatus        varchar2(60) := 'REQUIRES REAPPROVAL';  RequestorAction       varchar2(60) := 'APPROVE';  forwardToID           number;  forwardFromID         number;  DefaultApprovalPathID number;  --< Note expansion project FPJ Start>  --DocumentNote         VARCHAR2(480) := '';  DocumentNote WF_ITEM_ATTRIBUTE_VALUES.text_value%TYPE := NULL; --VARCHAR2(4000)  --< Note expansion project FPJ End>  ItemType        varchar2(8) := null;  ItemKey         varchar2(240) := null;  WorkflowProcess varchar2(80) := null;  print_check     varchar2(3) := 'N';  fax_check    varchar2(3) := 'N';  fax_number   varchar2(30);  email_check  varchar2(30) := 'N';  emailaddress varchar2(2000);  xml_or_edi   varchar2(10);  -- FPH Autocreate sourcing Rule Start  rel_gen_mthd         varchar2(30); --发放生成方法  create_sourcing_rule varchar2(30) := 'N'; --启用自动来源补充  update_sourcing_rule varchar2(30) := 'N'; --更新现有的来源补充夫则和分配  -- FPH Autocreate sourcing Rule End  l_massupdate_release VARCHAR2(1) := 'N'; -- RETROACTIVE FPI  l_org_assign_change  VARCHAR2(1) := 'N'; -- GA FPI   -- <FPJ Redesign Approval Window START>  l_change_summary PO_HEADERS_ALL.change_summary%TYPE;  -- <FPJ Redesign Approval Window END>  -- <FPJ Retroactive START>  l_communicate_updates VARCHAR2(1) := 'N';  l_retro_price_change  VARCHAR2(1) := 'N';  -- <FPJ Retroactive START>  l_user_id Number := 1110;Begin  fnd_client_info.set_org_context(114);  apps.fnd_global.apps_initialize(user_id      => l_user_id,                                  resp_id      => 50406,                                  resp_appl_id => 201);  PO_REQAPPROVAL_INIT1.Start_WF_Process(ItemType              => ItemType, --Default Null                                        ItemKey               => ItemKey, --Default Null                                        WorkflowProcess       => WorkflowProcess, --Default Null                                        ActionOriginatedFrom  => ActionOriginatedFrom,                                        DocumentID            => DocumentID, --Po header id                                        DocumentNumber        => DocumentNumber, --采购订单编码                                        PreparerID            => PreparerID, --采购员的员工ID                                        DocumentTypeCode      => DocumentTypeCode, --采购订单类型代码:                                        DocumentSubtype       => DocumentSubtype, --采购订单类型:报价单、标准采购订单、PBA                                        SubmitterAction       => RequestorAction, --提交类型                                        forwardToID           => forwardToID,                                        forwardFromID         => forwardFromID,                                        DefaultApprovalPathID => DefaultApprovalPathID,                                        Note                  => DocumentNote,                                        printFlag             => print_check, --是否打印                                        FaxFlag               => fax_check, --是否传真                                        FaxNumber             => fax_number, --传真号                                        EmailFlag             => email_check, --是否邮件                                        EmailAddress          => emailaddress, --邮件地址                                        CreateSourcingRule    => Create_Sourcing_Rule,                                        UpdateSourcingRule    => Update_Sourcing_Rule,                                        ReleaseGenMethod      => Rel_Gen_Mthd,                                        MassUpdateReleases    => l_massupdate_release, -- RETROACTIVE FPI CHANGE                                        -- <FPJ Retroactive>                                        RetroactivePriceChange => l_retro_price_change,                                        OrgAssignChange        => l_org_assign_change, -- GA FPI                                        CommunicatePriceChange => l_communicate_updates);End;


可以启用配置文件:PO:将调试工作流设置为“打开”(PO_SET_DEBUG_WORKFLOW_ON) 查看PO工作流审批调试工作。执行如下查询查看相关关键操作过程:

Select * From PO_WF_DEBUG Where ITEMKEY Like '63556%'或Select * From PO_WF_DEBUG Where EXECUTION_DATE>=System-5


 

 

 

0 0
原创粉丝点击