--------------********anonymous block for customer profile updation*********------------------------
declare
p_customer_profile_rec hz_customer_profile_v2pub.customer_profile_rec_type;
x_return_status VARCHAR2 (2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2 (2000);
P_OBJECT_VERSION_NUMBER number:=1;
begin
p_customer_profile_rec.party_id:=68277;
p_customer_profile_rec.cust_account_profile_id:=20936;
p_customer_profile_rec.cust_account_id:=17070;
p_customer_profile_rec.site_use_id:=9444;
--p_customer_profile_rec.standard_terms:=v_term_id;
--p_customer_profile_rec.cust_account_id='14072';
hz_customer_profile_v2pub.update_customer_profile(
'T',
p_customer_profile_rec ,
p_object_version_number ,
x_return_status ,
x_msg_count ,
x_msg_data
);
IF x_return_status ='S' THEN
COMMIT;
DBMS_OUTPUT.PUT_LINE('Creation of Customer Profile updation is Successful ');
DBMS_OUTPUT.PUT_LINE('Output information ....');
--dbms_output.put_line('Cust party Id = '||TO_CHAR(x_party_id));
--dbms_output.put_line('Cust party number = '||TO_CHAR(x_party_number));
--dbms_output.put_line('Cust profile Id = '||x_profile_id);
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 Customer Profile updation 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_customer_profile_rec hz_customer_profile_v2pub.customer_profile_rec_type;
x_return_status VARCHAR2 (2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2 (2000);
P_OBJECT_VERSION_NUMBER number:=1;
begin
p_customer_profile_rec.party_id:=68277;
p_customer_profile_rec.cust_account_profile_id:=20936;
p_customer_profile_rec.cust_account_id:=17070;
p_customer_profile_rec.site_use_id:=9444;
--p_customer_profile_rec.standard_terms:=v_term_id;
--p_customer_profile_rec.cust_account_id='14072';
hz_customer_profile_v2pub.update_customer_profile(
'T',
p_customer_profile_rec ,
p_object_version_number ,
x_return_status ,
x_msg_count ,
x_msg_data
);
IF x_return_status ='S' THEN
COMMIT;
DBMS_OUTPUT.PUT_LINE('Creation of Customer Profile updation is Successful ');
DBMS_OUTPUT.PUT_LINE('Output information ....');
--dbms_output.put_line('Cust party Id = '||TO_CHAR(x_party_id));
--dbms_output.put_line('Cust party number = '||TO_CHAR(x_party_number));
--dbms_output.put_line('Cust profile Id = '||x_profile_id);
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 Customer Profile updation 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