0% found this document useful (0 votes)
6 views1 page

API To Update Customer Organization and Vat Number

The document contains a PL/SQL block that updates an organization's details in the database. It retrieves the current object version number for a specified party ID and updates the organization's name and tax reference. The output includes various status messages and information about the update process, including handling multiple messages if applicable.

Uploaded by

Kavita Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

API To Update Customer Organization and Vat Number

The document contains a PL/SQL block that updates an organization's details in the database. It retrieves the current object version number for a specified party ID and updates the organization's name and tax reference. The output includes various status messages and information about the update process, including handling multiple messages if applicable.

Uploaded by

Kavita Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

DECLARE

p_organization_rec HZ_PARTY_V2PUB.organization_REC_TYPE;
xin_xout_object_version_number NUMBER;
x_profile_id NUMBER;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);

BEGIN
p_organization_rec.Party_rec.party_id := 25931049;
--xin_xout_object_version_number := 8;
p_organization_rec.organization_name := 'Casa A/S New2';
p_organization_rec.tax_reference := '29205272';

SELECT object_version_number
INTO xin_xout_object_version_number
FROM hz_parties
WHERE party_id = p_organization_rec.Party_rec.party_id AND status = 'A';

HZ_PARTY_V2PUB.update_organization(
'T',
p_organization_rec,
xin_xout_object_version_number,
x_profile_id,
x_return_status,
x_msg_count,
x_msg_data);

dbms_output.put_line('***************************');
dbms_output.put_line('Output information ....');
dbms_output.put_line('organization_name ....'||
p_organization_rec.organization_name );
dbms_output.put_line('xin_xout_object_version_number ....'||
xin_xout_object_version_number);
dbms_output.put_line('tax_reference ....'||p_organization_rec.tax_reference);
dbms_output.put_line('return_status= '||x_return_status);
dbms_output.put_line('msg_count= '||x_msg_count);
dbms_output.put_line('msg_data= '||x_msg_data);

IF x_msg_count > 1 THEN


FOR I IN 1..x_msg_count LOOP
dbms_output.put_line('I.'|| SUBSTR (FND_MSG_PUB.Get(p_encoded =>
FND_API.G_FALSE ), 1, 255));
rollback;
END LOOP;
END IF;
Commit;
END;
/

You might also like