Application Development 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: 

BAPI_RESERVATION_CREATE

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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

karun_prabhu
Active Contributor
0 Kudos

Even if we pass blank data to BAPI, it is throwing the same error message which is misguiding.