Skip to Content
avatar image
Former Member

Issue with header condition type in VOFM Routine Formula

Hello Gurus,

Hope you are all having a great day.

I created a formula (Routine) in VOFM which was applied to pricing procedure.

It was working fine until i found out during testing that when a particular header condition type

(which is a part of the formula) has no value, the formula is not executed, even though this condition

type is not mandatory.

In other words, the formula only works when this particular header condition type is entered in the sales document.

Could anybody please tell me, what could be the reason for this issue?

*I checked with the ABAPer who did the routine creation,

but have not found out the reason for this problem.

Thank you.

Ahm

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    May 29, 2014 at 08:19 PM

    Hello Ahm,

    can you please share your pricing procedure? take a snap shot of v/08 your pricing procedure? Another thing I would recommend is review your routine carefully and see if there is any logic associating with the condition type you talked about.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2014 at 05:59 PM

    Hi Ahm,

    Could you please provide details on that condition written in the routine. Is it a value from header pricing structure (net value or sub total etc) ?. If yes, then check the pricing procedure which is supposed calculate or populate this field value.

    Regards,

    Satya

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for your swift reply, Satya.

      Its a header condition type (freight) for quotation document.

      Its a part of a formula in a routine (which consists of other condition types) and is supposed to populate a value in a subtotal field in pricing procedure.

      But this formula only works if this particular

      condition type has a value and its a problem because this condition type will not

      always be entered in the document, its not  a mandatory condition type.

      The formula is dependent on this condition type and i'm not sure why.

      Thanks.

      Ahm.

  • May 29, 2014 at 08:59 PM

    Maybe I'm missing something, but it seems quite logical that formula is not called when condition does not exist. Formula is meant only to calculate the value of the condition, not to add the condition itself. If you need the condition to be added programmatically then use a user exit / enhancement.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2014 at 09:33 PM

    Thanks guys for your responses.

    I found the root cause, there was a statement in the

    routine, which made it impossible for the formula to work

    if the condition type had no value:

    "IF GV_ZD00 IS NOT INITIAL"

    The abaper i worked with took it out and now its working fine.

    Thanks

    Ahm

    Add comment
    10|10000 characters needed characters exceeded