‎2008 Mar 03 11:30 AM
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??
‎2008 Mar 03 11:56 AM
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
‎2008 Mar 03 11:56 AM
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
‎2008 Mar 03 6:33 PM
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
‎2008 Mar 04 4:40 AM
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
‎2008 Aug 06 12:40 PM