Skip to Content
author's profile photo Former Member
Former Member

Read Classification - Performance

Hi all,

I'm using the function 'CLAF_CLASSIFICATION_OF_OBJECTS' (including parameter inherited_char) to read the classification for various material.

The call function is in a loop statement.

If the loop is for say 100 Material everything runs fine but the program runs to long with for example 3000 Material.

I did some running time measurements after each call function. The result is, that 99% of the calls are quite fast but a few calls taking up to 5000 times longer that the others! If I repeated the run all material with long run times are changed. That means they are not always the same material with long run times.

I checked the OSS already but all Notes referred to the performance problem with this function are implemented.

Does anyone has a idea to get this solved?

Thanks ahead for any ideas.



PS: We are on 46C - SAPKH46C37

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Posted on Aug 07, 2004 at 07:28 AM

    Hello Markus

    4 or 5 years ago I solved the problem by writing my own function in 31I. Before version 4.5 configuration and classification was stored in the same database and I used my module to read both.

    After upgrade to 46c the configuration was separated into new database tables, but my old function is still used in many program.

    I also wrote a special function to search objects (i.e.. materials) via classification. Both functions perform extremely better than SAP standard functions.

    One problem you have to deal with is the formatting of the characteristics, but you have table that tells you all you need to know (Alpha or numeric, number of decimals etc.)

    I don't remember all the tables I use, but have a look at AUSP, INOB, CABN, CABNT, CAWN, CAWNT.

    Of course classification and characteristics can be configured in many different ways and I'm sure around the world you will find SAP R/3 systems where my functions can't be used.

    But I have used my knowledge about this in at least 4 different installations - without any problems.

    Best regards

    Thomas Madsen Nielsen

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 09, 2004 at 08:17 AM

    I seem to remember having a similar problem quite some time back. It was related to an internal table not getting cleared properly in one of SAP's Classification function groups. I ran my program until it slowed down. I then jumped into the debugger and used the trick from OSS note 649327 to show the largest 25 tables in memory. The one that wasn't clearing stuck out like a sore thumb. The follow is the text from that OSS note:

    In Basis Releases 4.6 and 6.10, you can display the largest internal

    tables by entering dis in the OK code field of the Debugger and

    ITAB-TOP25 as area (scroll with the screen buttons).This also applies to

    Release 6.20, provided the system does not yet contain the memory

    inspector (see above).

    Refer to note 185185 for information on releases before Release 4.6.

    After that I was able to clear the offending table inbetween calls and everything was fine. You might also try calling function module, CLAP_DDB_INIT_CLASSIFICATION, inbetween requests as well.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Peter,

      I had a look at 'BAPI_OBJCL_GETDETAIL' but there you need the class as well. Problem is because of the inheritance I can't use the class as a parameter.

      It would be a way to find first all involved classes and read the classification after it but the function 'CLAF_CLASSIFICATION_OF_OBJECTS' is doing exactly what i wanted but just not fast enough in some constellations.

      Thanks Thomas,

      I checked the memory during debugging. No very big tables. I did for testing a free memory before each call but no difference as well.

      To call the function 'CLAP_DDB_INIT_CLASSIFICATION' makes no sence because it's an other function group. In the used function group is no similare function.

      Thanks again for all your help.