‎2009 Jul 30 11:29 AM
Hi,
I am creating ZBAPI with the import parameters as PERNR & SUBTY
and export parameters are RETURN1 & RETURN2
and table parameter is IT_ZITEMS
The BAPI is fine till creation in SE37 but when i am trying to add the method as API Method in BOR, it is giving me the following error :
" BAPI &1: BAPI function module &2 has no return parameter "
Can any one tell me wt is the problem?
Waiting for ur reply...
-
Regards
Srinath
‎2009 Jul 30 11:35 AM
The return table BAPIRET2 should be as a TABLE parameter not export parameter.
‎2009 Jul 30 11:46 AM
You must have a returned parameter or table with the name RETURN and a type like BAPIRET2 in your function module, look at [Return Parameters (Error Handling)|http://help.sap.com/saphelp_utilities472/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/frameset.htm] in [BAPI Programming Guide Reference (CA-BFA)|http://help.sap.com/saphelp_utilities472/helpdata/en/a5/3ec8074ac011d1894e0000e829fbbd/frameset.htm].
You have to create a parameter named Return for every BAPI. This parameter returns exception messages or success messages to the calling program.
also
The export parameter Return can be implemented as follows:
As a structure, whereby it must be defined in the function module as an export parameter, as well as in the method in the BOR.
As a table, whereby it must be defined in the function module as a table parameter, as well as in the method in the BOR as an export parameter.
Look also at parameters' name (RETURN1, 2 and IT_ITEMS are not meaningful)
The names you choose for the function module parameters are used in the Business Object Repository (BOR) as the names of the associated method parameters. The names of BAPI parameters in the BOR and the names of the parameters in the associated function module must be identical. For this reason parameters in function modules must have meaningful names in English to ensure the BAPI method call can be carried out without any problems.
When assigning parameter names follow the guidelines below:
The names must be in English.
Choose meaningful names and do not use abbreviations.
Regards,
Raymond