API to Create Person Typ

Embed Size (px)

Citation preview

  • 7/22/2019 API to Create Person Typ

    1/5

    Oracle Apps Knowledge Sharing

    Loading

    PI to create a Person Type Party and Customer Account TR12

    (HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCO

    .

    . . ,

    .

    . .

    ,

    Oracle R12 API Java Apps

    HOME USEFUL LINKS ARTICLE INDEX VIDEO INDEX

    API's AP AOL AR CE IBY GL SLA INV PO OM OPM TCA SOA WF

    Page 1 of 5API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCO...

    10/7/2013http://www.shareoracleapps.com/2011/03/api-to-create-person-type-party-and.html

  • 7/22/2019 API to Create Person Typ

    2/5

    . ,

    .

    2.

    12.1.3

    .,

    .

    SETSERVEROUTPUT ON;

    DECLARE

    p_cust_account_rec HZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE;

    p_person_rec HZ_PARTY_V2PUB.PERSON_REC_TYPE;

    p_customer_profile_rec HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE;

    x_cust_account_id NUMBER;

    x_account_number VARCHAR2(2000);

    x_party_id NUMBER;

    x_party_number VARCHAR2(2000);

    x_profile_id NUMBER;

    x_return_status VARCHAR2(2000);

    x_msg_count NUMBER;

    x_msg_data VARCHAR2(2000);

    BEGIN

    -- Setting the Context --

    mo_global.init('AR');

    fnd_global.apps_initialize (user_id =>1318

    ,resp_id =>50559

    ,resp_appl_id =>222);

    mo_global.set_policy_context('S',204);

    fnd_global.set_nls_context('AMERICAN');

    -- Initializing the Mandatory API parameters

    p_cust_account_rec.account_name :='TEST_PERSON_ACCT';

    p_cust_account_rec.created_by_module :='BO_API';

    p_person_rec.person_first_name :='Team';

    p_person_rec.person_last_name :='Search';

    DBMS_OUTPUT.PUT_LINE('Calling the API hz_cust_account_v2pub.create_cust_account');

    Page 2 of 5API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCO...

    10/7/2013http://www.shareoracleapps.com/2011/03/api-to-create-person-type-party-and.html

  • 7/22/2019 API to Create Person Typ

    3/5

    HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCOUNT

    (

    p_init_msg_list =>FND_API.G_TRUE,

    p_cust_account_rec =>p_cust_account_rec,

    p_person_rec =>p_person_rec,

    p_customer_profile_rec=>p_customer_profile_rec, p_create_profile_amt =>'F',

    x_cust_account_id =>x_cust_account_id,

    x_account_number =>x_account_number,

    x_party_id =>x_party_id,

    x_party_number =>x_party_number,

    x_profile_id =>x_profile_id,

    x_return_status =>x_return_status,

    x_msg_count =>x_msg_count,

    x_msg_data =>x_msg_data

    );

    IFx_return_status =fnd_api.g_ret_sts_success THEN

    COMMIT;

    DBMS_OUTPUT.PUT_LINE('Creation of Partyof Type Person and customer accountis

    Successful ');

    DBMS_OUTPUT.PUT_LINE('Output information ....');

    DBMS_OUTPUT.PUT_LINE('x_cust_account_id : '||x_cust_account_id);

    DBMS_OUTPUT.PUT_LINE('x_account_number : '||x_account_number);

    DBMS_OUTPUT.PUT_LINE('x_party_id : '||x_party_id);

    DBMS_OUTPUT.PUT_LINE('x_party_number : '||x_party_number);

    DBMS_OUTPUT.PUT_LINE('x_profile_id : '||x_profile_id);

    ELSE

    DBMS_OUTPUT.put_line ('Creation of Party of Type Person and customer account

    failed:'||x_msg_data);

    ROLLBACK;

    FORi IN1..x_msg_count

    LOOP

    x_msg_data :=oe_msg_pub.get(p_msg_index =>i,p_encoded =>'F');

    dbms_output.put_line(i|| ') '|| x_msg_data);

    ENDLOOP;

    ENDIF;

    DBMS_OUTPUT.PUT_LINE('Completionof API');

    END;

    /

    SELECTparty_id,

    party_number,

    Page 3 of 5API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCO...

    10/7/2013http://www.shareoracleapps.com/2011/03/api-to-create-person-type-party-and.html

  • 7/22/2019 API to Create Person Typ

    4/5

    0 Responses to API to create a Person Type Party and Customer Account TCAR12 (HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCOUNT)

    Post a Comment

    party_name,

    person_last_name,

    person_first_name,

    object_version_number,

    created_by_module

    FROM hz_parties

    WHERE party_id ='5426';

    SELECTperson_profile_id,

    party_id,

    effective_start_date,

    object_version_number,

    created_by_module

    FROM hz_person_profiles

    WHERE person_profile_id ='4524';

    Do you think this Article is useful?

    Network Access Message:The page cannot be

    111111111

    Page 4 of 5API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCO...

    10/7/2013http://www.shareoracleapps.com/2011/03/api-to-create-person-type-party-and.html

  • 7/22/2019 API to Create Person Typ

    5/5

    Comment as: Select profile...

    Publish

    Preview

    NEWER POST OLDHOME

    Pages

    Search Results

    Video Tutorials!!

    List of All Posts

    Useful Links

    All Rights Reserved Oracle Apps Knowledge Sharing| Blogger Templateby Bloggermint

    Oracle EBS R12

    Oracle E Business Suite

    Oracle ERP System

    Page 5 of 5API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCO...

    10/7/2013h // h l /2011/03/ i d h l