DBA Data[Home] [Help]

APPS.OKE_FORM_DD250 SQL Statements

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

Line: 32

    select authoring_org_id
    from oke_k_headers_v
    where k_header_id =P_form_Header_id;
Line: 95

  ParamList.DELETE;
Line: 124

  SELECT rpad(Organization_Code , 3 , 'X')
  FROM   mtl_parameters
  WHERE  organization_id = P_Inv_Org_ID;
Line: 129

  SELECT MAX(Form_Header_Number)
  FROM   oke_k_form_headers
  WHERE  k_header_id = P_K_Header_ID
  AND    print_form_code = 'DD250'
  AND    substr(form_header_number , 1 , 3 ) = ShipNumPfx;
Line: 224

    SELECT EK.K_Header_ID               Contract_Header_ID
    ,      CK2.Contract_Number          Contract_Number
    ,      DECODE( EK.BOA_ID ,
                   NULL , NULL ,
                   CK.Contract_Number ) Order_Number
    FROM   okc_k_headers_all_b     CK2
    ,      okc_k_headers_all_b     CK
    ,      oke_k_headers       EK
    WHERE  EK.K_Header_ID = C_K_Header_ID
    AND    CK.ID  = EK.K_Header_ID
    AND    CK2.ID = NVL(EK.BOA_ID , EK.K_Header_ID);
Line: 241

    SELECT EK.K_Header_ID               Contract_Header_ID
    ,      CK2.Contract_Number          Contract_Number
    ,      DECODE( EK.BOA_ID ,
                   NULL , NULL ,
                   CK.Contract_Number ) Order_Number
    FROM   okc_k_headers_all_b     CK2
    ,      okc_k_headers_all_b     CK
    ,      oke_k_headers       EK
    WHERE  EK.K_Number_Disp = C_K_Header
    AND    EK.K_Type_Code   = C_K_Type
    AND    CK.ID  = EK.K_Header_ID
    AND    CK.Buy_Or_Sell = C_Buy_Or_Sell
    AND    CK2.ID = NVL(EK.BOA_ID , EK.K_Header_ID);
Line: 263

    SELECT Form_Header_ID
    FROM   oke_k_form_headers
    WHERE  k_header_id = C_K_Header_ID
    AND    print_form_code = 'DD250'
    AND    form_header_number = C_Shipment_Num;
Line: 433

      OKE_PRINT_FORM_PUB.Update_Print_Form
      ( p_api_version          => 1.0
      , p_commit               => FND_API.G_FALSE
      , p_init_msg_list        => FND_API.G_FALSE
      , x_msg_count            => X_Msg_Count
      , x_msg_data             => X_Msg_Data
      , x_return_status        => X_Return_Status
      , p_header_rec           => pfh_rec
      , p_line_tbl             => pfl_tbl
      );
Line: 454

    pfl_tbl.DELETE;
Line: 513

    SELECT DISTINCT
           DTL.Source_Header_ID     K_Header_ID
    ,      DTL.Source_Line_ID       Deliverable_ID
    ,      DTL.Organization_ID      Inv_Org_ID
    ,      DTL.Ship_To_Location_ID  Ship_To_Loc
    ,      DTL.Ship_From_Location_ID Ship_From_Loc
    ,      DLV.FOB_Code             FOB_Code
    ,      DLV.Gross_Weight         Gross_Weight
    ,      DLV.Net_Weight           Net_Weight
    ,      DLV.Weight_UOM_Code      Weight_UOM_Code
    ,      DLV.Volume               Volume
    ,      DLV.Volume_UOM_Code      Volume_UOM_Code
    FROM   wsh_delivery_details     DTL
    ,      wsh_delivery_assignments_v ASGN
    ,      wsh_new_deliveries       DLV
    WHERE  DLV.delivery_id          = P_Delivery_ID
    AND    ASGN.delivery_id         = DLV.delivery_id
    AND    DTL.delivery_detail_id   = ASGN.delivery_detail_id
    AND    DTL.source_code          = 'OKE'
    ORDER BY 1, 2, 4;
Line: 543

    SELECT DTL.Source_Line_ID       Deliverable_ID
    ,      DTL.Inventory_Item_ID    Item_ID
    ,      DTL.Item_Description     Item_Description
    ,      DTL.Shipped_Quantity     Shipped_Qty
    ,      DTL.Serial_Number        Serial_Num
    FROM   wsh_delivery_details     DTL
    ,      wsh_delivery_assignments_v ASGN
    WHERE  ASGN.delivery_id         = C_Delivery_ID
    AND    DTL.Organization_ID      = C_Inv_Org_ID
    AND    DTL.Source_Header_ID     = C_K_Hdr_ID
    -- AND DTL.Ship_To_Location_ID  = C_Ship_To
    AND    DTL.delivery_detail_id   = ASGN.delivery_detail_id
    AND    DTL.source_code          = 'OKE';
Line: 560

    SELECT 1
    FROM   oke_k_print_forms
    WHERE  k_header_id = C_K_Header_ID
    AND    print_form_code = 'DD250';
Line: 570

    SELECT Form_Header_Number
    FROM   oke_k_form_headers
    WHERE  k_header_id = C_K_Header_ID
    AND    print_form_code = 'DD250'
    AND    reference1  = C_Delivery_ID
    AND    reference2  = C_Inv_Org_ID;
Line: 580

    SELECT L.Line_Number            Line_Number
    ,      I.Item_Number            Item_Number
    ,      L.NSN_Number             Natl_Stock_Number
    ,      I.Description            Item_Description
    ,      L.Line_Description       Line_Description
    ,      L.Comments               Line_Comments
    ,      nvl( D.Unit_Price , L.Unit_Price )   Unit_Price
    ,      nvl( D.UOM_Code , L.UOM_Code )       UOM_Code
    FROM   oke_k_deliverables_b     D
    ,      oke_k_lines_v            L
    ,      mtl_item_flexfields      I
    WHERE  D.Deliverable_ID        = C_Deliverable_ID
    AND    L.K_Line_ID             = D.K_Line_ID
    AND    I.Organization_ID (+)   = D.Ship_From_Org_ID
    AND    I.Inventory_Item_ID (+) = D.Item_ID;
Line: 599

    SELECT WDI.Sequence_Number     BOL_Number
    -- ,      WDI.BOL_Issue_Office    BOL_Issue_Office
    -- ,      WDI.BOL_Issued_By       BOL_Issued_By
    -- ,      WDI.BOL_Date_Issued     BOL_Date_Issued
    FROM   wsh_document_instances  WDI
    ,      wsh_delivery_legs       WDL
    WHERE  WDL.Delivery_ID = P_Delivery_ID
    AND    WDI.Entity_ID   = WDL.Delivery_Leg_ID
    AND    WDI.Entity_Name = 'WSH_DELIVERY_LEGS'
    AND    WDI.Status     <> 'CANCELLED'
    ORDER BY WDL.Sequence_Number;
Line: 614

    SELECT rpad(nvl(Org.Name,' ') , 80 , ' ') ||           /* Name */
           rpad(nvl(Loc.Address_Line_1,' ') , 80 , ' ') || /* Address1 */
           rpad(nvl(Loc.Address_Line_2,' ') , 80 , ' ') || /* Address2 */
           rpad(nvl(Loc.Address_Line_3,' ') , 80 , ' ') || /* Address3 */
           rpad(' ' , 80 , ' ') ||                         /* Address4 */
           rpad(nvl(Loc.Town_Or_City,' ') , 80 , ' ') ||   /* City */
           rpad(nvl(Loc.Region_1,' ') , 80 , ' ') ||       /* County? */
           rpad(nvl(Loc.Region_2,' ') , 80 , ' ') ||       /* State */
           rpad(nvl(Loc.Region_3,' ') , 80 , ' ') ||       /* Province? */
           rpad(nvl(Loc.Postal_Code,' ') , 80 , ' ') ||    /* Postal_Code */
           rpad(nvl(Loc.Country,' ') , 80 , ' ')           /* Country_Code */
           Address
    FROM   hr_locations Loc
    ,      hr_organization_units Org
    WHERE  Loc.Location_ID = Org.Location_ID
    AND    Org.Organization_ID = C_Org_ID;
Line: 632

    SELECT rpad(nvl(p.Party_Name,' ') , 80 , ' ') ||   /* Name */
           rpad(nvl(p.Address1,' ') , 80 , ' ') ||     /* Address1 */
           rpad(nvl(p.Address2,' ') , 80 , ' ') ||     /* Address2 */
           rpad(nvl(p.Address3,' ') , 80 , ' ') ||     /* Address3 */
           rpad(nvl(p.Address4,' ') , 80 , ' ') ||     /* Address4 */
           rpad(nvl(p.City,' ') , 80 , ' ') ||         /* City */
           rpad(nvl(p.County,' ') , 80 , ' ') ||       /* County */
           rpad(nvl(p.State,' ') , 80 , ' ') ||        /* State */
           rpad(nvl(p.Province,' ') , 80 , ' ') ||     /* Province */
           rpad(nvl(p.Postal_Code,' ') , 80 , ' ') ||  /* Postal_Code */
           rpad(nvl(p.Country,' ') , 80 , ' ')         /* Country_Code */
           Address
    FROM   hz_cust_accounts c
    ,      hz_parties p
    WHERE  c.cust_account_id = C_Cust_Acct_ID
    AND    p.party_id = c.party_id;
Line: 650

    SELECT rpad(nvl(Party_Name,' ') , 80 , ' ') ||   /* Name */
           rpad(nvl(Address1,' ') , 80 , ' ') ||     /* Address1 */
           rpad(nvl(Address2,' ') , 80 , ' ') ||     /* Address2 */
           rpad(nvl(Address3,' ') , 80 , ' ') ||     /* Address3 */
           rpad(nvl(Address4,' ') , 80 , ' ') ||     /* Address4 */
           rpad(nvl(City,' ') , 80 , ' ') ||         /* City */
           rpad(nvl(County,' ') , 80 , ' ') ||       /* County */
           rpad(nvl(State,' ') , 80 , ' ') ||        /* State */
           rpad(nvl(Province,' ') , 80 , ' ') ||     /* Province */
           rpad(nvl(Postal_Code,' ') , 80 , ' ') ||  /* Postal_Code */
           rpad(nvl(Country,' ') , 80 , ' ')         /* Country_Code */
           Address
    ,      Location_ID
    ,      Site_Use_Code
    FROM   oke_cust_site_uses_v
    WHERE  ID1 = C_Site_ID;
Line: 677

    SELECT pr.jtot_object1_code Object_Code
    ,      pr.object1_id1 ID1
    ,      pr.code
    ,      pr.facility
    FROM   okc_k_party_roles_b pr
    ,      oke_k_deliverables_b kd
    ,    ( select cle_id , cle_id_ascendant , level_sequence
           from okc_ancestrys
           union all
           select id , id , 99999 from okc_k_lines_b ) a
    WHERE  kd.deliverable_id = C_Deliverable_ID
    AND    pr.rle_code = C_Role_Code
    AND    pr.dnz_chr_id = kd.k_header_id
    AND    a.cle_id = kd.k_line_id
    AND  ( ( pr.cle_id IS NULL AND a.cle_id = a.cle_id_ascendant )
         OR pr.cle_id = a.cle_id_ascendant )
    ORDER BY DECODE(pr.cle_id , null , 0 , a.level_sequence) DESC;
Line: 704

    SELECT pr.code
    FROM   okc_k_party_roles_b pr
    ,      oke_k_deliverables_b kd
    ,    ( select cle_id , cle_id_ascendant , level_sequence
           from okc_ancestrys
           union all
           select id , id , 99999 from okc_k_lines_b ) a
    WHERE  kd.deliverable_id = C_Deliverable_ID
    AND    pr.rle_code = C_Role_Code
    AND    pr.dnz_chr_id = kd.k_header_id
    AND    a.cle_id = kd.k_line_id
    AND    ( pr.cle_id IS NULL AND a.cle_id = a.cle_id_ascendant )
    AND    pr.object1_id1 = C_Party_ID
    ORDER BY DECODE(pr.cle_id , null , 0 , a.level_sequence) DESC;
Line: 729

    SELECT pr.jtot_object1_code Object_Code
    ,      pr.object1_id1 ID1
    ,      pr.facility
    FROM   okc_k_party_roles_b pr
    ,      oke_k_deliverables_b kd
    ,    ( select cle_id , cle_id_ascendant , level_sequence
           from okc_ancestrys
           union all
           select id , id , 99999 from okc_k_lines_b ) a
    WHERE  kd.deliverable_id = C_Deliverable_ID
    AND    pr.rle_code = C_Role_Code
    AND    pr.object1_id1 = C_ID1
    AND    pr.dnz_chr_id = kd.k_header_id
    AND    a.cle_id = kd.k_line_id
    AND  ( ( pr.cle_id IS NULL AND a.cle_id = a.cle_id_ascendant )
         OR pr.cle_id = a.cle_id_ascendant )
    ORDER BY DECODE(pr.cle_id , null , 0 , a.level_sequence) DESC;
Line: 755

    SELECT pr.code
    FROM   okc_k_party_roles_b pr
    ,      oke_k_deliverables_b kd
    ,    ( select cle_id , cle_id_ascendant , level_sequence
           from okc_ancestrys
           union all
           select id , id , 99999 from okc_k_lines_b ) a
    WHERE  kd.deliverable_id = C_Deliverable_ID
    AND    pr.rle_code = C_Role_Code
    AND    pr.object1_id1 = C_ID1
    AND    pr.dnz_chr_id = kd.k_header_id
    AND    a.cle_id = kd.k_line_id
    AND    pr.code is not null
    AND  ( ( pr.cle_id IS NULL AND a.cle_id = a.cle_id_ascendant )
         OR pr.cle_id = a.cle_id_ascendant )
    ORDER BY DECODE(pr.cle_id , null , 0 , a.level_sequence) DESC;
Line: 778

    SELECT kt.term_value_pk1 Code
    ,      OKE_UTILS.Get_Term_Values
           ( kt.term_code , kt.term_value_pk1
           , kt.term_value_pk2 , 'MEANING' ) Name
    FROM   oke_k_terms kt
    ,      oke_k_deliverables_b kd
    ,    ( select cle_id , cle_id_ascendant , level_sequence
           from okc_ancestrys
           union all
           select id , id , 99999 from okc_k_lines_b ) a
    WHERE  kd.deliverable_id = C_Deliverable_ID
    AND    kt.term_code = C_Term_Code
    AND    kt.k_header_id = kd.k_header_id
    AND    a.cle_id = kd.k_line_id
    AND  ( ( kt.k_line_id IS NULL AND a.cle_id = a.cle_id_ascendant )
         OR kt.k_line_id = a.cle_id_ascendant )
    ORDER BY DECODE(kt.k_line_id , null , 0 , a.level_sequence) DESC;
Line: 805

  SELECT Code
  FROM   okc_k_party_roles_b
  WHERE  rle_code = 'SHIP_FROM'
  AND    jtot_object1_code = 'OKX_INVENTORY'
  AND    object1_id1 = C_Ship_From_Org
  AND    dnz_chr_id = C_K_Header_ID;
Line: 816

  SELECT ID1
  FROM   oke_cust_site_uses_v
  WHERE  location_id = C_Ship_To_Loc
  AND    site_use_code = 'SHIP_TO';
Line: 857

    update oke_k_print_forms
    set last_update_date = sysdate
    WHERE  k_header_id = FrmHdrRec.K_Header_ID
    AND    print_form_code = 'DD250';
Line: 1164

    fnd_file.put_line(fnd_file.log , '... Inserting into OKE_K_FORM_HEADERS');