Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error handling in CV02N for Additional data tab

Former Member
0 Likes
1,295

Hi All ,

My requirement is to display error message  if suppose user maintains same Document owner , author and approver in Additional data tab of CV02N transaction

and should not allow to save .For this  i have used exit EXIT_SAPLCLFM_002 .

This error handling will not allow user to maintain same owner , author and approver after DIR is created .

If user try to change approvers  after error message displayed by pressing enter , exist parameters can’t update with new user name  .

Because of this ,  error message will display again even if  we change approver .

So this cause user has to come out of transaction once error message is displayed .

Is there any other way such that user can change approvers in the same transaction after message displayed .

here i am using message text type 'E' statement .

I have tried some other BADi but this message statement type 'E' is disturbing commit statement .

Please help ..

Regards ,

Sijin K P.

Hi All ,

My requirement is to display error message  if suppose user maintains same Document owner , author and approver in Additional data tab of CV02N transaction

and should not allow to save .For this  i have used exit EXIT_SAPLCLFM_002 .

This error handling will not allow user to maintain same owner , author and approver after DIR is created .

If user try to change approvers  after error message displayed by pressing enter , exist parameters can’t update with new user name  .

Because of this ,  error message will display again even if  we change approver .

So this cause user has to come out of transaction once error message is displayed .

Is there any other way such that user can change approvers in the same transaction after message displayed .

here i am using message text type 'E' statement .

I have tried some other BADi but this message statement type 'E' is disturbing commit statement .

Please help ..

Regards ,

Sijin K P.

7 REPLIES 7
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,090

Hi

What you can try is you can dispaly an information message and set E_OK_CODE and E_DYNPRO variable so that data should not be saved.

Thanks

Nabheet

Read only

0 Likes
1,090

Hi nabheet ,

Thanks for reply .

Could you please send me  a sample  code to set E_OK_CODE and E_DYNPRO variable .

Regards ,

Sijin K P.

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,090
Just press enter and debug see what is the ok code pass that and set the same screen number.  Nabheet
Read only

0 Likes
1,090

HI Nabheet ,

Thanks for your reply .

But i cannot use  above exit for this .

Because this exit will trigger  in two cases .

1. while creating DIR.

2.if  any changes occur in additional data tab.

So here i have to block user while creating DIR itself other wise if i allow DIR to create with Same approvers and try to release the DIR with out doing any changes in Additional data tab , Exit will not get called .

As u said if i set E_DYNPRO and E_OK_CODE while creating DIR , system is not allowing to save but it is prompting to enter the same details again in Additional tab .

That means once the information message is displayed ,eventhough all the approvers are there in the screen still asking for to enter the same details again .

Regards ,

Sijin K P.

Read only

0 Likes
1,090

Lets say you enter approvers which are not correct and then in this enhacement you are giving a  message which is fine. Now after you change it what data are you getting in exit is it updated or the old one if it old one we can not do it here. Can you please tell me screen number,program and fields so that we can search for some implicit/explicit enhancements.

Thanks

Nabheet

Read only

0 Likes
1,090

Suppose if we change Approvers and it displayed message  (  blocked save )and then if we change approver again from the same screen after pressing enter then am not getting updated value from exit .

Tcode  : CV01N , CV02N

Additional Data tab

screen number  : 0101

Fields :  Document Owner , Document Author , Approver

These are characteristic description of  class.

Regards ,

Sijin K P.

Read only

0 Likes
1,090

The screen number mentioned is main screen not sub screen anyways the approach i would like to take here is just enter the data and press enter and debug it. It will go intoPAI in that you can check if someperform is called inside the PAI modules if yes create an implicit enhancement and do your validations there.

thanks

Nabheet