Claire,
Welcome to the list, and don't forget your system configuration information for future posts.
I don't know of a business function to get labor and material costs for a WO, but you can look in the F3102 table. In this you will find all kinds of costs for WO's (planned, actual, completed,...). Please be aware that some of these cost values will only be filled in upon running WIP Accounting (R31802).
It wouldn't take too much to loop through the records in the F3102 and pick out the records for the cost types you want (A1, B1, B2...) to get the costs you're looking for.
Good luck!
Don Sauve
Wagstaff, Inc.
OW XE, Update 1, SP15.1, HP-UX 11.0, Oracle 8.1.6