Creating BAPI and Business Object
-
Upload
olecosas4273 -
Category
Documents
-
view
223 -
download
0
Transcript of Creating BAPI and Business Object
-
8/20/2019 Creating BAPI and Business Object
1/16
Creating BAPI and Business Object
https://www.sapnuts.com/courses/SAP-Cross-Applications/bapi-s-in-sap/creating-bapi.html
ast !pdated: March 2nd 2014 by Ashok Kumar Reddy
Developing BAP and Business !b"ec# in $AP% &orking &i#h BAP developmen#
' (
)e kno& BAP is a remo#e enable *unc#ion module bu# &hen ever &e are crea#ing a BAP% &e need #o *ollo& some rules+
"ules and standards #as per SAP$ %or creating a BAPI:
• ,very BAP mus# s#ar# &i#h BAP or -BAP./us#om+
• All impor#ing and epor#ing parame#ers mus# be o* #ype s#ruc#ures .no# direc# #ype en#ries+
• All impor#ing and epor#ing parame#er names mus# s#ar# &i#h BAP or -BAP+
• All impor#ing and epor#ing parame#ers mus# pass by value% as pass by re*erence is no# suppor#ed *or remo#e communica#ions+
• BAP mus# have re#urn parame#er .#o re#urn messages like success% &arning% error e#c+ o* #ype BAPR,2 or R,3R+
5ollo& #he belo& s#eps #o crea#e a cus#om BAP+
• /rea#e s#ruc#ures in $,11 *or impor#ing and epor#ing parame#ers+
• /rea#e a remo#e enabled *unc#ion module &i#h impor#ing and epor#ing parame#ers .mus# be o* #ype s#ruc#ure in $,67+
• /rea#e a business ob"ec# in $)!1+
• nser# R5/ *unc#ion module in#o business ob"ec#+
"e&uirement: 'e(elop a custom BAPI to get material details.
$#ep18 /rea#e s#ruc#ures *or re9uired impor#ing and epor#ing parame#ers in $,11+
https://www.sapnuts.com/courses/SAP-Cross-Applications/bapi-s-in-sap/creating-bapi.htmlhttps://www.sapnuts.com/user/ashokkumarreddy-1.htmlhttps://www.sapnuts.com/user/ashokkumarreddy-1.htmlhttps://www.sapnuts.com/courses/SAP-Cross-Applications/bapi-s-in-sap/creating-bapi.html
-
8/20/2019 Creating BAPI and Business Object
2/16
:o #o $,11% crea#e a s#ruc#ure -BAP;MAR as belo& *or impor#ing parame#er+
$imilarly crea#e ano#her s#ruc#ure -BAP;MARA as belo& *or epor#ing parame#er+
$#ep28 :o #o $,67% crea#e a remo#e enabled 5unc#ion module #o ge# ma#erial de#ails *or ma#erial inpu#+
:o #o $,67% provide name as -BAP;:,;MA,RA
-
8/20/2019 Creating BAPI and Business Object
3/16
A popup &ill come provide *unc#ion group and shor# #e#% en#er+
:o #o a##ribu#es #ab% selec# =>?@CRemo#e(,nabled module=>?@?> radio bu##on+
-
8/20/2019 Creating BAPI and Business Object
4/16
:o #o impor# #ab% add parame#er as belo&+
:o #o epor# #ab% add parame#ers as belo&+
-
8/20/2019 Creating BAPI and Business Object
5/16
:o #o $ource code and add belo& code+
-
8/20/2019 Creating BAPI and Business Object
6/16
$,
-
8/20/2019 Creating BAPI and Business Object
7/16
5 $G($3BR/ , 0+ Hadd message #o re#urn parame#er
R,3R(GP, F I,I+
R,3R(M,$$A:, F IMa#erial no# *oundI+
,D5+
$ave and ac#iva#e #he *unc#ion module% #es#+
$#ep68 :o $)!1% crea#e a business ob"ec#+
:o #o (code $)!1% provide name as -B3$MA01 and crea#e+
A popup &ill come% provide de#ails as belo&+
Do no# save i# in a local ob"ec#% &e canno# make BAP me#hods &i#h non(#ranspor#able ob"ec#s+
-
8/20/2019 Creating BAPI and Business Object
8/16
$ave i# in a package and crea#e a #ranspor# re9ues#+
$#ep48 nser# R5/ *unc#ion module in#o business ob"ec#+
-
8/20/2019 Creating BAPI and Business Object
9/16
o inser# R5/ in#o business ob"ec#% click on 3#ili#ies (J AP Me#hods (J Add Me#hod+
A popup &ill come% provide R5/ *unc#ion module name and en#er+
A popup &ill come% click on ne# icon+
-
8/20/2019 Creating BAPI and Business Object
10/16
Again click on ne# icon+
-
8/20/2019 Creating BAPI and Business Object
11/16
A conrma#ion popup &ill come% click yes+
-
8/20/2019 Creating BAPI and Business Object
12/16
)e have inser#ed a R5/ *unc#ion module in#o me#hods o* business ob"ec#% no& &e need #o do #&o #hings+
• /hange =>?@Cchange release s#a#us=>?@?> #o =>?@Cimplemen#ed=>?@?>+
• Again =>?@Cchange release s#a#us=>?@?> #o =>?@Creleased=>?@?>+
-
8/20/2019 Creating BAPI and Business Object
13/16
-
8/20/2019 Creating BAPI and Business Object
14/16
A popup &ill come "us# press en#er+
!nce ob"ec# is released% you &ill nd released icon as belo&+
-
8/20/2019 Creating BAPI and Business Object
15/16
BAP is crea#ed% no& i# can be usable by $AP and !($AP sys#ems+
-
8/20/2019 Creating BAPI and Business Object
16/16