Oracle EBs Apps Blog of Mahfuz, OPM and OBIEE Consultant

Sunday 8 September 2024

Batch Transactions History

 select --hou.name,
 gbh.plant_code        plant,
 --gmd.*,
 gbh.batch_no          "batch num",
 gmd.item_no,
 gmd.item_desc,
 gmd.line_type_meaning,
 flv.meaning           "Batch Status",
 --trunc(gbh.plan_start_date)   "Plan Start",
 trunc(gbh.actual_start_date) "Actual Start",
 trunc(gbh.due_date) "Due Date",
 --trunc(gbh.plan_cmplt_date) plan_complete,
 trunc(gbh.actual_cmplt_date) "Actual Comp Date",
 ffmb.attribute4 batch_type,
 gbs.batchstep_no,
 gmd.plan_qty,
 gmd.wip_plan_qty,
 gmd.actual_qty,
 -- gbs.plan_step_qty,
 gbs.actual_step_qty,
 gbs.backflush_qty,
 --gbs.plan_start_date,
 --gbs.actual_start_date,
 --gbs.due_date,
 --gbs.plan_cmplt_date,
 --gbs.actual_cmplt_date,
 --gbs.step_close_date,
 gbs.step_status,
 --gbs.priority_code,
 --gbs.priority_value,
 --gbs.delete_mark,
 --gbs.steprelease_type,
 --gbs.max_step_capacity,
 --gbs.max_step_capacity_uom,
 gbs.plan_charges,
 --gbs.actual_charges,
 --gbs.mass_ref_uom,
 --gbs.plan_mass_qty,
 --gbs.volume_ref_uom,
 --gbs.plan_volume_qty,
 gbs.text_code,
 gbs.actual_mass_qty,
 gbs.actual_volume_qty,
 --gbs.quality_status,
 --gbs.minimum_transfer_qty,
 --gbs.terminated_ind,
 gbs.mass_ref_um,
 gbs.max_step_capacity_um
  from gme_batch_header          gbh,
       gme_batch_steps_v           gbs,
       gme_material_details_v    gmd,
       hr_all_organization_units hou,
       mtl_parameters            mp,
       fnd_lookup_values         flv,
       fm_form_mst_b             ffmb
 where 1=1
   AND gbh.batch_id = gmd.batch_id
   AND gbh.batch_id = gbs.batch_id
   AND gbh.organization_id = gmd.organization_id
      -- AND gmd.line_type = '1'
      --AND gmd.line_no = 1
   and gmd.organization_id = hou.organization_id
   and gmd.organization_id = mp.organization_id
   AND flv.lookup_code = TO_CHAR(gbh.batch_status)
   AND flv.lookup_type = 'GME_BATCH_STATUS'
   AND flv.language = 'US' --and NAME='PIP-PF-Tasty Treat-141'
   AND ffmb.formula_id = gbh.formula_id
   and  gmd.item_no='0130022000'
  -- and gbh.batch_no = 130810
--   and gbs.batchstep_no = 10
 order by 2

No comments:

Post a Comment

Internal location is Already assigned to another Ship-to Address

      SELECT *   FROM hz_cust_accounts  WHERE ACCOUNT_NUMBER = 'R08'; -- CUST_ACCOUNT_ID =51401 , PARTY_ID= 235048    SELECT *   FRO...