09-29-2008 10:22 AM
Hi all,
In VA01 I have a situation where for a particular material number if customer material no is not maintained an error message is displayed that this material doesn't have a customer material no.
Now after I get that error if user enters customer material no and saves it the sales order should be saved along with the customer material no successfully.......
Thanks & Regards
Jerry
09-29-2008 10:49 AM
11-26-2008 5:41 PM
THis is what I have done,
I am coding this in MV45AZB's routine -
FORM USEREXIT_CUST_MATERIAL_READ USING US_KUNNR.
*** Read customer info record
call function 'RV_CUSTOMER_MATERIAL_READ'
exporting
cmr_kdmat = vbap-kdmat
cmr_kunnr = vbak-kunnr
cmr_matnr = vbap-matnr
cmr_vkorg = vbak-vkorg
cmr_vtweg = vbak-vtweg
cmr_spart = vbak-spart
importing
cmr_knmt = zknmt
exceptions
knmt_not_found = 1.
if sy-subrc <> 0.
message id 'ZZ' type 'E' number '015' "Cust.Mat not found
with 'Item ='
vbap-posnr
'Material ='
vbap-matnr.
else.
vbap-kdmat = zknmt-vbap. " I have declared an int. table zknmt of type knmt .
endif.
Hope this helps.
-Shareen