Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 2129

prevent user from saving after throwing error message in exit ZXWOCU07( EXIT_SAPLCOIH_009)

$
0
0

hello all,

 

for a PM Order in transaction IW32 ,

 

i have written a condition in user exit  ZXWOCU07( EXIT_SAPLCOIH_009),

 

the condition is throw error message if actual quantity is not equal to zero

 

when user selects Complete(business) button in application toolbar,

 

however the issue is after throwing the error , if user clicks enter and select save , the order is getting saved

 

which should not happen  i.e  it should prevent saving the order after throwing error message,

 

how do i achieve this,

 

below is my code in the include,

 

 

data : wa_resb TYPE resb,        it_resb TYPE STANDARD TABLE OF resb.
 if  caufvd_imp-auart eq c_ordertype_pm80 and sy-tcode EQ 'IW32'.   if sy-ucomm eq 'ARCH' or sy-ucomm eq 'WTER'.
 select * from resb INTO TABLE it_resb WHERE aufnr eq caufvd_imp-aufnr                                        and enmng GT 0.   if it_resb[] is   NOT INITIAL.     MESSAGE 'The actual Quantities are not zero for this order' type 'E'.   endif.
 endif.
 endif.

 

thanks in advance....


Viewing all articles
Browse latest Browse all 2129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>