Creating a Custom BAPI
-
Upload
ashish-mohapatra -
Category
Documents
-
view
34 -
download
1
description
Transcript of Creating a Custom BAPI
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 1/18
23rdJune2014
[http://1.bp.blogspot.com/C5b7B7761f4/U6cNvGFuyeI/AAAAAAAAJeU/k_QOfUgitqk/s1600/1.png]
[http://2.bp.blogspot.com/d0xJkK7bBvA/U6cN2G3wt5I/AAAAAAAAJg0/Jutu7tbUoi4/s1600/2.png]
Scenario:SAPprovidesanumberofStandardBAPIsforallthemodulestoachievethebusinessprocess.ButinveryrarecasewemayneedacustomBAPIourspecificbusinessneeds.ThebelowpostshowsthestepshowwecancreateacustomBAPI.
*NB*Saveallthestructures,FGandFMinatransportablepackageinordertocreateaBusinessobjectandAPImethod.Step1.Letshavethebelowtableforthedemopurpose.
Step2.MaintainSometableentries.
Step3.CreateaStructureanditshouldcontainnameZBAPI*asitistobeusedinthebapifunctionmodulecreation.
4.BAPI Creating a custom BAPI
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 2/18
[http://4.bp.blogspot.com/pAD67HHeszw/U6cN_GOTkPI/AAAAAAAAJhE/8jqJRQaacaw/s1600/3.png]
[http://2.bp.blogspot.com/hBH3waJP7SI/U6cOG128QyI/AAAAAAAAJik/UVKQBbgxX4M/s1600/4.png]
[http://3.bp.blogspot.com/lfI4n08Sd4/U6cOJUDBOiI/AAAAAAAAJi8/wqn8fEbceMU/s1600/5.png]
Step4.Selecttheappropriateradiobutton.
Step5.Providethebelowfieldswhicharemaintainedintheabovedatabasetable,Save&Activateit.
Step6.InTxSE80createafunctiongroupasourbapifunctionmoduleneedstobeassignedtotheFunctiongroup.Activatethefunctiongroup.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 3/18
[http://2.bp.blogspot.com/rLsxoUA7PuI/U6cOJviKhpI/AAAAAAAAJjI/TWaYyBVjrg/s1600/6.png]
[http://1.bp.blogspot.com/Qu6eVkEcCsE/U6cOJzsKEjI/AAAAAAAAJjE/c_B419_wYo8/s1600/7.png]
[http://2.bp.blogspot.com/V5p0n7ftNGg/U6cOLVbLquI/AAAAAAAAJjU/nSF_PAyV2bA/s1600/8.png]
Step7.InTxSE37createaFunctionmodule.
Step8.ProvidetheabovecreatedFunctiongroupandselectRemoteEnabledModule.
Step9.ProvidethebelowfieldsintheImportingsection.AsthisisRemoteEnabledFMsotheallparametersshouldbepassbyvalue.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 4/18
[http://1.bp.blogspot.com/LW7815IRzQs/U6cOLjadIZI/AAAAAAAAJjY/Szx2eCMA7Fk/s1600/9.png]
[http://1.bp.blogspot.com/boZ52Ci_sJk/U6cNvToLdjI/AAAAAAAAJek/ZbSSpiThz3w/s1600/10.png]
[http://3.bp.blogspot.com/ULpsgk9j0g/U6cNvSK0NAI/AAAAAAAAJeo/ToCJJKjsGME/s1600/11.png]
Step10.ProvidebelowparametersintheExportingsection.
Step11.ProvidebelowcodeintheSourcecodesection&activateit.ThisjustgetstheemployeedetailsbasedontheEmp_IDinput.
Step12.ThenreleasetheFunctionmodule.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 5/18
[http://4.bp.blogspot.com/rxMS0cuPjKM/U6cNw_XkH_I/AAAAAAAAJe4/w_Vu7un8UmQ/s1600/12.png]
[http://3.bp.blogspot.com/D4vNd92vzlQ/U6cNw8D3fI/AAAAAAAAJfE/SOr_VxSdKbw/s1600/13.png]
Step13.Afterreleasethebelowmessageappears.
Step14.ToCreatetheBusinessObjecttypeGotoTxSWO1.ProvidetheObjectnameandclickonCreatebutton.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 6/18
[http://4.bp.blogspot.com/tyegBkBpEvQ/U6cNw1OCsWI/AAAAAAAAJe8/3N3H1EMbnBo/s1600/14.png]
[http://3.bp.blogspot.com/P_8DFZE0BUU/U6cNxuI9_5I/AAAAAAAAJfo/bR9JhP8VLv4/s1600/15.png]
[http://3.bp.blogspot.com/8OJ15VE5sKo/U6cNxwf6GLI/AAAAAAAAJfU/76L3qmGbOBU/s1600/16.png]
Step15.ProvidethedetailsandclickonContinueButton.
Step16.GotoutilitiesandaddanAPIMethod.
Step17.ProvidetheFunctionmoduleNameandContinue.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 7/18
[http://3.bp.blogspot.com/ST7AoQMVUFs/U6cNyWiyZGI/AAAAAAAAJfQ/NO2LISLzPk/s1600/17.png]
[http://4.bp.blogspot.com/_jGn3E3t87Q/U6cNyjW1JLI/AAAAAAAAJfY/IB2_01gAbJE/s1600/18.png]
[http://1.bp.blogspot.com/9MlZ34qrst8/U6cN0EpAiI/AAAAAAAAJfg/VddH5g4Nr_8/s1600/19.png]
Step18.ProvidetheTextsandClickontheRightArrowButton.
Step19.AgainclickontheRightArrowButton.
Step20.ClickonYESbutton.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 8/18
[http://1.bp.blogspot.com/wB46Cah3Q10/U6cN2sATqEI/AAAAAAAAJf0/mFLrvPbXajo/s1600/20.png]
[http://4.bp.blogspot.com/jNXfGdgOIW8/U6cN3AFwoiI/AAAAAAAAJf4/jD7lt3GAwg0/s1600/21.png]
[http://1.bp.blogspot.com/4k7QRCDCEK8/U6cN3hAYyRI/AAAAAAAAJgE/Wzs8bsDbXw/s1600/22.png]
Step21.NowtoseetheMethodDetailsdoubleclickonit&Ucanseethedetails.
Step22.DetailsoftheMethodUnderABAPtab.
Step23.clickonthehighlightedbuttontoseethestatusoftheBusinessObject.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 9/18
[http://4.bp.blogspot.com/t281wWZ56dA/U6cN3wFEwHI/AAAAAAAAJgI/rPMqTM9Awug/s1600/23.png]
[http://2.bp.blogspot.com/7wHbjO3SVO0/U6cN4zA0jbI/AAAAAAAAJgQ/ltNUrsu0mDI/s1600/24.png]
Step24.TheStatusoftheBOisModeled.GoBack.
Step25.FromtheEDITmenunavigatealongthepathandselectToImplemented.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 10/18
[http://1.bp.blogspot.com/kIPSEBwCRW0/U6cN5KE_OlI/AAAAAAAAJgc/KJstEkg8D0Y/s1600/25.png]
[http://1.bp.blogspot.com/_wwEQnTjaiE/U6cN7KSKnwI/AAAAAAAAJgs/6DrdyvTJOpg/s1600/26.png]
Step26.AgainnavigatetotheHeadersectionoftheBOandwecanseetheStatusisimplemented.GoBACK.
Step27.NavigatealongtheHighlightedpathunderEDITmenuandSettheBOstatustoReleased.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 11/18
[http://1.bp.blogspot.com/2Cf8qYPp_pA/U6cN8XLnunI/AAAAAAAAJgo/CjgMgYxILHg/s1600/27.png]
[http://1.bp.blogspot.com/hDROqvXvOKw/U6cN9HBsTSI/AAAAAAAAJg4/8BJNhQKwPAA/s1600/28.png]
Step28.Thestatusissettoreleased.
Step29.GototheheaderSection&UcanseetheBOstatusisReleased.GoBACK.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 12/18
[http://1.bp.blogspot.com/Nhcaky64SZ8/U6cN4_2lVI/AAAAAAAAJhI/xMLYDKS7oaY/s1600/29.png]
[http://2.bp.blogspot.com/KRRyqQfFqfw/U6cOANXhFZI/AAAAAAAAJhY/MCzM1bsw61w/s1600/30.png]
Step30.Nowwehavetoreleasethemethodaswell.GototheEditmenuandnavigatealongthehighlightedpathtoreleaseit.
Step31.Doubleclickonthemethodnameandthestatusisreleased.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 13/18
[http://3.bp.blogspot.com/GAGkIBLV_6g/U6cOAheCb3I/AAAAAAAAJhc/qqD_82GwZM/s1600/31.png]
[http://3.bp.blogspot.com/LYbOpgQ0IQI/U6cOA9_thNI/AAAAAAAAJhk/qEqFdr45SWM/s1600/32.png]
Step32.ClickontheProgrambutton.
Step33.Thebelowprogramisautomaticallycreated.Sometimesthisprogramcanalsobemodifiedbytheprogrammeraspertheneed.GoBack.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 14/18
[http://4.bp.blogspot.com/R_GwPx3GeSw/U6cOCK36_pI/AAAAAAAAJhs/r_a_KkJAU5s/s1600/33.png]
[http://3.bp.blogspot.com/7j_cMPYDxSE/U6cODP0kZII/AAAAAAAAJhw/rS5x7SGDtTw/s1600/34.png]
Step34.LetstesttheMethod.SelectthemethodandclickontheTestbutton.
Step35.ClickontheF8button.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 15/18
[http://4.bp.blogspot.com/HtnlxZcihSo/U6cOEOC_CyI/AAAAAAAAJiE/QXbSnM4ob4Q/s1600/35.png]
[http://3.bp.blogspot.com/YqVUwsDr1x0/U6cOEvOx3WI/AAAAAAAAJh8/rhIN3KfdiDs/s1600/36.png]
[http://3.bp.blogspot.com/e7CtuWSudgw/U6cOFT7QUfI/AAAAAAAAJiI/XtdSYud8sko/s1600/37.png]
Step36.ProvidetheEmployeeIdnumberas0002andclickontheExecutebutton.
Step37.Wereceivedthebelowoutput.SotheAPIMethodworksfine.
Step38.WefindthenewlycreatedBusinessobjectTypeintheTransactionBAPI,clickonthegeneratebuttonorfromtheMenuchooseGenerate.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 16/18
[http://2.bp.blogspot.com/ljIrN7vX7I/U6cOGQHo_hI/AAAAAAAAJiY/KiWzI4E9w9I/s1600/38.png]
[http://2.bp.blogspot.com/AoUV_y0zKiE/U6cOGuopEZI/AAAAAAAAJic/ucCTZdNAPRY/s1600/39.png]
[http://2.bp.blogspot.com/uAYT2t8OYs/U6cOHr4unJI/AAAAAAAAJio/c4PhRX1We48/s1600/40.png]
Step39.Wereceivedamessagefortehgeneration.
Step40.NowgotoTxBAPIandclickontheAlphabeticaltab.HerewecanfindtheBusinessObjecttype.
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 17/18
[http://2.bp.blogspot.com/1QD8vR31BlY/U6cOJEEyHzI/AAAAAAAAJjA/MIQJkgTbBjg/s1600/41.png]
Step41.HerewecanseethebusinessobjectAPIMethod.
xxxxxxxxxxxx
Posted23rdJune2014bySPrasad
0 Viewcomments
-
6/15/2015 4.BAPICreatingacustomBAPI
http://freesapabap.blogspot.in/2014/06/4bapicreatingcustombapi.html 18/18
No comments yet
Add a comment