Skip to Content
0
Former Member
Apr 09, 2008 at 10:44 PM

Formula calulation in SQ01 in Queries areas

630 Views

Hi Gurus

There is a field VBGEL which is Ref No , I want to modify in SQ01.

The name of VBGEL in short fields is REF .I have created a display field ACTUAL_PR

which stores the qty * st_price.

I wrote a formula in SQ01 by going to Edit- changes

Short name = ACTUAL_PR

Under

Calculation Formula

INV_QTY * ACT (which will calculate qty x st price and display the result in ACTUAL_PR ).

Now my requirement is I want to write a formula For actual price .

I want the Actual price to display as zero where VBGEL starts with 6* (credit) AND 7* (debit) in my report.

So when I run the report the report , Actual price = INV_QTY * ACT should shows ' 0 ' value and rest ref starts from 8* ,9* etc., should shows the value as it is.

How can I write a formula so that ACTUAL_PR should be 0 where VBGEL starts with (REF) = 6* AND 7*

REF = VBGEL

if REF = 6* ANA 7*

ACTUAL_PR = 0

ELSE

ACTUAL_PR = INV_QTY * ACT

ENDIF.

how can write the condition in SQ01 under queries this formula.

Thanks for your help in advanced

regards

Piros