-------------********anonymous block for customer party site creation****------------------
declare
p_party_site_rec hz_party_site_v2pub.party_site_rec_type;
x_party_site_id number;
x_party_site_number number;
x_return_status VARCHAR2 (2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2 (2000);
begin
p_party_site_rec.party_id := 68277;
p_party_site_rec.location_id :=19959;
p_party_site_rec.identifying_address_flag := 'Y';
p_party_site_rec.created_by_module :='HZ_CPUI';
hz_party_site_v2pub.create_party_site ('T',
p_party_site_rec,
x_party_site_id,
x_party_site_number,
x_return_status,
x_msg_count,
x_msg_data );
IF x_return_status ='S'THEN
COMMIT;
DBMS_OUTPUT.PUT_LINE('Creation of party site is Successful ');
DBMS_OUTPUT.PUT_LINE('Output information ....');
dbms_output.put_line('Cust party site Id = '||TO_CHAR(x_party_site_id));
dbms_output.put_line('Cust party site number = '||TO_CHAR(x_party_site_number));
dbms_output.put_line('Return Status Of Api = '||x_return_status);
dbms_output.put_line('No of err msgs = '||x_msg_count);
dbms_output.put_line('err information = '||x_msg_data);
ELSE
DBMS_OUTPUT.put_line ('Creation of party site got failed:'||x_msg_data);
ROLLBACK;
FOR i IN 1 .. x_msg_count
LOOP
x_msg_data := fnd_msg_pub.get( p_msg_index => i, p_encoded => 'F');
dbms_output.put_line( i|| ') '|| x_msg_data);
END LOOP;
END IF;
DBMS_OUTPUT.PUT_LINE('Completion of API');
end;
/
declare
p_party_site_rec hz_party_site_v2pub.party_site_rec_type;
x_party_site_id number;
x_party_site_number number;
x_return_status VARCHAR2 (2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2 (2000);
begin
p_party_site_rec.party_id := 68277;
p_party_site_rec.location_id :=19959;
p_party_site_rec.identifying_address_flag := 'Y';
p_party_site_rec.created_by_module :='HZ_CPUI';
hz_party_site_v2pub.create_party_site ('T',
p_party_site_rec,
x_party_site_id,
x_party_site_number,
x_return_status,
x_msg_count,
x_msg_data );
IF x_return_status ='S'THEN
COMMIT;
DBMS_OUTPUT.PUT_LINE('Creation of party site is Successful ');
DBMS_OUTPUT.PUT_LINE('Output information ....');
dbms_output.put_line('Cust party site Id = '||TO_CHAR(x_party_site_id));
dbms_output.put_line('Cust party site number = '||TO_CHAR(x_party_site_number));
dbms_output.put_line('Return Status Of Api = '||x_return_status);
dbms_output.put_line('No of err msgs = '||x_msg_count);
dbms_output.put_line('err information = '||x_msg_data);
ELSE
DBMS_OUTPUT.put_line ('Creation of party site got failed:'||x_msg_data);
ROLLBACK;
FOR i IN 1 .. x_msg_count
LOOP
x_msg_data := fnd_msg_pub.get( p_msg_index => i, p_encoded => 'F');
dbms_output.put_line( i|| ') '|| x_msg_data);
END LOOP;
END IF;
DBMS_OUTPUT.PUT_LINE('Completion of API');
end;
/
No comments:
Post a Comment