Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to get Batch class for a given batch number ???

Former Member
0 Likes
1,947

From which table i can find the link of Batch (CHARG) and its class.

I have batch no. with me i want to know its class..

which table can provide the link between two....

From which table i can find the link of Batch (CHARG) and its class.

I have batch no. with me i want to know its class..

which table can provide the link between two....

8 REPLIES 8
Read only

Former Member
0 Likes
1,599

Hi

Check the table <b>MCHA</b>

Also check CABN,KSSK,KSML,INOB,AUSP

Reward points for useful Answers

Regards

Anji

Message was edited by:

Anji Reddy Vangala

Read only

0 Likes
1,599

not able to find the link

Read only

0 Likes
1,599

Hi

Take the MATNR and CHARG fields (from MCHB table) and concatenate and pass to OBJEK field of INOB table and take the KLART field

this will help you.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

0 Likes
1,599

from inob i get the value of Class type not the Class Number ( Date eleement KLASSE_D)

Check Txn. MSC3N in CLassification tab

Read only

0 Likes
1,599

Hi

Try a code like this:

DATA: BEGIN OF MCHA_KEY,
       MATNR TYPE MATNR,
       WERKS TYPE WERKS_D,
       CHARG TYPE CHARG_D,
      END   OF MCHA_KEY.

DATA: BATCHCLASS LIKE BAPI_CLASS_KEY-CLASSTYPE VALUE '022'.

DATA: OBJECT_CLASSIFICATION LIKE  BAPI_OBJECT_VALUES
                                              OCCURS 0 WITH HEADER LINE,
      CLASS_OBJECTS LIKE  BAPI_CLASS_OBJECTS  OCCURS 0 WITH HEADER LINE.
DATA: _CLASSNUM LIKE BAPI_CLASS_KEY-CLASSNUM.

    BAPIFLAG = 'X'.

    CALL FUNCTION 'BAPI_CLASS_GET_CLASSIFICATIONS'
         EXPORTING
              CLASSTYPE              = '022'
              CLASSNUM               = _CLASSNUM
              CHARACTS_OF_CLASS_ONLY = BAPIFLAG
         TABLES
              OBJECT_CLASSIFICATION  = OBJECT_CLASSIFICATION
              CLASS_OBJECTS          = CLASS_OBJECTS
         EXCEPTIONS
              OTHERS                 = 1.

Max

Read only

0 Likes
1,599

what shud i pass in classnum

Read only

0 Likes
1,599

Hi

It's the class, u can see the value, seeing a batch by trx MSC3N: here you can find out the class and class type: it should be constants for the batch.

Or try to see the view M_CLASA.

Max

Message was edited by:

max bianchi

Read only

Former Member
0 Likes
1,599

Hi,

all the info of batches is in MCHA, MCH1, MCHB.

<b>Reward points</b>

Regards