Hi, everybody
Despite having four branches in the product tree, only three branches are coming through.
My query is as follows;
SELECT
LEVEL AS SEVIYE,
LPAD (LEVEL, (LEVEL * 2) - 1, '.') AS URUN_HIYERASI,
PART_NO AS PARCA_NO,
IFSAPP.INVENTORY_PART_API.GET_DESCRIPTION (CONTRACT, PART_NO) AS PARCA_ACIKLAMA,
CONTRACT AS SITE,
ENG_CHG_LEVEL AS REVIZYON,
PART_REVISION_API.NUMBER_OF_REVISIONS (CONTRACT, PART_NO, NULL) AS REVIZYON_SAYISI,
PART_REVISION_API.GET_REVISION_TEXT (CONTRACT, PART_NO, ENG_CHG_LEVEL) AS REVIZYON_METNI,
BOM_TYPE AS YAPI_TURU,
ALTERNATIVE_NO AS ALTERNATIF,
IFSAPP.MANUF_STRUCT_ALTERNATE_API.GET_ALTERNATIVE_DESCRIPTION (CONTRACT, PART_NO, ENG_CHG_LEVEL, BOM_TYPE, ALTERNATIVE_NO) AS ALTERNATIF_ACIKLAMA,
COMPONENT_PART AS BILESEN_MALZEME,
IFSAPP.INVENTORY_PART_API.GET_DESCRIPTION (CONTRACT, COMPONENT_PART) AS BILESEN_MALZEME_TANIMI,
COMPONENT_SCRAP AS BILESEN_HURDASI,
SHRINKAGE_FACTOR AS FIRE_ORANI,
LEADTIME_OFFSET AS TEMIN_SURESI_DENGELEME,
PROMISE_PLANNED AS TAH_PLANLANDI,
PHANTOM_CONSUME AS FANTOM_TUKETIM,
CHARGED_ITEM AS MASRAF_KALEMI,
PURCHASE_COMP_BACKFLUSH_DB AS SATINALMA_BILESENLERININ_OTOMATIK_CEKIMI,
GEN_OH_COST_DISTRIBUTION AS GG_MALIYET_DAGITIM_FAKTORU,
OPER_COST_DISTRIBUTION AS OPERASYON_MALIYET_DAGITIM_FAKTORU,
QTY_PER_ASSEMBLY AS MONTAJ_BASINA_MIKTAR,
CONSUMPTION_ITEM AS TUKETIM_KALEMI,
IFSAPP.INVENTORY_PART_API.GET_UNIT_MEAS (CONTRACT, COMPONENT_PART) AS OLCU_BIRIMI,
IFSAPP.INVENTORY_PART_API.GET_PLANNER_BUYER (CONTRACT, COMPONENT_PART) AS PLANLAMACI,
MANUF_PART_ATTRIBUTE_API.GET_STRUCTURE_EFFECTIVITY (CONTRACT, PART_NO) AS YAPI_ETKINLIGI,
IFSAPP.INVENTORY_PART_PLANNING_API.GET_MIN_ORDER_QTY (CONTRACT, COMPONENT_PART) AS MINIMUM_SIPARIS_MIKTARI,
IFSAPP.INVENTORY_PART_PLANNING_API.GET_MAX_ORDER_QTY (CONTRACT, COMPONENT_PART) AS MAXIMUM_SIPARIS_MIKTARI,
LINE_ITEM_NO AS SATIR_NO,
NOTE_TEXT AS NOT_METNI,
OPERATION_NO AS OPERASYON_NO
FROM
IFSAPP.MANUF_STRUCTURE
CONNECT BY
PRIOR COMPONENT_PART = PART_NO
AND PRIOR CONTRACT = CONTRACT
AND PRIOR STOP_BOM_EXPLOSION_DB = 'FALSE'
AND BOM_TYPE_DB = PRIOR BOM_TYPE_DB
AND EFF_PHASE_IN_DATE <= SYSDATE
AND NVL (EFF_PHASE_OUT_DATE, SYSDATE) >= SYSDATE
AND ( OBJTYPE != 'RECIPESTRUCTURE'
OR NVL (IFSAPP.RECIPE_STRUCT_ALTERNATE_API.GET_REWORK_ALTERNATE_DB (PRIOR CONTRACT, PRIOR PART_NO, PRIOR ENG_CHG_LEVEL, PRIOR BOM_TYPE, PRIOR ALTERNATIVE_NO), 'FALSE') = 'FALSE')
AND IFSAPP.MANUF_STRUCT_ALTERNATE_API.GET_OBJSTATE (CONTRACT, PART_NO, ENG_CHG_LEVEL, BOM_TYPE, ALTERNATIVE_NO) <> 'OBSOLETE' START WITH PART_NO = '&PART_NO'
AND CONTRACT = (
SELECT
CONTRACT
FROM
INVENTORY_PART
WHERE
PART_NO = '&PART_NO'
)
--AND BOM_TYPE_DB = 'M'
AND ENG_CHG_LEVEL = '1'
AND ALTERNATIVE_NO = '*'
AND ( OBJTYPE != 'RECIPESTRUCTURE'
OR NVL (IFSAPP.RECIPE_STRUCT_ALTERNATE_API.GET_REWORK_ALTERNATE_DB (CONTRACT, PART_NO, ENG_CHG_LEVEL, BOM_TYPE, ALTERNATIVE_NO), 'FALSE') = 'FALSE') ORDER SIBLINGS BY LINE_SEQUENCE