DBA Data[Home] [Help]

APPS.JAI_FA_ASSETS_PKG SQL Statements

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

Line: 24

                    added the who columns in the insert into table JAI_RCV_CENVAT_CLAIM_T
                    Dependencies Due to this bug:-
                    None
02/11/2006  for Bug 5228046, File version 120.3
            Forward porting the change in 11i bug 5365523 (Additional CVD Enhancement).
            This bug has datamodel and spec changes.

16/04/2007  Kunkumar for bug no 5989740 for
              forward porting ja_in_fa_mass_additions_p.sql;     version 115.3.6107.2  to R12
Line: 45

    select  a.rowid, a.*
    from   JAI_FA_MASS_ADDITIONS a
    where (p_parent_request_id IS NULL OR create_batch_id = p_parent_request_id)
    and    process_flag <> 'Y'
    FOR UPDATE OF process_flag;
Line: 53

    select  po_distribution_id,
            rcv_transaction_id,
            invoice_distribution_id,
            set_of_books_id,
            exchange_rate
    from    ap_invoice_distributions_all
    where   invoice_id = p_invoice_id
    and     distribution_line_number = p_distribution_line_number;*/ /*rchandan for bug#4454657 commented AND the following two CURSORs have been added */
Line: 64

    select  po_distribution_id,
            rcv_transaction_id,
            set_of_books_id,
            amount
    from    ap_invoice_lines_all
    where   invoice_id = p_invoice_id
    and     line_number = p_line_number;
Line: 74

    SELECT exchange_rate
      FROM ap_invoices_all
     WHERE invoice_id = p_invoice_id;
Line: 79

    select amount
    from   ap_invoice_distributions_all
    where  invoice_id =  p_invoice_id
    and    invoice_line_number = p_invoice_line_number
    and    distribution_line_number = p_distribution_line_number;
Line: 87

    select  shipment_line_id,
            vendor_id
    from    rcv_transactions
    where   transaction_id = p_transaction_id;
Line: 95

    select  tax_id, currency, tax_amount, tax_type, tax_name, vendor_id
    from    JAI_RCV_LINE_TAXES
    where   shipment_line_id = p_shipment_line_id
    and
            (
              (tax_type in  (
	                       jai_constants.tax_type_cvd,
			       jai_constants.tax_type_add_cvd ,  -- Date 01/11/2006 Bug 5228046 added by SACSETHI
			       jai_constants.tax_type_customs,/*rchandan for bug#4428980*/
                               jai_constants.tax_type_customs_Edu_cess,
                               jai_constants.tax_type_cvd_edu_Cess,jai_constants.tax_type_sh_customs_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess)) /* BOE Tax Added higher education cess for bug #5907436  ; kundan kumar */
Line: 114

    select  mod_cr_percentage
    from    JAI_CMN_TAXES_ALL
    where   tax_id = p_tax_id;
Line: 119

    select fa_mass_additions_s.nextval
    from dual;
Line: 162

            the trigger ja_in_fa_mass_additions_boe3p after insert
            on fa_mass_additions.

            In FA all amounts are posted in functional currency and hence 'INR'
            is hardcoded.

            IF called from the trigger a parent request id is passed on to
            this procedure, but for submission from SRS, this is null.

2     12/03/2005        Bug 4210102. Added by LGOPALSA  Version 115.1
                        (1) Added CVD and customs education cess
            (2) Added check file syntax in dbdrv


===============================================================================
Dependencies

Version   Author       Dependency     Comments
115.1     LGOPALSA      IN60106 +     Service + Cess tax dependency
                        4146708
-----------------------------------------------------------------------------*/

  if p_parent_request_id is not null then

    lb_req_status :=
    Fnd_concurrent.wait_for_request
    (
    p_parent_request_id,
    60, /* default value - sleep time in secs */
    0, /* default value - max wait in secs */
    lv_phase,
    lv_status,
    lv_dev_phase,
    lv_dev_status,
    lv_message
    );
Line: 212

  'Process Details for mass addition id / Invoice number / Distribution Line No / No of tax lines inserted :');
Line: 278

        insert into fa_mass_additions
        (
        mass_addition_id,
        description,
        book_type_code,
        date_placed_in_service,
        fixed_assets_cost,
        payables_units,
        fixed_assets_units,
        payables_code_combination_id,
        feeder_system_name,
        create_batch_date,
        invoice_number,
        accounting_date,
        vendor_number,
        po_number,
        po_vendor_id,
        posting_status,
        queue_name,
        invoice_date,
        payables_cost,
        depreciate_flag,
        asset_type,
        created_by,
        creation_date,
        last_update_date,
        last_updated_by,
        last_update_login
        )
        values
        (
        ln_fa_mass_addition_id,
        cur_rec_taxes.tax_name,
        cur_rec_invoice_line.book_type_code,
        cur_rec_invoice_line.date_placed_in_service,
        ln_tax_amount, /* fixed_assets_cost */
        1, /*payables_units*/
        1, /*fixed_assets_units */
        cur_rec_invoice_line.payables_code_combination_id,
        lv_feeder_system_name, /*feeder_system_name */  /*rchandan for bug#4428980*/
        cur_rec_invoice_line.create_batch_date,
        cur_rec_invoice_line.invoice_number,
        cur_rec_invoice_line.accounting_date,
        cur_rec_invoice_line.vendor_number,
        cur_rec_invoice_line.po_number,
        cur_rec_taxes.vendor_id, /* Tax vendor */
        lv_new, /* posting status *//*rchandan for bug#4428980*/
        lv_new, /* Queue Name *//*rchandan for bug#4428980*/
        cur_rec_invoice_line.invoice_date,
        ln_tax_amount, /*payables_cost*/
        cur_rec_invoice_line.depreciate_status,
        cur_rec_invoice_line.asset_type,
        cur_rec_invoice_line.created_by,
        sysdate, /* creation_date */
        sysdate,  /*last_update_date*/
        cur_rec_invoice_line.last_updated_by,
        cur_rec_invoice_line.last_update_login
        );
Line: 343

      lv_error_message := 'Processed Successfully on / no of tax lines inserted :'
                                || to_char(sysdate) || ' / ' || to_char(ln_no_of_tax_for_inv_line);/*rchandan for bug#4428980*/
Line: 346

      update  JAI_FA_MASS_ADDITIONS
      set     process_flag = 'Y',
              process_message = lv_error_message,/*rchandan for bug#4428980*/
              last_update_date = sysdate
      where   rowid = cur_rec_invoice_line.rowid;
Line: 367

        update  JAI_FA_MASS_ADDITIONS
        set     process_flag = 'E',
                process_message = lv_error_message,
                last_update_date = sysdate
      where   rowid = cur_rec_invoice_line.rowid;
Line: 425

                     registered in India Local Fixed Assets. This will first select
                     the PO Number for the Asset and also the PO Number for the
                     receipt selected by the user and if these 2 tally will loop
                     around for the Organization_Id,Receipt_Num and shipment_line_id
                     combination and calls ja_in_claim_modvat_process which in turn
                     handles RG and Accounting Entries. This is mainly for claiming balance
                     50% cenvat for Assets Purchased/Retired in the same financial year.

2. 10/05/2005   Vijay Shankar for Bug#4346453. Version: 116.1
                 Code is modified due to the Impact of Receiving Transactions DFF Elimination

              * High Dependancy for future Versions of this object *

--------------------------------------------------------------------------------------------*/
  V_DEBUG := jai_constants.yes ; --Ramananda for File.Sql.35
Line: 451

   (SELECT PO_NUMBER
    FROM FA_ASSET_INVOICES
    WHERE ASSET_ID=P_ASSET_ID
   )
   LOOP
    V_PO_NUMBER_ASSET := C_FETCH_PO_NUMBER.PO_NUMBER;
Line: 466

    SELECT SEGMENT1
    FROM PO_HEADERS_ALL A, RCV_TRANSACTIONS B, RCV_SHIPMENT_HEADERS C
    WHERE A.PO_HEADER_ID     = B.PO_HEADER_ID
    AND B.SHIPMENT_HEADER_ID = C.SHIPMENT_HEADER_ID
    AND B.TRANSACTION_TYPE   =lv_transaction_type--rchandan for bug#4428980
    AND A.VENDOR_ID          = B.VENDOR_ID
    AND A.VENDOR_SITE_ID     = B.VENDOR_SITE_ID
    AND C.RECEIPT_NUM        =P_RECEIPT_NUM
    AND B.ORGANIZATION_ID    =P_ORGANIZATION_ID
    AND B.SHIPMENT_LINE_ID   =P_SHIPMENT_LINE_ID
    AND ROWNUM=1
   )
   LOOP
    V_PO_NUMBER_RECEIPT := C_FETCH_PO_NUMBER_RECEIPT.SEGMENT1;
Line: 494

    select JAI_RCV_CENVAT_CLAIM_T_S.nextval into ln_batch_identifier from dual; /* changd the name of the sequence - ssumaith - sequence change process*/
Line: 498

     SELECT
      shipment_line_id,
      -- ATTRIBUTE1,
      -- TO_DATE(ATTRIBUTE2,'YYYY/MM/DD HH24:MI:SS') ATTRIBUTE2,
      transaction_id,
      quantity
     FROM
      JAI_RCV_CLAIM_MODVAT_V
     WHERE
      receipt_num=p_receipt_num
      and to_organization_id=p_organization_id
      and shipment_line_id  =p_shipment_line_id
    )
    LOOP
     IF V_DEBUG ='Y' THEN
      FND_FILE.PUT_LINE(FND_FILE.LOG,'1.7 shipment_line_id:' ||cur_rec.shipment_line_id
            ||', quantity:' ||cur_rec.quantity||', transaction_id:' ||cur_rec.transaction_id);
Line: 520

      UPDATE JAI_RCV_CENVAT_CLAIMS
        SET cenvat_claimed_ptg = 100,
            cenvat_sequence = NVL(cenvat_sequence, 0) + 1,
            last_update_date = trunc(v_sysdate),
            last_updated_by = v_uid,
            last_update_login = v_uid
      WHERE transaction_id = CUR_REC.transaction_id;
Line: 535

      FND_FILE.PUT_LINE(FND_FILE.LOG,'2.2 After Update of JAI_RCV_CENVAT_CLAIMS');
Line: 541

      FND_FILE.PUT_LINE(FND_FILE.LOG,'2.3 Before Insert into JAI_RCV_CENVAT_CLAIM_T');
Line: 546

    INSERT INTO JA_IN_TEMP_MOD_PARAMS
                 (shipment_line_id,
                  attribute1,
                  attribute2,
                  transaction_id,
                  quantity,
                  cenvat_percent)
    VALUES (CUR_REC.shipment_line_id,
            CUR_REC.ATTRIBUTE1,
            CUR_REC.ATTRIBUTE2, --'YYYY/MM/DD HH24:MI:SS',
            CUR_REC.transaction_id,
            CUR_REC.QUANTITY,
            0.5);--This is made as 0.5 assuming 50% is already claimed.
Line: 564

        INSERT INTO JAI_RCV_CENVAT_CLAIM_T
        (
          batch_identifier,
          shipment_line_id,
          transaction_id,
          quantity,
          --Vijay Shankar for Bug#4346453. RCV DFF Elim. Enh. attribute1,
          --attribute2,
          --cenvat_percent,
          creation_date,
          process_date,
          error_flag,
          error_description,
          process_flag,
          unclaimed_cenvat_amount,
          -- added, Harshita for Bug 4866533
          created_by,
          last_updated_by,
          last_update_date
        )
        VALUES
        (
          ln_batch_identifier,
          CUR_REC.shipment_line_id,
          CUR_REC.transaction_id,
          CUR_REC.quantity,
          --Vijay Shankar for Bug#4346453. RCV DFF Elim. Enh. :JA_IN_RCP_LINES.EXCISE_INVOICE_NO,
          --:JA_IN_RCP_LINES.EXCISE_INVOICE_DATE,
          --:JA_IN_RCP_LINES.CURRENT_CENVAT / 100,
          trunc(sysdate),
          null,
          null,
          null,
          'M',    -- Means Claim
          null,
          -- added, Harshita for Bug 4866533
          fnd_global.user_id,
          fnd_global.user_id,
          sysdate
        );
Line: 608

      RAISE_APPLICATION_ERROR(-20010,'Exception Raised in Insert of JA_IN_TEMP_MOD_PARAMS ' || SQLERRM) ;
Line: 612

      FND_FILE.PUT_LINE(FND_FILE.LOG,'2.4 After Insert into ja_in_temp_mod_params');
Line: 669

 CURSOR cc is SELECT DATE_PLACED_IN_SERVICE FROM FA_BOOKS
WHERE ASSET_ID =p_ASSET_ID;