cancel
Showing results for 
Search instead for 
Did you mean: 

Subroutine IN VTFL

Former Member
0 Kudos

Dear Gurus,

I am using a freight condition type as a header condition, The user has added freight in the price initially at the time of sales order creation, later on suppose the user wants to subtract the freight value at the time of invoice creation after the customer tells that CIF will be not borne by him and rather it should be borne by the company itself.

The requirement from the user side is that the amount should be distributed equally to all the line items.

For example, in the invoice there are three line items whose total value of all line items is 1000$(USD) and the total quantity of all line items is 10 shippers (cartons).

What is happening is that suppose I am splitting the batch and my line items will become 6, its subtracting in all the six line items. even including the zero line.

I want to create a subroutine for that in the copy control VTFL. for the item category (TAN) where It should skip the line whose quantity is zero.

please guide me, where do and how will create a subroutine.

Thanks & Regards

Anand K

Accepted Solutions (0)

Answers (2)

Answers (2)

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

In internet there a PDF document. Search it with this string in google: INSIDE VOFM ext:pdf.

It explain how to do it, when to do it, and so on.

I hope this helps you,

Regards,

Eduardo

Edited by: Eduardo Hinojosa on Sep 22, 2009 1:06 PM

Shiva_Ram
Active Contributor
0 Kudos

Hi,

It looks like you don't need to create a seperate routine to resolve the issue.

Normally the frieght value is based on the weight of the line item or quantity of the line item.

So in order to have equal distribution of the frieght cost among the line items, just assign the rountine number under the column AltCBV against the condition type in the pricing procedure (SPRO -> sales and distributoin -> Basic functions ->Pricing -> Pricing control -> Define and assign pricing procedures).

For example if you want to spread the freight cost based on weight, then assign rountine 13 netweight.

If any of the standard routines does not suit your requirement, then you can develop your own routine in T.code VOFM , under menu Formulas-> Condition base value.

Regards