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: 

Error while defining BAPI method in the BOR

former_member305388
Active Contributor
0 Kudos

Hi all,

I am following a document and trying to learn BAPIs. Now, after an object type is created through SWO1, from Utilities -> API Methods -> Add Method, I am asked to enter a function module name. Shouldthis FM be already existing one? When I gave some name there and entered, it's giving an error

BAPI : BAPI function module ZBAPI_GET_BILL_ITEMS has no return parameter

Diagnosis

The system checks that the RETURN parameter has been defined in both the BOR and in the function module. The parameter must refer to one of the BAPI return structures (all planned reference structures can be used for BAPIs up to and including Release 4.6B; but from Release 4.6C only BAPIRET2 can be used).

The BOR parameter must be type EXPORT (one line or multi-line) and the function module parameter must be type EXPORT (if one line) or type TABLE (if multi-line).

Procedure

Create a RETURN parameter for the function module. Also define the reference of the BOR parameters to the function module parameter in the BOR ("Name in function module").

Note that only incompatible changes can be made to BAPIs already released and delivered.

Find out about enhancing or modifying BAPIs that have already been delivered by calling the BAPI Explorer (Tools -> BusinessFramework -> BAPI Explorer) and reading the project form "Project to change an existing BAPI".

Can anybody help me out, please?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Yes, you have to enter existing FM name.

Declare one Return parameter,

RETURN LIKE BAPIRET2 Return Code

For BAPI this is mandator.

2 REPLIES 2

Former Member
0 Kudos

Yes, you have to enter existing FM name.

Declare one Return parameter,

RETURN LIKE BAPIRET2 Return Code

For BAPI this is mandator.

Former Member
0 Kudos

Hi ,

In the export of that fm u have to give this.

parameter name typing associated type

RETURN TYPE BAPIRETURN

Regards