create or replace procedure xxupdate_customer_address_p(p_party_number varchar2) is
l_location_rec HZ_LOCATION_V2PUB.location_rec_type;
l_loc_rec hz_locations%rowtype;
l_object_version_number NUMBER;
l_addr_val_status VARCHAR2(20);
l_addr_warn_msg VARCHAR2(20);
l_return_status varchar2(10);
l_msg_count number;
l_msg_data varchar2(2000);
begin
select *
INTO l_loc_rec
from hz_locations
where location_id = (select location_id
from hz_party_sites
where party_id = (select party_id
from hz_parties
where party_number = p_party_number)
AND identifying_address_flag = 'Y');
l_location_rec.location_id := l_loc_rec.location_id;
l_object_version_number := l_loc_rec.OBJECT_VERSION_NUMBER;
DBMS_OUTPUT.PUT_LINE(l_location_rec.location_id);
l_location_rec.country := l_loc_rec.country;
l_location_rec.address1 := 'ABCD';
l_location_rec.address2 := 'ABCD';
l_location_rec.address3 := 'ABCD';
l_location_rec.address4 := FND_API.G_MISS_CHAR;
l_location_rec.city := l_loc_rec.city;
l_location_rec.postal_code := l_loc_rec.postal_code;
HZ_LOCATION_V2PUB.update_location(p_init_msg_list => FND_API.G_FALSE,
p_location_rec => l_location_rec,
p_do_addr_val => 'Y',
p_object_version_number => l_object_version_number,
x_addr_val_status => l_addr_val_status,
x_addr_warn_msg => l_addr_warn_msg,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data);
dbms_output.put_line('Party Number :'||p_party_number||' - '||l_addr_val_status||' - '||' - '||l_addr_warn_msg||' - '||l_return_status||' - '||l_msg_data);
commit;
exception
when others then
dbms_output.put_line('Error Occured:'||sqlerrm);
end xxupdate_customer_address_p;
l_location_rec HZ_LOCATION_V2PUB.location_rec_type;
l_loc_rec hz_locations%rowtype;
l_object_version_number NUMBER;
l_addr_val_status VARCHAR2(20);
l_addr_warn_msg VARCHAR2(20);
l_return_status varchar2(10);
l_msg_count number;
l_msg_data varchar2(2000);
begin
select *
INTO l_loc_rec
from hz_locations
where location_id = (select location_id
from hz_party_sites
where party_id = (select party_id
from hz_parties
where party_number = p_party_number)
AND identifying_address_flag = 'Y');
l_location_rec.location_id := l_loc_rec.location_id;
l_object_version_number := l_loc_rec.OBJECT_VERSION_NUMBER;
DBMS_OUTPUT.PUT_LINE(l_location_rec.location_id);
l_location_rec.country := l_loc_rec.country;
l_location_rec.address1 := 'ABCD';
l_location_rec.address2 := 'ABCD';
l_location_rec.address3 := 'ABCD';
l_location_rec.address4 := FND_API.G_MISS_CHAR;
l_location_rec.city := l_loc_rec.city;
l_location_rec.postal_code := l_loc_rec.postal_code;
HZ_LOCATION_V2PUB.update_location(p_init_msg_list => FND_API.G_FALSE,
p_location_rec => l_location_rec,
p_do_addr_val => 'Y',
p_object_version_number => l_object_version_number,
x_addr_val_status => l_addr_val_status,
x_addr_warn_msg => l_addr_warn_msg,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data);
dbms_output.put_line('Party Number :'||p_party_number||' - '||l_addr_val_status||' - '||' - '||l_addr_warn_msg||' - '||l_return_status||' - '||l_msg_data);
commit;
exception
when others then
dbms_output.put_line('Error Occured:'||sqlerrm);
end xxupdate_customer_address_p;
No comments:
Post a Comment