08-03-2009 5:03 PM
Hi everybody when I call the BAPI_RESERVATION_CREATE in the program as follow,
it failed with the message:
An error has occurred in enhancement EXIT_SAPLMEWB_001 (please check)
I'm working on ECC 6.0.4
refresh t_lis.
refresh errmsg.
refresh t_lis_res.
clear itab_archivo.
loop at itab_archivo.
resehead-plant = itab_archivo-var4.
resehead-res_date = p_fecha.
resehead-move_type = itab_archivo-var3.
if itab_archivo-var3 = '201'.
resehead-cost_ctr = itab_archivo-var1.
resehead-func_area = itab_archivo-var2.
endif.
if itab_archivo-var3 = '261'.
resehead-order_no = itab_archivo-var1.
endif.
n_req_sica = itab_archivo-var6.
else.
itab-material = itab_archivo-var1.
itab-plant = resehead-plant.
itab-quantity = itab_archivo-var2.
itab-short_text = n_req_sica.
append itab.
endif.
call function 'BAPI_RESERVATION_CREATE'
exporting
reservation_header = resehead
no_commit = wk_no_commit
importing
reservation = b_res_no
tables
reservation_items = itab
return = errmsg.
endloop.
08-03-2009 5:54 PM
Hi,
I think there is an issue in the exit
Go to the transaction se37 >EXIT_SAPLMEWB_001> there would be an include check that include for any errors.
Regards,
Himanshu
08-03-2009 5:23 PM
Here's the code again sorry I accidently deleted a line of code.
refresh t_lis.
refresh errmsg.
refresh t_lis_res.
clear itab_archivo.
loop at itab_archivo.
if itab_archivo-indic = '0'.
resehead-plant = itab_archivo-var4.
resehead-res_date = p_fecha.
resehead-move_type = itab_archivo-var3.
if itab_archivo-var3 = '201'.
resehead-cost_ctr = itab_archivo-var1.
resehead-func_area = itab_archivo-var2.
endif.
if itab_archivo-var3 = '261'.
resehead-order_no = itab_archivo-var1.
endif.
n_req_sica = itab_archivo-var6.
else.
itab-material = itab_archivo-var1.
itab-plant = resehead-plant.
itab-quantity = itab_archivo-var2.
itab-short_text = n_req_sica.
append itab.
endif.
call function 'BAPI_RESERVATION_CREATE'
exporting
reservation_header = resehead
no_commit = wk_no_commit
importing
reservation = b_res_no
tables
reservation_items = itab
return = errmsg.
endloop.
08-03-2009 5:54 PM
Hi,
I think there is an issue in the exit
Go to the transaction se37 >EXIT_SAPLMEWB_001> there would be an include check that include for any errors.
Regards,
Himanshu
11-04-2009 10:52 AM
Hi All,
I too is having a problem using BAPI_RESERVATION_CREATE.
I am using the said BAPI in SAP XI. I mapped all the required field in header and in per item. But when I tried to use the BAPI, error occurs;
TYPE='E', Message : "An error has occurred in enhancement EXIT_SAPLMEWB_001 (Please check)", LOG_NO:, LOG_MSG_NO:000000 (CODE:W5061)
Please help me on this experts.
Thanks!
Randy
09-02-2010 4:35 PM
I'm having the same problem but my enanchement is empty!
Any suggestion?
Problem solved: i forgot to append the items table.
Edited by: Simone Milesi on Sep 2, 2010 5:47 PM
10-15-2014 7:04 AM
Even if we pass blank data to BAPI, it is throwing the same error message which is misguiding.