/* TCE BomView Precice
   !! Parameternamen: para_i_pitem_id nicht aendern !! 
   PITEM PITEM_ID = praeziese1  PUID = 'x0EdDv3nVe1piD' :para_ir_puid = 'x0EdDv3nVe1piD'
  */
SELECT
  i.pitem_id AS item,
  ir.pitem_revision_id AS rev,
  ir.puid AS ir_puid
FROM
  infodba.POM_BACKPOINTER bp
  INNER JOIN infodba.PPSBOMVIEWREVISION bvr ON (bvr.puid = bp.to_uid)
  INNER JOIN infodba.PPSOCCURRENCE bo ON (bo.rparent_bvru = bvr.puid)
  INNER JOIN infodba.PITEMREVISION ir ON (ir.puid = bo.rchild_itemu)
  INNER JOIN infodba.PITEM i ON (i.puid = ir.ritems_tagu)
WHERE
  bp.from_uid = :para_ir_puid

