Skip to Content
author's profile photo Former Member
Former Member

bapi

Hi

This is lalitha i have got an error while creating "BAPI"

error" BAPI &1: BAPI function module& 2 has no return parameter

and another error " not to creat methods.

while entering T-code swo1 - after selecting methods in object type -> utilities - API METHODS-> Add modules.

How to solve

with regards

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 04, 2007 at 08:09 PM

    Hello Lalitha

    I can address one of your questions.

    Since you are creating a BAPI which is a special kind of RFC-enabled function module the BAPI must have a RETURN parameter (either a structure or a table type, e.g. <b>BAPIRET2 </b>or <b>BAPIRETTAB</b>) in order to return messages to the caller of the BAPI.

    Why is such a RETURN parameter <i>mandatory</i>?

    BAPIs are usually used for <b>external </b>access, thus they are called via RFC. If the BAPI would throw any exceptions this would cause the RFC connection to break down. As a consequence the caller has no idea what has happened.

    Instead, BAPIs <b>collect </b>all messages (in the RETURN parameter) and stop processing as soon as they encounter any AEX message (Abort, Error, Dump).

    Regards

    Uwe

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.