412: -- First get the FND schema name
413: SELECT fou.oracle_username into v_fnd_schema
414: FROM fnd_product_installations fpi,
415: fnd_oracle_userid fou,
416: fnd_application fa
417: WHERE fpi.application_id = fa.application_id
418: AND fpi.oracle_id = fou.oracle_id
419: AND fa.application_short_name = 'FND';
420:
729: begin
730:
731: begin /* APPLICATION_ID check block */
732: select count( APPLICATION_ID ) into v_numRows
733: from FND_APPLICATION where APPLICATION_ID = app_id;
734: IF v_numRows = 0 THEN
735: return ( FND_SEQNUM.BADAPPID );
736: END IF;
737: exception
740: fnd_message.set_token( 'ERRNO', sqlcode, FALSE );
741: fnd_message.set_token( 'ROUTINE', 'define_doc_seq', FALSE );
742: fnd_message.set_token( 'REASON', sqlerrm, FALSE );
743: fnd_message.set_token( 'ERRFILE', 'AFSQNUMB.pls', FALSE );
744: fnd_message.set_token( 'SQLSTMT', 'select count from FND_APPLICATION where APPLICATION_ID = ' || to_char(app_id), FALSE );
745: app_exception.raise_exception;
746: return( FND_SEQNUM.ORAFAIL );
747: end; /* APPLICATION_ID check block */
748:
872: begin
873:
874: begin /* APPLICATION_ID check block */
875: select count( APPLICATION_ID ) into v_numRows
876: from FND_APPLICATION where APPLICATION_ID = app_id;
877: IF v_numRows = 0 THEN
878: return ( FND_SEQNUM.BADAPPID );
879: END IF;
880: exception
883: fnd_message.set_token( 'ERRNO', sqlcode, FALSE );
884: fnd_message.set_token( 'ROUTINE', 'assign_doc_seq', FALSE );
885: fnd_message.set_token( 'REASON', sqlerrm, FALSE );
886: fnd_message.set_token( 'ERRFILE', 'AFSQNUMB.pls', FALSE );
887: fnd_message.set_token( 'SQLSTMT', 'select count from FND_APPLICATION where APPLICATION_ID = ' || to_char(app_id), FALSE );
888: app_exception.raise_exception;
889: return( FND_SEQNUM.ORAFAIL );
890: end; /* APPLICATION_ID check block */
891: