cancel
Showing results for 
Search instead for 
Did you mean: 

DOCUMENT_MAIN01 and read classification?

Former Member
0 Kudos

Hi,

I'm looking for a way to read the classifications of a document on every SAVE-Operation...

Normally I would use the BADI DOCUMENT_MAIN01 . There is a method called AFTER_SAVE, but there are no parameters for the classification and with a GET_DETAIL I only get the old values of the attributes. It seems that it is not yet commited to the database.

Is there any chance to get the current classification data?

Thanks

Sven

Edited by: Sven Kornetzki on Sep 1, 2008 10:29 AM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

FM 'CTMS_DDB_HAS_VALUES_INTERNAL' could be used to get entered classification.

Just have another connected problem...in the BADI we change Document Type if the proper characteristic has specific value.

So we change the Doc key in this case. And I still didn't find where to change the doc type in the entered classification, so that it will be created for the new document with changed doc type. Does anybody have any ideas?

rafael_zaragatzky
Active Contributor
0 Kudos

Hi,

I have been using CLFM_GET_INTERNAL_TABLES before, but got stuck now after importing SP 13 for ECC 600. Now it shows the same values as in the DB.

Any new ideas please?

rafael_zaragatzky
Active Contributor
0 Kudos

Hi again,

Just want to share with you the solution that I implemented at the end.

I use the BAdI CACL_VALUE_CHANGE in order to store the changed classification values in the memory and then let DOCUMENT_MAIN01 import them from memory.

If the characteristic you are interested in is not on the list, then it wasn't changed and you can safely take it from the database (BAPI_DOCUMENT_GETDETAIL2 or BAPI_OBJCL_GETDETAIL).

ralfstaenglen
Discoverer
0 Kudos

Hi Raphael,

I have a similar problem. Within Rel 4.7 I use in sequence:

- CALL FUNCTION 'CARD_CLASS_READ_CHARACTS (with SAP ECC 6.0 this clears the buffer instead of reading it)

- CLAP_DDB_ALLOCATION_FR_BUFFER

- CLFM_GET_AUSP_FROM_BUFFER (with SAP ECC 6.0 the AUSP Buffer is empty)

I tried your hint, but the BAdI CACL_VALUE_CHANGE is not called in TA u2018CV01Nu2019.

Do you have an idea to get the buffered classifiation data (AUSP) in IF_EX_DOCUMENT_MAIN01~BEFORE_SAVE (SAP ECC 6.0) ? By debugging I found that the dynpro stores them in a structre named "BILD".

Debugging in the area of classification is very time consuming.

The behaviour is completly different if you do the changes in the tab "additional data" or if you change them directly in "classification". In the last case the buffer is available. If you enter the data in the additional data tab, jumb to classification and save afterwards, the buffer is available too. If you save from the TAB directly the buffer is empty.

regards

Ralf Staenglen

Edited by: Ralf Staenglen on Apr 16, 2010 5:01 PM

stefan_rhrl
Explorer
0 Kudos

Hi Sven,

try

data: lt_RMCLAUSP type TABLE OF RMCLAUSP.

CALL FUNCTION 'CLFM_GET_INTERNAL_TABLES'

EXPORTING

I_ALLAUSP = 'X'

I_ALLKSSK = ' '

I_DELOB = ' '

I_DELCL = ' '

TABLES

EXP_AUSP_TAB = lt_RMCLAUSP.

It reads from the buffer.

Stefan.

Former Member
0 Kudos

Hi Sven,

I did some work on a similar issue a couple of years back. I cant remember the exact details, but will try to point you in the right direction.

The bapi after_save is called after the DMS record is saved, but that is unfortunately for you before the characteristics is saved.

I needed to update the DIR with some values found in classification, so what i did was to call a method in the background - this was called after the chars were saved, and then i updated the dir using a bapi.

A bit hassly, but it worked.

Espen