zoukankan      html  css  js  c++  java
  • Oracle EBS 银行账户API

     创建银行

    -- Create Bank
    DECLARE
        p_init_msg_list           VARCHAR2(200);
        p_country_code            VARCHAR2(200);
        p_bank_name               VARCHAR2(200);
        p_bank_number             VARCHAR2(200);
        p_alternate_bank_name     VARCHAR2(200);
        p_short_bank_name         VARCHAR2(200);
        p_description             VARCHAR2(200);
        p_tax_payer_id            VARCHAR2(200);
        p_tax_registration_number VARCHAR2(200);
        x_bank_id                 NUMBER;
        x_return_status           VARCHAR2(200);
        x_msg_count               NUMBER;
        x_msg_data                VARCHAR2(200);
        p_count                   NUMBER;
    BEGIN
        p_init_msg_list       := fnd_api.g_true;
        p_country_code        := 'US';
        p_bank_name           := 'Bank1';
        p_bank_number         := '123';
        p_alternate_bank_name := 'Alternate Test Bank';
        p_short_bank_name     := 'B1';
        p_description         := 'Test Bank Creation API';
    
        ce_bank_pub.create_bank(p_init_msg_list => p_init_msg_list
                               ,p_country_code => p_country_code
                               ,p_bank_name => p_bank_name
                               ,p_bank_number => p_bank_number
                               ,p_alternate_bank_name => p_alternate_bank_name
                               ,p_short_bank_name => p_short_bank_name
                               ,p_description => p_description
                               ,x_bank_id => x_bank_id
                               ,x_return_status => x_return_status
                               ,x_msg_count => x_msg_count
                               ,x_msg_data => x_msg_data);
    
        dbms_output.put_line('BANK_ID/PARTY_ID = ' || x_bank_id);
        dbms_output.put_line('X_RETURN_STATUS = ' || x_return_status);
        dbms_output.put_line('X_MSG_COUNT = ' || x_msg_count);
        dbms_output.put_line('X_MSG_DATA = ' || x_msg_data);
    
        IF x_msg_count = 1 THEN
            dbms_output.put_line('x_msg_data ' || x_msg_data);
        ELSIF x_msg_count > 1 THEN
            LOOP
                p_count    := p_count + 1;
                x_msg_data := fnd_msg_pub.get(fnd_msg_pub.g_next
                                             ,fnd_api.g_false);
            
                IF x_msg_data IS NULL THEN
                    EXIT;
                END IF;
            
                dbms_output.put_line('Message' || p_count || ' ---' || x_msg_data);
            END LOOP;
        END IF;
    END;
    

      创建分行,也可用于创建供应商时创建的银行分行账户,在供应商创建一行环节,只能创建分行账户,银行账户是取系统已有的银行,换句话说,供应商处不能创建银行只能创建分行。

    --创建供应商银行分行 created by jenrry 20170419
    DECLARE
      l_return_status            VARCHAR2(1);
      l_msg_count                NUMBER;
      l_msg_data                 VARCHAR2(1000);
      l_bank_rec                 hz_bank_pub.bank_rec_type := hz_bank_pub.g_miss_bank_rec;
      l_orga_rec                 hz_party_v2pub.organization_rec_type := hz_party_v2pub.g_miss_organization_rec;
      l_party_rec                hz_party_v2pub.party_rec_type := hz_party_v2pub.g_miss_party_rec;
      p_bank_id                  number;
      x_party_id                 NUMBER;
      x_party_number             hz_parties.party_number%TYPE;
      x_profile_id               NUMBER;
      x_relationship_id          NUMBER;
      x_rel_party_id             NUMBER;
      x_rel_party_number         hz_parties.party_number%TYPE;
      x_bitcode_assignment_id    NUMBER;
      x_bbtcode_assignment_id    NUMBER;
      x_rfccode_assignment_id    NUMBER;
      x_pobject_version_number   NUMBER;
      x_bbtobject_version_number NUMBER;
      x_rfcobject_version_number NUMBER;
    
    BEGIN
      fnd_global.apps_initialize(0, 50737, 20005);
      mo_global.init('SQLAP');
    
      l_orga_rec.organization_name := '酒仙桥支行'; --支行名称
    
      l_orga_rec.created_by_module := 'CE';
      l_bank_rec.branch_type       := 'ABA'; --分行类型
      --l_bank_rec.bank_or_branch_number := ''; --支行编号
      l_bank_rec.inactive_date    := fnd_api.g_miss_date;
      l_bank_rec.institution_type := 'BANK_BRANCH';
      l_bank_rec.organization_rec := l_orga_rec;
    
      hz_bank_pub.create_bank_branch(p_init_msg_list         => fnd_api.g_false,
                                     p_bank_rec              => l_bank_rec,
                                     p_bank_party_id         => 5050,
                                     x_party_id              => x_party_id,
                                     x_party_number          => x_party_number,
                                     x_profile_id            => x_profile_id,
                                     x_relationship_id       => x_relationship_id,
                                     x_rel_party_id          => x_rel_party_id,
                                     x_rel_party_number      => x_rel_party_number,
                                     x_bitcode_assignment_id => x_bitcode_assignment_id,
                                     x_bbtcode_assignment_id => x_bbtcode_assignment_id,
                                     x_rfccode_assignment_id => x_rfccode_assignment_id,
                                     x_return_status         => l_return_status,
                                     x_msg_count             => l_msg_count,
                                     x_msg_data              => l_msg_data);
    
      dbms_output.put_line('l_return_status:' || l_return_status);
      dbms_output.put_line('l_msg_count:' || l_msg_count);
      dbms_output.put_line('l_msg_data:' || l_msg_data);
      dbms_output.put_line('x_party_id:' || x_party_id);
      dbms_output.put_line(fnd_msg_pub.get_detail(1, 'F'));
    
    END;
    

      

    土豆君
  • 相关阅读:
    android存储訪问框架Storage Access Framework
    hdu 5338 ZZX and Permutations (贪心+线段树+二分)
    集成CCFlow工作流与GPM的办公系统驰骋CCOA介绍(三)
    PHP中文分词扩展 SCWS
    使用docker 搭建基础的 mysql 应用
    UVA 11090 Going in Cycle!!(Bellman-Ford推断负圈)
    HDU 5237 Base64
    Android 自己定义主菜单
    HDU 1018 Big Number 数学题解
    python经常使用的十进制、16进制、字符串、字节串之间的转换(长期更新帖)
  • 原文地址:https://www.cnblogs.com/jenrry/p/10007469.html
Copyright © 2011-2022 走看看