Pages

Tuesday, March 19, 2019

Update Customer Party Site Changes

DECLARE

CURSOR C1 IS
select distinct vendor_name,hcsa.party_site_id,segment1 vendor_num,hps.party_site_name
from ap_suppliers asa,
hz_cust_accounts hca,
hz_cust_acct_sites_all hcsa,
hz_party_sites hps
where asa.party_id = hca.party_id
and hcsa.status = 'A'
and hca.cust_account_id = hcsa.cust_account_id
and hcsa.org_id IN(241,88)
and hps.party_site_id = hcsa.party_site_id
--and hca.account_name = asa.vendor_name
and asa.segment1 IN
('218190');
--and rownum = 1;

   l_party_site_rec   hz_party_site_v2pub.PARTY_SITE_REC_TYPE;
   l_obj_num          NUMBER := 2;
   l_return_status    VARCHAR2 (1);
   l_msg_count        NUMBER;
   l_msg_data         VARCHAR2 (2000);
BEGIN
for i in c1 loop
   l_party_site_rec.party_site_id := i.party_site_id;--565906;
   l_party_site_rec.status := 'A';
   l_party_site_rec.party_site_name := i.vendor_name;--'Terravant Wine Company LLC';
   l_obj_num := 1;
   hz_party_site_v2pub.update_party_site (
      p_init_msg_list           => FND_API.G_FALSE,
      p_party_site_rec          => l_party_site_rec,
      p_object_version_number   => l_obj_num,
      x_return_status           => l_return_status,
      x_msg_count               => l_msg_count,
      x_msg_data                => l_msg_data);
   DBMS_OUTPUT.put_line ('Ret Status:' || l_return_status);
   DBMS_OUTPUT.put_line ('l_msg_data:' || l_msg_data);

   IF l_msg_count > 0
   THEN
      FOR I IN 1 .. l_msg_count
      LOOP
         DBMS_OUTPUT.put_line (
               I
            || '.'
            || SUBSTR (FND_MSG_PUB.Get (p_encoded => FND_API.G_FALSE), 1, 255));
      END LOOP;
   END IF;
   end loop;
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line ('Error:' || SQLERRM);
END;

1 comment:

  1. How to Get Bonus at Slots Sites - Play Real Money Casino
    Slot machines are the most pcie 슬롯 popular of all types 승부 예측 사이트 of casino games, so you can try a lot 룰렛 돌리기 of slots games at the 맥스 88 same time without spending 스포츠 스코어 your money. This

    ReplyDelete