SWO1创建BO文档格式.docx
《SWO1创建BO文档格式.docx》由会员分享,可在线阅读,更多相关《SWO1创建BO文档格式.docx(9页珍藏版)》请在冰豆网上搜索。
BusinessObjecttypeisarepresentationofanybusinessentityinanSAPsystem.Exampleofentitycouldbeanemployee,purchaseorder,etc.
ABOtypeincludesboththedataoftheentityandthefunctionsitperforms.DataisstoredinformofBOattributesandfunctionsinformofBOmethods.ThuswecanunderstandBOasanobjectorientedapproachtomodelbusinessentitiesandprocesses.
2.
RoleofBusinessObjecttypes
BusinessObjecthasthefollowingfunctions:
a.
BOreducesthecomplexityoftheSAPsystembydividingitintosmallerunits.
b.
AtBOlevel,non-SAPsystemscancommunicatewithSAPsystem.ThiscanbedoneusingBAPIs.
c.
BOenablesvariousbusinesscomponentstocommunicatewitheachother.
d.
BOtypesactsasentrypointstodataandfunctionsforanSAPSystem.
e.
BO'
scanbeusedinbusinessworkflows,ALEandRFC.
3.
BusinessObjectProperties
Eachbusinessobjecthasthefollowingproperties:
ObjectTypeID
-Itisusedforinternalidentificationofthebusinessobject.
ObjectName
-Itisusedforexternalidentificationofthebusinessobject.UsingthispropertyexternalsystemcaninteractwithSAPsystem.
SuperType
-ItistheparentobjectfromwhichallthecomponentsoftheBOareinherited.
Name
-ItisadescriptivenameoftheBO.
Description
-Itisabriefdescriptionofthebusinessobjecttype.
f.
Application
-TheapplicationcomponenttowhichtheBObelongsto.
g.
Program
-ProgramthatwillcontaintheABAPcodeoftheBO.
4.
ComponentsofaBusinessObject
Thereare5componentsofabusinessobject:
KeyFields
Ø
Canbeacombinationofoneormorefields
Isaspecificationofuniqueobjectkey-toaccessaspecificinstanceofaBO
Isareferencetounderlyingapplicationtable
Mustbecharacterbased
ValuesetwhencreatingaBOinstanceorbyamethod
Canbereadfromoutside.Cannotbechangedfromoutside
Maximumlengthofconcatenatedkeyfieldcanbe70characters
Attributes
PropertiesandcharacteristicsofaBO
Canbesingle-lineormulti-line
Canbeinstanceindependent(static)orinstancedependent
Typesofattributes:
•
Virtual-Setbyamethod/BOprogramwhenaccessed
DBfield-Loadedfromthedatabasewhenaccessed,basedonthekeyfields
Events
IndicatestheoccurrenceofastatuschangeofaBO
Canhaveparameters
andexceptionslikemethods
HavelistenersoutsidetheBO.E.g.Workflow
Methods
ThesearefunctionsthatencapsulatesthefunctionalitiesofaBO
Canbesynchronousorasynchronous
Canbeinstanceindependentorinstancedependent
Canhaveparameters(mandatory/optional,single/multi-line,import/export/both)andexceptions
TheABAPimplementationcanbe:
Afunctionmodule
ABAPI
Atransaction
Adialogmodule(Obsolete)
Areport
OtherABAPforms(Directimplementation,ABAPclassmethods,systemprogrametc.)
Typesofmethods:
Synchronous-Resultisreturneddirectlytothecallingprogram.
Asynchronous-Resultcanbereturnedtothecallingprogramonlythroughanevent.
InterfaceTypes
LikemodelsforBOTypes
Donothaveanykeyfields
Cannotbeinstantiated
Donothavedevelopmentstatuses
Canbeinherited-substituteformultipleinheritance
Canhaveimplementation
ABOTypecaninheritoneormoreinterfaces
MethodsdefinedinaninterfacecanberedefinedinaBOType
TheinterfaceIFSAP
anditsmethodsExistenceCheckandDisplayareinheritedbyallBOTypesbydefault
5.
BusinessObjectStatutes
ThefollowingarethedifferentdevelopmentstatusesofaBO/BOComponent:
Modeled
-Onlydefined(themethodanditssignature)
Implemented
-ABAPimplementationisdone,canbeusedfortestingorinternaluse
Released
-Methodreadytobeused
Obsolete
-Attribute/Method/Eventnottobeusedanymore
Youcan
checkthestatusoftheBusinessObjectbyclickingonthe'
Basicdata'
button(capsign).Itliststhedetailsofthecreated/openBOwiththedetailsofthesupertype,status,name,descriptionandtransportdata,etc.
6.
CreatingaBusinessObject
BusinessObjectBuilderisthetoolusedforcreating,implementingandtestingbusinessobjecttypes.
Themenupathtoaccessitis:
Tools->
BusinessFramework->
BAPIDevelopment->
BusinessObjectBuilder.
Transaction'
SWO1'
canalsobeusedforthesame.
GototransactionSWO1(BusinessObjectBuilder).
InputthenameoftheZ-businessobjectandclickon'
Create'
.
Selectthe'
Supertype'
.
Enterdetailsofpropertiesofthebusinessobjectlikeobjecttype,objectname,description,programnameandapplication.
ClickontheCheckButton.
BOwouldgetcreatedandthedefaultstructurewouldbeasbelow:
Gotothe'
BasicData'
buttonorclickCtrl+Shift+F1toviewthebasicdataoftheBO.
h.
Inthe'
Methods'
tab,createanewmethodbyclicking'
New'
button
orF5.
i.Clickon'
Parameters'
orclickCtrl+Shift+F7toaddparameterstothemethod.
j.
Clickon'
Program'
orclickCtrl+Shift+F3toaddcodetotheprogram.Atemplateofthemethodwouldbegenerated.Addthesourcecodeinthemethod.
k.
Savethemethodandsetitsreleasestatusto'
Implemented'
l.
ChangethestatusoftheBOto'
m.
GeneratetheBO.
n.
Released'
tomakeitreadyforuse.
o.
Toseethedetailsoftheexceptions,clickon'
Exceptions'
orclickCtrl+Shift+F8.
p.
ToseethelistoferrorsnavigatetoGoto->
Errorlist.