Query To Find Batch Master Classification View

How to find batch master with classification view?

This is an actual request from one of my company SAP user. The SAP Query comes in handy for such request as you can create it easily as long as you know the tables and fields involved.

Table Joins

MCHA - Batches

MCHA-CUOBJ_BM - Internal object no.: Batch classification

MCHB - Batch Stocks

MCHA-CUOBJ_BM = 0 (means No Classification View in Batch Master MSC1N / MSC2N / MSC3N)

Join Field between MCHA and MCHB

MATNR - Material Number
WERKS - Plant
CHARG - Batch Number

Query To Find Batch Master Classification View

Notes:

Actually, I was trying to further join using table INOB, KSSK and KLAH to get the Classification Class Name.  However, SAP query regard field MCHA-CUOBJ_B and INOB-CUOBJ as Illegal Joins.  It seems to be a limitation but should work if you are using ABAP programming.  Even without these tables, the SAP Query works fine with some explanation.  This request was accepted by the SAP users and considered closed.

INOB - Link between Internal Number and Object
INOB-CUOBJ - Configuration (internal object number)

KSSK - Allocation Table: Object to Class
KSSK-OBJEK - Key of object to be classified

KLAH - Class Header Data
KLAH-CLINT - Internal Class Number

ABAP Tips

Read Also

Get help for your ABAP problems
Do you have a ABAP Question?

ABAP Books
ABAP Certification, BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference Books

More ABAP Tips

Main Index
SAP ERP Modules, Basis, ABAP and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.