DBA Data[Home] [Help]

APPS.WSH_INVOICE_UTILITIES SQL Statements

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

Line: 10

 | Name: update_numbers                                                      |
 | Purpose: It looks in ra_interface_lines table for the lines inserted for  |
 |          this run of Receivables Interface and updates them with an       |
 |          Invoice Number based on the delivery name                        |
 +===========================================================================*/

  FUNCTION update_invoice_numbers(x_del_id NUMBER, x_del_name VARCHAR2,
	   err_msg IN OUT VARCHAR2) Return NUMBER IS

    inv_num_index Number;
Line: 26

    Select nvl((max(index_number)+1), 0)
    Into inv_num_index
    From wsh_invoice_numbers
    Where delivery_id = x_del_id;
Line: 43

    Insert Into Wsh_Invoice_Numbers
      (INVOICE_NUMBER_ID, DELIVERY_ID, INDEX_NUMBER, LAST_UPDATE_DATE,
       LAST_UPDATED_BY, CREATION_DATE, CREATED_BY)
    VALUES
      (wsh_invoice_numbers_s.nextval, x_del_id, inv_num_index, SYSDATE,
       fnd_global.user_id, SYSDATE, fnd_global.user_id);
Line: 54

      err_msg := 'Error in wsh_invoice_utilities.update_invoice_numbers:\n '||
		 SQLERRM;
Line: 61

  PROCEDURE update_numbers(x_org_id NUMBER ,
			   x_request_id NUMBER,
			   err_msg IN OUT VARCHAR2 ) IS

    group_col_clause varchar2(10000) := '';
Line: 66

    select_col       varchar2(10000) := '';
Line: 82

      Select upper(c.from_column_name), c.from_column_length
      From ra_group_by_columns c
      Where c.column_type = 'M';
Line: 87

      Select delivery_id
      From wsh_deliveries
      Where name = x_del_name;
Line: 102

	select_col := col_name;
Line: 105

	select_col := select_col || '||' || '''~'''|| '||'|| col_name;
Line: 116

    grp_stmt := 'Select ' || select_col || ' group_cols,'    ||
		' l.interface_line_attribute3, ROWID '       ||
		' From RA_INTERFACE_LINES_ALL L'             ||
		' Where trx_number is NULL'                  ||
		' And request_id = ' || to_char(x_request_id)||
		' Order by ' || group_col_clause             ||
		' , l.interface_line_attribute3, l.org_id' ;
Line: 172

	if ( update_invoice_numbers ( this_del_id, this_del_name,
				      err_msg ) < 0 ) Then
	  return;
Line: 185

	  if ( update_invoice_numbers ( this_del_id, this_del_name,
				        err_msg ) < 0 ) Then
	    return;
Line: 196

      Update RA_INTERFACE_LINES_ALL
	set trx_number = inv_num
	where rowid = chartorowid(this_rowid);
Line: 209

      err_msg := 'Error in wsh_invoice_utilities.update_numbers:\n '|| SQLERRM;