cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Subscribe

Hello experts,

I am trying to check the value of a characteristic when I save a document in CV01N/CV02N.

I am using  IF_EX_DOCUMENT_MAIN01~BEFORE_SAVE but I have no access to classification information.

I have seen that in the same implementation there is a method call BEFORE_SEARCH_DATA that has the classification data.

How can I acces that information??

Thanks in advance.

0 Likes
View Entire Topic
Former Member
0 Likes

Maybe IF_EX_DOCUMENT_MAIN01~ADD_ADDITIONAL_CLASSES is what you want. It gets the already existing classes which you can then check or change and even add new classes. In case of error simply throw the exception CANCEL.

Former Member
0 Likes

Hello Samuli,

There is no method call ADD_ADDITIONAL_CLASSES in DOCUMENT_MAIN01 (or I do not find ir).

The only methods I see are:


BEFORE_READ_DATA

AFTER_READ_DATA

ASSIGN_NUMBER

BEFORE_SAVE

BEFORE_DELETE

AFTER_SAVE

AFTER_DETERMINE_VALID_VERSION

AFTER_SEARCH_DATA

AFTER_CHANGE_NUMBER_CHECK

BEFORE_SEARCH_DATA

DOCUMENT_DELETE

SET_KPRO_UPDATE_MODE

Are you  sure that method is in DOCUMENT_MAIN01, where can I find it??

Thanks in advance.

Laura.


Former Member
0 Likes

What is your SAP version incl. SP level? SAP note 1630402 needs to be in the system. You should also make sure SAP note 1839361 is applied, otherwise the BAdI gets called too late.

https://service.sap.com/sap/support/notes/1630402

https://service.sap.com/sap/support/notes/1839361

Former Member
0 Likes

Hello Samuli,

First of all, thanks for you answer. I have implemented the note 1630402 and now I have the method ADD_ADDITIONAL_CLASSES in DOCUMENT_MAIN01 . I have set a break-point and I can see that it works.

Then problem is that when executing CV02N, it seems that parameters CHAR_VALUES and CLASS_VALUES should have the characteristics and the class associated with the document, but they are empty!!

Coupled with this, the note 1839361 cannot be implemented in my system.

Could you give me more information to know if I have done something wrong??

Thanks again.

Former Member
0 Likes

It might be that the parameters do not contain the existing classes, I just assumed they do. I will have to test it myself and get back to you.