Sie sind auf Seite 1von 3

12/4/2016 CopyControlswithinSDERPSDSCNWiki

GettingStarted Store

CommunityWIKI SAPCommunity Welcome,Guest Login Register


TheSAPCommunitywikiwillbeclosedtonewcontentsubmissionsfromDecember76:00p.m.CETtoDecember116:00p.m.CET.
Weapologizefortheinconvenience,butweneedtotakethesystemofflinewhileweimprovetheplatform.Pleaseplanyourtasksaccordingly.
ERPSD / / ERPSDCustomizing

CopyControlswithinSD
CreatedbyGerardMagorrian,lastmodifiedonAug21,2012

Purpose
Thisdocumentwillprovideageneraloverviewofcopycontrolswithinsalesanddistribution.

WhatAreCopyControls?
CopyControlsareshortprogramsthatareusedwhencopyingfromonedocumenttoanother.Theyconsistofprogramsknownasroutinesthatinformthesystemhowthedataistobecopiedfromthe
sourcedocumenttothetargetdocument.

Thestandardsystemalreadycontainsanumberoftheseroutines.However,itispossibletogenerateadditionalroutinestofulfilbusinessrequirementsnotreachedwithinthestandarddeliveredsystem.

YoucanuseanexistingSDdocumentasthebasisforcreatingasubsequentdocumentforexample,whencreatingasalesorderwithreferencetoaquotation.Inthiscasethesystemcancopyallthedata
oronlycertaindatafromthequotationintothesalesorder.Whichfieldsaretobecopiedfromthesourcedocument(quotation)dependsonhowthecopycontrolshavebeenconfigured.

Wherearetheyfound?
TheCopyControlsareconfiguredwithintheIMG.Theycanbelocatedthroughthefollowingmenupaths:

SalesandDistribution>Sales>Maintaincopycontrolforsalesdocuments,or
SalesandDistribution>Shipping>Specifycopycontrolfordeliveries,or
SalesandDistribution>Billing>BillingDocuments>Maintaincopycontrolforbilling

Oralternatively,theycanbeaccesseddirectlybyusingthefollowingtransactioncodes:

VTAAcontrolforcopyingfromsalesordertosalesorder
VTLAcontrolforcopyingfromsalesordertodelivery
VTAFcontrolforcopyingfrombillingdoctosalesorder
VTFAcontrolforcopyingfromsalesordertobillingdoc
VTFLcontrolforcopyingfromdeliverytobillingdoc
VTFFcontrolforcopyingfrombillingdoctobillingdoc

Howdotheywork?
CopycontrolsaresetupatthreelevelsofthesalesorderHeaderlevel,ItemlevelandSchedulelinelevel.TheSchedulelinelevelisonlyrelevantwhencopyingfromsalesordertosalesorderorfrom
billingdoctosalesorder.

TheHeaderCopyRoutinesareusedtocopydatafromtheHeaderoftheSourcedocumenttotheHeaderoftheTargetdocument.AnumberofcopyroutinesarerequiredoneforGeneralHeaderdata,
oneforPartnerdata,etc.

https://wiki.scn.sap.com/wiki/display/SD/Copy+Controls+within+SD 1/3
12/4/2016 CopyControlswithinSDERPSDSCNWiki

ItispossibletoviewthesourcecodeforeachroutinebyusingtheF4helpfunction.Highlighttheappropriateroutineandpressthesourcetext(F5)buttontodisplaythecodethroughtheABAPeditor.

CopycontrolsfortheitemlevelcanbeaccessedbyopeningtheItemfolderinthedialogstructureandselectinganitemcategoryfromtheDisplayViewItem:Overviewscreen.Againthereareseveral
routinesusedherefortheitemlevelcopycontrols.F1helpcanbeutilisedtogetabetterunderstandingonhoweachroutineisemployed.

Itisworthnoting,ifthereisaproposeditemcategoryonthetargetsalesdoctype,thenthiswillbetheitemcategoryinthetargetsalesdocument.However,ifthefieldisleftblank,thenthesystemwilluse
thecustomerdefinedconfigurationintransactionVOV4todeterminetheappropriateitemcategory.

InadditiontothecopyroutinesthereareanumberofcheckboxcontrolsforexampleCompletereferenceatheaderlevelandCopyquantityatItemlevel.F1canagainbeusedheretoaddfurtherinsight
intotheroleofeachofthesefields.

Atthelowestlevel,theScheduleLinecopycontrolroutinescanbeaccessedbydoubleclickingontheScheduleLinefolderinthedialogstructurewhentheappropriateItemcategoryhasbeenselected.
Theschedulelineroutinesworksimilartotheheaderanditemcategoryroutinesdetailedpreviously.

ReferenceStatus
Documentsthathavebeencopiedareassignedanupdatedreferencestatusinthecopieditem.

Anitemcanhavethefollowingstatus:

Notrelevanttheitemisnotrelevantforcopying
NotreferencedTheitemhasnotyetbeencopied.
PartiallyreferencedTheentireitemquantitywasnotcopied.
FullyreferencedTheentireitemquantityhasbeencopiedortheentireitemquantityhasnotbeencopied,buttheitemcannotbereferencedfurther.

Todisplaythereferencestatus:

SelectingHeader>Statusforthestatusoftheentiredocument.(FieldVBUKRFSTK)
SelectingItem>Statusforthestatusofthelineitem.(FieldVBUPRFSTA

WhatFieldsarebeingcopied?
Notethatthereareseveralcopyroutinesateachlevelofthecustomisingheader,itemandscheduleline.

https://wiki.scn.sap.com/wiki/display/SD/Copy+Controls+within+SD 2/3
12/4/2016 CopyControlswithinSDERPSDSCNWiki

FindingoutwhichfieldsarebeingcopiedcanbeachievedbyexaminingthesourcecodeintheABAPEditortransactioncodeSE38.

RelatedContent
RelatedDocuments

RelatedNotes
daten_kopieren data replication tvcpa tvcpaap

ContactUs SAPHelpPortal
Privacy TermsofUse LegalDisclosure Copyright FollowSCN

https://wiki.scn.sap.com/wiki/display/SD/Copy+Controls+within+SD 3/3

Das könnte Ihnen auch gefallen