Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Find last record in subreport to call another subreport?

Using a manufacturing software I need to extract materials and labor for a specific job

In order to do this I need to get material and labor from two different levels of Bill of materials

one level is model numbers and next level down are component numbers (defined as assembly in one field, and component in another field)

My issue is my sub report is listing all work orders with correct part number, but I only want last work order for each part number.

How can I filter out all but last work order? Then use that work order number to query labor table in another sub report?

So currently I have material and labor sub reports in group headers for model number which works! (for Model / top assembly)

But next level down work orders are not tagged for Job Number so I want most recent.

Does this make any sense?

I tried to use max


MAX_WORKORDER:= (Maximum ({WOHeader.WONumber}))

Then suppress workorders in group footer where max_workorder<> {WOHeader_Comp.WONumber}

but that didn't seem to suppress anything

Any suggestions greatly appreciated


Former Member
Former Member replied

Have you tried adding a group by work order and then inserting SR in that group header.

Then linking SR on WorkOrder ID


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question