DBA Data[Home] [Help]

APPS.HZ_EXTRACT_ORG_CUST_BO_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 209

		select child_operation_flag
		from hz_bus_obj_tracking
		where event_id = p_event_id
		and child_bo_code = 'ORG'
		and parent_bo_code = 'ORG_CUST';
Line: 329

  	-- call event API get_org_cust_updated for each id.

  	x_org_cust_objs := HZ_ORG_CUST_BO_TBL();
Line: 392

			x_org_cust_objs(i).action_type := 'CHILD_UPDATED';
Line: 517

The Get Organization Customers Updated procedure is a service to retrieve all of the Organization Customer business
objects whose updates have been captured by the logical business event. Each Organization Customers Updated business
event signifies that one or more Organization Customer business objects have been updated.
The caller provides an identifier for the Organization Customers Update business event and the procedure returns
database objects of the type HZ_ORG_CUST_BO for all of the Organization Customer business objects from the business event.
Gathering all of the returned database objects from those API calls, the procedure packages them in a table structure
and returns them to the caller.
*/

 PROCEDURE get_org_custs_updated(
    p_init_msg_list       IN            VARCHAR2 := fnd_api.g_false,
    p_event_id            IN           	NUMBER,
    x_org_cust_objs         OUT NOCOPY    HZ_ORG_CUST_BO_TBL,
    x_return_status       OUT NOCOPY    VARCHAR2,
    x_msg_count           OUT NOCOPY    NUMBER,
    x_msg_data            OUT NOCOPY    VARCHAR2
  ) is

l_obj_root_ids HZ_EXTRACT_BO_UTIL_PVT.BO_ID_TBL;
Line: 551

        	hz_utility_v2pub.debug(p_message=>'get_org_custs_updated(+)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 575

		get_org_cust_updated(
    		p_init_msg_list => fnd_api.g_false,
		p_event_id => p_event_id,
    		p_org_cust_id  => l_obj_root_ids(i),
    		x_org_cust_obj  => x_org_cust_objs(i),
		x_return_status => x_return_status,
		x_msg_count => x_msg_count,
		x_msg_data => x_msg_data);
Line: 597

        	hz_utility_v2pub.debug(p_message=>'get_org_custs_updated (-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 620

        hz_utility_v2pub.debug(p_message=>'get_org_custs_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 639

        hz_utility_v2pub.debug(p_message=>'get_org_custs_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 662

        hz_utility_v2pub.debug(p_message=>'get_org_custs_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 704

			select cust_acct_relate_id into l_cust_acct_relate_id
			from HZ_CUST_ACCT_RELATE_ALL
			where cust_account_id = PX_CUST_ACCT_OBJ.ACCT_RELATE_OBJS(i).cust_acct_id
 			and related_cust_account_id = PX_CUST_ACCT_OBJ.ACCT_RELATE_OBJS(i).related_cust_acct_id
			--and relationship_type = PX_CUST_ACCT_OBJ.ACCT_RELATE_OBJS(i).relationship_type  -- bug 13871410
                        and nvl(relationship_type,'null') = nvl(PX_CUST_ACCT_OBJ.ACCT_RELATE_OBJS(i).relationship_type, 'null')
			--and org_id = PX_CUST_ACCT_OBJ.ACCT_RELATE_OBJS(i).org_id
			and nvl(org_id,-99) = nvl(PX_CUST_ACCT_OBJ.ACCT_RELATE_OBJS(i).org_id,-99)
                        and rownum =1;
Line: 729

		px_cust_acct_obj.action_type := 'CHILD_UPDATED';
Line: 758

			px_cust_acct_obj.CUST_PROFILE_OBJ.action_type := 'CHILD_UPDATED';
Line: 791

			then PX_CUST_ACCT_OBJ.CUST_ACCT_CONTACT_OBJS(i).action_type := 'CHILD_UPDATED';
Line: 868

  					then PX_CUST_ACCT_OBJ.CUST_ACCT_SITE_OBJS(i).CUST_ACCT_SITE_USE_OBJS(j).SITE_USE_PROFILE_OBJ.action_type := 'CHILD_UPDATED';
Line: 899

			then PX_CUST_ACCT_OBJ.CUST_ACCT_SITE_OBJS(i).CUST_ACCT_CONTACT_OBJS(j).action_type := 'CHILD_UPDATED';
Line: 904

		then PX_CUST_ACCT_OBJ.CUST_ACCT_SITE_OBJS(i).action_type := 'CHILD_UPDATED';
Line: 908

		then PX_CUST_ACCT_OBJ.action_type := 'CHILD_UPDATED';
Line: 923

	   SELECT
  		sys_connect_by_path(CHILD_BO_CODE, '/') node_path,
  		CHILD_OPERATION_FLAG,
  		CHILD_BO_CODE,
  		CHILD_ENTITY_NAME,
  		CHILD_ID,
  		populated_flag
	 FROM HZ_BUS_OBJ_TRACKING
         where event_id = p_event_id
	 START WITH child_id = p_root_id
   		AND child_entity_name = 'HZ_PARTIES'
   		AND  PARENT_BO_CODE IS NULL
   		AND event_id = p_event_id
   		AND CHILD_BO_CODE = 'ORG_CUST' --(or ORG, PERSON_CUST, ORG_CUST).
	CONNECT BY PARENT_ENTITY_NAME = PRIOR CHILD_ENTITY_NAME
    	AND PARENT_ID = PRIOR CHILD_ID
    	AND parent_bo_code = PRIOR child_bo_code
	and event_id = PRIOR event_id;
Line: 943

    	   select child_event_id,creation_date
	    FROM HZ_BUS_OBJ_TRACKING
	    where event_id = p_event_id
	    and parent_bo_code is null
	    and rownum = 1;
Line: 951

		SELECT event_id
    		FROM HZ_BUS_OBJ_TRACKING
    		WHERE creation_date = cp_creation_date
    		AND child_id = p_root_id
    		AND child_event_id IS NULL
    		and event_id <> p_event_id
		and rownum = 1;
Line: 1007

		then l_action_type := 'UPDATED';
Line: 1028

	then PX_ORG_CUST_OBJ.action_type := 'CHILD_UPDATED';
Line: 1081

 PROCEDURE get_org_cust_updated(
    p_init_msg_list       IN            VARCHAR2 := fnd_api.g_false,
    p_event_id            IN           	NUMBER,
    p_org_cust_id           IN           NUMBER,
    x_org_cust_obj         OUT NOCOPY    HZ_ORG_CUST_BO,
    x_return_status       OUT NOCOPY    VARCHAR2,
    x_msg_count           OUT NOCOPY    NUMBER,
    x_msg_data            OUT NOCOPY    VARCHAR2
  ) is
l_obj_root_ids HZ_EXTRACT_BO_UTIL_PVT.BO_ID_TBL;
Line: 1106

        	hz_utility_v2pub.debug(p_message=>'get_org_cust_updated(+)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 1132

	-- Based on BOT, for updated branch, set action_type = 'UPDATED'/'CREATED'


	l_org_cust_obj := x_org_cust_obj;
Line: 1154

        	hz_utility_v2pub.debug(p_message=>'get_org_cust_updated (-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 1177

        hz_utility_v2pub.debug(p_message=>'get_org_cust_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 1196

        hz_utility_v2pub.debug(p_message=>'get_org_cust_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 1219

        hz_utility_v2pub.debug(p_message=>'get_org_cust_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 1522

  	-- call event API get_org_cust_updated for each id.

  	x_org_cust_v2_objs := HZ_ORG_CUST_V2_BO_TBL();
Line: 1572

			x_org_cust_v2_objs(i).action_type := 'CHILD_UPDATED';
Line: 1697

The Get Organization Customers Updated procedure is a service to retrieve all of the Organization Customer business
objects whose updates have been captured by the logical business event. Each Organization Customers Updated business
event signifies that one or more Organization Customer business objects have been updated.
The caller provides an identifier for the Organization Customers Update business event and the procedure returns
database objects of the type HZ_ORG_CUST_V2_BO for all of the Organization Customer business objects from the business event.
Gathering all of the returned database objects from those API calls, the procedure packages them in a table structure
and returns them to the caller.
*/

 PROCEDURE get_v2_org_custs_updated(
    p_init_msg_list       IN            VARCHAR2 := fnd_api.g_false,
    p_event_id            IN           	NUMBER,
    x_org_cust_v2_objs         OUT NOCOPY    HZ_ORG_CUST_V2_BO_TBL,
    x_return_status       OUT NOCOPY    VARCHAR2,
    x_msg_count           OUT NOCOPY    NUMBER,
    x_msg_data            OUT NOCOPY    VARCHAR2
  ) is

l_obj_root_ids HZ_EXTRACT_BO_UTIL_PVT.BO_ID_TBL;
Line: 1731

        	hz_utility_v2pub.debug(p_message=>'get_v2_org_custs_updated(+)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 1755

		get_v2_org_cust_updated(
    		p_init_msg_list => fnd_api.g_false,
		p_event_id => p_event_id,
    		p_org_cust_id  => l_obj_root_ids(i),
    		x_org_cust_v2_obj  => x_org_cust_v2_objs(i),
		x_return_status => x_return_status,
		x_msg_count => x_msg_count,
		x_msg_data => x_msg_data);
Line: 1777

        	hz_utility_v2pub.debug(p_message=>'get_v2_org_custs_updated (-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 1800

        hz_utility_v2pub.debug(p_message=>'get_v2_org_custs_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 1819

        hz_utility_v2pub.debug(p_message=>'get_v2_org_custs_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 1842

        hz_utility_v2pub.debug(p_message=>'get_v2_org_custs_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 1898

		px_cust_acct_v2_obj.action_type := 'CHILD_UPDATED';
Line: 1927

			px_cust_acct_v2_obj.CUST_PROFILE_OBJ.action_type := 'CHILD_UPDATED';
Line: 1960

			then px_cust_acct_v2_obj.CUST_ACCT_CONTACT_OBJS(i).action_type := 'CHILD_UPDATED';
Line: 2045

			then px_cust_acct_v2_obj.CUST_ACCT_SITE_OBJS(i).CUST_ACCT_CONTACT_OBJS(j).action_type := 'CHILD_UPDATED';
Line: 2050

		then px_cust_acct_v2_obj.CUST_ACCT_SITE_OBJS(i).action_type := 'CHILD_UPDATED';
Line: 2054

		then px_cust_acct_v2_obj.action_type := 'CHILD_UPDATED';
Line: 2069

	   SELECT
  		sys_connect_by_path(CHILD_BO_CODE, '/') node_path,
  		CHILD_OPERATION_FLAG,
  		CHILD_BO_CODE,
  		CHILD_ENTITY_NAME,
  		CHILD_ID,
  		populated_flag
	 FROM HZ_BUS_OBJ_TRACKING
         where event_id = p_event_id
	 START WITH child_id = p_root_id
   		AND child_entity_name = 'HZ_PARTIES'
   		AND  PARENT_BO_CODE IS NULL
   		AND event_id = p_event_id
   		AND CHILD_BO_CODE = 'ORG_CUST' --(or ORG, PERSON_CUST, ORG_CUST).
	CONNECT BY PARENT_ENTITY_NAME = PRIOR CHILD_ENTITY_NAME
    	AND PARENT_ID = PRIOR CHILD_ID
    	AND parent_bo_code = PRIOR child_bo_code
	and event_id = PRIOR event_id;
Line: 2089

    	   select child_event_id,creation_date
	    FROM HZ_BUS_OBJ_TRACKING
	    where event_id = p_event_id
	    and parent_bo_code is null
	    and rownum = 1;
Line: 2097

		SELECT event_id
    		FROM HZ_BUS_OBJ_TRACKING
    		WHERE creation_date = cp_creation_date
    		AND child_id = p_root_id
    		AND child_event_id IS NULL
    		and event_id <> p_event_id
		and rownum = 1;
Line: 2153

		then l_action_type := 'UPDATED';
Line: 2174

	then PX_ORG_CUST_V2_OBJ.action_type := 'CHILD_UPDATED';
Line: 2227

 PROCEDURE get_v2_org_cust_updated(
    p_init_msg_list       IN            VARCHAR2 := fnd_api.g_false,
    p_event_id            IN           	NUMBER,
    p_org_cust_id           IN           NUMBER,
    x_org_cust_v2_obj         OUT NOCOPY    HZ_ORG_CUST_V2_BO,
    x_return_status       OUT NOCOPY    VARCHAR2,
    x_msg_count           OUT NOCOPY    NUMBER,
    x_msg_data            OUT NOCOPY    VARCHAR2
  ) is
l_obj_root_ids HZ_EXTRACT_BO_UTIL_PVT.BO_ID_TBL;
Line: 2252

        	hz_utility_v2pub.debug(p_message=>'get_v2_org_cust_updated(+)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 2269

	-- Based on BOT, for updated branch, set action_type = 'UPDATED'/'CREATED'


	l_org_cust_obj := x_org_cust_v2_obj;
Line: 2291

        	hz_utility_v2pub.debug(p_message=>'get_v2_org_cust_updated (-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 2314

        hz_utility_v2pub.debug(p_message=>'get_v2_org_cust_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 2333

        hz_utility_v2pub.debug(p_message=>'get_v2_org_cust_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);
Line: 2356

        hz_utility_v2pub.debug(p_message=>'get_v2_org_cust_updated(-)',
                               p_prefix=>l_debug_prefix,
                               p_msg_level=>fnd_log.level_procedure);