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

how to check errors in bapi

Former Member
0 Likes
1,695

hi

friends

can anybody tell me how to find errors in bapi.if there is problem with any record what should we do.

thanks

savita

4 REPLIES 4
Read only

Former Member
0 Likes
921

Hi,

During processing of a BAPI function module , if an error is found and needs to be passed back to calling application you MUST NOT raise exceptions. Instead you must populate the erorr message in the RETURN exporting parameter which has type BAPIRETURN1.

If you need to return multiple messages then you create RETURN table parameter of type BAPIRET2.

In the structures, BAPIRETURN1 and BAPIRET2, you need to populate the fields related to message i.e. ID, NUMBER, TYPE, etc.

The calling application then builds the messages from these.

Cheers.

Read only

0 Likes
921

hi

u said about creating a table field of type return,how to pass this in bapi.

Read only

0 Likes
921

Hi,

Declare internal table as below.

tbl_return TYPE TABLE OF bapiret2 WITH HEADER LINE

Use this tbl_return in the function module under tables:

TABLES

return = tbl_return

Regards,

Ashok

Read only

Former Member
0 Likes
921

Hi

check the BAPI return after processing the BAPI

regards

Shiva