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

code for user-exit in VA01

Former Member
0 Likes
436

Hi all!

I need help regarding coding for the following:

While creating sales order if the user repeates the same material no. again the system should give a warning. The warning should get triggered when user enters material no. , quantity and presses ENTER button .

Please tell me how to write the code for the same.

Thanks in advance.

Regards,

Pallavi.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
391

Hi,

You can right ur code in MV45AFZZ.

in the exit move field to vbap.

Regards,

Sasi

2 REPLIES 2
Read only

Former Member
0 Likes
392

Hi,

You can right ur code in MV45AFZZ.

in the exit move field to vbap.

Regards,

Sasi

Read only

Former Member
0 Likes
391

User Exit is EXIT_SAPMV45A_005. Go to CMod, create a new project , under enhancement give V45A0004. In ZXVVAU11 ,

data: WA_VBAP TYPE VBAP,

lv_matnr type matnr,

lv_matnr1 type matnr.

sort t_vbap by matnr.

IF sy-tcode = 'VA01'

AND ( sy-ucomm = 'SICH' ) .

loop at t_vbap INTO WA_VBAP.

lv_matnr = t_vbap-matnr.

if lv_matnr = lv_matnr1.

message 'Material number duplicated ' with type 'E'. (Pass the material number as parameter in message, so user can know which material number got ).

else.

continue.

endif.

lv_matnr1 = lv_matnr.

clear lv_matnr,WA_VBAP.

endloop.

endif.

Message was edited by:

DEBOPRIYO MALLICK