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

update batch classification

Former Member
0 Likes
1,424

Good morning everyone,

I need to update a field in the classification of the material transaction msc2n, I used the function VB_BATCH_GET_DETAIL to read the ratings, there is some function of an update?

from already thank you.

2 REPLIES 2
Read only

FredericGirod
Active Contributor
0 Likes
557

Hi Lucas,


to create caracteristic :

    CALL FUNCTION 'BAPI_CHARACT_CREATE'

      EXPORTING

        charactdetail    = is_charactdetail

      TABLES

        charactdescr     = it_charactdescr

        charactvaluesnum = it_charactnum

        return           = it_return.


to create class (with caracteristic):

    CALL FUNCTION 'BAPI_CLASS_CREATE'

      EXPORTING

        classnumnew          = itg_data-classnum

        classtypenew         = '022'

        classbasicdata       = is_classdetail

      TABLES

        return               = it_return

        classdescriptions    = it_libelle

        classcharacteristics = it_charact.

to get the number link to the material number :

    CALL FUNCTION 'BAPI_OBJCL_GET_KEY_OF_OBJECT'

      EXPORTING

        objectname         = w_objectname

        objecttable        = w_nametable

        classtype          = w_classtype

        create_missing_key = 'X'

      IMPORTING

        clobjectkeyout     = w_key

      TABLES

        return             = it_return.


Create the link between material & class

    CALL FUNCTION 'BAPI_OBJCL_CREATE_KEY'

      EXPORTING

        clobjectkey_new = w_key

        classnum_new    = itg_data-classnum

        status          = '1'

      TABLES

        return          = it_return.

I have a full set of this kind of program, if you need it ... just ask

regards

Fred

Read only

Former Member
0 Likes
557

Hi Lucas,

You can see few BAPIs in the below link:

http://wiki.sdn.sap.com/wiki/display/ABAP/ECC+standard+Batch+Input+programs

Sample code in below link is for adding Allowed characteristics values.

http://wiki.sdn.sap.com/wiki/display/Snippets/Simple+ABAP+-+Change+allowed+values+in+a+characteristi...

If you need to only update a value you needn't fill and pass 'charactvaluesdescrnew' internal table.

Regards,

Nisha Vengal.