01-07-2019 3:37 PM
Hello.
I wanted to create a report to show characteristic values for multiple objects at once, based on the chosen class type and number.
My approach is to show the batch characteristic values using FM 'BAPI_OBJCL_GETDETAIL' and then transpose them to show in alv grid.
The parameters I used was the class type 023, class number given by user (specific for batch characteristic) and the objecttable MCH1. Everything works fine if those values are hard-coded (class type, objecttable).
My problem is that this report should be a generic one so based on the chosen class type and number pair I would somehow get the correct objecttable value and then run the FM.
Is there any table that has such link?
I did find the TCLO table that has the values that create the needed objectkey and this is based on the objecttable (ex.: for MCH1 i need to concatenate the material and batch number) but how can I get the needed object table when I have only the class type and number?
Is this even possible?
01-08-2019 8:09 AM
Check table TCLA based on class type retrieve the table and proceed.
01-09-2019 8:16 AM
I checked it already before writing my question, but sadly this table will not solve my problem.
Using the FM as I wrote and using the TCLA table (selecting type 023) you suggested I would retrieve the value MCHA for object table name but to get anything I need to use MCH1 as the objects value I checked consist of material and batch only. MCHA would also have plant inside the object. So how to know that this should be MCH1 and not MCHA?
I read that 023 is a multi object type so I should look into table TCLAO to get all possible table names but still how to know which one to use?
I thought that there is a connection for class type, class number to the correct table name.
So example a class type 023 with class number BOLTS will use table MCHA but 023 and SCREWS will be configured for MCH1 table.
I probably do not understand fully the classification approach so I am a bit confused.
01-10-2019 8:21 AM
At least in my system i can see specifically in case of batch we are using FM VB_BATCH_DEFINITION to determine batch definition level then if level is 0 they are using MCHA else MCH1 for level 1. I believe you need to discuss this with your function expert how the definition is done.
Nabheet