cancel
Showing results for 
Search instead for 
Did you mean: 

Bill of Material SQL query same as Bill of Material Report

0 Kudos

Dear Experts, I need to display the results same as SBO Bill of Material Reports where Systems calculates the n'th Level material items as of 1st Level Finished goods Value. I have Tried to dig out the issue while even exploring the SQL profiler.

I have multiple level BOM whith different X quantity of finished and Child BOMs.
Please Help me to generate the SQL Query.

Regards,

Awais

Accepted Solutions (0)

Answers (1)

Answers (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos
0 Kudos

Hi,

My Company uses SAP Hana for the database. Do you have Hana query for this

I have tried

With BOM ("Parent","Child","Quantity","Level")

As

(

Select P."Father" "Parent",P."Code" "Child", "Quantity",0 "Level"

From ITT1 P Where P."Code" = 'XXXXXX'

Union All

Select c."Father",C."Code",C."Quantity","Level"+1

From Itt1 C Inner join BOM B on c."Father"=B."Child"

)

Select B."Parent",B."Child",B."Quantity",B."Level"

From BOM B

Inner join OITM I

On B."Child"=I."ItemCode"

where I."PrcrmntMtd" = 'M' order by "Level"

But Hana seems doesn't support recursive query with "WITH" clause

lenastodal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Vuong,
Thanks for coming to SAP Community for answers. Please post your question as a new question here:
https://answers.sap.com/questions/ask.html
Since you're new in asking questions here, check out our tutorial about asking and answering questions (if you haven't already), as it provides tips for preparing questions more effectively, that draw responses from our members. Please note, that your post here won't be answered.