sappayrolltutor.docx
- 文档编号:6899245
- 上传时间:2023-01-12
- 格式:DOCX
- 页数:27
- 大小:1.08MB
sappayrolltutor.docx
《sappayrolltutor.docx》由会员分享,可在线阅读,更多相关《sappayrolltutor.docx(27页珍藏版)》请在冰豆网上搜索。
sappayrolltutor
WageTypeProcessingBasicConcepts
bySteveBogner,ManagingPartner,InsightConsultingPartners
RelationshipofPayrollDriver,Schema(Functions),Rules(Operations)
EachcountrypayrollversionsupportedbySAPhasaprogramcalledthe"payrolldriver"thatcalculatespayrolls.Forexample,intheU.S.,thepayrolldriverisRPCALCU0,inMexicoitisHMXCALC0,andinCanadaRPCALCK0.Eachoneisdifferent,buttheyshareacommoncoreoffunctionality.Thejobofthepayrolldriveristoprocesspayrollfunctionsasspecifiedinapayrollschema.Thesepayrollfunctionseachperformaspecificjob,forexample-readingdatafrominfotypes,calculatingtaxes,andprocessingwagetypes.Somefunctionsprocesspayrollrules.Rulesareacollectionofpayrolloperations.Eachoperationdoesasmallunitofwork,suchasmultiplyingawagetype’snumberbyaratetogetanamount.
SchemasareeditedwithtransactionPE01,andrules
Figure1–Processingrelationships
withPE02.FunctionsandoperationsaremaintainedwithtransactionPE04.Toviewpayrollresults,
usetransactionpc_payresult(orinearlierR/3releasesgotoTools>Payrollresult>DisplayinthePayrollmenu).(SeeFigure1.)Thestandardpayrollschemaforacountrycanbederivedfromtablet500l.Ifthecountryintablet500lhasanXintheOldNamingConvfield,thentheschemaisHRCountryIndicatorplus000.Otherwise,itistheISOCodeplus00.SotheU.S.hasschemaU000andforMexicoitisMX00.
HeaderandTableWageTypeConcept
Whencalculatingpayroll,wagetypesarereadfrominfotypesandtheTimeManagementclusterandstoredinaninternaltablecalledtheInputTable(IT).(SeeTable1.)InABAPterms,thisissimplyaninternaltable.Variouspayrollfunctionsandoperationscanreadandupdatedatainthistable.SimilartoABAPinternaltables,thereisaheaderrow.Thatheaderrowdefineswhichrowofdatacanbeaccessedbythepayrolloperations.Aftermanipulatingthedataintheheaderrow,youcansavetherowbacktotheIT,saveittoanotherpayrolltable,orignoreit.InTable1therearethreewagetypes,andwagetype2100iscurrentlyintheheaderrow.Afteryouaredonewithwagetype2100,wagetype4200ismovedintotheheaderrow.
Table1
Wagetype
Number
Rate
Amount
2100
0
0
100.00
2100
0
0
100.00
4200
0
0
20.00
1500
40
10.30
412.00
Table1InputTable
CreatingCustomSchemasandRules
SchemaandRuleNamingConventions
CustomermodifiedschemasandrulesneedtobeginwithZ.ManycustomerssimplyreplacethefirstletterofthestandardschemawithaZ–i.e.,theirmodifiedcopyofUAP0becomesZAP0.Buttherecanbeproblemswiththatconvention.Forexample,youmightlaterimplementCanadianpayrollandneedamodifiedversionofschemaKAP0,butZAP0isalreadyusedfortheU.S.Formanyyears,I’veusedanamingconventionofZplusthecountryidentifierandasequentialnumberformodifiedrulesandschemas.SoamodifiedUAP0wouldbecomeZU01andamodifiedKAP0becomesZK01.
EditorDocumentation
Documentationforthefunction,operation,schema,andruleeditorsisavailableonlineat.ClickonSAPR/3andR/3Enterpriseandthenselectyourreleaselevelandlanguage.ThennavigatetotheHumanResources>HRToolssection.
F1Help
Intheschemaandruleeditors,placeyourcursoronafunctionoroperationandpressF1togethelptext.Aschemaorarule’sdocumentationisavailableintheeditorviatheGoto>Documentationmenu.Intheschemaeditor,theF4keyshowspossiblevaluesforeachofthefourparametersforwhateverfunctionisenteredonthatline.Thesamedocumentation–andmore–isavailableviatransactionPDSY.
CreatingaTestSchema
Fortestingpurposes,itisusefultohaveaversionofthepayrollschemathatdoesnotcareaboutthecontrolrecord(transactionPA03)settings.Bypassingthecontrolrecordletsyourunandsavetheresultsforanypayperiodneeded,withouthavingtoupdatethecontrolrecord.There’snoproblemwithhavingsuchaschemaaround,sincethepayrolldriverdoesnotsavepayrollresultsfromaschemathatignoresthecontrolrecordinaproductionsystem.Forexamples,Iwillshowyouhowtocreatetwoschemas–ZUA0,whichwillbeusedinproductionandwillcheckthecontrolrecord,andZUAT,whichignoresthecontrolrecordandisusedfortestingpurposesonly.
First,createacopyofSAP’sschemaUIN0andnameitZUA2.Intheschemaeditor(transactionPE02)enterschemaUIN0,andclickthecopybutton,orSchema>Copyinthemenu.EnterZUA2fortheToschema.TheneditZUA2andmaketheCHECKABRlineexecutablebyremovingtheasteriskintheDcolumn.(SeeFigure2.)TheCHECKfunctioniscommentedoutbySAPinthestandardschema,soyouuncommentithereforuseinthemainZUA0schema.
Figure2MakingtheCHECKABRlineexecutable
NowcopytheSAP-standardschemaU000toZUA1andcommentouttheinitializationschemaUIN0(Figure3).
Figure3CommentouttheinitializationschemaUIN0
Intheschemaeditor,createtheproductionschema(don’tcopyitfromanything)inmyexampleZUA0.BesuretochecktheSchemacanbeexecutedcheckbox.(SeeFigure4.)Onlyexecutableschemascanbeenteredintothepayrolldriverselectionscreen.
Figure4ChecktheSchemacanbeexecutedcheckbox
TheproductionschemaZUA0isasimpleone,justtwolines.(SeeFigure5.)First,youcalltheinitializationschema,andthenyoucallthemaincalculationschemaZUA1.
Figure5SchemaZUAO
CopyschemaZUA0toyourtestschemaZUAT.(SeeFigure6.)YouwantZUATtoignorethecontrolrecord,sohaveituseschemaUIN0forinitialization.RememberthatCHECKABRiscommentedoutinUIN0.Therefore,boththeproductionandtestschemasnowusethesamecalculationlogicinschemaZUA1–whichkeepstheminsync.
Figure6CopyschemaZUA0totestschemaZUAT
YourcustomrulesfortheseexampleswillgoinacopyofschemaUAP0.CopyUAP0toZUA3andaddlinesforeachofthefiveexamples.(SeeFigure7.)EditschemaZUA1toCOPYZUA3insteadofCOPYUAP0(notshown).
Figure7Addlinesforeachofthefiveexamples
SchemaandRuleDocumentation
CreatingDocumentationObjects
ManycustomizingobjectsinPayrollcanbedocumentedonlineinSAP.Thedocumentationisaddedtoatransportsothatitcanbemigratedtoeachclientinthedevelopment,QA,andproductionenvironments.TherearethreewaystodocumentanobjectonlineinSAP.
Whenchangingschemasandrules,youcangodirectlytotheDocumentationsectionatthefirstscreenoftheeditor.Or,whileediting,usetheGoto>Documentationmenu.Eithermethodtakesyoutoaneditor.TheeditorshowninFigure8isfromtheEnterpriserelease,andtheappearanceandfunctionscanchangefromonereleasetoanother.RuleZUA0hasnodocumentation.
Figure8EditorfromtheEnterpriserelease
TypicaldocumentationmightlooklikewhatisshowninFigure9.AnotherU2headingwasaddedforModificationHistory.
Figure9ModificationHistoryheaderadded
Whenmodifyingwagetypes,constants,andotherdataviaviewsintransactionSM30ortheIMG,clickontheblueiorInfobuttonfordocumentation.Thecurrentdocumentationisbroughtupindisplaymode.ClickontheeditbuttonorpressF5tomaintainit.
TransactionPDSYisauniversalwaytoaccessallthisdocumentation,regardlessofwhereitcomesfrom.ViaPDSY,youcanviewandeditdocumentation,usingthesameeditor,formanydifferentobjects.EarlyreleasesofR/3usedreportRPDSYS00toviewandmaintaindocumentation,butithasbeenreplacedwithtransactionPDSY.WhileRPDSYS00maycontinuetoexist,youcannotbeassureditisshowingyouthemostrecentdocumentation.
Documentthe‘Why’
Eachrule,schema,wagetype,andconstantcanbedocumentedonline.ClickontheGotomenuandselectDocumentation.Fromthere,youcanenterdocumentationonwhyyouaremakingthechanges,referencethetransportitisassignedto,andperhapsenterotherchangemanagementinformation(i.e.issuenumber,ticketnumberandsoon).Thecriticalpartistodefinewhyyouaremakingthechange,notjustsayingwhattheruledoes.Mostpeoplewhohavetocomebehindyoutomodifytherulecanseewhattheruleisdoing,butmaynotknowwhyitwasdoneacertainwayorifthereareotherdependenciesintheschema.Thissortofdocumentationrequiresverylittleeffort,andsavesmuchtimeinthefuture.
ExpandingtheSchemaandRules
ReportRPDASC00canbeusedtopullalltheCOPYschemasandrulesintoonelist.Thisisveryusefulwhenyouarelookingforcertainthingsintheschema–forexample,whereiswagetype0COLused?
RunningthereportasshowninFigure10listsallschemas,sub-schemas,rules,andsub-rulesforthemainschemaZUAT.
Figure10ReportformainschemaZUAT
RunningthePayrollDriver
Thepayrolldrivercanberunanumberofdifferentways.Fromthepayrollmenuforaspecificcountry,selectthePayroll>Startpayrolloption.OrusetransactionPC00_Mxx_CALC,wherexxisthecountryidentifier(orMOLGA).ThepayrolldrivercanalsobeexecutedfromtransactionsSE38andSA38.Anywayyougo,thisselectionscreencomesup(usingU.S.payrollandthetestemployeeasanexample).(SeeFigure11.)
Figure11PayrolldriverselectionscreenfortheUnitedStates
IfyouareusingtheschemaZUA0forproductionpayroll,thepayrollperiodisalwaysleftatCurrentperiodunlessyouareonlyrunningsimulations,whichtellsthepayrolldrivertogetthecurrentpayperiodfromthepayrollcontrolrecord.IfyouusethetestschemaZUAT,youcouldselectOtherperiodandthenenterwhateverperiodandyearyouwanttorun,andsavethoseresults(onlyinanon-productionsystem)
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- sappayrolltutor
![提示](https://static.bdocx.com/images/bang_tan.gif)