Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

problem with VOFM

0 Kudos

Hi experts,

please someone elaborate me how to create a VOFM routine because when i want to create a new routine a popup with SAP access key appears.

I have search and read some threads with this subject but i did not understand how works.

I saw that almost each routine has few CHECK intstructions.

And because an example is like 1000 words, please someone explain this simple VOFM routine:

* Pricing for free goods (100%-discount)
form kobed_055.
  sy-subrc = 4.
  if komp-kposn ne 0.
    check: komp-prsfd eq 'B'.
  sy-subrc = 0.
* Prestep
form kobev_055.
  sy-subrc = 0.

Thank you.


Former Member
0 Kudos

The procedure to create the new VOFM.

1. Go to VOFM transaction

2. Page down until you find a new spot on the page to put in the VOFM number and description.

3. Put in the VOFM number and the description of the VOFM.

4. Now the VERY IMPORTANT part of the process. Double click on the VOFM description not the VOFM number to create this as a Development/Correction and not as a repair. If you double click on the number then this copies some existing code and prompts you for a repair.

5. Activate and generate the VOFM routine. Note: Configuration must be setup by the OM team for this step.

for example Go to the routine number that needs to be copied.

Put your cursor on the routine number field that needs to be copied.

Overwrite that number with your new routine number and hit enter.

The new routine will be created as a copy of the old routine and you can modify the new routine as you need it.


You have to copy routine 104 to 904

Routine number Description Active

104 Bill.bus.item data X

Put your cursor on 104 and then change it to 904 and hit enter.

904 will be created as a copy of 104 and you can make your changes in 904.

Don't forget to activate it after you are done.

Thanks & Regards,


0 Kudos

it is not working.

Active Contributor
0 Kudos

[VOFM's in SD and more info >>>>|]

Former Member
0 Kudos

Hi Dan,

Check this site to have an idea on how to create a new routine.



Former Member
0 Kudos


Check this below link


Jyothi CH.

0 Kudos

i can't create the new routine because i need a access key...

There is no other possibility to create a routine?

0 Kudos

Access key is must for creating routines in vofm.

Ask ur basis to request one from SAP.


Former Member
0 Kudos

VOFM routines....

The initial value is SY-SUBRC = 4.

Means that this price condition or output type should not be used...

But if you managed to get through all the abap will end up in a SY-SUBRC = 0 and the price condition or output type will appear in your procedure.

OK ?