Skip to Content

Error using BAPI_OBJCL_GETCLASSES

Hi,

I have a problem using BAPI_OBJCL_GETCLASSES. This is a piece of code:

CLEAR: objectkey,

alloclist,

i_return.

CONCATENATE i_mcha-matnr i_mcha-charg INTO objectkey.

CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'

EXPORTING

objectkey_imp = objectkey

objecttable_imp = objecttable

classtype_imp = classtype

TABLES

alloclist = alloclist

return = i_return.

The problem is that sometimes it function return me the class correctly and

no others (not found it).

However i test in the se37 'BAPI_OBJCL_GETCLASSES' the objectkey not found

previously and it exist.

regards,

Manuel H.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Sep 29, 2007 at 04:33 AM

    I believe that while concatenating MATNR and CHARGE, it is missing leading zeroes for material. I suggest you to use CONVERSION_EXIT_MATN1_INPUT to get correct Material no, concatenate this with Batch no and then pass to the fm. Hopefully it will work.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 29, 2007 at 07:18 AM

    Are you using a class type of '023', If yes you might have to get the objectkey first by using BAPIGETKEYOBJ.

    Please search for the exact BAPI name.

    Regards,

    Srihari

    Add comment
    10|10000 characters needed characters exceeded