Dear Friends ,

I have gone through a recent unique requirement to get to display Purchase Category hierarchy. You can get up to level 4 but can be extended up to your business requirement .

You can comment or post your experience  following the details .

SQL query to display Purchase Category hierarchy

SELECT DISTINCT (

SELECT category_name

FROM POR_BROWSE_CATEGORIES_TL pbct

WHERE pbct.category_id = picpl.level1_cat_id

) Level_1_Name

,(

SELECT category_name

FROM POR_BROWSE_CATEGORIES_TL pbct

WHERE pbct.category_id = picpl.level2_cat_id

) Level_2_Name

,(

SELECT category_name

FROM POR_BROWSE_CATEGORIES_TL pbct

WHERE pbct.category_id = picpl.level3_cat_id

) Level_3_Name

,(

SELECT category_name

FROM EGP_CATEGORIES_VL ecv

WHERE picpl.level4_cat_id = ecv.category_id

) Level_4_Name

FROM POR_ITEM_CAT_PARENT_LEVELS picpl

WHERE picpl.type = 'SOURCING'

ORDER BY Level_1_Name

,Level_2_Name

,Level_3_Name

,Level_4_Name


Happy Learning !!!

Comments

Popular posts from this blog

How to Customize AP Invoice Approval in Oracle Fusion cloud Application using Business Process Management(BPM)