2006 Aug 09 8:33 PM
2006 Aug 09 9:07 PM
Did you check with your MM consultant if the configuration for the same is correct?
Raj
2006 Aug 09 9:14 PM
Instead of passing values MCHA and 023, populate the same in variables and pass the same to this fm.
Try this out.
DATA: V_TABLE TYPE BAPI1003_KEY-OBJECTTABLE,
V_CLASS TYPE BAPI1003_KEY-CLASSTYPE.
V_TABLE = 'MCHA'.
V_CLASS = '023'
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = i_objtable-object
objecttablenew = V_TABLE
classnumnew = i_objtable-classnum
classtypenew = V_CLASS
TABLES
allocvaluesnum = i_allocvaluesnum
allocvalueschar = i_allocvalueschar
allocvaluescurr = i_allocvaluescurr
return = return.
2006 Aug 09 9:19 PM
Hi Raj,
What confiuration are you talking about. Can you please tell something more on that. So that I can talk to the functional consultants.
Ashish,
I tried passing the values through variables aswell. It didnt help. Waiting.................
2006 Aug 09 9:23 PM
Can you check in TCLA table if entry is already present for class '023'?
2006 Aug 09 9:26 PM
Hi,
In TCLA there is one entry present for class type '023' and that is where I got the object table 'MCHA' from.
Waiting
2006 Aug 09 9:31 PM
Have you seen documentation for this BAPI, it clearly explains the purpose.
Check out -
Function
This BAPI creates a classification with assigned values if the
classification does not yet exist. The classification is defined by the
required fields object key (ObjectKeyNew), object table
(ObjectTableNew), class name (AllocDetail-Class_Num), and class type
(AllocDetail-Class_Type). The characteristics and their values are
transferred in different tables according to type. Numeric, time, and
date characteristics are transferred in table AllocValuesNum. Character
and boolean characteristics are transferred in table AllocValuesChar,
and currency characteristics are transferred in table AllocValuesCurr.
If the BAPI runs successfully, table RETURN contains no messages of type
'E'.
Note
The object key (ObjectKey) must be transferred in internal format,
before conversion exits. For example, a material number must be
transferred with leading zeros.
2006 Aug 09 9:41 PM
I went through the documentation but I could not figure out whats going wrong in my case. Do you have any thing to tell regarding the documnetation.
2006 Aug 09 9:59 PM
Can you debug this fm and see where it is failing exactly........
2006 Aug 09 10:05 PM
Yes...debugging is one option.
Otherwise, ask your functional consultant or user to manually create a class and chracteristics for this class type. If there is any error in config, you may catch there. If everything goes good there, then you may try looking at debuggin option.
Raj
2006 Aug 09 10:09 PM
2006 Aug 10 12:46 AM
2006 Aug 10 5:25 AM
You can find tàble name with this function
CALL FUNCTION 'VB_BATCH_DEFINITION'
IMPORTING
obtab = gv_obtab.
in our system it 'MCH1'.
Also object key must contain matnr and batch numer
you can create like this example:
it_objects-key_field = 'MATNR'.
it_objects-value_int = matnr.
APPEND it_objects.
it_objects-key_field = 'CHARG'.
it_objects-value_int = charge.
APPEND it_objects.
CLEAR l_objectkey.
CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
EXPORTING
objecttable = gv_obtab
IMPORTING
objectkey_conc = l_objectkey
TABLES
objectkeytable = it_objects
return = it_return.