DBA Data[Home] [Help]

APPS.JL_AR_DOC_NUMBERING_PKG SQL Statements

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

Line: 30

     SELECT 'Success'
     INTO   l_dummy_code
     FROM   jg_zz_ar_src_trx_ty st, ra_batch_sources_all src
     WHERE  st.cust_trx_type_id = p_trx_type
     AND    st.batch_source_id = p_batch_source_id
     AND    invoice_class = p_invoice_class
     AND    st.batch_source_id = src.batch_source_id
     AND    src.global_attribute3 = p_document_letter
     AND    st.enable_flag = 'Y';
Line: 72

     SELECT substr(global_attribute2,1,4)
     INTO   l_branch_number
     FROM   ra_batch_sources a
     WHERE  a.batch_source_id = p_batch_source_id;
Line: 77

     SELECT count(*)
     INTO   l_count
     FROM   jg_zz_ar_src_trx_ty ty, ra_batch_sources_all src
     WHERE  ty.cust_trx_type_id = p_trx_type
     AND    ty.batch_source_id = src.batch_source_id
     AND    substr(src.global_attribute3,1,1) <> p_document_letter
     AND    substr(src.global_attribute2,1,4) <> l_branch_number
     AND    ty.enable_flag = 'Y';
Line: 153

    SELECT global_attribute1
    INTO   l_four_digit_code
    FROM   ar_system_parameters;
Line: 164

          SELECT substr(global_attribute10,1,4)
          INTO   l_product_line_code
          FROM   mtl_system_items
          WHERE  inventory_item_id = p_inventory_item_id
          AND    organization_id = l_so_org_id;
Line: 187

             SELECT substr(global_attribute7,1,4)
             INTO   l_product_line_code
             FROM   ar_memo_lines
             WHERE  memo_line_id = p_memo_line_id;
Line: 209

        SELECT 'Success'
        INTO   l_dummy_code
        FROM   ra_batch_sources
        WHERE  substr(global_attribute2,1,4) = l_product_line_code
        AND    batch_source_id = p_batch_source_id;
Line: 269

    SELECT registration_number
    INTO   l_comp_cuit
    FROM   xle_firstparty_information_v
    WHERE  legal_entity_id = p_legal_entity_id;
Line: 280

     SELECT substr(global_attribute3,1,1),substr(global_attribute2,1,4)
     ,global_attribute8, to_char(fnd_date.canonical_to_date(global_attribute9),'YYYY/MM/DD')
     INTO   l_doc_letter, l_branch_num, l_cai_num, l_cai_date
     FROM   ra_batch_sources
     WHERE  batch_source_id = p_batch_source_id;
Line: 286

     SELECT REPLACE(l_cai_date,'/') INTO l_cai_date from dual;
Line: 288

     SELECT REPLACE(l_comp_cuit,'-') INTO l_comp_cuit from dual;
Line: 298

    SELECT lpad(substr(dgi_code,1,2),2,'0')
    INTO   l_dgi_code
    FROM   jl_ar_ap_trx_dgi_codes dgi,
           ra_cust_trx_types rctt
    WHERE  trx_letter = l_doc_letter
    AND    rctt.cust_trx_type_id = p_trx_type_id
    AND    trx_category = (select type from ra_cust_trx_types where
                           cust_trx_type_id = p_trx_type_id);
Line: 321

    Select length(l_num_bar_code) into l_leng from dual;
Line: 354

    SELECT MOD(l_temp,10) into l_temp FROM dual;
Line: 387

      SELECT tax_category_id,
	     org_tax_attribute_name,
	     org_tax_attribute_value,
	     con_tax_attribute_name,
             con_tax_attribute_value
      FROM   jl_ar_ar_doc_letter
      WHERE  document_letter = p_document_letter
      AND    sysdate between start_date_active and nvl(end_date_active,sysdate);
Line: 402

       SELECT global_attribute3
       INTO   p_document_letter
       FROM   ra_batch_sources
       WHERE  batch_source_id = p_batch_source_id;
Line: 422

    SELECT hou.location_id
    INTO   l_loc_id
    FROM   hr_organization_units hou
    WHERE  hou.organization_id = l_so_org_id;
Line: 443

       SELECT hrl.global_attribute1
       INTO   l_organization_class_code
       FROM   hr_locations hrl,
              hr_organization_units hrou
       WHERE  hrou.organization_id = l_so_org_id
       AND    hrl.location_id = hrou.location_id;
Line: 486

          SELECT adr.global_attribute8
          INTO   l_contributor_class_code
          FROM   hz_cust_acct_sites_all adr,
                 hz_cust_site_uses rsu
          WHERE  rsu.site_use_id = p_ship_to_address_id
          AND    rsu.cust_acct_site_id = adr.cust_acct_site_id;
Line: 499

          SELECT cas.global_attribute8
          INTO   l_contributor_class_code
          FROM   hz_cust_acct_sites cas
          WHERE  cas.cust_acct_site_id = p_ship_to_address_id;
Line: 523

      SELECT 'Success'
      INTO   l_dummy_code
      FROM   jl_zz_ar_tx_att_cls
      WHERE  tax_attr_class_code = l_organization_class_code
      AND    tax_attr_class_type = 'ORGANIZATION_CLASS'
      AND    tax_category_id = doc_letter_rec.tax_category_id
      AND    tax_attribute_name = doc_letter_rec.org_tax_attribute_name
      AND    tax_attribute_value = doc_letter_rec.org_tax_attribute_value;
Line: 554

           SELECT nvl(cas.global_attribute9,'N')
           INTO  l_cus_cls_flag
           FROM  hz_cust_acct_sites_all cas, hz_cust_site_uses rsu
           WHERE rsu.site_use_id = p_ship_to_address_id
           AND   rsu.cust_acct_site_id = cas.cust_acct_site_id;
Line: 561

             SELECT 'Success'
             INTO   l_dummy_code
             FROM   jl_zz_ar_tx_cus_cls_all cus, hz_cust_acct_sites_all cas, hz_cust_site_uses rsu
             WHERE  tax_attr_class_code =  l_contributor_class_code
             AND    rsu.site_use_id = p_ship_to_address_id
             AND    cas.cust_acct_site_id = cus.address_id
             AND    rsu.cust_acct_site_id = cas.cust_acct_site_id
             AND    tax_category_id = doc_letter_rec.tax_category_id
             AND    tax_attribute_name = doc_letter_rec.con_tax_attribute_name
             AND    tax_attribute_value = doc_letter_rec.con_tax_attribute_value;
Line: 572

             SELECT 'Success'
             INTO   l_dummy_code
             FROM   jl_zz_ar_tx_att_cls att
             WHERE  tax_attr_class_type = 'CONTRIBUTOR_CLASS'
             AND    tax_attr_class_code =  l_contributor_class_code
             AND    tax_category_id = doc_letter_rec.tax_category_id
             AND    tax_attribute_name = doc_letter_rec.con_tax_attribute_name
             AND    tax_attribute_value = doc_letter_rec.con_tax_attribute_value;
Line: 584

           SELECT nvl(cas.global_attribute9,'N')
           INTO   l_cus_cls_flag
           FROM   hz_cust_acct_sites cas
           WHERE  cas.cust_acct_site_id = p_ship_to_address_id;
Line: 589

             SELECT 'Success'
             INTO   l_dummy_code
             FROM   jl_zz_ar_tx_cus_cls_all cus, hz_cust_acct_sites cas
             WHERE  tax_attr_class_code =  l_contributor_class_code
             AND    cas.cust_acct_site_id = cus.address_id
             AND    cas.cust_acct_site_id = p_ship_to_address_id
             AND    tax_category_id = doc_letter_rec.tax_category_id
             AND    tax_attribute_name = doc_letter_rec.con_tax_attribute_name
             AND    tax_attribute_value = doc_letter_rec.con_tax_attribute_value;
Line: 599

             SELECT 'Success'
             INTO   l_dummy_code
             FROM   jl_zz_ar_tx_att_cls att
             WHERE  tax_attr_class_type = 'CONTRIBUTOR_CLASS'
             AND    tax_attr_class_code =  l_contributor_class_code
             AND    tax_category_id = doc_letter_rec.tax_category_id
             AND    tax_attribute_name = doc_letter_rec.con_tax_attribute_name
             AND    tax_attribute_value = doc_letter_rec.con_tax_attribute_value;
Line: 698

    SELECT to_number(argument3)
    INTO   l_batch_source_id
    FROM   fnd_concurrent_requests
    WHERE  request_id = p_request_id;
Line: 711

    SELECT auto_trx_numbering_flag
          ,substr(global_attribute3,1,1)
          ,to_date(global_attribute4,'YYYY/MM/DD HH24:MI:SS')
          ,to_number(global_attribute5)
    INTO  l_auto_trx_numbering_flag
         ,l_document_letter
         ,l_last_trx_date
	 ,l_advance_days
    FROM  ra_batch_sources
    WHERE  batch_source_id = l_batch_source_id;
Line: 754

    SELECT type
    INTO   l_invoice_class
    FROM   ra_cust_trx_types
    WHERE  cust_trx_type_id = p_trx_type;
Line: 829

     arp_standard.debug('validate_interface_lines: ' || '-- update the dates');
Line: 832

    UPDATE ra_batch_sources
    SET    global_attribute4 = fnd_date.date_to_canonical(l_max_trx_date)
    WHERE  batch_source_id = l_batch_source_id;
Line: 871

    SELECT decode(batch_source_type, 'INV',to_number(global_attribute1),
                                     batch_source_id)
    INTO   l_imp_batch_src
    FROM   ra_batch_sources
    WHERE  batch_source_id = p_batch_source_id;
Line: 888

  SELECT substr(p_concat_segs,instr(p_concat_segs,''||p_flex_delimiter||'',1,4)+1) INTO l_num_code FROM dual;
Line: 918

    SELECT batch_source_type
    INTO   l_imp_batch_src_type
    FROM   ra_batch_sources
    WHERE  batch_source_id = p_batch_source_id;
Line: 936

    SELECT 'SUCCESS'
    INTO   l_return_code
    FROM   ra_batch_sources
    WHERE  batch_source_id = p_batch_source_id
    AND    batch_source_type = 'FOREIGN'
    AND    p_trx_date BETWEEN
                 to_date(global_attribute4,'YYYY/MM/DD HH24:MI:SS')
            AND  SYSDATE + to_number(global_attribute5);
Line: 956

    SELECT nvl(printing_count,0)
    INTO   l_return_code
    FROM   ra_customer_trx
    WHERE  customer_trx_id  = p_cust_trx_id;
Line: 971

    SELECT global_attribute1
    INTO   l_br_numb_method
    FROM   ar_system_parameters;
Line: 985

    SELECT hl.global_attribute7
    INTO   l_br_numb_code
    FROM   hr_locations hl, hr_organization_units hou
    WHERE  hl.location_id = hou.location_id
    AND    hou.organization_id = p_inv_org_id;
Line: 1004

    SELECT substr(rbs.global_attribute3,1,1)
    INTO   l_doc_letter
    FROM   ra_batch_sources rbs
    WHERE  rbs.batch_source_id = p_batch_source_id;
Line: 1019

    SELECT lpad(substr(rbs.global_attribute2,1,4),4,'0')
    INTO   l_br_number
    FROM   ra_batch_sources rbs
    WHERE  rbs.batch_source_id = p_batch_source_id;
Line: 1034

    SELECT to_date(rbs.global_attribute4,'YYYY/MM/DD HH24:MI:SS')
    INTO   l_last_trx_date
    FROM   ra_batch_sources rbs
    WHERE  rbs.batch_source_id = p_batch_source_id;
Line: 1049

    SELECT substr(rbs.global_attribute5,1,3)
    INTO   l_adv_days
    FROM   ra_batch_sources rbs
    WHERE  rbs.batch_source_id = p_batch_source_id;
Line: 1064

    SELECT lpad(substr(hl.global_attribute7,1,4),4,'0')
    INTO   l_hr_br_number
    FROM   hr_locations  hl
    WHERE  hl.location_id  = p_location_id;
Line: 1104

     SELECT batch_source_type into l_batch_src_type
     FROM ra_batch_sources_all
     WHERE batch_source_id = p_batch_source_id;
Line: 1110

       SELECT global_attribute1 into l_source_id
       FROM ra_batch_sources_all
       WHERE batch_source_id = p_batch_source_id;
Line: 1114

       SELECT substr(global_attribute2,1,4),
              substr(global_attribute3,1,1),
              auto_trx_numbering_flag
       INTO   l_branch_number,
              l_document_letter,
              l_auto_trx_numbering_flag
       FROM   ra_batch_sources_all
       WHERE  batch_source_id = l_source_id;
Line: 1131

     l_string := 'select '||
                       l_seq_name||'.nextval seq_number '||
                       'from dual' ;
Line: 1142

       SELECT substr(global_attribute2,1,4),
              substr(global_attribute3,1,1),
              auto_trx_numbering_flag
       INTO   l_branch_number,
              l_document_letter,
              l_auto_trx_numbering_flag
       FROM   ra_batch_sources_all
       WHERE  batch_source_id = p_batch_source_id;