Create Organization API

Create Organization

DECLARE

p_organization_rec hz_party_v2pub.organization_rec_type;

x_return_status VARCHAR2 (2000);

x_msg_count NUMBER;

x_msg_data VARCHAR2 (2000);

x_party_id NUMBER;

x_party_number VARCHAR2 (2000);

x_profile_id NUMBER;

BEGIN

p_organization_rec.organization_name := 'erpschools';

p_organization_rec.created_by_module := 'ERPSCHOOLS_DEMO';

hz_party_v2pub.create_organization ('T',

p_organization_rec,

x_return_status,

x_msg_count,

x_msg_data,

x_party_id,

x_party_number,

x_profile_id

);

DBMS_OUTPUT.put_line ('party id ' || x_party_id);

DBMS_OUTPUT.put_line (SUBSTR ('x_return_status = ' || x_return_status,

1,

255

)

);

DBMS_OUTPUT.put_line ('x_msg_count = ' || TO_CHAR (x_msg_count));

DBMS_OUTPUT.put_line (SUBSTR ('x_msg_data = ' || x_msg_data, 1, 255));

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

)

);

END LOOP;

END IF;

END;

The above API should create records in hz_parties table and hz_organization_profiles table.

Comments

Popular posts from this blog

Create attachments and attach them to Sales Order Header or Order Lines

Link XLA Tables With AR Tables To Get Information From GL