Anda di halaman 1dari 10

4/25/2016

UnlashingSXDAandLSMWPart1Definition|SCN

GettingStarted Newsletters

Hi,Guest

LogOn

JoinUs

Store

SearchtheCommunity

Products

Services&Support

AboutSCN

Downloads

Industries

Training&Education

Partnership

DeveloperCenter

Activity

LinesofBusiness

UniversityAlliances

Events&Webinars

Innovation

Browse

Communications

Actions

CustomerRelationshipManagement(SAPCRM)

UnlashingSXDAandLSMWPart1Definition
PostedbyLusPrezGrauinCustomerRelationshipManagement(SAPCRM)onOct9,20142:08:43AM
Share

Tweet

Like

Hi!

Itsquitedifficulttobepreciseintheareawhichthisblogshouldbelongs,SXDAandLSMWareNetweaver
componentsandworkscrosssolutions,butasImspecializedinCRMandtheexampleiswiththeOneOrderobjectI
believethisisthebestspot,IjusthopethiscanbeusefulalsotootherSAPprofessionalwhichworksinadifferent
area.

Thisblogisaboutimprovingthemassdatatransfer(insert,update,delete)experienceusingLSMWandSXDA
andwillbefocusedonthedefinitionofthewholeproject.Pleasedon'tskipthesecondpartoftheblogwhichincludes
theexecutionandreferences: UnlashingSXDAandLSMWPart2Execution

What?Someoneaskedwhat'sLSMW?ThisisanoldtopicandIbelieveiscoveredenoughtroughSCN,butIthinka
shortdefinitionwillbegood:LegacySystemMigrationWorkbenchisanoldframeworktomanagedatatransferintoa
SAPsystem(createsalesorders,customers,etc.supportsalargenumberofobjects).

Consultants:
Areyoutiredofdependingfullyondevelopers?
Areyoutiredofthesentencecustomreport?,wecantsupportyou

Developers:
Areyoutiredofmanuallydealwithmassprocessingusingparallelization?
Dosufferfromitchingeachtimeyouhavetodevelopareporttouploadafilefromthelocalpc?
DoyoustillsufferPTSDafterdealwithcomplexdatamappinginLSMW(events)?

IfmostoftheanswerisaYES,Ibelievethisblogcanreallybeuseful,Otherwise,theresalotofstuffgoingonSCN

TheScenario:

Updatemorethan5kofsalesorderswhichhaveawrongpostingdate.

Step1:Createaproject

AcordingtoSAP"AprojectisusedtogroupBusinessObjectstogetherforatransfer"InourscenarioweonlyhaveOne
BusinessObject:SalesOrder.Thisdoesn'tmakemuchsenseinourbasicscenario,butimagineyouwanttomigrate
variouslegacysystemstoyourSAPsolution,youcancreateaprojectforeachleagacysystemandinsideeachproject
youwillhavealltheBusinessObjectrequired(Customers,Relationships,Products,etc.)orevenbetter,eachlegacy
havetwoBusinessObject,Legacysystem1hasCustomersandrelationshipsandLegacysystem2hasProducts,this
isaverynicewaytoorganizeyourdatatransfer,right?

http://scn.sap.com/community/crm/blog/2014/10/09/sxdaanicewaytoimprovethelsmwexperience

1/10

4/25/2016

UnlashingSXDAandLSMWPart1Definition|SCN

Step2:Createasubproject,rundefinitionsandtasks
viaWizard

TheSubprojectwillcorrespondtoBusinessObjectitselfinourcasetheOneOrderobject.

Step3:Choosethetypeofdatatransferobject
(BusinessObject)

DependsontheBusinessObjecttypeselected,thewizardwillprovideyouthecorrespondingloadmethod(LOA),
loadmethodssupportedare:

BAPI(youcancreate/useyourownBAPIS,inthatcase,theBAPISmustbegeneratedthroughBAPIALE
interface,I'mnotgoingfurtheronthisasthemaintopiciswideenough)
BatchInput
DirectInput
IDoc

YoualreadyhavetherelationshipbetweenBusinessObjectandloadmethoddeliveredbySAP,andthiswilldepend
onwhichmodulesdoyou"installed"inyourNetweaver.

Youcancheckwhichobjects/loadprograms/interfacesareavailablethroughSXDA>Goto>DXProgramLibrary

http://scn.sap.com/community/crm/blog/2014/10/09/sxdaanicewaytoimprovethelsmwexperience

2/10

4/25/2016

UnlashingSXDAandLSMWPart1Definition|SCN

Step4:Reviewtaksparameters

Thetaskis,asthenamesays,eachtaskwhichwillbeperformedsequentiallyineachrundefinition,oh!Ialmostforgot,
what'sarundefinition?ForthatIwillneedtogoforanother"complex"scenario:Imagineyouhavetocreatecustomers
andthesourcefilesaremorethanone,youcancreatearundefinitionforeachfileinthesameSubproject(Business
Object)why?forexampletorunthedatatransferinparalel,orabettercaseyouhavedifferenttasksforeachrun,first
runvalidatefile,secondrunnobecausethefiledoesn'tneedto.

STEP4.1:TaskConvertdata

CallstheLSMWasthemapingtoolinordertoconvertthefilefromexternalformattotheBAPI,BatchInput,etc.internal
format.Youdontneedtochangenothinghere,butgiveyouthedetailtobuildthefilenameforthestep4.2.Itbelieve
it'sgoodtoknowtheProject,SubprojectandObjectfieldsofthesecondscreenshotcorrespondtotheLSMWproject
whichwillbegeneratedoncethewizardfinish.

http://scn.sap.com/community/crm/blog/2014/10/09/sxdaanicewaytoimprovethelsmwexperience

3/10

4/25/2016

UnlashingSXDAandLSMWPart1Definition|SCN

Smallparenthesis:SometimesLSMWneedaverycomplexinputfilesandthecustomerdoesnthave/want/knowto
performthoseconversionsontheLegacysystem.HereswhereanothermajoradvantageoftheSXDAcomestoplay,
thepossibilitytodefineadditionalsteps,inthiscaseImbrieflytalkingabouttheTaskTypes:Extractdata(EXT)and
Cleardata(PUR),youcandefineacustomFunctionmoduleorcustomprogramforbothTasktypesinordertoread
thesourcefileandformatitnicelyinaLSMWfriendlyfile,speciallythehierarchicaltypeones,peoplewhomdealtwith
thatinLSMWknowsexactlywhatImtalkingabout,right?NomoredirtystuffontheLSMWmappingevents!Keepthe
mappingassimpleasyoucan.IfyouaremoreinterestedinthistopicIcanwriteaspecificoneaboutthis,butfirstly
letsseetheacceptanceofthisone

YoucandefineadditionaltasksonSXDA>Goto>DXProgramLibrary>Createregistration,onceisregisteredthe
wizardwillsuggesttouseit(ifyoucreatetherunfromscratchoriftherunisalreadycreatedandyouwanttoaddthis
newtaskmanually)

Step4.2:TaskCheckfile

ItChecksifthefilehasacorrectIDocformat,doesntcheckthedataitself,onlythestructure.Theimportantparthereis
thenameofthenameoftheinputfile,thefilenameistheresultfromthemappingconversionsperformedbyLSMW
(convertaflatornotflatfiletotheIDocformatwhichcanbeconsumedbythestandardBAPI)Thenameconventionis
alwaysthesamenameoftheSXDAproject(Uppercase)_subprojectID_ObjectID.lsmw.conv(youcancheckthisin
thepreviousscreenshots,Step4.1)
Youcanperformthissteponceeverythingisfinished,evenalltheLSMWbutitsbettertodoitattheverybeginningto
avoidtheOhIforgot.

http://scn.sap.com/community/crm/blog/2014/10/09/sxdaanicewaytoimprovethelsmwexperience

4/10

4/25/2016

UnlashingSXDAandLSMWPart1Definition|SCN

Step4.3:TaskFilesplit

Inthisstepwesplittheconvertedfileinsmallchunks,thenumberofthetotalIDocsgeneratedisdividedinto
thenumberoffilesdefined,andthisisquiteuseful,forexample:checkaparticularblockona100recordfile
itseasierthandothesameonafilewhichhas500k,forfurtherinformationcheckthesectionFixtheerrors.I
alsoliketokeepthefiles,sometimesthedatatransfercanbeperformedsuccessfullybutsomedatagotlost,
soitsagoodwaytotracesmallmappingerrors,lossofdata,etc.

http://scn.sap.com/community/crm/blog/2014/10/09/sxdaanicewaytoimprovethelsmwexperience

5/10

4/25/2016

UnlashingSXDAandLSMWPart1Definition|SCN

Step4.5:TaskLoaddata

Thisisthemostimportantstepandoneoftheawesomenessfeatures,youcanchoosethesizeofthetransactionsper
commitandifyouwanttoperformthedatatransfersequentiallyorinparallelusingaservergroup,thelastonecan
increasetheperformancedramatically,butyoumustcheck/configurewiththebasisguystheservergroupinorderto
notusealltheDIAprocessesagoodtuningbetweenparallelprocessingandblocksizeisoneofthecornerstoneof
anoptimalandhealthydatatransfer.

Ionlylogtheerrormessages,becauseIdontwanttoincreasethelogsnecessaryandIalsochecktheWriteIDocto
errorfiles,becauseallowmetofixrecordswitherrors,Iwillexplainthislateron.

Aswesplitthefilein5weneeda1errorfileforeachtostoretheerroneousrecords,morefiles,easiertofindinside
thefiletheerror,butwealsowillseethisinthefollowingsteps.

http://scn.sap.com/community/crm/blog/2014/10/09/sxdaanicewaytoimprovethelsmwexperience

6/10

4/25/2016

UnlashingSXDAandLSMWPart1Definition|SCN

Step5:Choosemessagetype

InourscenarioImdealingwithXIFinterfaces(BAPIIDoc)thiscandifferdependingonyourobjecttypeanddata
transfermethod.

Step6:PerformthemappingusingLSMW

Theconvertdatastepdoesnthaveanyinput/outputfile,thiswillbeautomaticallyinformedoncetheLSMWtasksare
completed.

http://scn.sap.com/community/crm/blog/2014/10/09/sxdaanicewaytoimprovethelsmwexperience

7/10

4/25/2016

UnlashingSXDAandLSMWPart1Definition|SCN

AsIpointedinStep4.1IalreadyhaveaProject,SubprojectandObject(generatedbytheSXDAwizard)Dont

forgettoconfigtheInboundIDocProcessingfromtheLSMWperspective(settings)more
infoaboutthisandLSMWathelpsapportal

LetsassumeInishedallthemandatorysteps(everybodywhoisusedtoLSMWknowswhatImtalking
about,ifyouarenotusedtoLSMWthereareveryniceblogssteptosteponSCNwhichcoverthose
steps,from2to6)
NowItsmetospecifythelesandassigntotheinputstructures(rememberunlthisstepsaredone,
theSXDAConvertDatastepwillbeincomplete.

http://scn.sap.com/community/crm/blog/2014/10/09/sxdaanicewaytoimprovethelsmwexperience

8/10

4/25/2016

UnlashingSXDAandLSMWPart1Definition|SCN

AsyoucanseetheLSMWautomaticallyassignedtheIDsfortheImportedandConverteddata,thismust
matchintheSXDAsteps.

Finally,wegobacktotheSXDAweseetheinput/outputfilesinformed(ifthisdoesnthappen:twocausecanbea
refreshontheSXDAscreen,so/NSXDAorsomeLSMWstepismissing)

http://scn.sap.com/community/crm/blog/2014/10/09/sxdaanicewaytoimprovethelsmwexperience

9/10

4/25/2016

UnlashingSXDAandLSMWPart1Definition|SCN

Endofpart1:

Ihopeyouarestartingtoseetheadvantagesofcombiningbothtoolsandlookingforwardtoyourfeedback

Cheers!

Luis

954Views

Topics:customer_relationship_managementTags:lsmw,data_transfer,sxda

AverageUserRating
(7ratings)

Share

Tweet

Like

0Comments
Therearenocommentsonthispost

SiteIndex
Privacy

ContactUs
TermsofUse

SAPHelpPortal
LegalDisclosure

Copyright

http://scn.sap.com/community/crm/blog/2014/10/09/sxdaanicewaytoimprovethelsmwexperience

FollowSCN

10/10

Anda mungkin juga menyukai