TCA Create Person API

Create Person API

Name of the API :CREATE PERSON APIBase Tables Affected :

HZ_PARTIES

HZ_PERSON_PROFILES

PL/SQL Procedure used :CREATE_PERSONPackage Used :

HZ_PARTY_V2PUB

Mandatory Parameters:

p_init_msg_list IN VARCHAR2:= FND_API.G_FALSEp_person_rec IN PERSON_REC_TYPEx_party_id OUT NUMBER,x_party_number OUT VARCHAR2x_prof i l e_i d OUT NUMBERx_return_status OUT VARCHAR2x_msg_count OUT NUMBERx_msg_data OUT VARCHAR2

Procedure:

PgSQL

1

2

3

4

5

6

7

8

9

10

PROCEDUREcreate_person(

p_init_msg_listINVARCHAR2:=FND_API.G_FALSE,

p_person_recINPERSON_REC_TYPE,

x_party_idOUTNUMBER,

x_party_numberOUTVARCHAR2,

x_profile_idOUTNUMBER,

x_return_statusOUTVARCHAR2,

x_msg_countOUTNUMBER,

x_msg_dataOUTVARCHAR2

);

General Tips for Running the Create Person API:

a) Save the API in a script file and then run the script from the SQL Prompt (Example : RUN createperson.sql)
b) Enter the values for the Parameters from inside the script file itself unless it is required to Enter some value from the SQL Prompt.
c) Set the organization id before running the script as :
EXEC fnd_client_info.set_org_context(<orgid>); for 11i
OR For R12
EXEC mo_global.init (‘AR’);
EXEC mo_global.set_org_context(<org_id>, NULL, ‘AR’);
EXEC mo_global.set_policy_context(‘S’, <org_id>);
d) Ensure that the Profile Option HZ : Generate Party Number is Set to ‘Yes’ at Site Level.