DBA Data[Home] [Help]

APPS.JAI_OPM_GBH_TRIGGER_PKG SQL Statements

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

Line: 16

  Cursor C_Reg_Sel IS SELECT register_selected, po_id
    FROM JAI_OPM_OSP_HDRS
        WHERE osp_header_id = pr_new.batch_id ;
Line: 20

  Cursor C_Vend_Id(p_po_id number) IS SELECT a. Vendor_id,  a.ship_to_location_id,  b.location_code FROM po_headers_all a, hr_locations_all b
                                      WHERE po_header_id = p_po_id
                                      AND a.SHIP_TO_LOCATION_ID = b.LOCATION_ID; /*Added ship_to_location_id for bug # 9088563*/
Line: 25

    SELECT organization_id, INVENTORY_ITEM_ID,act_quantity,uom_code
    FROM JAI_OPM_OSP_DTLS
    WHERE osp_header_id = pr_new.batch_id
    and issue_recpt_flag = 'R';
Line: 30

  Cursor C_Tot_Excise IS SELECT SUM(excise_payable) tot_excise_payable
  FROM JAI_OPM_OSP_DTLS
             WHERE osp_header_id = pr_new.batch_id and
           issue_recpt_flag = 'I';
Line: 35

  Cursor C_Act_Out_Qty IS SELECT SUM(act_quantity) tot_qty
  FROM JAI_OPM_OSP_DTLS
             WHERE osp_header_id = pr_new.batch_id and
           issue_recpt_flag = 'R';
Line: 40

  Cursor C_Plan_Out_Qty IS SELECT plan_quantity plan_qty
  FROM JAI_OPM_OSP_DTLS
             WHERE osp_header_id = pr_new.batch_id and
           issue_recpt_flag = 'R';
Line: 47

    SELECT MAX(NVL(OSP_RETURN_DAYS,0))
    from  JAI_CMN_INVENTORY_ORGS --JAI_OPM_ORGANIZATIONS
    WHERE organization_id = cpn_organization_id;
Line: 51

  l_updated_by NUMBER;
Line: 64

  lv_register   JAI_OPM_OSP_HDRS.REGISTER_SELECTED%type ;
Line: 88

       should also be inserted.
       Presently , this was done at completion state , when the batch status = 3

08-Jun-2005   This Object is Modified to refer to New DB Entity names in place of Old DB Entity Names,
              as required for CASE COMPLAINCE. Version 116.1

13-Jun-2005    File Version: 116.2
               Ramananda for bug#4428980. Removal of SQL LITERALs is done
08-Jul-2005    Brathod
               Issue: Inventory Convergence Uptake
               Solution:
               -  Code related to batch_status = 2 (Release) is commented because this functionality
                  is now handled by the form JAINGOSP.fmb and the code is included in the form.
               -  Code is modified to remove reference to OPM Tables which are obsoleted in R12 Datamodel
                  and replace with the related Discrete Objects

--------------------------------------------------------------------------------------------*/

IF pr_new.BATCH_STATUS = 3 AND pr_old.BATCH_STATUS=1 THEN
/*   Raise_application_error(-20010,'Cannot Certify the Batch Without Releasing it');
Line: 121

  l_updated_by := pr_new.last_updated_by;
Line: 140

      INSERT INTO JAI_OPM_TXN_EXTN_HDRS
        ( TRANSACTION_NAME,
          TRANSACTION_HEADER_ID,
          VENDOR_CUSTOMER_ID,
          TRANSACTION_DATE,
          ORIGINAL_DUE_DATE,
          EXTENDED_DUE_DATE,
          USER_REFERENCE,
          CREATION_DATE,
          CREATED_BY,
          LAST_UPDATE_DATE,
          LAST_UPDATED_BY,
          LAST_UPDATE_LOGIN)
      VALUES
        ( lv_tran_name, --'OSP_ISSUE',
          pr_new.batch_id,
          l_vend_id,
          sysdate,
          sysdate + return_days,
          sysdate + return_days,
          pr_new.batch_no,
          sysdate,
          l_updated_by,
          sysdate,
          l_updated_by,
          null
        );
Line: 192

            l_updated_by,
            rec.organization_id,
            rec.inventory_item_id
          );
Line: 215

    UPDATE JAI_OPM_OSP_HDRS
    SET  final_receipt = 'Y',
         receivable_excise = l_recv_qty
    WHERE osp_header_id = pr_new.batch_id;