PA创建协议

2023-10-17 22:10
文章标签 协议 创建 pa

本文主要是介绍PA创建协议,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

PA创建协议可以使用 PA_AGREEMENT_PUB.CREATE_AGREEMENT 和 PA_AGREEMENT_PUB.ADD_FUNDING,但是这两个函数创建PA协议的校验实在太多了,很多没有必要。查找系统选择 pa_agreement_utils 创建PA协议。代码如下所示

DECLAREl_row_id             VARCHAR2(30);l_agreement_id       NUMBER;l_project_funding_id NUMBER;l_err_code VARCHAR2(240);l_err_msg  VARCHAR2(240);BEGINmo_global.set_policy_context('S',106);pa_agreement_utils.create_agreement(p_rowid                  => l_row_id,p_agreement_id           => l_agreement_id,p_customer_id            => 32088 --客户,p_agreement_num          => 'AGREEMENT_0006' --协议编号,p_agreement_type         => '立即-收款' --协议类型,p_last_update_date       => SYSDATE,p_last_updated_by        => fnd_global.user_id,p_creation_date          => SYSDATE,p_created_by             => fnd_global.login_id,p_last_update_login      => fnd_global.user_id,p_owned_by_person_id     => 88 --管理员,p_term_id                => 1000 --付款方式,p_revenue_limit_flag     => 'N' --收入硬限制,p_amount                 => 10000 --系欸金额,p_description            => 'DEMO AGRREMENT IMPORT' --备注,p_expiration_date        => NULL --到期日,p_attribute_category     => NULL,p_attribute1             => NULL,p_attribute2             => NULL,p_attribute3             => NULL,p_attribute4             => NULL,p_attribute5             => NULL,p_attribute6             => NULL,p_attribute7             => NULL,p_attribute8             => NULL,p_attribute9             => NULL,p_attribute10            => NULL,p_template_flag          => NULL,p_pm_agreement_reference => NULL,p_pm_product_code        => NULL/* MCB2 params begin */,p_owning_organization_id  => 106 -- 组织,p_agreement_currency_code => 'CNY' --协议币种,p_invoice_limit_flag      => 'N' --发票限制/*Federal*/,p_customer_order_number => NULL --客户PO,p_advance_required      => 'N' -- 要求预付款,p_start_date            => NULL --起始日期,p_billing_sequence      => NULL --开单序号,p_line_of_account       => NULL -- 会计账户 ,p_attribute11           => NULL,p_attribute12           => NULL,p_attribute13           => NULL,p_attribute14           => NULL,p_attribute15           => NULL,p_attribute16           => NULL,p_attribute17           => NULL,p_attribute18           => NULL,p_attribute19           => NULL,p_attribute20           => NULL,p_attribute21           => NULL,p_attribute22           => NULL,p_attribute23           => NULL,p_attribute24           => NULL,p_attribute25           => NULL);dbms_output.put_line('l_agreement_id = ' || l_agreement_id);pa_agreement_utils.create_funding(p_rowid                  => l_row_id,p_project_funding_id     => l_project_funding_id,p_last_update_date       => SYSDATE,p_last_updated_by        => fnd_global.user_id,p_creation_date          => SYSDATE,p_created_by             => fnd_global.user_id,p_last_update_login      => fnd_global.login_id,p_agreement_id           => l_agreement_id --协议ID ,p_project_id             => 3001 --项目ID    ,p_task_id                => NULL --任务,p_allocated_amount       => 10000 --分配金额 ,p_date_allocated         => trunc(SYSDATE),p_attribute_category     => NULL,p_attribute1             => NULL,p_attribute2             => NULL,p_attribute3             => NULL,p_attribute4             => NULL,p_attribute5             => NULL,p_attribute6             => NULL,p_attribute7             => NULL,p_attribute8             => NULL,p_attribute9             => NULL,p_attribute10            => NULL,p_pm_funding_reference   => NULL,p_pm_product_code        => NULL,p_project_rate_type      => NULL,p_project_rate_date      => NULL,p_project_exchange_rate  => NULL,p_projfunc_rate_type     => NULL,p_projfunc_rate_date     => NULL,p_projfunc_exchange_rate => NULL,x_err_code               => l_err_code,x_err_msg                => l_err_msg,p_funding_category       => 'ORIGINAL' --资金分配分类 );dbms_output.put_line('l_project_funding_id = ' || l_project_funding_id);IF l_err_code <> '0' THENRETURN;dbms_output.put_line('error_msg = ' || l_err_msg);END IF;pa_agreement_utils.summary_funding_insert_row(p_agreement_id => l_agreement_id,p_project_id   => 3001,p_task_id      => NULL,p_login_id     => fnd_global.login_id,p_user_id      => fnd_global.user_id);COMMIT;
EXCEPTIONWHEN OTHERS THENROLLBACK;dbms_output.put_line('SQLERRM   = ' || SQLERRM);
END;

生成的采购协议如下图所示:

 

这篇关于PA创建协议的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/228257

相关文章

HTTP 与 SpringBoot 参数提交与接收协议方式

《HTTP与SpringBoot参数提交与接收协议方式》HTTP参数提交方式包括URL查询、表单、JSON/XML、路径变量、头部、Cookie、GraphQL、WebSocket和SSE,依据... 目录HTTP 协议支持多种参数提交方式,主要取决于请求方法(Method)和内容类型(Content-Ty

Spring创建Bean的八种主要方式详解

《Spring创建Bean的八种主要方式详解》Spring(尤其是SpringBoot)提供了多种方式来让容器创建和管理Bean,@Component、@Configuration+@Bean、@En... 目录引言一、Spring 创建 Bean 的 8 种主要方式1. @Component 及其衍生注解

MySQL 数据库表操作完全指南:创建、读取、更新与删除实战

《MySQL数据库表操作完全指南:创建、读取、更新与删除实战》本文系统讲解MySQL表的增删查改(CURD)操作,涵盖创建、更新、查询、删除及插入查询结果,也是贯穿各类项目开发全流程的基础数据交互原... 目录mysql系列前言一、Create(创建)并插入数据1.1 单行数据 + 全列插入1.2 多行数据

MySQL 临时表创建与使用详细说明

《MySQL临时表创建与使用详细说明》MySQL临时表是存储在内存或磁盘的临时数据表,会话结束时自动销毁,适合存储中间计算结果或临时数据集,其名称以#开头(如#TempTable),本文给大家介绍M... 目录mysql 临时表详细说明1.定义2.核心特性3.创建与使用4.典型应用场景5.生命周期管理6.注

Java对接MQTT协议的完整实现示例代码

《Java对接MQTT协议的完整实现示例代码》MQTT是一个基于客户端-服务器的消息发布/订阅传输协议,MQTT协议是轻量、简单、开放和易于实现的,这些特点使它适用范围非常广泛,:本文主要介绍Ja... 目录前言前置依赖1. MQTT配置类代码解析1.1 MQTT客户端工厂1.2 MQTT消息订阅适配器1.

MySQL的触发器全解析(创建、查看触发器)

《MySQL的触发器全解析(创建、查看触发器)》MySQL触发器是与表关联的存储程序,当INSERT/UPDATE/DELETE事件发生时自动执行,用于维护数据一致性、日志记录和校验,优点包括自动执行... 目录触发器的概念:创建触www.chinasem.cn发器:查看触发器:查看当前数据库的所有触发器的定

创建springBoot模块没有目录结构的解决方案

《创建springBoot模块没有目录结构的解决方案》2023版IntelliJIDEA创建模块时可能出现目录结构识别错误,导致文件显示异常,解决方法为选择模块后点击确认,重新校准项目结构设置,确保源... 目录创建spChina编程ringBoot模块没有目录结构解决方案总结创建springBoot模块没有目录

Linux中的自定义协议+序列反序列化用法

《Linux中的自定义协议+序列反序列化用法》文章探讨网络程序在应用层的实现,涉及TCP协议的数据传输机制、结构化数据的序列化与反序列化方法,以及通过JSON和自定义协议构建网络计算器的思路,强调分层... 目录一,再次理解协议二,序列化和反序列化三,实现网络计算器3.1 日志文件3.2Socket.hpp

Linux中的HTTPS协议原理分析

《Linux中的HTTPS协议原理分析》文章解释了HTTPS的必要性:HTTP明文传输易被篡改和劫持,HTTPS通过非对称加密协商对称密钥、CA证书认证和混合加密机制,有效防范中间人攻击,保障通信安全... 目录一、什么是加密和解密?二、为什么需要加密?三、常见的加密方式3.1 对称加密3.2非对称加密四、

IntelliJ IDEA2025创建SpringBoot项目的实现步骤

《IntelliJIDEA2025创建SpringBoot项目的实现步骤》本文主要介绍了IntelliJIDEA2025创建SpringBoot项目的实现步骤,文中通过示例代码介绍的非常详细,对大家... 目录一、创建 Spring Boot 项目1. 新建项目2. 基础配置3. 选择依赖4. 生成项目5.