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

VA01 User exit to validate header data

Former Member
0 Likes
3,056

Hi Experts,

i need to validate Order reason in VA01, where user needs to select only specific order reason for a Order type, sales org, division and distribution channel combination.

I tried MV45AFZZ , Form USEREXIT_SAVE_DOCUMENT_PREPARE . On throwing custom error message on this routine , the program flow halts but all the fields are disabled for input.

Is there any user exit / badi / Enhancement spots avaiable where i can validate the header data and throw a error message without disabling the fields. Pleasse let me know .

Thanks,

Murali

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,861

Have you checked the other exit includes? perhaps MV45AFZB which provides several "data check" routines, including those ofr header, item, business data, etc. Familiarize yourself with MV45AFZ* using SE80 for program SAPMV45A.

Have you checked the other exit includes? perhaps MV45AFZB which provides several "data check" routines, including those ofr header, item, business data, etc. Familiarize yourself with MV45AFZ* using SE80 for program SAPMV45A.

6 REPLIES 6
Read only

Former Member
0 Likes
1,862

Have you checked the other exit includes? perhaps MV45AFZB which provides several "data check" routines, including those ofr header, item, business data, etc. Familiarize yourself with MV45AFZ* using SE80 for program SAPMV45A.

Read only

0 Likes
1,861

Hi ,

Thanks everyone for answering.

Is there any enhancement Project ( i mean the one we see it in SMOD), for the MV45AF* program user exits , it seems like we need to get the access key. I am working in ECC 6.0, if any enhancement spot also will help me . Please let me know.

Thanks,

Murali

Read only

0 Likes
1,861

Hi Murali,

You have to register include MV45AFZZ in SAP service marketplace portal to get an access key to be able to do any changes in this include. Or You can "cheat" it with implicit enhancements, which can be implemented for every subroutine. Step-by-step guide can be found in [How To Do Implicit Enhancement|http://wiki.sdn.sap.com/wiki/display/ABAP/HowToDoImplicitEnhancement]. It is really easy.

Regards,

Adrian

Read only

0 Likes
1,861

SD user exits are "old" style...always on, no CMOD entry, etc....but you do have to get an access key for your first change to any of the exit includes, as I recall....

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,861

in program SAPMV45A use routine USEREXIT_CHECK_VBAK in include MV45AFZZ

Read only

Former Member
0 Likes
1,861

Hi Murali,

all the fields are disabled for input because of an error message. Try to use

MESSAGE TYPE 'S' DISPLAY LIKE 'E'.

instead of

MESSAGE TYPE 'E'.

But in such case, You will have to somehow control a program flow, because processing will not terminate as when using an error message.

Probably You have to find a better place to perform your checks. To find it, check [User Exits In Sales Document Processing|http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm].

Regards,

Adrian