DBA Data[Home] [Help]

APPS.BOMPINRV SQL Statements

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

Line: 12

  		select a.revision,
		       nvl(length(rtrim(a.revision,'0123456789')),0) rev_len
  		from mtl_item_revisions_b a
  		where a.organization_id = i_org_id
  		and   a.inventory_item_id = i_item_id
  		and   a.effectivity_date = (
			select max(b.effectivity_date)
			from mtl_item_revisions_b b
			where b.inventory_item_id = a.inventory_item_id
			and   b.organization_id   = a.organization_id
			and   b.effectivity_date  <= i_date_time)
		--	and   b.implementation_date is not null)
--  		and   a.implementation_date is not null  commneted for bug 4637312
		order by a.revision desc; --* Added for Bug #3483066
Line: 28

          	select 'x'
     	  	from   mtl_item_revisions_b r
  	  	where r.organization_id = i_org_id
  	  	and   r.inventory_item_id = i_item_id
  	  	and   r.revision = rev;
Line: 70

			Insert into mtl_item_revisions_b(
				inventory_item_id,
				organization_id,
				revision,
				last_update_date,
				last_updated_by,
				creation_date,
				created_by,
				last_update_login,
				effectivity_date,
				program_application_id,
				program_id,
				program_update_date,
				request_id,
				REVISION_ID,
				REVISION_LABEL,
				OBJECT_VERSION_NUMBER)
			values (
				i_item_id,
 				i_org_id,
				new_item_revision,
				sysdate,
				who.userid,
				sysdate,
				who.userid,
                 		who.loginid,
        			i_date_time,
                 		who.appid,
                		who.progid,
				sysdate,
                 		who.reqstid,
				MTL_ITEM_REVISIONS_B_S.nextval,
				new_item_revision,
				1) RETURNING revision_id INTO i_revision_id;
Line: 105

			 SELECT userenv('LANG') INTO i_language_code FROM dual;
Line: 107

   			insert into MTL_ITEM_REVISIONS_TL (
                       		inventory_item_id,
                        	organization_id,
                        	revision_id,
                        	language,
                        	source_lang,
                        	last_update_date,
                        	last_updated_by,
                        	creation_date,
                        	created_by,
                        	last_update_login,
                        	description )
                 	SELECT  i_item_id,
                        	i_org_id,
                        	i_revision_id,
                        	lang.language_code,
                        	i_language_code,
                        	sysdate,
                        	who.userid,
                        	sysdate,
                        	who.userid,
                        	who.userid,
                        	NULL
                       	FROM FND_LANGUAGES lang
                       	where lang.INSTALLED_FLAG in ('I', 'B')
                       	and not exists
                      		(select NULL
                       		 from MTL_ITEM_REVISIONS_TL T
                       		 where T.INVENTORY_ITEM_ID = i_item_id
                       		 and   T.ORGANIZATION_ID = i_org_id
                       		 and   T.REVISION_ID = i_revision_id
                       		 and   T.LANGUAGE = lang.LANGUAGE_CODE);