DBA Data[Home] [Help]

APPS.JL_ZZ_AP_LIBRARY_1_PKG SQL Statements

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

Line: 13

      select 'exists'
      into l_exists
      from ap_income_tax_regions
      where sysdate < nvl(inactive_date, sysdate+1)
      and region_short_name = vsstate;
Line: 27

      select 'exists'
      into l_exists
      from   hz_geographies geo
      where  geo.country_code = 'BR'
      and nvl(start_date, sysdate) <= sysdate
      and nvl(end_date, sysdate) >= sysdate
      and geo.geography_type = 'STATE'
      and geo.geography_code = vsstate;
Line: 54

  select substr(description,1,30)
  into vdesc
  from fnd_descr_flex_contexts_vl
  where  application_id = 7003
  and descriptive_flexfield_name  = 'JG_AP_SYSTEM_PARAMETERS'
  and descriptive_flex_context_code = 'JL.BR.APXCUMSP.SYS_PARAMETER'
  and enabled_flag = 'Y' and rownum = row_number;
Line: 72

  SELECT L.LOOKUP_CODE
  Into inttyp
  FROM FND_LOOKUPS L,PO_VENDOR_SITES V
  WHERE L.LOOKUP_CODE = V.GLOBAL_ATTRIBUTE2
  AND L.LOOKUP_TYPE = 'JLBR_INTEREST_PENALTY_TYPE'
  AND V.VENDOR_SITE_ID = vndstid and rownum = row_number;
Line: 92

  SELECT GLOBAL_ATTRIBUTE8, GLOBAL_ATTRIBUTE6,
         GLOBAL_ATTRIBUTE4, GLOBAL_ATTRIBUTE3
  INTO pntamt, intgrd, intprd, intamt
  FROM PO_VENDOR_SITES
  WHERE VENDOR_SITE_ID = vndstid and rownum = row_number;
Line: 108

  SELECT L.LOOKUP_CODE
  INTO intfml
  FROM FND_LOOKUPS L, PO_VENDOR_SITES V
  WHERE L.LOOKUP_CODE = V.GLOBAL_ATTRIBUTE5
  AND L.LOOKUP_TYPE = 'JLBR_INTEREST_FORMULA'
  AND V.VENDOR_SITE_ID = vndstid and rownum = row_number;
Line: 125

  SELECT L.LOOKUP_CODE
  INTO pnttyp
  FROM FND_LOOKUPS L, PO_VENDOR_SITES V
  WHERE L.LOOKUP_CODE = V.GLOBAL_ATTRIBUTE7
  AND L.LOOKUP_TYPE = 'JLBR_INTEREST_PENALTY_TYPE'
  AND V.VENDOR_SITE_ID = vndstid and rownum = row_number;
Line: 142

  SELECT substr(global_attribute10,1,38)
  INTO cons_inv_num
  FROM ap_invoices
  WHERE invoice_id = invoiceid and rownum = row_number;
Line: 157

  select payment_status_flag
  into pay_stat
  from ap_invoices
  where invoice_id = invoiceid and rownum = row_number;
Line: 172

  select count(*)
  into tot_recs
  from ap_payment_schedules
  where invoice_id = invoiceid
  and global_attribute11 is not null;
Line: 188

  select code_combination_id
  into ccid
  from po_distributions_ap2_v
  where line_location_id = line_locn_id
  and rownum < 2 ;
Line: 206

  select decode(account_type,'A','Y','N')
  Into account_type
  from gl_code_combinations
  where code_combination_id = ccid and rownum = row_number;
Line: 222

  select tax_code_combination_id
  Into ccid
  from ap_tax_codes
  where name = tax_name
   and nvl(start_date,p_val_date) <= p_val_date
   and nvl(inactive_date,p_val_date+1) > p_val_date
   and nvl(enabled_flag,'Y') = 'Y';
Line: 240

  select to_number(global_attribute2)
  Into ccid
  from hr_locations_all
  where location_id = locn_id and rownum = row_number;
Line: 255

  select nvl(max(distribution_line_number),0)
  into max_dist_line_num
  from ap_invoice_distributions
  where invoice_id = invoiceid
  -- Commented out as unnecessary - iswillia (08-OCT-1999)
  --and rownum = row_number
  -- End of Commented out portion - iswillia (08-OCT-1999)
  ;
Line: 274

  SELECT po_distribution_id
  INTO distid
  FROM po_distributions_ap2_v
  WHERE line_location_id = line_locn_id
  AND rownum < 2 ;
Line: 293

    SELECT ap_invoice_distributions_s.nextval
    INTO   l_invoice_distribution_id
    FROM   dual;
Line: 307

                                  p_last_update_date       IN OUT NOCOPY  Date,
                                  p_Last_Updated_By        IN OUT NOCOPY  number,
                                  p_Set_Of_Books_Id        IN OUT NOCOPY  number,
                                  p_Type_1099              IN OUT NOCOPY  varchar2,
                                  p_Last_Update_Login      IN OUT NOCOPY  number,
                                  p_Creation_Date          IN OUT NOCOPY  Date,
                                  p_Created_By             IN OUT NOCOPY  number,
                                  p_exchange_rate          IN OUT NOCOPY  Number,
                                  p_exchange_rate_type     IN OUT NOCOPY  Varchar2,
                                  p_exchange_date          IN OUT NOCOPY  Date,
                                  p_invoice_amount_limit   IN OUT NOCOPY  number,
                                  p_amount_hold_flag       IN OUT NOCOPY  varchar2,
                                  p_cfo_code               IN OUT NOCOPY  varchar2
                                  ) IS
  l_last_update_date           Date;
Line: 322

  l_Last_Updated_By            number;
Line: 325

  l_Last_Update_Login          number;
Line: 338

     SELECT set_of_books_id,
            type_1099,
            exchange_rate,
            exchange_rate_type,
            exchange_date,
            invoice_amount_limit,
            substr(amount_hold_flag,1,1),
            rtrim(substr(global_attribute2,1,5)),
            last_update_date,
            last_Updated_By,
            last_Update_Login,
            creation_date,
            created_by
    INTO    l_Set_Of_Books_Id,
            l_Type_1099,
            l_exchange_rate ,
            l_exchange_rate_type ,
            l_exchange_date,
            l_invoice_amount_limit,
            l_amount_hold_flag ,
            l_cfo_code,
            l_last_update_date ,
            l_last_Updated_By ,
            l_last_Update_Login ,
            l_creation_date,
            l_created_by
    FROM    ap_invoices_v
    where   invoice_id = P_Invoice_id;
Line: 380

     p_last_update_date     := l_last_update_date;
Line: 381

     p_last_Updated_By      := l_last_updated_by;
Line: 382

     p_last_Update_Login    := l_last_update_login;
Line: 395

  SELECT count(*)
  Into tot_rec
  FROM ap_invoice_distributions
  WHERE invoice_id = invoiceid
  AND line_type_lookup_code IN ('ICMS','IPI');
Line: 411

  select state ship_from
  into shp_frm
  from po_vendor_sites
  where vendor_site_id = vendsite_id
  and nvl(inactive_date,sysdate + 1) > sysdate and rownum = row_number;
Line: 427

  select substr(region_2,1,30)
  into shp_to
  from hr_locations_all
  where location_id = locn_id and rownum = row_number;
Line: 442

  select tax_rate_differential
  into tax_flag
  from jl_br_ap_operations
  where cfo_code = cfocd and rownum = row_number;
Line: 458

  SELECT transaction_reason_code, substr(global_attribute1,1,15)
  INTO trans_reason_code, fiscal_class_code
  FROM po_lines
  WHERE po_line_id = polineid and rownum = row_number;
Line: 472

  SELECT ship_to_organization_id
  INTO inv_org_id
  FROM po_line_locations
  Where po_line_id = p_po_line_id ;
Line: 486

  SELECT inventory_organization_id
  INTO inv_org_id
  FROM financials_system_parameters Where rownum = row_number;
Line: 499

  select substr(Global_Attribute3,1,25)
  into asson_method
  from ap_System_Parameters Where rownum = row_number;
Line: 518

  select ATC.tax_code_combination_id,
         to_number(substr(ATC.global_attribute1,1,15)),
         ATC.description,
         decode(GL.account_type,'A','Y','N')
  into tcc_id1, tcc_id2, description, account_type
  from ap_tax_codes ATC, gl_code_combinations GL
  where ATC.name = vatcode
  and ATC.tax_code_combination_id = GL.code_combination_id
  and nvl(ATC.inactive_date,sysdate + 1) > sysdate and rownum = row_number;
Line: 543

  SELECT count(*)
  Into tot_rec
  FROM ap_invoice_distributions
  WHERE invoice_id = invoiceid
  AND line_type_lookup_code = 'ITEM';
Line: 559

  select nvl(tax_recoverable,'N')
  into tax_recoverable
  from jl_br_ap_operations
  where cfo_code = cfocd and rownum = row_number;
Line: 574

  select count(*)
  into tot_rec
  from ap_payment_schedules
  where invoice_id = invoiceid;
Line: 589

  select count(*)
  into tot_rec
  from ap_invoice_distributions
  where invoice_id = invoiceid
  and awt_invoice_id is not null;
Line: 605

  select vendor_site_id
  into vendsite_id
  from ap_invoices
  where invoice_id = invoiceid and rownum = row_number;
Line: 620

  select substr(global_attribute16,1,25)
  into tax_cal_name
  from po_vendor_sites
  where vendor_site_id = vendsite_id
  and nvl(inactive_date,sysdate + 1) > sysdate and rownum = row_number;
Line: 636

  select substr(global_attribute2,1,25)
  into tax_type
  from ap_tax_codes
  where tax_id = tax_code_id
  and nvl(inactive_date,sysdate + 1) > sysdate and rownum = row_number;
Line: 653

  select base_date
  Into basedt
  from jl_br_ap_tax_calendar_headers
  where tax_calendar_name = taxcal_name
  and tax_type = taxtype and rownum = row_number;
Line: 670

  select j.due_date
  into duedt
  from jl_br_ap_tax_calendar_lines j, ap_invoices a
  where a.invoice_id = invoiceid
  and j.tax_calendar_name = taxcal_name
  and a.terms_date between j.start_date and j.end_date
  and sysdate < nvl(j.inactive_date,sysdate+1) and rownum = row_number;
Line: 689

  select j.due_date
  into duedt
  from jl_br_ap_tax_calendar_lines j, ap_invoices a
  where a.invoice_id = invoiceid
  and j.tax_calendar_name = taxcal_name
  and a.invoice_date between j.start_date and j.end_date
  and sysdate < nvl(j.inactive_date,sysdate+1) and rownum = row_number;
Line: 708

  select j.due_date
  into duedt
  from jl_br_ap_tax_calendar_lines j, ap_invoice_distributions a
  where a.invoice_id = invoiceid
  and j.tax_calendar_name = taxcal_name
  and a.accounting_date between j.start_date and j.end_date
  and sysdate < nvl(j.inactive_date,sysdate+1) and rownum = row_number;
Line: 731

  Select etb.town_or_city
    From
         xle_establishment_v etb
        ,xle_bsv_associations bsv
        ,gl_ledger_le_v gl
  Where
        etb.legal_entity_id = gl.legal_entity_id
  And   bsv.legal_parent_id = etb.legal_entity_id
  And   etb.establishment_id = bsv.legal_construct_id
  And   bsv.entity_name = l_BSV
  And   gl.ledger_id = l_ledger_id;
Line: 745

 select set_of_books_id,substr(global_attribute4,1,25)
 into l_ledger_id,l_BSV
 from ap_system_parameters;
Line: 769

  select city
  into vcity
  from po_vendor_sites
  where vendor_site_id = vendsite_id
  and nvl(inactive_date,sysdate + 1) > sysdate and rownum = row_number;
Line: 786

  SELECT COUNT (*)
  INTO   total_rec
  FROM   fnd_currencies_vl c
  WHERE  c.global_attribute1 = cnab
  AND    c.currency_code <> curr_code;
Line: 802

  SELECT SUBSTR (c.global_attribute1, 1, 15)
  INTO    cnab
  FROM   fnd_currencies_vl c
  WHERE  c.currency_code = curr_code
  AND    rownum = row_number;
Line: 817

select tax_id
  into p_tax_id
  from AP_TAX_CODES
 where name = p_tax_name
   and nvl(start_date,p_val_date) <= p_val_date
   and nvl(inactive_date,p_val_date+1) > p_val_date
   and nvl(enabled_flag,'Y') = 'Y';
Line: 842

  Select etb.town_or_city, etb.region_2
  From
         xle_establishment_v etb
        ,xle_bsv_associations bsv
        ,gl_ledger_le_v gl
  Where
        etb.legal_entity_id = gl.legal_entity_id
  And   bsv.legal_parent_id = etb.legal_entity_id
  And   etb.establishment_id = bsv.legal_construct_id
  And   bsv.entity_name = l_BSV
  And   gl.ledger_id = l_ledger_id;
Line: 856

 select set_of_books_id,substr(global_attribute4,1,25)
 into l_ledger_id,l_BSV
 from ap_system_parameters;
Line: 883

  select city,
         state    --Bug # 2319552
  into vcity,
       vstate     --Bug # 2319552
  from po_vendor_sites
  where vendor_site_id = vendsite_id
  and nvl(inactive_date,sysdate + 1) > sysdate and rownum = row_number;
Line: 901

  select vendor_id
  into vendor_id
  from ap_invoices
  where invoice_id = invoiceid and rownum = row_number;
Line: 928

    UPDATE AP_PAYMENT_SCHEDULES
      SET GLOBAL_ATTRIBUTE1 = v_inttyp,
          GLOBAL_ATTRIBUTE2 = v_intamt,
          GLOBAL_ATTRIBUTE3 = v_intprd,
          GLOBAL_ATTRIBUTE4 = v_intfml,
          GLOBAL_ATTRIBUTE5 = v_intgrd,
          GLOBAL_ATTRIBUTE6 = v_pnttyp,
          GLOBAL_ATTRIBUTE7 = v_pntamt,
          GLOBAL_ATTRIBUTE8 = 'N',
          GLOBAL_ATTRIBUTE_CATEGORY = v_glbattctg
      WHERE INVOICE_ID = v_invid;
Line: 965

    UPDATE AP_PAYMENT_SCHEDULES
      SET GLOBAL_ATTRIBUTE1 = v_inttyp,
          GLOBAL_ATTRIBUTE2 = v_intamt,
          GLOBAL_ATTRIBUTE3 = v_intprd,
          GLOBAL_ATTRIBUTE4 = v_intfml,
          GLOBAL_ATTRIBUTE5 = v_intgrd,
          GLOBAL_ATTRIBUTE6 = v_pnttyp,
          GLOBAL_ATTRIBUTE7 = v_pntamt,
          GLOBAL_ATTRIBUTE8 = 'N',
          GLOBAL_ATTRIBUTE_CATEGORY = v_glbattctg
      WHERE INVOICE_ID = v_invid
      AND PAYMENT_NUM = v_pmtno;
Line: 996

    UPDATE AP_PAYMENT_SCHEDULES
      set due_date = to_date (l_due_date_char,'YYYY/MM/DD HH24:MI:SS')
      where invoice_id  = l_invoice_id
      and   payment_num = l_payment_num;
Line: 1018

    UPDATE AP_PAYMENT_SCHEDULES
      SET discount_date = to_date (l_discount_date_char,'YYYY/MM/DD HH24:MI:SS')
      WHERE invoice_id  = l_invoice_id
      AND   payment_num = l_payment_num;
Line: 1039

    UPDATE AP_PAYMENT_SCHEDULES
      SET due_date = to_date (l_due_date_char,'YYYY/MM/DD HH24:MI:SS')
      where invoice_id = l_new_invoice_id;
Line: 1060

    UPDATE AP_PAYMENT_SCHEDULES
      SET due_date = l_new_date1
      WHERE invoice_id = s_invoice_id
      AND payment_num = s_payment_num;
Line: 1082

    UPDATE AP_PAYMENT_SCHEDULES
      SET discount_date = l_new_date1
      WHERE invoice_id = s_invoice_id
      AND payment_num = s_payment_num;
Line: 1104

    UPDATE AP_PAYMENT_SCHEDULES
      set global_attribute11 = s_bank_collection_id
      where invoice_id = s_invoice_id
      and payment_num = s_payment_num;