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

Pointers needed on Mapping Parameters - BAPI_OBJCL_CHANGE

Former Member
0 Likes
594

Hi Gurus,

I am unable to pass correct mapping paramters to BAPI_OBJCL_CHANGE.

I need to update Characteristics in AUSP table

The paramters being passed:

Import parameters

OBJECTKEY - what should be the value for Object key ?

Should i concatenate Material num and Batch to build Object Key ?

OBJECTTABLE - AUSP

CLASSNUM - what is Class Num?

CLASSTYPE - 023

STATUS - '1'

STANDARDCLASS -

CHANGENUMBER -

KEYDATE -

NO_DEFAULT_VALUES -

Tables

ALLOCVALUESNUMNEW

ALLOCVALUESCHARNEW

What should be populated in the above tables.

Please giude me with some pointers to use the above BAPI.

Please help me out in this one, its very critical.

Many Thanks,

Madan

1 REPLY 1
Read only

Former Member
0 Likes
427
data: numc_values type table of bapi1003_alloc_values_num with header line,
        alph_values type table of bapi1003_alloc_values_char with header line,
        curr_values type table of bapi1003_alloc_values_curr with header line,
        return type table of bapiret2 with header line,
        material type bapi1003_key-object.
.
.
  if not data_record-sp_ind is initial.
    move 'spare-part-indicator' to alph_values-charact.
    move data_record-sp_ind to alph_values-value_char.
    append alph_values.
  endif.
.
.
    call function 'BAPI_OBJCL_CHANGE'
      exporting
        objectkey          = material
        objecttable        = 'MARA'
        classnum           = 'SPARES'
        classtype          = '001'
      tables
        allocvaluesnumnew  = numc_values
        allocvaluescharnew = alph_values
        allocvaluescurrnew = curr_values
        return             = return.

the above is a code snippet from a program we use to maintain chracteristics of a class on material masters.

The object key is indeed the object that is being classified. in this case, the material number. you must first move it to the work field to make sure there is no typing issues with the BAPI. The object table is the table which stores the OBJECT (not the classification table AUSP). The classnum is actuall the NAME of the class, and the class type is the class type (for materials, this is '001' for example.

the internal tables store the values for the characteristics, and each characteristic goes into one of the three tables, depending on its data type. in the snippet is an example of loading a "character" characteristic.

actually create a classification manually, and then check it in AUSP, and you will see how the data is stored, and this might also help you. ausp is one of about a dozen or so tables used in classification.

this comes from a working, active program, but of course, you use this at your own risk (end of disclaimer)

i hope this helps. we do a lot of classification, so if you need any further help, just ask.