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

ERROR IN BAPI

Former Member
0 Likes
705

hi all

i m doing BAPI for test purpose(MATERIAL MASTER). this is my first BAPI program.

first i have Defined Structure For The BAPI.

then i Wrote Function Module (remote enabled) and released .

now i m creating the API Method Using The BAPI WIZARD.

i went SW01 and gave the bapi name.

now when i put the function module name it is giving ERROR.

BAPI ZBAPIFUN the refr structure LHA1 of parameter LIFNR does not begin with BAPI.

BAPI &1: function module &2 has no return parameter.

how to give return parameter in function module??

5 REPLIES 5
Read only

Former Member
0 Likes
630

Hi

Use the stru name also starting with ZBAPI and fms names also starting with zbapi_urname.

In FMS, all parameters are Pass by value mode not in reference mode.

If these helpful rewards points.

Regards

Pratap.M

Read only

roger_gomez
Active Participant
0 Likes
630

Hi Anuj,

You should ad a RETURN parameter (for return messages) in tables tab of BAPI. Type for this return table can be BAPIRET2.

Reward points if helps

Roger

Read only

Former Member
0 Likes
630

hey while doing first while defining structures in SE11 create them by ZBAPI intial name

and very important to save every object in a package (not in local object)

for return parameters u can use

BAPIRETURN

BAPIRET1

BAPIRET2.

reward points if helpful

Read only

Former Member
0 Likes
630

HI ANUJ ,

FIRST CHECK WHETHER YOUR STRUCTURE IS ACTIVE OR NOT.

IF NO ACTIVATE IT . THEN GO TO SWO1,

DELETE THE FUNCTION MODULE NAME FROM METHODS LIST OF YOUR BAPI.now goto se37(function builder), select ur

function module and click CHANGE . in the upcoming screen

select

ATTRIBUTES tab : in it select REMOTE ENABLED MODULE

IMPORT tab:

parmeter name type associated type pass..

<ur parameter> like <structrnam-fieldnam> <check>

EXPORT tab:

parmeter name type associated type pass..

RETURN TYPE BAPIRET2 <check>

TABLES

parmeter name type associated type

<INTERNALTAB> LIKE <structrnam>

SOURCECODE

required code.

save check activate

clik ATTRIBUTES tab and use menupath

FUNCTION MODULE-release-release

SWO1-

select ur bapi add the function module by

menupath UTILIES-- APIMETHODS--ADD METHOD

AND THEN DO FURTHER STEPS

Read only

Former Member
0 Likes
630

thanx