‎2008 Feb 25 10:57 AM
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
‎2008 Feb 25 10:59 AM
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.
‎2008 Feb 25 11:12 AM
hi
u said about creating a table field of type return,how to pass this in bapi.
‎2008 Feb 25 11:42 AM
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
‎2008 Feb 25 11:05 AM
Hi
check the BAPI return after processing the BAPI
regards
Shiva