EBS常用的API之二

AR模块

创建客户/客户地址

hz_cust_account_v2pub.create_cust_account(p_init_msg_list        => fnd_api.g_true
                                               ,p_create_profile_amt   => fnd_api.g_false
                                               ,p_cust_account_rec     => l_cust_account_rec
                                               ,p_organization_rec     => l_organization_rec
                                               ,p_customer_profile_rec => l_customer_profile_rec
                                               ,x_cust_account_id      => x_customer_id
                                               ,x_account_number       => l_dummy_char
                                               ,x_party_id             => l_dummy_num
                                               ,x_party_number         => l_dummy_char
                                               ,x_profile_id           => l_dummy_num
                                               ,x_return_status        => x_status
                                               ,x_msg_count            => x_msg_count
                                               ,x_msg_data             => x_msg_data);

hz_location_v2pub.create_location(p_init_msg_list => fnd_api.g_true
                                       ,p_location_rec  => l_location_rec
                                       ,x_location_id   => x_location_id
                                       ,x_return_status => l_dummy_status
                                       ,x_msg_count     => l_msg_count
                                       ,x_msg_data      => l_dummy_msg);

创建事务处理

ar_invoice_api_pub.create_single_invoice(p_api_version          => 1.0
                                            ,p_init_msg_list        => fnd_api.g_false
                                            ,p_commit               => fnd_api.g_false
                                            ,p_batch_source_rec     => l_batch_source_rec
                                            ,p_trx_header_tbl       => l_trx_header_tbl
                                            ,p_trx_lines_tbl        => l_trx_lines_tbl
                                            ,p_trx_dist_tbl         => l_trx_dist_tbl
                                            ,p_trx_salescredits_tbl => l_trx_salescredits_tbl
                                            ,x_customer_trx_id      => x_customer_trx_id
                                            ,x_return_status        => l_dummy_status
                                            ,x_msg_count            => x_msg_count
                                            ,x_msg_data             => l_dummy_msg);

创建收款

ar_receipt_api_pub.create_cash(p_api_version                => 1.0
                                    ,p_init_msg_list              => fnd_api.g_true
                                    ,p_commit                     => fnd_api.g_false
                                    ,p_validation_level           => fnd_api.g_valid_level_full
                                    ,x_return_status              => l_return_status
                                    ,x_msg_count                  => l_msg_count
                                    ,x_msg_data                   => l_msg_data
                                    ,p_currency_code              => p_cash_rec.currency_code
                                    ,p_amount                     => p_cash_rec.amount
                                    ,p_receipt_number             => p_cash_rec.receipt_number
                                    ,p_receipt_date               => p_cash_rec.receipt_date
                                    ,p_gl_date                    => p_cash_rec.gl_date
                                    ,p_maturity_date              => p_cash_rec.maturity_date
                                    ,p_customer_number            => p_cash_rec.customer_number
                                    ,p_receipt_method_id          => p_cash_rec.receipt_method_id
                                    ,p_org_id                     => p_cash_rec.org_id
                                    ,p_remittance_bank_account_id => p_cash_rec.remittance_bank_account_id
                                    ,p_attribute_rec              => p_cash_rec.attribute_rec
                                    ,p_global_attribute_rec       => p_cash_rec.global_attribute_rec
                                    ,p_comments                   => p_cash_rec.comments
                                    ,p_cr_id                      => x_cash_receipt_id
                                    ,p_factor_discount_amount     => p_cash_rec.factor_discount_amount);

创建杂项收款

ar_receipt_api_pub.create_misc(p_api_version                => 1.0
                                    ,p_init_msg_list              => fnd_api.g_true
                                    ,p_commit                     => fnd_api.g_false
                                    ,p_validation_level           => fnd_api.g_valid_level_full
                                    ,x_return_status              => l_return_status
                                    ,x_msg_count                  => l_msg_count
                                    ,x_msg_data                   => l_msg_data
                                    ,p_currency_code              => p_cash_rec.currency_code
                                    ,p_amount                     => p_cash_rec.amount
                                    ,p_receipt_number             => v_receipt_num
                                    ,p_receipt_date               => p_cash_rec.receipt_date
                                    ,p_gl_date                    => p_cash_rec.gl_date
                                    ,p_activity                   => p_cash_rec.activity
                                    ,p_remittance_bank_account_id => p_cash_rec.remittance_bank_account_id
                                    ,p_receipt_method_id          => p_cash_rec.receipt_method_id
                                    ,p_attribute_record           => p_cash_rec.attribute_rec
                                    ,p_global_attribute_record    => p_cash_rec.global_attribute_rec
                                    ,p_comments                   => p_cash_rec.comments
                                    ,p_org_id                     => p_cash_rec.org_id
                                    ,p_misc_receipt_id            => x_cash_receipt_id);

收款核销发票

ar_receipt_api_pub.apply(p_api_version      => 1.0
                            ,p_init_msg_list    => fnd_api.g_true
                            ,p_commit           => fnd_api.g_false
                            ,p_validation_level => fnd_api.g_valid_level_full
                            ,p_org_id           => l_org_id
                            ,p_cash_receipt_id  => p_cash_receipt_id
                            ,p_customer_trx_id  => p_customer_trx_id
                            ,p_apply_date       => p_apply_date
                            ,p_apply_gl_date    => p_apply_gl_date
                            ,x_return_status    => x_return_status
                            ,x_msg_count        => l_msg_count
                            ,x_msg_data         => x_msg_data);

核销收款注销/短期负债(Receipt write-off)

ar_receipt_api_pub.activity_application(p_api_version                  => 1.0
                                           ,p_init_msg_list                => fnd_api.g_true
                                           ,p_commit                       => fnd_api.g_false
                                           ,p_validation_level             => fnd_api.g_valid_level_full
                                           ,p_org_id                       => l_org_id
                                           ,p_called_from                  => 'API'
                                           ,x_return_status                => l_return_status
                                           ,x_msg_count                    => l_msg_count
                                           ,x_msg_data                     => l_msg_data
                                           ,p_cash_receipt_id              => p_cash_receipt_id
                                           ,p_amount_applied               => p_amount_applied
                                           ,p_applied_payment_schedule_id  => -3
                                           , ----核销到收款注销
                                            p_receivables_trx_id           => p_receivables_trx_id
                                           ,p_apply_gl_date                => p_apply_gl_date
                                           ,p_application_ref_type         => l_application_ref_type
                                           ,p_application_ref_id           => l_application_ref_id
                                           ,p_application_ref_num          => l_application_ref_num
                                           ,p_secondary_application_ref_id => l_secondary_application_ref_id
                                           ,p_receivable_application_id    => l_receivable_application_id);

冲销收款

ar_receipt_api_pub.reverse(p_api_version            => 1.0
                              ,p_init_msg_list          => fnd_api.g_true
                              ,p_commit                 => fnd_api.g_false
                              ,p_validation_level       => fnd_api.g_valid_level_full
                              ,x_return_status          => l_return_status
                              ,x_msg_count              => l_msg_count
                              ,x_msg_data               => l_msg_data
                              ,p_cash_receipt_id        => p_cash_receipt_id
                              ,p_reversal_category_code => p_reversal_category_code
                              ,p_reversal_reason_code   => p_reversal_reason_code
                              ,p_reversal_date          => p_reversal_date
                              ,p_reversal_gl_date       => p_reversal_gl_date
                              ,p_attribute_rec          => l_attribute_rec);

贷项通知单核销发票

ar_cm_api_pub.apply_on_account(p_api_version               => 1,
                                         p_init_msg_list             => fnd_api.g_true,
                                         p_commit                    => fnd_api.g_false,
                                         p_cm_app_rec                => l_cm_app_rec,
                                         x_return_status             => l_return_status,
                                         x_msg_count                 => l_msg_count,
                                         x_msg_data                  => l_msg_data,
                                         x_out_rec_application_id    => l_out_rec_application_id,
                                         x_acctd_amount_applied_from => l_acctd_amount_applied_from,
                                         x_acctd_amount_applied_to   => l_acctd_amount_applied_to);

HR模块

创建人员

    hr_employee_api.create_employee(p_validate                     => l_person_rec.validate
                                   ,p_hire_date                    => l_person_rec.hire_date
                                   ,p_business_group_id            => l_person_rec.business_group_id
                                   ,p_last_name                    => l_person_rec.last_name
                                   ,p_sex                          => l_person_rec.sex
                                   ,p_person_type_id               => l_person_rec.person_type_id
                                   ,p_per_comments                 => l_person_rec.per_comments
                                   ,p_date_employee_data_verified  => l_person_rec.date_employee_data_verified
                                   ,p_date_of_birth                => l_person_rec.date_of_birth
                                   ,p_email_address                => l_person_rec.email_address
                                   ,p_employee_number              => l_person_rec.employee_number
                                   ,p_expense_check_send_to_addres => l_person_rec.expense_check_send_to_addres
                                   ,p_first_name                   => l_person_rec.first_name
                                   ,p_known_as                     => l_person_rec.known_as
                                   ,p_marital_status               => l_person_rec.marital_status
                                   ,p_middle_names                 => l_person_rec.middle_names
                                   ,p_nationality                  => l_person_rec.nationality
                                   ,p_national_identifier          => l_person_rec.national_identifier
                                   ,p_previous_last_name           => l_person_rec.previous_last_name
                                   ,p_registered_disabled_flag     => l_person_rec.registered_disabled_flag
                                   ,p_title                        => l_person_rec.title
                                   ,p_vendor_id                    => l_person_rec.vendor_id
                                   ,p_work_telephone               => l_person_rec.work_telephone
                                   ,p_attribute_category           => l_person_rec.attribute_category
                                   ,p_attribute1                   => l_person_rec.attribute1
                                   ,p_attribute2                   => l_person_rec.attribute2
                                   ,p_attribute3                   => l_person_rec.attribute3
                                   ,p_attribute4                   => l_person_rec.attribute4
                                   ,p_attribute5                   => l_person_rec.attribute5
                                   ,p_attribute6                   => l_person_rec.attribute6
                                   ,p_attribute7                   => l_person_rec.attribute7
                                   ,p_attribute8                   => l_person_rec.attribute8
                                   ,p_attribute9                   => l_person_rec.attribute9
                                   ,p_attribute10                  => l_person_rec.attribute10
                                   ,p_attribute11                  => l_person_rec.attribute11
                                   ,p_attribute12                  => l_person_rec.attribute12
                                   ,p_attribute13                  => l_person_rec.attribute13
                                   ,p_attribute14                  => l_person_rec.attribute14
                                   ,p_attribute15                  => l_person_rec.attribute15
                                   ,p_attribute16                  => l_person_rec.attribute16
                                   ,p_attribute17                  => l_person_rec.attribute17
                                   ,p_attribute18                  => l_person_rec.attribute18
                                   ,p_attribute19                  => l_person_rec.attribute19
                                   ,p_attribute20                  => l_person_rec.attribute20
                                   ,p_attribute21                  => l_person_rec.attribute21
                                   ,p_attribute22                  => l_person_rec.attribute22
                                   ,p_attribute23                  => l_person_rec.attribute23
                                   ,p_attribute24                  => l_person_rec.attribute24
                                   ,p_attribute25                  => l_person_rec.attribute25
                                   ,p_attribute26                  => l_person_rec.attribute26
                                   ,p_attribute27                  => l_person_rec.attribute27
                                   ,p_attribute28                  => l_person_rec.attribute28
                                   ,p_attribute29                  => l_person_rec.attribute29
                                   ,p_attribute30                  => l_person_rec.attribute30
                                   ,p_per_information_category     => l_person_rec.per_information_category
                                   ,p_per_information1             => l_person_rec.per_information1
                                   ,p_per_information2             => l_person_rec.per_information2
                                   ,p_per_information3             => l_person_rec.per_information3
                                   ,p_per_information4             => l_person_rec.per_information4
                                   ,p_per_information5             => l_person_rec.per_information5
                                   ,p_per_information6             => l_person_rec.per_information6
                                   ,p_per_information7             => l_person_rec.per_information7
                                   ,p_per_information8             => l_person_rec.per_information8
                                   ,p_per_information9             => l_person_rec.per_information9
                                   ,p_per_information10            => l_person_rec.per_information10
                                   ,p_per_information11            => l_person_rec.per_information11
                                   ,p_per_information12            => l_person_rec.per_information12
                                   ,p_per_information13            => l_person_rec.per_information13
                                   ,p_per_information14            => l_person_rec.per_information14
                                   ,p_per_information15            => l_person_rec.per_information15
                                   ,p_per_information16            => l_person_rec.per_information16
                                   ,p_per_information17            => l_person_rec.per_information17
                                   ,p_per_information18            => l_person_rec.per_information18
                                   ,p_per_information19            => l_person_rec.per_information19
                                   ,p_per_information20            => l_person_rec.per_information20
                                   ,p_per_information21            => l_person_rec.per_information21
                                   ,p_per_information22            => l_person_rec.per_information22
                                   ,p_per_information23            => l_person_rec.per_information23
                                   ,p_per_information24            => l_person_rec.per_information24
                                   ,p_per_information25            => l_person_rec.per_information25
                                   ,p_per_information26            => l_person_rec.per_information26
                                   ,p_per_information27            => l_person_rec.per_information27
                                   ,p_per_information28            => l_person_rec.per_information28
                                   ,p_per_information29            => l_person_rec.per_information29
                                   ,p_per_information30            => l_person_rec.per_information30
                                   ,p_date_of_death                => l_person_rec.date_of_death
                                   ,p_background_check_status      => l_person_rec.background_check_status
                                   ,p_background_date_check        => l_person_rec.background_date_check
                                   ,p_blood_type                   => l_person_rec.blood_type
                                   ,p_correspondence_language      => l_person_rec.correspondence_language
                                   ,p_fast_path_employee           => l_person_rec.fast_path_employee
                                   ,p_fte_capacity                 => l_person_rec.fte_capacity
                                   ,p_honors                       => l_person_rec.honors
                                   ,p_internal_location            => l_person_rec.internal_location
                                   ,p_last_medical_test_by         => l_person_rec.last_medical_test_by
                                   ,p_last_medical_test_date       => l_person_rec.last_medical_test_date
                                   ,p_mailstop                     => l_person_rec.mailstop
                                   ,p_office_number                => l_person_rec.office_number
                                   ,p_on_military_service          => l_person_rec.on_military_service
                                   ,p_pre_name_adjunct             => l_person_rec.pre_name_adjunct
                                   ,p_rehire_recommendation        => l_person_rec.rehire_recommendation
                                   ,p_projected_start_date         => l_person_rec.projected_start_date
                                   ,p_resume_exists                => l_person_rec.resume_exists
                                   ,p_resume_last_updated          => l_person_rec.resume_last_updated
                                   ,p_second_passport_exists       => l_person_rec.second_passport_exists
                                   ,p_student_status               => l_person_rec.student_status
                                   ,p_work_schedule                => l_person_rec.work_schedule
                                   ,p_suffix                       => l_person_rec.suffix
                                   ,p_benefit_group_id             => l_person_rec.benefit_group_id
                                   ,p_receipt_of_death_cert_date   => l_person_rec.receipt_of_death_cert_date
                                   ,p_coord_ben_med_pln_no         => l_person_rec.coord_ben_med_pln_no
                                   ,p_coord_ben_no_cvg_flag        => l_person_rec.coord_ben_no_cvg_flag
                                   ,p_coord_ben_med_ext_er         => l_person_rec.coord_ben_med_ext_er
                                   ,p_coord_ben_med_pl_name        => l_person_rec.coord_ben_med_pl_name
                                   ,p_coord_ben_med_insr_crr_name  => l_person_rec.coord_ben_med_insr_crr_name
                                   ,p_coord_ben_med_insr_crr_ident => l_person_rec.coord_ben_med_insr_crr_ident
                                   ,p_coord_ben_med_cvg_strt_dt    => l_person_rec.coord_ben_med_cvg_strt_dt
                                   ,p_coord_ben_med_cvg_end_dt     => l_person_rec.coord_ben_med_cvg_end_dt
                                   ,p_uses_tobacco_flag            => l_person_rec.uses_tobacco_flag
                                   ,p_dpdnt_adoption_date          => l_person_rec.dpdnt_adoption_date
                                   ,p_dpdnt_vlntry_svce_flag       => l_person_rec.dpdnt_vlntry_svce_flag
                                   ,p_original_date_of_hire        => l_person_rec.original_date_of_hire
                                   ,p_adjusted_svc_date            => l_person_rec.adjusted_svc_date
                                   ,p_town_of_birth                => l_person_rec.town_of_birth
                                   ,p_region_of_birth              => l_person_rec.region_of_birth
                                   ,p_country_of_birth             => l_person_rec.country_of_birth
                                   ,p_global_person_id             => l_person_rec.global_person_id
                                   ,p_party_id                     => l_person_rec.party_id
                                   ,
                                    --out
                                    p_person_id                 => x_person_id
                                   ,p_assignment_id             => x_assignment_id
                                   ,p_per_object_version_number => x_dummy_number
                                   ,p_asg_object_version_number => x_dummy_number
                                   ,p_per_effective_start_date  => x_dummy_date
                                   ,p_per_effective_end_date    => x_dummy_date
                                   ,p_full_name                 => x_dummy_varchar
                                   ,p_per_comment_id            => x_dummy_number
                                   ,p_assignment_sequence       => x_dummy_number
                                   ,p_assignment_number         => x_dummy_varchar
                                   ,p_name_combination_warning  => x_dummy_boolean
                                   ,p_assign_payroll_warning    => x_dummy_boolean
                                   ,p_orig_hire_warning         => x_dummy_boolean);
                                   

更新人员

hr_person_api.update_person(p_validate              => FALSE
                               ,p_effective_date        => SYSDATE
                               ,p_datetrack_update_mode => 'CORRECTION'
                               ,p_person_id             => p_person_id
                               ,p_object_version_number => l_object_version_number
                               ,p_employee_number       => l_employee_num
                               ,p_person_type_id        => l_person_rec.person_type_id
                               ,p_first_name            => l_person_rec.first_name
                               ,p_last_name             => l_person_rec.last_name
                               ,p_national_identifier   => l_person_rec.national_identifier
                               ,p_effective_start_date  => l_effective_start_date
                               ,p_effective_end_date    => l_effective_end_date
                               ,p_email_address         => l_person_rec.email_address
                               ,p_sex                   => l_person_rec.sex
                               ,
                                --   p_attribute8 => 'Y',
                                --   p_attribute4 => l_person_rec.attribute4,
                                p_full_name                => l_full_name
                               ,p_comment_id               => l_comment_id
                               ,p_name_combination_warning => l_name_combination_warning
                               ,p_assign_payroll_warning   => l_assign_payroll_warning
                               ,p_orig_hire_warning        => l_orig_hire_warning);

终止人员

l_period_of_service_id := rec_employee.period_of_service_id;
        l_object_version_number := rec_employee.object_version_number;
        
        hr_ex_employee_api.actual_termination_emp(p_validate                   => l_validate,
                                                  p_effective_date             => l_effective_date,
                                                  p_period_of_service_id       => l_period_of_service_id,
                                                  p_object_version_number      => l_object_version_number,
                                                  p_actual_termination_date    => l_effective_date,
                                                  p_last_standard_process_date => l_effective_date,
                                                  p_person_type_id             => l_person_type_id,
                                                  p_leaving_reason             => 'R',
                                                  p_last_std_process_date_out  => l_last_std_process_date_out,
                                                  p_supervisor_warning         => l_supervisor_warning,
                                                  p_event_warning              => l_event_warning,
                                                  p_interview_warning          => l_interview_warning,
                                                  p_review_warning             => l_review_warning,
                                                  p_recruiter_warning          => l_recruiter_warning,
                                                  p_asg_future_changes_warning => l_asg_future_changes_warning,
                                                  p_entries_changed_warning    => l_entries_changed_warning,
                                                  p_pay_proposal_warning       => l_pay_proposal_warning,
                                                  p_dod_warning                => l_dod_warning,
                                                  p_alu_change_warning         => l_alu_change_warning);
      
        hr_ex_employee_api.update_term_details_emp(p_validate              => l_validate,
                                                   p_effective_date        => l_effective_date,
                                                   p_period_of_service_id  => l_period_of_service_id,
                                                   p_object_version_number => l_object_version_number,
                                                   p_leaving_reason        => 'R');
      
        l_final_process_date := l_last_std_process_date_out;
      
        hr_ex_employee_api.final_process_emp(p_validate                   => l_validate,
                                             p_period_of_service_id       => l_period_of_service_id,
                                             p_object_version_number      => l_object_version_number,
                                             p_final_process_date         => l_final_process_date,
                                             p_org_now_no_manager_warning => l_org_now_no_manager_warning,
                                             p_asg_future_changes_warning => l_f_asg_future_changes_warning,
                                             p_entries_changed_warning    => l_f_entries_changed_warning);
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值