DECLARE -- Standard IN/OUT parameter variables p_init_msg_list VARCHAR2(1) := FND_API.

G_TRUE; x_return_status VARCHAR2(2000); x_msg_count NUMBER; x_msg_data VARCHAR2(2000); -- API Record Type variable p_organization_rec HZ_PARTY_V2PUB.ORGANIZATION_REC_TYPE; -- API output parameter variables x_party_id NUMBER; x_party_number VARCHAR2(2000); x_profile_id NUMBER; BEGIN -- Values to pass to API p_organization_rec.organization_name := 'XX DHANUSH ORG'; p_organization_rec.home_country := 'India'; p_organization_rec.created_by_module := 'TCA_V2_API'; -- API to call HZ_PARTY_V2PUB.create_organization ( p_init_msg_list p_organization_rec x_return_status x_msg_count x_msg_data x_party_id x_party_number x_profile_id ); -- Result status and error handling dbms_output.put_line('x_return_status: '||x_return_status); dbms_output.put_line('x_msg_count: '||x_msg_count); dbms_output.put_line('x_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)); END LOOP; END IF; -- Display API output parameters 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); --Displaying Organization Name dbms_output.put_line('Organization Name= '|| p_organization_rec.organization_nam e); EXCEPTION when others then dbms_output.put_line(sqlerrm(sqlcode)); END;

Sign up to vote on this title
UsefulNot useful