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

VOFM-Formula -Scale basis - needs help

Former Member
0 Likes
1,001

Hi All,

I have created a formula (no.600) using tcode VOFM,under Formula-Scale basis.Activated and assigned this formula in V/06,under 'Scales' -- (G-Scale based on a formula),

and scale formula = 600.

Can any body help me calling my formula in VA01 transaction.

I need to update discount with 2 scales.

Upto item quantity 4,no discount

From 5 to 100,discount of 2.000 $

From 101 and above ,no further discount

My code in formula is as follows:

===========================================

FORM FRM_STAFFELBAS_600.

IF KOMP-MGAME < '5.000'.

XKWERT = 0.

ELSEIF KOMP-MGAME < '100.000'.

XKWERT = 2 * KOMP-MGAME.

ELSE.

XKWERT = 2 * 100 .

ENDIF.

ENDFORM.

(Currently i have hard coded the docnt amount as '2').

============================================

The value XWERT is getting filled correctly and displaying correctly on the sales order screen-conditions,till quantity is 100.

But,it is not showing correctly when quantity is more than 100.

Please help me.

Thanks in advance.

Seshagiri.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
832

HI

<b>FORM FRM_STAFFELBAS_600.

IF KOMP-MGAME LT<b>(<)</b> '5.000'.

XKWERT = 0.

ELSEIF ( KOMP-MGAME GE '5.000' and KOMP-MGAME LT '100.000'.

XKWERT = 2 * KOMP-MGAME.

ELSE.

XKWERT = 2 * 100 .

ENDIF.

ENDFORM.</b>

Regards

Peram

FORM FRM_STAFFELBAS_600.
IF KOMP-MGAME LT(<) '5.000'.
XKWERT = 0.
ELSEIF ( KOMP-MGAME GE '5.000' and KOMP-MGAME LT '100.000'.
XKWERT = 2 * KOMP-MGAME.
ELSEIF KOMP-MGAME GE '100.000'.
XKWERT = 2 * 100 .
ENDIF.
ENDFORM.

Regards

Peram

5 REPLIES 5
Read only

Former Member
0 Likes
833

HI

<b>FORM FRM_STAFFELBAS_600.

IF KOMP-MGAME LT<b>(<)</b> '5.000'.

XKWERT = 0.

ELSEIF ( KOMP-MGAME GE '5.000' and KOMP-MGAME LT '100.000'.

XKWERT = 2 * KOMP-MGAME.

ELSE.

XKWERT = 2 * 100 .

ENDIF.

ENDFORM.</b>

Regards

Peram

Read only

0 Likes
832

Hi,

Tried,but still the same problem.

(Both my previous code and code modified by you are working exactly same).

I mean value '100' is getting assigned to XWERT correctly, when qty. is GT 100,from both of our codes.

But ultimately in my sales order conditions screen,discount is not getting stopped after qty. crosses 100.

Thanks & Regards

Seshagiri.

Read only

0 Likes
832
FORM FRM_STAFFELBAS_600.
IF KOMP-MGAME LT(<) '5.000'.
XKWERT = 0.
ELSEIF ( KOMP-MGAME GE '5.000' and KOMP-MGAME LT '100.000'.
XKWERT = 2 * KOMP-MGAME.
ELSEIF KOMP-MGAME GE '100.000'.
XKWERT = 2 * 100 .
ENDIF.
ENDFORM.

Regards

Peram

Read only

Former Member
0 Likes
832

Hi,

Thanks for the pains you have taken in attempting to give me solution.

However our functional guy has solved in configuration.

Thanks & Regards

Seshagiri

Read only

0 Likes
832

Hi, can you tell me how does him solve it?