cancel
Showing results for 
Search instead for 
Did you mean: 

Document version in CV01N

Former Member
0 Kudos

Hello experts,

Is it possible control the value of the field Document Version in CV01N. SAP maintain the last value used in this transaction, I would like to have this filed empty in every CV01N execution. Is it possible??

Thanks in advance.


Laura

Accepted Solutions (1)

Accepted Solutions (1)

benedikt_wagner_mdt
Active Participant
0 Kudos

Hi Laura,

please try to implement BAdI DOCUMENT_MAIN01, method AFTER_SAVE with following line:

      set parameter id 'CV3' field space.

This should initialize the parameter id CV3 (version) after the document is saved.

Regards,

Benedikt

Former Member
0 Kudos

Hello Benedikt,

It seems to work!!! The "bad" thing coudl be that it is necesary to indicate the revision everytime (in CV01N and ACV02N) but it's a good solution.

Thanks!

Answers (3)

Answers (3)

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Laura,

I think that the easiest way to control the document version is to use the BADI definition DOCUMENT_NUMBER01 with methods

DOCVERSION_GET_NEXT

DOCVERSION_GET_LAST

With these BADI methods you should be able to create your individual checking and setting routine for document versions.

Best regards,
Christoph

Former Member
0 Kudos

Hello Christoph,

I have set a break-point in those two methods but SAP doesn't stop when executing CV01N, so I suppose it will not work.

Thanks anyway!

Regards.

markus_deuter
Active Participant
0 Kudos

Hi Laura,

Hopefully you have activated the BAdI ?

Regards,

Markus

Former Member
0 Kudos

Hopefully yes.

Thanks.

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Laura,

I'm sorry but I thought your question was about getting a special document version. If you edit a document info record and then return to CV01N the data is getting auto-filled. This means to be the standard behavior and there is no parameter or exit I know that could prevent this behavior.

Best regards,

Christoph

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Laura,

This can be easily done at personal levels. From any SAP screen > Go to Own data screen as shown here.

Go to Parameters tab and maintain these values. CV3 is parameter Id for Document Version and CV4 is that of Document Part and Save settings.

Next time on when you run CV01n you have these defaults.

KJogeswaraRao

markus_deuter
Active Participant
0 Kudos

Hi Jogeswara,

you are right, but by this mechanism you cannot empty the field ... unfortunately. Even if you save one space character.

But you can set the parameter CV3 to # ... this leads to the Situation, that the user must care about the field in general. Perhaps this is an interesting workaround, too.

Regards,

Markus

jogeswararao_kavala
Active Contributor
0 Kudos

Yes, You are right.

Former Member
0 Kudos

Hello Jogeswara,

First of all thanks for your response, but it doesn't solve the problem. The first time I enter CV01N it works fine, but if I create version number 05 the next time I execute the transaction value 05 is set (I suppose because the MEMORY ID??)

Regards

markus_deuter
Active Participant
0 Kudos

Hi Laura,

I think this is possible if you implement a field exit for data element DOKVR with a little ABAP, e.g.

if SY-TCODE = 'CV01N'.

     clear DRAW-DOKVR.

     endif.

To implement a filed exit, follow: http://wiki.scn.sap.com/wiki/display/ABAP/Field+exits

Regards,

Markus

   

P.S. pls rate if this was helpful

markus_deuter
Active Participant
0 Kudos

Hi Laura,

in addition check if parameter 'abap/fieldexit' in RZ11 is set to true

Regards,

Markus