Вы находитесь на странице: 1из 24

GettingStarted Newsletters

Hi,Guest

LogOn

JoinUs

SearchtheCommunity

Products

Services&Support

AboutSCN

Downloads

Industries

Training&Education

Partnership

DeveloperCenter

Activity

LinesofBusiness

UniversityAlliances

Events&Webinars

Innovation

Browse

CreatingVOFMcustomroutine,
functionalitysameasSAPstandardroutine
103withAdditionalFunctionality

Version3

createdbyMohammedKhurshedonSep19,20131:25PM,lastmodifiedbyMohammedKhurshedonSep26,20134:26PM

Share

Tweet

Like

1.Introduction
1.1DocumentPurpose
1.2Thisisthedocumenthelpsyoutocreatecustomroutineforsalesorderfor
belowspecificrequirement:

Functionaldescription:
IncaseofsaleorderwiththeSDdocumentcategoryKorLorHrelatedtoaninvoice,weneedtofillthe
fixedvaluedate(VBKD_VALDT)withthebillingreferencedate(VBRK_FKDAT).
Forexample:
Invoice90001111,thebillingdateis22.07.2013

Store

Communications

Actions

Ifwecreateasaleorderrelatedtothisinvoice,wewantthefixedvaluedateequaltothebillingreference
date.

Aspertherequirement:
Sapstandardroutine103triggerswheneversalesorderisbeingcreatedwithreference.Sapstandard
routineisconfiguredinVOFMtransactionas:

Sapstandardroutine103hasthefunctionalityofcopyingthebillingdocumentheaderdataandbilling
documentlineitemdataintothesalesorderheaderdata,wheneversalesorderisbeingcreatedusing
referencedocument.
Note:ToachievethisrequirementwecanalsoenhancetheSAPstandardroutine103butheretheyneedthe
customroutinebecauseitwillbeconfiguredondemandbasisbyclientwhenevertheyneedit.

AboutVOFMTransaction:

TransactionVOFMisatoolthatwasdevelopedinR/3tofacilitatethedefinitionofbothSAPdeliveredas

wellascustomerdefinedroutines/rulesusedinthesystemduringvariousbusinessprocesses.VOFM
routinesareABAPcodewritteninForms.VOFMprovidestheuserwiththebenefitofchoosingfromoneof
thestandarddeliveredR/3routinesorwritingtheirown.VOFMisintendedfortheimplementationteam
whenconfiguringthesystem.Itisnotintendedfortheenduser.
Herewehavefourimportantmenus:
i)Copyingrequirements
ii)Datatransfer
iii)Requirements
iv)Formulas

Stepstocreatethecustomroutine:
1)GototransactionVOFMDatatransferOrders

2)Provideacustomroutinename

NamingConvention:

VOFMroutinesareorganizedusingtheGroupIndicatorCode.TheVOFMprogramuses
thegroupindicatortodeterminetheprogramincludeandsubroutinenameswhenit
dynamicallycreatestheseobjects.Theassignmentofthesenamesishardcodedintheprogram.
ThevalidgroupindicatorcodesaredefinedindatabasedomainGRPZEusingavaluerange.

GototransactionVOFNplacethecursoronclassinputandpressF1key.

Nowdoubleclickondataelementandseethedomainvaluesas:

AllthefixedvaluesareGroupIndicatorCode.

StandardSAProutinenamestartsfrom1to599.
Soallcustomnamestartsfrom600to999.

Nowprovidethecustomroutinenameandpressenter,itwillaskforaccesskey:

Oncetheaccesskeyprovidedaincludeprogramgetgeneratedwithtransportrequestas:

AllincludeprogramgeneratedfromRoutinehasanentryintableTFRM(FormRoutinesfor
Requirements/Formulas/DataTransports)andTFRMT(FORMRoutinesforReqs./Formulae/Data
Transports:Texts).

1)Doubleclickonthecustomroutine901

Amodificationmessageappearsas:

Thenmentionediconintheabovescreenshotneedstobeusedformodificationofthecustomroutine.
NowplacethecursorattheendoftheENDFORMandclickontheinsertbuttontowriteourowncodeas
shownbelow:

Onclickinginsertbuttonwehavetheareaforwritingourcodewith*(INSERT,,*)INSERTas:

Nowasperrequirementabovewehavewrittenfollowingcode:

Alongwithcodeforstandardroutine103,thecodemarkedinredistheadditionalforthisspecificscenario
hasbeenused.
ThebillingdatehasbeencopiedalsoinVBRKvaluedatewhichalsogetscopiedintoVBKD.
ThestandardSAPprogramforcreatingthesalesorderusingreferencedocumentchecksforallvaluesandif
foundanydifferencebetweenCVBRKandVBKD,itcreatesanadditionalentryforVBKD.Forthatreasonin
thisscenariofixedvaluedateisalsocopiedintoCVBRK.
Oncethecodingisoverweneedtoactivatethecustomroutine901andincludeprogramgenerated.
ForconfirmingthesameweneedtochecktheentriesinTFRMtableas:

EvenifanyerroroccursthenweneedtoruntheSAPstandardprogramRV80HGENtoregenerateallVOFM
routines.
Testing:
TheBillingDocument90000112hasbeenusedtocreatetheSalesorder:

Ithasthefixedvaluedate:22.07.2013
Nowfollowingstepshasbeentakentocreatethesalesorderusingbillingdocumentasfollows:
InVA01transactionforagivenordertype(ZRD)whensalesorderhasbeencreatedwithReference

Referencedocumenthasbeentakenasbillingdocument(9000112)asmentionedabove.

Afterclickingonthecopyoption,ascreenwillopenhavingtheinformationofthesalesorder.

Transporting
thecustomroutinetodifferentsystem:

ProgramRV80HGENcanbeusedtoregenerateallVOFMroutines.WheneverVOFM
routinesaretransportedthisprogramshouldbeexecutedinalltargetsystems.Itis
possibletoincludeanautomaticexecutionoftheprograminthetransportrequestby
applyingOSSnote598475.

Itcanbeaddedtothetransportrequestofthecustomroutineincludeas:
Doubleclickonthetransportrequest

Openitinchangemodeandprovideinputasshownbelow:

Andpressenterandsave.

Sowhenthistransportissenttotargetsystemthenitgetsexecutedautomatically.

EvenifitdoesnotworkthenweneedtorunSAPstandardprogramRV80HGENmanuallyinthetarget
system.

ActivationORDeactivationOfCustomRoutine:
SometimeswhiletransportingtheentriesintableTFRMorTFRMTdoesnotexistsintargetsystem.Inthis
caseweneedtorunthestandardSAPprogramRV80HGENfirstandthenStandardSAPprogram
SDINVOFMusedtoidentifyandrepairmissingtableentriesintheVOFMcontroltablesTFRMandTFRMT.

WecanalsoactivateanddeactivateourcustomroutinefromVOFMas:

DependingupontheactiontheTRFMorTRFMTentriesgetsupdatedautomaticallyas:

32373Views

Products:sap_erp_sales_and_distributionTopics:enterprise_resource_planning

AverageUserRating
(19ratings)

Share

Tweet

Like

25Comments
venugopalSep19,20133:18PM

Haiwonderfuldocumentyouhaveshared,reallythisisveryhelpfulforfunctionalconsultants
thanksalot
Like(0)

MohammedKhurshedSep19,20133:33PM

Youarealwayswelcome

Like(0)

PradeepManiDec11,20137:56AM

Goodwork,thanksforpostingthis.
Whatwillbetheuseofhavingfixedvaluedateequaltobillingdate.
Like(0)

RavinNKDec12,201312:50AM(inresponsetoPradeepMani)

Thatwaywearejustcontrollingthatthecustomer'sduedatetopaytheinvoicestartsonthe
dayhewasbilled.
Like(0)

DebopriyaGhoshOct4,20133:07PM

Helpfuldocument.....
Like(0)

MahejyothiOct5,20137:30AM

goodwork..reallyhelpful
Like(0)

VijaySimhaDec11,20137:05AM

Verygood.CanyoupleaseletmemeknowmoreaboutthisVOFM'sifyouhaveanydocumentplease
shareitwithme

.
Like(0)

EduardoHinojosaDec19,20133:37PM(inresponsetoVijaySimha)

Hi

Icansuggestyouthesenotes

SAPNote156230Requirements:Whatispermitted,whatisnot?
SAPNote22808Transferringformulas
SAPNote326560VariousproblemswhenusingVOFMfunctions
SAPNote356737CustomernamerangeforVOFMroutines
SAPNote381348Usinguserexit,customerexit,VOFMinSD
SAPNote327220VOFMfunctionanditsobjects

Regards

Eduardo
Like(1)

madhukumarMar19,20147:06AM(inresponsetoEduardoHinojosa)

Thankyouverymuchyoursuggessionanditisreallyhelpful....
Like(0)

DeepKDec19,20132:20PM

HiMohammed,

Veryusefuldocumentforthosearenotworkedwithcopyingroutine.

Thanks,
Deep.
Like(0)

EduardoHinojosaDec19,20132:43PM

Goodjob,butyourdocumentneedsacomment.TherangeforVOFMaccordingNote327220VOFM
functionanditsobjectsin"2.2Namespaces"isforFOFU(thiscasefrom900to999),indetail:

Subsequentfunctionsfrom900to999(FOFUthiscase)
Groupkeyroutinesfrom50to99
Datatransferroutinesf.textsfrom50to99
allotherindicatorsfrom600to999

Regards

Eduardo
Like(3)

varunyadavDec30,20134:31PM

Nice.

Helpful.
Like(0)

RampeVFeb6,20144:45AM

Hello

MohammedKhurshed,


Usefuldocument.

ThankYou.
Like(0)

SivaPrasadVasireddyMar7,201410:16AM

ThisisVeryHelpfulDocument
Like(0)

madhukumarMar19,20147:02AM

HelloMohammedKhurshed,

YourExplanationisveryclearandeasilyunderstandableandDocumentisveryhelpful.

Continuethegoodwork.....

ThanksandBestRegards,
Madhukumar
Like(0)

FazhlayElahiApr7,20145:45PM

veryusefuldocument
Like(0)

SyedMehtabJan8,20156:06AM

Hi,

veryhelpfuldocument.
ilookforwardtootherscenariosbasedVOFM

Thanks
Like(0)

GeorgeRessosJan8,20158:20AM

Verygoodandhelpfulldocument.
Like(0)

SANJITBHATTACHARYAJan8,201512:02PM

Verygooddocumentwaitingformoresuchkindofdocuments.
Like(0)

ABAPSOFOSS0012820640Apr21,20153:44PM

Verygooddocument,thanksforsharing,itwasusefull.
Like(0)

AnbuselvanSDMay5,20151:53AM

HiMohammed,

Thankyouforthewellillustrateddocument.Itwouldbehelpfulfornewbie'slikemyself.ButIam
unabletounderstandthebusinessneedtofillthefixedvaluedate(VBKD_VALDT)withthe

billingreferencedate(VBRK_FKDAT).

Inwhatscenario,thebusinesswouldliketohavethiskindofrequirement..sincewehaveafield
calledservicerendereddate..

Like(0)

TanmayVermaAug3,201512:26PM

Verywelldocumented.Thanksalot.
Like(0)

VENKATARAMIREDDYKONDURIAug3,20151:10PM

Hi,

veryusfulldocument.thanksalotforsharing..

Regards
venkataramireddykonduri
Like(0)

AspireWFJan27,20163:36PM

Mohammed,

Extremelyhelpful.Greatpost!Thanksalotforsharing.

BR,
Aspire
Like(0)

SanthanakrishnanArumugamApr29,20168:40AM

Hi,

Greatpostkeepgoing,GoodLuck
Like(0)

SiteIndex
Privacy

ContactUs
TermsofUse

SAPHelpPortal
LegalDisclosure

Copyright

FollowSCN

Вам также может понравиться