Thursday, May 12, 2016

OAF Errors

Solved: You cannot run a page which is not Self Secured when the MAC fails

Sometimes we will face below issues in R12.

Issue 1:
You have insufficient privileges for the current operation. Please contact your System Administrator.

You cannot run a page which is not Self Secured when the MAC fails.


Resolution:

Set the below 3 profiles to None
1) FND Function Validation Level
2) FND Validation Level
3) Framework Validation Level
JDev-2
Issue 2:
Unexpected URL parameters have been detected and will be ignored Solution:

Resolution:

In JDeveloper, go to menu Tools–>Embedded OC4J Server Preferences–>Global–>Startup–>Select Default Local IP Address.
JDev-3

OPM Interface Manager Navigation

Oracle Process manufacturer Super User --> Inventory -->; Setup -> Interface Managers

Requisition Details Query - ASCP

ELECT
  prqh.segment1 requisition_no
, prqh.creation_date
, papf.full_name Buyer
, msib.segment1 item
, prla.item_description
, prla.unit_meas_lookup_code uom
, prla.unit_price
, prla.quantity
, prla.source_type_code
, prla.quantity_delivered
, prla.need_by_date
, prla.note_to_receiver
, prla.justification
, prqh.org_id
, prla.destination_organization_id
, prqh.approved_date
, ood.organization_code
FROM
  po_requisition_headers_all prqh
, po_requisition_lines_all prla
, per_all_people_f papf
, mtl_system_items_b msib
, org_organization_definitions ood
WHERE
  prqh.requisition_header_id   =prla.requisition_header_id
AND ood.organization_id        = prla.destination_organization_id
AND prqh.interface_SOURCE_CODE = 'MSC'
AND prqh.preparer_id           =papf.person_id
AND msib.inventory_item_id     = prla.item_id
AND sysdate BETWEEN papf.effective_start_date AND papf.effective_end_date
AND prla.destination_organization_id=msib.organization_id
AND prqh.creation_date between :P_FROM_DATE and :P_TO_DATE
and prla.destination_organization_id = :P_ORG_ID
ORDER BY
  1;

Item Assignment Details Query - ASCP

SELECT
 (
    SELECT
      meaning
    FROM
      fnd_lookup_values_vl
    WHERE
      lookup_type  ='MRP_ASSIGNMENT_TYPE'
    AND lookup_code=m.ASSIGNMENT_TYPE
  )
  Assignment_type,
    ( select msib.segment1 from mtl_system_items_b msib where m.inventory_item_id=msib.inventory_item_id
AND m.organization_id=msib.organization_id) Item
, m.ORGANIZATION_CODE
, m.organization_id
, m.entity_name
, m.description
, m.sourcing_rule_type_text
, m.sourcing_rule_name
, m.inventory_item_id
, m.creation_date
  ,m.ASSIGNMENT_ID
, m.ASSIGNMENT_SET_ID
FROM
  MRP_SR_ASSIGNMENTS_v m
  , MRP_ASSIGNMENT_SETS mas
  where m.assignment_set_id=:P_ASSIGNMENT_SET_ID
 and mas.assignment_set_id=m.assignment_set_id
  and m.organization_id=:P_ORG_ID
;

Item Master Setup Query - ASCP

SELECT
  msib.segment1 Item_Code
, msib.description Item_Description
, msib.primary_unit_of_measure uom
, (
    SELECT
      mcb.segment1
    FROM
      mtl_categories_b mcb
    WHERE
      mcb.category_id =
      (
        SELECT
          category_id
        FROM
          mtl_item_categories_v
        WHERE
          category_set_name  ='Inventory'
        AND inventory_item_id=msib.inventory_item_id
        AND organization_id  =msib.organization_id
      )
  )
  inventory_category
  , (
    SELECT
      mcb.segment1
    FROM
      mtl_categories_b mcb
    WHERE
      mcb.category_id =
      (
        SELECT
          category_id
        FROM
          mtl_item_categories_v
        WHERE
          category_set_name  ='Purchasing'
        AND inventory_item_id=msib.inventory_item_id
        AND organization_id  =msib.organization_id
      )
  )
  purchasing_category
  ,(SELECT
          category_concat_segs
        FROM
          mtl_item_categories_v
        WHERE
          category_set_name  ='Inventory'
        AND inventory_item_id=msib.inventory_item_id
        AND organization_id  =msib.organization_id) Inventory
        ,(SELECT
          category_concat_segs
        FROM
          mtl_item_categories_v
        WHERE
          category_set_name  ='Purchasing'
        AND inventory_item_id=msib.inventory_item_id
        AND organization_id  =msib.organization_id) Purchasing
  ,msib.ITEM_TYPE "UserItem Type"
, (
    SELECT
      full_name
    FROM
      per_all_people_f
    WHERE
      person_id= msib.buyer_id
    AND rownum =1
  )
  buyer_name
  ,msib.INVENTORY_ITEM_FLAG "Inventory Item"
,msib.STOCK_ENABLED_FLAG "Stockable"
,msib.MTL_TRANSACTIONS_ENABLED_FLAG "Transactable"
,msib.RESERVABLE_TYPE "Reservable"
,msib.PURCHASING_ITEM_FLAG "Purchased"
,msib.PURCHASING_ENABLED_FLAG "Purchasable"
,msib.MUST_USE_APPROVED_VENDOR_FLAG "Use Approve Supplier List"
,msib.OUTSIDE_OPERATION_FLAG "OSP item"
,msib.OUTSIDE_OPERATION_UOM_TYPE "Unit Type"
, m.PREPROCESSING_LEAD_TIME
, m.FULL_LEAD_TIME
, m.MINIMUM_ORDER_QUANTITY
, m.MAXIMUM_ORDER_QUANTITY
, (
    SELECT
      meaning
    FROM
      fnd_lookup_values_vl
    WHERE
      lookup_type  = 'MRP_PLANNING_CODE'
    AND lookup_code=m.mrp_planning_code
  )
  MRP_PLANNING_VALUE
,(
    SELECT
      meaning
    FROM
      fnd_lookup_values_vl
    WHERE
      lookup_type ='MRP_SAFETY_STOCK'
    and
      lookup_code= m.mrp_safety_stock_code
  )
  Safety_Stock_value
  , (
    SELECT
      meaning
    FROM
      fnd_lookup_values_vl
    WHERE
      lookup_type ='ASSEMBLY_PEGGING_CODE'
    and
      lookup_code= m.END_ASSEMBLY_PEGGING_FLAG
  )
  Pegging_Flag
  ,decode ( m.ATO_FORECAST_CONTROL, 3, 'None', 2, 'Consume and derive' , 1, 'Consume') Forecast
  ,msib.LIST_PRICE_PER_UNIT "List price"
,m.MRP_PLANNING_CODE
,m.FIXED_ORDER_QUANTITY
,m.FIXED_DAYS_SUPPLY
,m.SAFETY_STOCK_BUCKET_DAYS
,m.MRP_SAFETY_STOCK_PERCENT
,m.END_ASSEMBLY_PEGGING_FLAG
,m.PLANNING_TIME_FENCE_DAYS
,m.DEMAND_TIME_FENCE_DAYS
,m.RELEASE_TIME_FENCE_DAYS
,m.PLANNING_EXCEPTION_SET
,m.purchasing_enabled_flag
,m.purchasing_item_flag
,m.purchasing_tax_code
  /*--, micv.category_set_name*/
  /*--, mcb.segment1*/
, msib.organization_id
, msib.source_subinventory "Source: Sub Inventory"
, msib.safety_stock_bucket_days "Safety Stock: Bucket Days"
, msib.mrp_safety_stock_percent "Safety Stock: Percent"
, msib.fixed_order_quantity "OM:Fixed Order Quantity"
, msib.fixed_days_supply "OM:Fixed days Supply"
, msib.fixed_lot_multiplier "OM:Fixed Lot Multiplier"
, msib.vmi_minimum_units "VM:Minimum Quantity"
, msib.vmi_maximum_units "VM:Maximum Quantity"
, msib.vmi_minimum_days "VM:Minimum Days Of Supply"
, msib.vmi_maximum_days "VM:Maximum Days Of Supply"
, msib.vmi_fixed_order_quantity "VM:Fixed Quantity"
, msib.so_authorization_flag "VM:Release Authorization Req"
, msib.consigned_flag "VM:Consigned"
, msib.asn_autoexpire_flag "VM:Auto Expire ASN"
, msib.vmi_forecast_type "VM:Forecast Type"
, msib.forecast_horizon "VM:Window Days"
FROM
  MTL_SYSTEM_ITEMS_FVL m
, mtl_system_items_b msib
  /*--, mtl_category_sets_v mcsv*/
  /*--, mtl_item_categories_v micv*/
  /*--, mtl_categories_b mcb*/
WHERE
  m.inventory_item_id=msib.inventory_item_id
AND m.organization_id=msib.organization_id
  /*--and mcsv.category_set_id = micv.category_set_id*/
  /*--and micv.inventory_item_id= msib.inventory_item_id*/
  /*--and msib.organization_id= micv.organization_id*/
  /*--and micv.category_set_name in ('Purchasing','Inventory')*/
  /*--and mcb.category_id=micv.category_id*/
  /*--and mcb.structure_id= micv.structure_id*/
AND msib.organization_id=:P_ORG_ID
ORDER BY
  msib.organization_id
, msib.segment1 ;

Forecast Details

SELECT
  msib.segment1 item
,msib.description
,msib.primary_unit_of_measure uom
(select organization_code from org_organization_definitions where organization_id=msib.organization_id) organization_code
, mfi.forecast_designator
, mfd.forecast_set
, mfd.bucket_type
, mf.forecast_date
, mf.original_forecast_quantity
, mf.current_forecast_quantity
,mf.confidence_percentage
,mf.origination_type
,mf.comments
FROM
  MRP_FORECAST_ITEMS mfi
, mtl_system_items_b msib
,MRP_FORECAST_DESIGNATORS_V mfd
, MRP_FORECAST_DATES mf
WHERE
  msib.inventory_item_id   =mfi.inventory_item_id
AND msib.organization_id   =mfi.organization_id
AND mfd.forecast_designator= mfi.forecast_designator
AND mfd.organization_id    =mfi.organization_id
and mf.inventory_item_id=msib.inventory_item_id
and mf.organization_id=msib.organization_id
and mf.forecast_designator=mfd.forecast_designator
AND mfi.forecast_designator=:P_FORECAST_DESIGNATOR
and msib.organization_id=:P_ORG_ID
and mfd.forecast_set=:P_FORECAST_SET;