Using BAPI IN LSMW.docx
《Using BAPI IN LSMW.docx》由会员分享,可在线阅读,更多相关《Using BAPI IN LSMW.docx(15页珍藏版)》请在冰豆网上搜索。
UsingBAPIINLSMW
UsingBAPIinLSMW
BySureshKumarParvathaneni
Step-by-StepGuideforusingBAPIinLSMW
Note!
ThescreenprintsinthisarticlearefromECC5.0.Theymaydifferslightlyinotherversions.
Introduction:
ThisdocumentdetailstheusageofBAPIinLSMW.WehaveusedtheexampleofmigrationofthepurchaseorderdataintoSAP.
Pre-requisites:
ItisassumedthatthereaderofthisarticlehastheminimumknowledgerequiredontheBusinessObject,BAPI,MessageTypesandIDocTypes.
Step-by-StepProcedure:
DetailsoftheBAPIusedinthisscenario:
BusinessObject:
BUS2012
Method:
CreateFromData
DetailsofMessageTypeandBasicIDocType:
MessageType:
PORDCR
BasicIDocType:
PORDCR02
Let’shavealookattheBAPIfirst,beforeproceedingtotheLSMW:
1.GotoTransactionBAPI
2.ClickonSearchButton
3.Enterthevalue“BUS2012”andselect“Obj.type(TechnicalObjectName”
4.PressENTER
5.Followingscreenappears:
6.Ontheleftsideofthescreen,Expandthe“PurchaseOrder”.
7.Select“PurchaseOrder”anddouble-clickonthesamefordetails.
BuildingLSMWusingBAPI:
1. GotoTransactionLSMW.
2. EntertheProject,SubprojectandObjectinformationandclickonCREATE.
3. EnterthedescriptionsforProject,SubprojectandObjectasprompted.
4. NowselectSettingsIDocInboundProcessing
5. “IDocInboundProcessing”screenappears.Entertherequireddetailsasshownbelow:
6. Clickon“ActivateIDocInboundProcessing”.
7. Clickon“Yes”whenpromptedfor“ActivateIDocInbound?
”
8. Hiton“Back”toreturntothemainscreen.
9. ClickonContinue(F8).FollowingScreenappears:
10. SelecttheStep1“MaintainObjectAttributes”andselect“Execute”.
11. Selecttheradiobutton“BusinessObjectMethod”andenterthefollowingdetails:
BusinessObject:
BUS2012
Method:
CreateFromData
HitENTER
12. SaveandclickonBACKbutton.Followinginformationmessageisdisplayed.
13. Nowselectstep2“MaintainSourceStructures”andclick“Execute”.
14. Inthisstep,weneedtomaintainthesourcestructure.Inourexample,letsconsidertheexampleofafilewith2structuresHeadandItemdataasshownbelow:
ClickonCreateandnamethesourcestructureasHEADERDATA.NowselectHEADERDATAandclickon“Create”againtocreatethechildstructure.Followingpopupappears:
Select“LowerLevel”andclickonContinue.EntertheItemdatastructurename.
ClickSaveandhitBACKbuttontogotothemainscreen.
15. Selectstep3“MaintainSourceFields”andhitexecute.
16. Enterthefieldsasshownbelow:
17. ClickSAVEandreturntomainscreen.
18. Selectstep4“MaintainStructureRelations”andclickExecute.
SelectE1PORDCRandclickonCREATERelationShip.Followingscreenappears:
SelectHEADERDATAandhitENTER
SimilarlydothesameforthestructureE1BPEKKOA,E1BPEKPOCandE1BPPEKET.
ClickSaveandreturntomainscreen.
19. Selectthestep“MaintainFieldMappingandConversionRules”andclickonexecute.MaintaintheFieldMappingasseenbelow:
20. Selectstep7“MaintainSourceFiles”andprovidethelinkforthetestfilecreated.(Createatestfilewiththesamestructureasdefinedearlier).
Saveandreturntomainscreen.
21. Selectthestep“AssignFiles”andclickonExecute.
Assignthefileprovidedtothesourcestructure.Herethesamefileisprovidedforboththestructures.
Saveandreturntothemainscreen.
22. Selectthestep“ReadData”andclickonExecute.
ClickonExecute.
Returntothemainscreen.
23. Selectthestep“Displayreaddata”andclickonexecute.
Clickonthestructurenametogetthefieldlevelvalues.
24. Returntomainscreenandnowselect“ConvertData”.
25. Returntothemainscreenandselect“DisplayConverteddata”.
26. Returntomainscreenandselect“StartIDocgeneration”.
27. Nowselectthestep“StartIDocProcessing”onthemainscreen.
28. Returntomainscreenandclickon“CreateIDocoverview”.HerethedatarecordandstatusrecordsoftheIDoccouldbeviewed: