1. creating vofm custom routine, functionality sam
TRANSCRIPT
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
1/24
Getting Started Newsletters Store
Products Services & Support About SCN Downloads
Industries Training & Education Partnership Developer Center
Lines of Business University Alliances Events & Webinars Innovation
Log On Join UsHi, Guest Search the Community
Activi ty Communications Actions
Browse
0 Tweet
created by Mohammed Khurshed on Sep 19, 2013 1:25 PM, last modified by Mohammed Khurshed on Sep 26, 2013 4:26 PM
1. Introduction
1.1 Document Purpose
This is the document helps you to create custom routine for sales order for
below specific requirement:
Functional description:
In case of sale order with the SD document category ‘K’ or ‘L’ or ‘H’ related to an invoice, we need to fill the
fixed value date (VBKD_VALDT) with the billing reference date (VBRK_FKDAT).
For example:
Invoice 90001111, the billing date is 22.07.2013
Creating VOFM custom routine,functionality same as SAP standard routine103 with Additional Functionality
Share 6 3Like
Version 3
http://scn.sap.com/community/uachttp://scn.sap.com/contenthttp://scn.sap.com/welcomehttp://scn.sap.com/docs/login.jspahttp://scn.sap.com/login.jspahttp://scn.sap.com/people/mohammed.khurshedhttp://scn.sap.com/people/mohammed.khurshedhttps://twitter.com/intent/tweet?hashtags=scn&original_referer=http%3A%2F%2Fscn.sap.com%2Fdocs%2FDOC-46586&ref_src=twsrc%5Etfw&text=Creating%20VOFM%20custom%20routine%2C%20functionality%20same%20as%20SAP%20standard%20ro...&tw_p=tweetbutton&url=http%3A%2F%2Fscn.sap.com%2Fdocs%2FDOC-46586&via=SAPCommNethttp://scn.sap.com/contenthttp://scn.sap.com/actionshttp://scn.sap.com/communicationshttp://scn.sap.com/activityhttp://scn.sap.com/login.jspahttp://scn.sap.com/docs/login.jspahttp://scn.sap.com/community/uachttp://scn.sap.com/community/developer-centerhttp://scn.sap.com/community/downloadshttp://scn.sap.com/welcomehttps://www.sapstore.com/?url_id=banner-US-2015-SCN-HeadLinkhttp://scn.sap.com/community/newslettershttp://scn.sap.com/community/getting-started
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
2/24
If we create a sale order related to this invoice, we want the fixed value date equal to the billing reference
date.
http://scn.sap.com/servlet/JiveServlet/showImage/102-46586-3-282456/Capture.JPGhttp://scn.sap.com/servlet/JiveServlet/showImage/102-46586-3-282562/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
3/24
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
4/24
Sap standard routine ‘103’ has the functionality of copying the billing document header data and billing
document line item data into the sales order header data, whenever sales order is being created using
reference document.
Note: To achieve this requirement we can also enhance the SAP standard routine 103 but here they need the
custom routine because it will be configured on demand basis by client whenever they need it.
About VOFM Transaction:
Transaction VOFM is a tool that was developed in R/3 to facilitate the definition of both SAP delivered as
http://scn.sap.com/servlet/JiveServlet/showImage/282466/Capture.JPGhttp://scn.sap.com/servlet/JiveServlet/showImage/282465/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
5/24
well as customer defined routines/rules used in the system during various business processes. VOFM
routines are ABAP code written in Forms. VOFM provides the user with the benefit of choosing from one of
the standard delivered R/3 routines or writing their own. VOFM is intended for the implementation team
when configuring the system. It is not intended for the end user.
Here we have four important menus:
i) Copying requirements
ii) Data transferiii) Requirements
iv) Formulas
Steps to create the custom routine:
1) Go to transaction VOFMàData transferà Orders
2) Provide a custom routine name
http://scn.sap.com/servlet/JiveServlet/showImage/282473/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
6/24
Naming Convention:
VOFM routines are organized using the Group Indicator Code. The VOFM program uses
the group indicator to determine the program include and subroutine names when it
dynamically creates these objects. The assignment of these names is hard coded in the p rogram.
The valid group indicator codes are defined in data base domain GRPZE using a value range.
Go to transaction ‘VOFN’ place the cursor on class input and press ‘F1’ key.
http://scn.sap.com/servlet/JiveServlet/showImage/282474/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
7/24
http://scn.sap.com/servlet/JiveServlet/showImage/282475/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
8/24
Now double click on data element and see the domain values as:
http://scn.sap.com/servlet/JiveServlet/showImage/282476/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
9/24
All the fixe d val ues a re Group Indicator Code .
Standard SAP routine name starts from 1 to 599.
So all custom name starts from 600 to 999.
Now provide the custom routine name and press enter, it will ask for access key:
http://scn.sap.com/servlet/JiveServlet/showImage/282477/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
10/24
Once the access key provided a include program get generated with transport request as:
http://scn.sap.com/servlet/JiveServlet/showImage/282478/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
11/24
All include program generated from Routine has an entry in table TFRM (Form Routines for
Requirements/Formulas/Data Transports) and TFRMT (FORM Routines for Reqs./Formulae/Data
Transports: Texts).
1) Double click on the cust om routine 901
A modification message appears as:
http://scn.sap.com/servlet/JiveServlet/showImage/282482/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
12/24
Then mentioned icon in the above screen shot needs to be used for modification of the custom routine.
Now place the cursor at the end of the ENDFORM and click on the insert button to write our own code as
shown below:
On clicking insert button we have the area for writing our code with *(INSERT,, *) INSERT as:
http://scn.sap.com/servlet/JiveServlet/showImage/282484/Capture.JPGhttp://scn.sap.com/servlet/JiveServlet/showImage/282483/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
13/24
Now as per requirement above we have written following code:
Along with code for standard routine 103, the code marked in red is the additional for this specific scenario
has been used.
The billing date has been copied also in VBRK value date which also gets copied into VBKD.
The standard SAP program for creating the sales order using reference document checks for all values and if
found any difference between CVBRK and VBKD, it creates an additional entry for VBKD. For that reason in
his scenario fixed value date is also copied into CVBRK.
Once the coding is over we need to activate the custom routine 901 and include program generated.
For confirming the same we need to check the entries in TFRM table as:
http://scn.sap.com/servlet/JiveServlet/showImage/282504/Capture.JPGhttp://scn.sap.com/servlet/JiveServlet/showImage/282488/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
14/24
Even if any error occurs then we need to run the SAP standard program “RV80HGEN” to regenerate all VOFM
routines.
Testing:
The Billing Document ’90000112’ has been used to create the Sales order :
http://scn.sap.com/servlet/JiveServlet/showImage/282510/Capture.JPGhttp://scn.sap.com/servlet/JiveServlet/showImage/282509/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
15/24
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
16/24
Reference document has been taken as billing document(9000112) as mentioned above.
After clic king on the c opy option, a s creen will open having the information of the sales order.
http://scn.sap.com/servlet/JiveServlet/showImage/282525/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
17/24
Transporting
he custom routine to different system:
Program RV80HGEN can be used to re-generate all VOFM routines. Whenever VOFM
routines are transported this program should be executed in all target systems. It is
possible to include an automatic execution of the program in the transport request by
applying OSS note 598475.
It can be added to the transport request of the custom routine include as:
Double click on the transport request
Open it in change mode and provide input as shown below:
http://scn.sap.com/servlet/JiveServlet/showImage/282533/Capture.JPGhttp://scn.sap.com/servlet/JiveServlet/showImage/102-46586-3-282595/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
18/24
And press enter and save.
So when this transport is sent to target system then it gets executed automatically.
Even if it does not work then we need to run SAP standard program ‘RV80HGEN’ manually in the target
system.
Activation OR D eactivation Of Custom Routine:
Sometimes while transporting the entries in table TFRM or TFRMT does not exists in target system. In this
case we need to run the standard SAP program RV80HGEN first and then Standard SAP program
SDINVOFM used to identify and repair missing table entries in the VOFM control tables TFRM and TFRMT.
e can also activate and deactivate our custom routine from VOFM as:
Depending upon the action the TRFM or TRFMT entries gets updated automatically as:
http://scn.sap.com/servlet/JiveServlet/showImage/282535/Capture.JPGhttp://scn.sap.com/servlet/JiveServlet/showImage/282534/Capture.JPG
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
19/24
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
20/24
Like (0)
Like (0)
Pradeep Mani Dec 11, 2013 7:56 AM
Good work,thanks for posting this.
What will be the use of having fixed value date equal to billing date.
Like (0)
Ravin NK Dec 12, 2013 12:50 AM (in response to Pradeep Mani)
That way we are just controlling that the customer's due date to pay the invoice starts on the
day he was billed.
Like (0)
Debopriya Ghosh Oct 4, 2013 3:07 PM
Helpful document.....
Like (0)
Mahe jyothi Oct 5, 2013 7:30 AM
good work.. really helpful
Like (0)
Vijay Simha Dec 11, 2013 7:05 AM
Very good.Can you p lease let me me know more abo ut this VOFM's if you have any do cument please
share it with me .
Eduardo Hinojosa Dec 19, 2013 3:37 PM (in response to Vijay Simha)
Hi
I can suggest you these notes
SAP Note 156230 - Requirements: What is permitted, what is not?
SAP Note 22808 - Transferring formulas
SAP Note 326560 - Various problems when using VOFM functions
SAP Note 356737 - Customer name range for VOFM routines
SAP Note 381348 - Using user exit, customer exit, VOFM in SD
SAP Note 327220 - VOFM function and its obj ects
http://-/?-http://-/?-http://scn.sap.com/people/eduardo.hinojosahttp://-/?-http://scn.sap.com/people/vijay.simhahttp://-/?-http://scn.sap.com/people/mahesh.jyothihttp://-/?-http://scn.sap.com/people/debopriya.ghosh4http://-/?-http://-/?-http://scn.sap.com/people/ravin.nkhttp://-/?-http://scn.sap.com/people/pradeepmani
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
21/24
Like (1)
Regards
Eduardo
Like (0)
madhu kumar Mar 19, 2014 7:06 AM (in response to Eduardo Hinojosa)
Thank you very much your suggession and it is really he lpful ....
Like (0)
Deep K Dec 19, 2013 2:20 PM
Hi Mohammed,
Very useful document for those are not worked wi th copying routine.
Thanks,
Deep.
Like (3)
Eduardo Hinojosa Dec 19, 2013 2:43 PM
Good job, but your document needs a comment. The range for VOFM according Note 327220 - VOFM
function and its objects in "2.2 Namespaces" is for FOFU (this case from 900 to 999), in detail:
Subsequent functions from 900 to 999 (FOFU this case)
Group key routines from 50 to 99
Data transfer routines f. texts from 50 to 99
all other indicators from 600 to 999
Regards
Eduardo
Like (0)
varun yadav Dec 30, 2013 4:31 PM
Nice.
Helpful.
Rampe V Feb 6, 2014 4:45 AM
Hello Mohammed Khurshed,
http://scn.sap.com/people/mohammed.khurshedhttp://-/?-http://scn.sap.com/people/giddalur.r2http://-/?-http://scn.sap.com/people/varun.saphttp://-/?-http://scn.sap.com/people/eduardo.hinojosahttp://-/?-http://scn.sap.com/people/deep.khanrahttp://-/?-http://-/?-http://scn.sap.com/people/madhukumar.lakshmana
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
22/24
Like (0)
Useful document.
Thank You.
Like (0)
Siva Prasad Vasireddy Mar 7, 2014 10:16 AM
This is Very Helpful Document
Like (0)
madhu kumar Mar 19, 2014 7:02 AM
Hello Mohammed Khurshed,
Your Explanation is very clear and easily understandable and Document is very helpful.
Continue the good work.....
Thanks and Best Regards,
Madhukumar
Like (0)
Fazhlay Elahi Apr 7, 2014 5:45 PM
very useful document
Like (0)
Syed Mehtab Jan 8, 2015 6:06 AM
Hi, very helpful document.
i loo k forward to other scenarios based VOFM
Thanks
Like (0)
George Ressos Jan 8, 2015 8:20 AM
Very good and helpfull document.
http://-/?-http://scn.sap.com/people/george.ressos2http://-/?-http://scn.sap.com/people/syed.mehtabhttp://-/?-http://scn.sap.com/people/fazhlayhttp://-/?-http://scn.sap.com/people/madhukumar.lakshmanahttp://-/?-http://scn.sap.com/people/siva.vasireddy2
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
23/24
Like (0)
SANJIT BHATTACHARYA Jan 8, 2015 12:02 PM
Very good document waiting for more such kind of do cuments.
Like (0)
ABAP-SOFOS S0012820640 Apr 21, 2015 3:44 PM
Very good document, thanks for sharing, it was usefull.
Like (0)
Anbuselvan SD May 5, 2015 1:53 AM
Hi Mohammed,
Thank you for the well illustrated document. It would b e helpful for newbie's like myself. But I am
unable to understand the business need to fill the fixed value date (VBKD_VALDT) with thebilling reference date (VBRK_FKDAT). In what scenario, the business would like to have this kind of requirement.. since we have a field
called service rendered date..
http://scn.sap.com/servlet/JiveServlet/showImage/105-586133-697915/sap+sd+1.JPGhttp://-/?-http://scn.sap.com/people/sap.sd4http://-/?-http://scn.sap.com/people/victor.galuehttp://-/?-http://scn.sap.com/people/sanjit.bhattacharya
-
8/17/2019 1. Creating VOFM Custom Routine, Functionality Sam..
24/24
Follow SCNSite Index Contact Us SAP Help Portal
Privacy Terms of Use Legal Disclosure Copyright
Like (0)
Tanmay Verma Aug 3, 2015 12:26 PM
Very well documented. Thanks a lot.
Like (0)
VENKATA RAMIREDDY KONDURI Aug 3, 2015 1:10 PM
Hi , very usfull document . thanks alot for sharing ..
Regards
venkata rami reddy konduri
Like (0)
Aspire WF Jan 27, 2016 3:36 PM
Mohammed,
Extremely helpful. Great post! Thanks a lot for sharing. BR,
Aspire
Like (0)
Santhanakrishnan Arumugam Apr 29, 2016 8:40 AM
Hi,
Great post keep going, Good Luck
http://-/?-http://scn.sap.com/people/mmskrishnanficohttp://-/?-http://scn.sap.com/people/aspire.wfhttp://-/?-http://scn.sap.com/people/venkataramireddy.kondurihttp://-/?-http://scn.sap.com/people/tanmay.verma2http://www.sap.com/corporate-en/our-company/legal/copyright/index.epxhttp://www.sap.com/corporate-en/our-company/legal/impressum.epxhttps://accounts.sap.com/ui/public/viewTextResource?scenario=SCN&spId=504efd8ee4b0555c3c17b94e&resourceType=RESOURCE_TERMS_OF_USE&version=1&spDisplayName=SAP%20Community%20Network&locale=enhttps://accounts.sap.com/ui/public/viewTextResource?scenario=SCN&spId=504efd8ee4b0555c3c17b94e&resourceType=RESOURCE_PRIVACYPOLICY&version=1&spDisplayName=SAP%20Community%20Networkhttp://help.sap.com/http://scn.sap.com/docs/DOC-18476http://scn.sap.com/docs/DOC-19361http://spr.ly/SCNgoogleplushttp://bit.ly/SCNyouThttp://bit.ly/SCNFBhttp://bit.ly/SCNTwR