Skip to Content
avatar image
Former Member

Passing values to formula

Hi All,

Is there any function module to create and read formula?Here I need to calculate the price for purchased material.i am using formula to calculate price.Each tax code having its won formula.

I would like to store these formula in z-table and use it in my program.So there is no need to change my program when changes occurs.My Question is how to read this field value as formula?.........for reference refer the table tc25.

example: (pb00+jin2) / menge.

pb00 - base value,

jin2- service tax,

menge -quantity.

How should i pass the value to pb00,jin2 and menge.

Let me know if there is any doughts in my questions. It will be geartful if u share ur ideas with me pl.

Thanks in Advance!!!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 16, 2008 at 04:27 AM

    hi,

    you should use subroutine like this...

    suppose you have to add two no.

    then .

    PERFORM ADD USING A

    B.

    form ADD USING AA type i

    BB type i.

    data :cc type i.

    cc = AA + BB.

    endform.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 04:46 AM

    Hi,

    I can suggest you to create a function module which gets taxcode, pb00, jin2, menge and your logic should validate taxcode and according to that corresponding formulas should be executed and the result is returned using a export parameter.

    You can use that FM in all your programs as well as if there is any change in the formula, only change is need in Function module calculation logic.

    Regards

    Karthik D

    Add comment
    10|10000 characters needed characters exceeded