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.
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.