02-24-2006 6:45 AM
Hi all,
I'd like to ask the difference between export types BAPIRETURN, BAPIRET1, BAPIRET2 in the BAPI if I want to return a return code to a VB program.
Which type should I use?
Thanks.
02-24-2006 6:51 AM
These were used in the RFC to handle the exceptions. suppose i am having 3 tables in my FM(RFC) if any one of the tables is empty or all the tables were empty then error message is populated thru the itab_message(bapiret2 or bapiret1 or bapireturn).
Regarding the return code i think these structures were not used.
02-24-2006 6:51 AM
Hi Macy,
As such all these are the return types used in BAPi's to give out the messages.
It depends on the BAPi you are using.
There might be a Return table of type BAPIRETURN as well an export structure of type BAPIRET2/BAPIRET1 OR vice-versa.
It only depends on you what kind of messages are you looking for (detailed or too the point)
The Export Structure will have too the point result i.e. BAPI successful or failed, whereas the RETURN TABLES parameter will give you all the details (i.e. why the BAPI Failed...)
BAPIRET2 & BAPIRET1 provides you with some additional data about the success or failure message generated.
Hope it helps...
Lokesh
pls. reward appropriate points
02-24-2006 6:57 AM
Thanks.
Actually I just want my BAPI to return an integer to indicate success or failure.
e.g. return like BAPIRETURN
in the BAPI, I set return-code = 4 if it fails.
But the vb .net connector says the type BAPIRETURN has not defined.
I wonder what's wrong are there.
02-24-2006 7:00 AM
Hi,
you need to declare it first as type bapireturn and set the returncode as 4.
Regards
vijay
02-24-2006 6:55 AM
All the mentioned are the structures which are used to get the return values/msgs from the BAPI.
Only the structure is going to difer.u can make use of anything..again it depends on the BAPI which u are going to use
Thanks
Eswar
Message was edited by: Eswar Kanakanti