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

BAPI return parameter

Former Member
0 Likes
941

Dear frnds,

I am working in version ECC 6.0. I want to create a BAPI for one of our requirement.

For that I have created one function module. In that function module it has import

parameter and output goes in table parameter. I have also declare export parameter as RETURN TYPE BAPIRETURN.

The function is executing as expected.

When I am trying add this function as API method in SWO1 transaction it gives me error like 'BAPI &1: BAPI function module &2 has no return parameter'.

Please let me know how to deal with error.

4 REPLIES 4
Read only

former_member214288
Participant
0 Likes
681

Hello Jyoti,

Change that return parameter to TABLES parameter from EXPORT parameter and make it Non-optional or mandatory parameter.

Let me know if I can be of further assistance on this and do reward points if this is helpfull.

Ram

Read only

0 Likes
681

Hi Ram,

Thanks for mediate response. I tried the way you suggested, but it didn't work out.

It is still giving same error. When I get help on the error it shows below screen.

Can any one let me know the meaning of procedure. How to define the reference of the BOR parameters to the function module parameter in the BOR.

Thanks

Jyoti.

-


<b>

BAPI : BAPI function module ZBAPI_BOM_READ1 has no return parameter

Message no. S&537</b>

<b>Diagnosis</b>

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).

<b>Procedure</b>

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").

Read only

0 Likes
681

hi,

the structure of your BAPI return table does not matchs with BOR..

check whether you have given relevant structure to your return table..

I hope the Return table parameter should be of structure<b> BAPIRET2</b>

<b>

Put retun parameters ias TABLE PARAMETER AND mark optional,,.</b>

If not just check with the useful bapi's you have come accross with this development..

rewards if useful,

regards,

nazeer

Message was edited by:

nazeer shaik

Read only

0 Likes
681

Dear all,

My problem get solved. Reason for the error was I had created function name started with ZBAPI. actully it should start with BAPI only.

Thank You for your help.