Showing posts with label AP. Show all posts
Showing posts with label AP. Show all posts

Thursday, December 12, 2013

VENDOR SITE UPDATE SCRIPT OR SUPPLIER SITE UPDATE SCRIPT IN R12

vendor site update script or supplier site update script in R12


procedure update_api
is
l_msg_data                   varchar2 (20000);
l_return_status              varchar2 (100);
l_msg_count                  number;
l_party_id  number;
l_vendor_rec                 ap_vendor_pub_pkg.r_vendor_site_rec_type;
vendor_site_id number         :=null;
cursor c_ven_l
is
/*
select av.vendor_id,avs.vendor_site_id, avs.org_id,bb.prepay_code_combination_id,av.segment1,avs.vendor_site_code from xxmb_ven_site_stg_bk2 aa,xxmb_ven_site_stg bb, gl_code_combinations_kfv cc,ap_suppliers av, ap_supplier_sites_all avs,hr_operating_units hou
where aa.vendor_number=bb.vendor_number
and aa.employee_number=bb.employee_number
and aa.error_code='processed'
and aa.vendor_site_code=bb.vendor_site_code
and aa.operating_unit_name=bb.operating_unit_name
and bb.prepay_code_combination=cc.concatenated_segments
and bb.prepay_code_combination_id=cc.code_combination_id
and bb.vendor_number=av.segment1
and bb.operating_unit_name= hou.name
and hou.organization_id= avs.org_id
and av.vendor_id=avs.vendor_id;
*/
select av.vendor_id,avs.vendor_site_id, aa.group_id,av.segment1,avs.vendor_site_code, avs.org_id,xvs.awt_group_name,avs.awt_group_id
from ap_awt_groups aa, xxmb_ven_site_stg_bk1 xvs,ap_suppliers av,ap_supplier_sites_all avs,hr_operating_units hou
where aa.name=xvs.awt_group_name
and xvs.operating_unit_name= hou.name
and avs.org_id= hou.organization_id
and xvs.awt_group_name is not null
and av.segment1=xvs.vendor_number
and av.vendor_id=avs.vendor_id
and avs.vendor_site_code=xvs.vendor_site_code
and error_code='processed'
--and a
and avs.awt_group_id is  null
--and avs.org_id=90
--and xvs.vendor_number=16810
order by 4;
/*
select av.vendor_id,avs.vendor_site_id, aa.group_id,av.segment1,avs.vendor_site_code, avs.org_id,xvs.awt_group_name,avs.awt_group_id
from ap_awt_groups aa,xxmb_ven_site_stg xvs,ap_suppliers av,ap_supplier_sites_all avs,hr_operating_units hou
where aa.name=xvs.awt_group_name
and xvs.operating_unit_name= hou.name
and avs.org_id= hou.organization_id
and xvs.awt_group_name is not null
and av.segment1=xvs.vendor_number
and av.vendor_id=avs.vendor_id
and avs.vendor_site_code=xvs.vendor_site_code
and error_code='processed'
--and avs.org_id=90
--and xvs.vendor_number=16810
order by 4;
--and avs.vendor_site_id=11600;
*/
begin

--mo_global.set_policy_context('s',90);

for cv_ven_l in c_ven_l
loop
l_return_status := null;
l_msg_count := null;
l_msg_data := null;
--  l_vendor_id := null;

l_party_id := null;
l_vendor_rec := null;
--dbms_output.put_line ('updating vendor  ' || cv_ven_l.segment1);
--dbms_output.put_line('updating vendor  ' || cv_ven_l.segment1||'cv_ven_l.org_id'||cv_ven_l.org_id||'cv_ven_l.vendor_site_code'||cv_ven_l.vendor_site_code);
--l_vendor_rec.vendor_id=cv_ven_l.vendor_id;
--l_vendor_rec.vendor_site_id=cv_ven_l.vendor_site_id;
--l_vendor_rec.segment1 := 23055--cv_ven_l.segment1;
--l_vendor_rec.vendor_name := cv_ven_l.vendor_name;
--l_vendor_rec.start_date_active := sysdate;
l_vendor_rec.vendor_id:=cv_ven_l.vendor_id;--3174;
l_vendor_rec.vendor_site_id:=cv_ven_l.vendor_site_id;--2762;
--l_vendor_rec.prepay_code_combination_id:=cv_ven_l.prepay_code_combination_id;
l_vendor_rec.awt_group_id:=cv_ven_l.group_id;
l_vendor_rec.allow_awt_flag:='y';
--l_vendor_rec.org_id:=88;--cv_ven_l.org_id;
--l_vendor_rec.vendor_site_code:=cv_ven_l.vendor_site_code;
--l_vendor_rec.phone:='9822310522';
vendor_site_id:=cv_ven_l.vendor_site_id;

fnd_global.apps_initialize(user_id => fnd_global.user_id,resp_id => fnd_global.resp_id,resp_appl_id => fnd_global.resp_appl_id);
fnd_msg_pub.initialize;
mo_global.init ('sqlap');

ap_vendor_pub_pkg.update_vendor_site
(p_api_version      => 1.0,
p_init_msg_list     => 'f',
p_commit            => 'f',
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_vendor_site_rec   => l_vendor_rec,
p_vendor_site_id    => vendor_site_id
--p_calling_prog    => l_party_id

);
--dbms_output.put_line ('c_ven_l'||cv_ven_l.segment1);
--dbms_output.put_line ('c_ven_l'||cv_ven_l.vendor_site_code);
--dbms_output.put_line ('c_ven_l'||cv_ven_l.org_id);
dbms_output.put_line ('c_ven_l'||cv_ven_l.vendor_site_id);
dbms_output.put_line ('x_msg_count'||l_msg_count);
dbms_output.put_line ('x_msg_data'||l_msg_data);
dbms_output.put_line ('l_return_status'||l_return_status);
commit;
end loop;
end update_api;


procedure update_main (
errbuf         out      varchar2,
retcode        out      varchar2
)
is
begin
update_api;
end update_main;

VENDOR OR SUPPLIER UPDATE SCRIPT IN R12

ap_suppliers update script :


procedure update_api
is
l_msg_data                   varchar2 (20000);
l_return_status              varchar2 (100);
l_msg_count                  number;
l_party_id  number;
l_vendor_rec                 ap_vendor_pub_pkg.r_vendor_rec_type;
cursor c_ven_l
is
select vendor_id from ap_suppliers where last_updated_by='-1';
/*
select av.vendor_id, aa.group_id,av.segment1 from ap_awt_groups aa,xxmb_ven_stg_bk1 xvs,ap_suppliers av
where aa.name=xvs.awt_group_name
and xvs.awt_group_name is not null
and av.segment1=xvs.vendor_number
and error_code='processed';
*/
/*select av.vendor_id, aa.group_id,av.segment1 from ap_awt_groups aa,xxmb_ven_stg xvs,ap_suppliers av
where aa.name=xvs.awt_group_name
and xvs.awt_group_name is not null
and av.segment1=xvs.vendor_number
and error_code='processed';
*/

begin



for cv_ven_l in c_ven_l
loop
l_return_status := null;
l_msg_count := null;
l_msg_data := null;
--  l_vendor_id := null;

l_party_id := null;
l_vendor_rec := null;
--dbms_output.put_line('updating vendor  ' || cv_ven_l.segment1);
--dbms_output.put_line('updating vendor  ' || cv_ven_l.segment1);
--l_vendor_rec.segment1 := cv_ven_l.segment1;
l_vendor_rec.vendor_id := cv_ven_l.vendor_id;
--l_vendor_rec.awt_group_id :=cv_ven_l.group_id;
--l_vendor_rec.vendor_name := cv_ven_l.vendor_name;
--l_vendor_rec.start_date_active := sysdate;
fnd_global.apps_initialize(user_id => fnd_global.user_id,resp_id => fnd_global.resp_id,resp_appl_id => fnd_global.resp_appl_id);
fnd_msg_pub.initialize;
ap_vendor_pub_pkg.update_vendor (p_api_version      => 1.0,
p_init_msg_list    => 'f',
p_commit           => 'f',
x_return_status    => l_return_status,
p_validation_level     =>fnd_api.g_valid_level_full,
x_msg_count        => l_msg_count,
x_msg_data         => l_msg_data,
p_vendor_rec       => l_vendor_rec,
p_vendor_id        => cv_ven_l.vendor_id

);
dbms_output.put_line('cv_ven_l.vendor_id'||cv_ven_l.vendor_id);
dbms_output.put_line('l_msg_count'||l_msg_count);
dbms_output.put_line('l_msg_data'||l_msg_data);
dbms_output.put_line('l_return_status'||l_return_status);
commit;
end loop;
end update_api;


procedure update_main (
errbuf         out      varchar2,
retcode        out      varchar2
)
is
begin
update_api;
end update_main;

Sunday, November 25, 2012

AP Supplier Bank Info Query


 SELECT hou.name operating_unit,
  av.vendor_name                ,
  av.segment1 vendor_number     ,
  assa.vendor_site_code          ,
  eb.bank_name                 ,
  ebb.bank_branch_name         ,
  ebb.branch_number            ,
  eba.bank_account_num         ,
  eba.bank_account_name
   FROM ap.ap_suppliers av         ,
  ap.ap_supplier_sites_all assa     ,
  apps.iby_ext_bank_accounts eba  ,
  apps.iby_account_owners ao      ,
  apps.iby_ext_banks_v eb         ,
  apps.iby_ext_bank_branches_v ebb,
  hr_operating_units hou
  WHERE av.vendor_id           = assa.vendor_id
AND ao.account_owner_party_id = av.party_id
AND eba.ext_bank_account_id   = ao.ext_bank_account_id
AND eb.bank_party_id          = ebb.bank_party_id
AND eba.branch_id             = ebb.branch_party_id
AND eba.bank_id               = eb.bank_party_id
AND assa.org_id                 =hou.organization_id
AND assa.org_id                 =89 ;




AP Supplier site Query in R12


 SELECT assa.vendor_site_id                                 ,
  iep.default_payment_method_code payment_method_lookup_code,
  hou.name operating_unit                                   ,
  av.vendor_name                                            ,
  av.segment1                                               ,
  av.vendor_id                                              ,
  assa.vendor_site_code                                     ,
  assa.address_line1                                        ,
  assa.county                                               ,
  assa.city                                                 ,
  assa.state                                                ,
  assa.country                                              ,
  assa.vendor_site_code_alt                                 ,
  assa.purchasing_site_flag                                 ,
  assa.rfq_only_site_flag                                   ,
  assa.pay_site_flag                                        ,
  assa.address_line2                                        ,
  assa.address_line3                                        ,
  assa.address_line4                                        ,
  assa.address_style                                        ,
  assa.zip                                                  ,
  assa.province                                             ,
  assa.area_code                                            ,
  assa.phone                                                ,
  assa.inactive_date                                        ,
  assa.fax                                                  ,
  assa.fax_area_code--,assa.payment_method_lookup_code
  ,
  assa.terms_date_basis                                ,
  assa.distribution_set_id                             ,
  gcck.concatenated_segments accts_pay_code_combination,
  cc.concatenated_segments prepay_code_combination     ,
  assa.pay_group_lookup_code                           ,
  assa.terms_id                                        ,
  apt.name term_name                                   ,
  assa.invoice_amount_limit                            ,
  assa.pay_date_basis_lookup_code                      ,
  assa.invoice_currency_code                           ,
  assa.payment_currency_code                           ,
  assa.hold_all_payments_flag                          ,
  assa.hold_future_payments_flag                       ,
  assa.hold_reason                                     ,
  assa.hold_unmatched_invoices_flag                    ,
  assa.allow_awt_flag                                  ,
  assa.awt_group_id                                    ,
  aw.tax_name                                          ,
  assa.bank_charge_bearer                              ,
  assa.country_of_origin_code                          ,
  assa.create_debit_memo_flag                          ,
  assa.offset_tax_flag                                 ,
  assa.supplier_notif_method                           ,
  assa.email_address                                   ,
  assa.remittance_email                                ,
  assa.primary_pay_site_flag
   FROM ap_suppliers av        ,
  ap_supplier_sites_all assa   ,
  hr_operating_units hou       ,
  gl_code_combinations_kfv gcck,
  gl_code_combinations_kfv cc  ,
  IBY_EXTERNAL_PAYEES_ALL iep  ,
  ap_terms_tl apt              ,
  AP_AWT_TAX_RATES_ALL AW
  WHERE av.vendor_id        =assa.vendor_id
AND assa.terms_id           =apt.term_id(+)
AND assa.org_id             = hou.organization_id
AND gcck.code_combination_id=assa.accts_pay_code_combination_id
AND cc.code_combination_id  =assa.prepay_code_combination_id
AND assa.vendor_site_id     =iep.supplier_site_id
AND ASSA.AWT_GROUP_ID       =AW.TAX_RATE_id(+)
  --and iep.default_payment_method_code is null
AND assa.org_id= 89;

Tuesday, December 27, 2011

Supplier or Vendor Creation API

Supplier Creation in R12

VENDOR:
 l_vendor_rec.segment1 := cv_ven_l.vendor_number;
   l_vendor_rec.vendor_name := cv_ven_l.vendor_name;
   l_vendor_rec.summary_flag := cv_ven_l.summary_flag;
   l_vendor_rec.enabled_flag := cv_ven_l.enabled_flag;
   l_vendor_rec.vendor_type_lookup_code := cv_ven_l.vendor_type_lookup_code;
   l_vendor_rec.start_date_active := SYSDATE;
   l_vendor_rec.customer_num := cv_ven_l.customer_num;
   l_vendor_rec.pay_group_lookup_code := cv_ven_l.pay_group_lookup_code;
   l_vendor_rec.pay_date_basis_lookup_code := cv_ven_l.pay_date_basis_lookup_code;
   l_vendor_rec.invoice_currency_code := cv_ven_l.invoice_currency_code;
   l_vendor_rec.terms_id :=cv_ven_l.term_id;
   l_vendor_rec.ext_payee_rec.default_pmt_method :=cv_ven_l.payment_method_lookup_code;
   l_vendor_rec.invoice_currency_code := cv_ven_l.payment_currency_code;
   l_vendor_rec.payment_currency_code := cv_ven_l.payment_currency_code;
   l_vendor_rec.invoice_amount_limit := cv_ven_l.invoice_amount_limit;
   l_vendor_rec.state_reportable_flag :=trim( cv_ven_l.state_reportable_flag);
   l_vendor_rec.attribute1 := cv_ven_l.attribute1;
   l_vendor_rec.end_date_active := cv_ven_l.end_date_active;
   l_vendor_rec.allow_substitute_receipts_flag := cv_ven_l.allow_substitute_receipts_flag;
   l_vendor_rec.allow_unordered_receipts_flag := cv_ven_l.allow_unordered_receipts_flag;
   l_vendor_rec.employee_id :=cv_ven_l.employee_id;


   fnd_msg_pub.initialize;
   ap_vendor_pub_pkg.create_vendor (p_api_version      => 1.0,
                                    p_init_msg_list    => 'F',
                                    p_commit           => 'F',
                                    x_return_status    => l_return_status,
                                    x_msg_count        => l_msg_count,
                                    x_msg_data         => l_msg_data,
                                    p_vendor_rec       => l_vendor_rec,
                                    x_vendor_id        => l_vendor_id,
                                    x_party_id         => l_party_id
                                   );

VENDOR-SITE:

    l_vendor_rec_site.vendor_id := cv_ven_site_l.vendor_id;
    l_vendor_rec_site.vendor_site_code := cv_ven_site_l.vendor_site_code;
    fnd_file.put_line (fnd_file.log, 'Vendor Site Code is:          '||cv_ven_site_l.vendor_site_code);
    l_vendor_rec_site.vendor_site_code_alt := cv_ven_site_l.vendor_site_code_alt;
    l_vendor_rec_site.org_id := cv_ven_site_l.organization_id;
    l_vendor_rec_site.purchasing_site_flag := cv_ven_site_l.purchasing_site_flag;
    l_vendor_rec_site.rfq_only_site_flag := cv_ven_site_l.rfq_only_site_flag;
    l_vendor_rec_site.pay_site_flag := cv_ven_site_l.pay_site_flag;
    l_vendor_rec_site.primary_pay_site_flag := cv_ven_site_l.primary_pay_site_flag;
    l_vendor_rec_site.address_line1 := cv_ven_site_l.address_line1;
      fnd_file.put_line (fnd_file.log, 'Address Line1  is:           '||cv_ven_site_l.address_line1);
    l_vendor_rec_site.address_line2 := cv_ven_site_l.address_line2;
    l_vendor_rec_site.address_line3 := cv_ven_site_l.address_line3;
    l_vendor_rec_site.address_line4 := cv_ven_site_l.address_line4;
    l_vendor_rec_site.city := cv_ven_site_l.city;
    l_vendor_rec_site.state := cv_ven_site_l.state;
    l_vendor_rec_site.zip := cv_ven_site_l.zip;
    l_vendor_rec_site.country := cv_ven_site_l.country;
    l_vendor_rec_site.county := cv_ven_site_l.county;
    l_vendor_rec_site.phone := cv_ven_site_l.phone;
    l_vendor_rec_site.ext_payee_rec.default_pmt_method := cv_ven_site_l.payment_method_lookup_code;
    l_vendor_rec_site.invoice_currency_code := cv_ven_site_l.invoice_currency_code;
    l_vendor_rec_site.invoice_currency_code := cv_ven_site_l.payment_currency_code;
    l_vendor_rec_site.terms_date_basis := cv_ven_site_l.terms_date_basis;
    l_vendor_rec_site.email_address := cv_ven_site_l.email_address;
    l_vendor_rec_site.supplier_notif_method := cv_ven_site_l.supplier_notif_method;
    l_vendor_rec_site.address_style := cv_ven_site_l.address_style;
    l_vendor_rec_site.remittance_email:= cv_ven_site_l.remittance_email;
    l_vendor_rec_site.invoice_amount_limit := cv_ven_site_l.invoice_amount_limit;
    l_vendor_rec_site.payment_currency_code := cv_ven_site_l.payment_currency_code;
    l_vendor_rec_site.pay_group_lookup_code := cv_ven_site_l.pay_group_lookup_code;
    l_vendor_rec_site.terms_id := cv_ven_site_l.term_id;
    l_vendor_rec_site.pay_date_basis_lookup_code := cv_ven_site_l.pay_date_basis_lookup_code;
    l_vendor_rec_site.fax := cv_ven_site_l.fax;
    l_vendor_rec_site.area_code := cv_ven_site_l.area_code;
    l_vendor_rec_site.prepay_code_combination_id := cv_ven_site_l.prepay_code_combination_id;
    l_vendor_rec_site.accts_pay_code_combination_id := cv_ven_site_l.accts_pay_code_combination_id;
    fnd_msg_pub.initialize;
    ap_vendor_pub_pkg.create_vendor_site (p_api_version        => 1.0,
                                          p_init_msg_list      => 'F',
                                          p_commit             => 'F',
                                          x_return_status      => l_return_status,
                                          x_msg_count          => l_msg_count,
                                          x_msg_data           => l_msg_data,
                                          p_vendor_site_rec    => l_vendor_rec_site,
                                          x_vendor_site_id     => l_vendor_site_id,
                                          x_party_site_id      => l_party_site_id,
                                          x_location_id        => l_location_id
                                         );

VENDOR-CONTACTS:

    l_vendor_contact_rec.vendor_id := cv_site_con_l.vendor_id;
    l_vendor_contact_rec.vendor_site_id := cv_site_con_l.vendor_site_id;
    l_vendor_contact_rec.vendor_site_code := cv_site_con_l.vendor_site_code;
    l_vendor_contact_rec.org_id := cv_site_con_l.org_id;
    l_vendor_contact_rec.org_party_site_id := cv_site_con_l.party_site_id;
    l_vendor_contact_rec.person_title := cv_site_con_l.title;
    l_vendor_contact_rec.person_first_name := cv_site_con_l.first_name;
    l_vendor_contact_rec.person_middle_name := cv_site_con_l.middle_name;
    l_vendor_contact_rec.person_last_name := cv_site_con_l.last_name;
    l_vendor_contact_rec.prefix := cv_site_con_l.prefix;
    l_vendor_contact_rec.area_code := cv_site_con_l.area_code;
    l_vendor_contact_rec.phone := cv_site_con_l.phone;
    l_vendor_contact_rec.contact_name_phonetic := cv_site_con_l.contact_name_alt;
    l_vendor_contact_rec.person_first_name_phonetic := cv_site_con_l.first_name_alt;
    l_vendor_contact_rec.person_last_name_phonetic := cv_site_con_l.last_name_alt;
    l_vendor_contact_rec.email_address := cv_site_con_l.email_address;
    l_vendor_contact_rec.url := cv_site_con_l.url;
    l_vendor_contact_rec.fax_area_code := cv_site_con_l.fax_area_code;
    l_vendor_contact_rec.fax_phone := cv_site_con_l.fax;
    fnd_msg_pub.initialize;
    ap_vendor_pub_pkg.create_vendor_contact (p_api_version           => 1.0,
                                             p_init_msg_list         => 'F',
                                             p_commit                => 'F',
                                             x_return_status         => l_return_status,
                                             x_msg_count             => l_msg_count,
                                             x_msg_data              => l_msg_data,
                                             p_vendor_contact_rec    => l_vendor_contact_rec,
                                             x_vendor_contact_id     => l_vendor_contact_id,
                                             x_per_party_id          => l_per_party_id,
                                             x_rel_party_id          => l_rel_party_id,
                                             x_rel_id                => l_rel_id,
                                             x_org_contact_id        => l_org_contact_id,
                                             x_party_site_id         => l_party_site_id
                                            );

else we can use below One.


DECLARE
   p_api_version          NUMBER;
   p_init_msg_list        VARCHAR2 (200);
   p_commit               VARCHAR2 (200);
   p_validation_level     NUMBER;
   x_return_status        VARCHAR2 (200);
   x_msg_count            NUMBER;
   x_msg_data             VARCHAR2 (200);
   p_vendor_contact_rec   apps.ap_vendor_pub_pkg.r_vendor_contact_rec_type;
   x_vendor_contact_id    NUMBER;
   x_per_party_id         NUMBER;
   x_rel_party_id         NUMBER;
   x_rel_id               NUMBER;
   x_org_contact_id       NUMBER;
   x_party_site_id        NUMBER;
   v_msg_index_out          NUMBER;
BEGIN
   p_api_version := 1.0;
   p_init_msg_list := 'T';
   p_commit := 'T';
   p_validation_level := FND_API.G_VALID_LEVEL_FULL;
   x_return_status := NULL;
   x_msg_count := NULL;
   x_msg_data := NULL;
   p_vendor_contact_rec.vendor_contact_id := po_vendor_contacts_s.NEXTVAL;
   P_VENDOR_CONTACT_REC.vendor_site_id :=1580;
   P_VENDOR_CONTACT_REC.PERSON_FIRST_NAME := 'M';
   P_VENDOR_CONTACT_REC.PERSON_LAST_NAME := 'MANOHAR';
   P_VENDOR_CONTACT_REC.PHONE           := '9840395136';
   P_VENDOR_CONTACT_REC.EMAIL_ADDRESS := 'manohar@gmail.com';
   P_VENDOR_CONTACT_REC.URL := 'www.google.com';
   P_VENDOR_CONTACT_REC.org_id := 87;
   p_vendor_contact_rec.party_site_id  := 14653;
   p_vendor_contact_rec.org_party_site_id := 14653;
   p_vendor_contact_rec.VENDOR_ID := 1228;          
   x_vendor_contact_id := NULL;
   x_per_party_id := NULL;
   x_rel_party_id :=NULL;
   x_rel_id := NULL;
   x_org_contact_id := NULL;
   x_party_site_id := NULL;
   apps.ap_vendor_pub_pkg.create_vendor_contact (p_api_version           => p_api_version,
                                             p_init_msg_list         => p_init_msg_list,
                                             p_commit                => p_commit,
                                             p_validation_level      => p_validation_level,
                                             x_return_status         => x_return_status,
                                             x_msg_count             => x_msg_count,
                                             x_msg_data              => x_msg_data,
                                             p_vendor_contact_rec    => p_vendor_contact_rec,
                                             x_vendor_contact_id     => x_vendor_contact_id,
                                             x_per_party_id          => x_per_party_id,
                                             x_rel_party_id          => x_rel_party_id,
                                             x_rel_id                => x_rel_id,
                                             x_org_contact_id        => x_org_contact_id,
                                             x_party_site_id         => x_party_site_id
                                                );
   DBMS_OUTPUT.put_line ('X_RETURN_STATUS = ' || x_return_status);
   DBMS_OUTPUT.put_line ('X_MSG_COUNT = ' || TO_CHAR (x_msg_count));
   DBMS_OUTPUT.put_line ('X_MSG_DATA = ' || x_msg_data);
   DBMS_OUTPUT.put_line ('X_VENDOR_CONTACT_ID = ' || TO_CHAR (x_vendor_contact_id));
   DBMS_OUTPUT.put_line ('X_PER_PARTY_ID = ' || TO_CHAR (x_per_party_id));
   DBMS_OUTPUT.put_line ('X_REL_PARTY_ID = ' || TO_CHAR (x_rel_party_id));
   DBMS_OUTPUT.put_line ('X_REL_ID = ' || TO_CHAR (x_rel_id));
   DBMS_OUTPUT.put_line ('X_ORG_CONTACT_ID = ' || TO_CHAR (x_org_contact_id));
   DBMS_OUTPUT.put_line ('X_PARTY_SITE_ID = ' || TO_CHAR (x_party_site_id));
   DBMS_OUTPUT.put_line ('');
   COMMIT;


END;