Application Development 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: 

sample

Former Member
0 Kudos

sample

Message was edited by: Raju Boda

12 REPLIES 12

Former Member
0 Kudos

Did you check with your MM consultant if the configuration for the same is correct?

Raj

0 Kudos

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.

0 Kudos

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.................

0 Kudos

Can you check in TCLA table if entry is already present for class '023'?

0 Kudos

Hi,

In TCLA there is one entry present for class type '023' and that is where I got the object table 'MCHA' from.

Waiting

0 Kudos

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.

0 Kudos

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.

0 Kudos

Can you debug this fm and see where it is failing exactly........

0 Kudos

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

0 Kudos

sample

Message was edited by: Raju Boda

0 Kudos

sample

Message was edited by: Raju Boda

Former Member
0 Kudos

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.