cancel
Showing results for 
Search instead for 
Did you mean: 

SQ01 : Percent Formula (Local Field) Value not correct

Former Member
0 Kudos

Hi Guru,

i am try to create a Report for the Production Variance Analysis in term of

Component Quantity - Required and Withdrawn

i use two field as local field for the as;

           FIELD                            FORMULA                       REMARKS                                                                                                                  

  • VAR_QTY                          B - A                               Where 'A' is Required Qty, and 'B' is Withdrawn qty, and its output value is OK (169.585)
  • VAR_PER                          (VAR_QTY / A ) * 100       This is for difference value in Percent (%), but is system giving out 0.000, instead of (3.972)

additional setting of 'VAR_PE' is shown in Screen shot.

Additional Information:

Table  -

Order item                                     - AFPO

Resevation Dependent Requirement - RESB

Material Description                        - MAKT

pls revert ASAP, thanks in Advance

regards

Muhammad Shoaib

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gurus',

i am waiting to solution (how to create the Field Group and it assignment) i sure this the final touch to close this issue. else i have done every possible solution above and and from my mind.

looking for the prompt and positive solution=

regards

Muhammad shoaib

Former Member
0 Kudos

Create an infoset in SQ02, then create a Query using that infoset in SQ01. I am not aware what all fields are being used in the report, so in the infoset you can just use RESB table. Then rest of the info. of how to create the custom field in SQ01 is already provided, so do a test with that.

Former Member
0 Kudos

Hi,

thanks a lot to all guru who help me in this issue, esp the "Vivek",

regards

Muhammad Shoaib

Answers (1)

Answers (1)

Former Member
0 Kudos

Muhammed,

I suspect your VAR_PER formula calculates a zero because B - A is negative.

Best Regards,

DB49

Former Member
0 Kudos

Hi Dogboy,

Thanks for the response, i change the formula accordingly to take the result of VAR_QTY in +ve value, (now is A - B), even though the result remain same = 0 (zero).

I deleted the both local field create newly, no impact , pls guide.

regards

Muhammad Shoaib

Former Member
0 Kudos

Muhammad,

The formula itself, although illogical from a business perspective, should give you some VAR_PCT other than zero.

One thing I notice is that you are comparing several different units of measure.  Percentages should be a comparison of two numbers, not two quantities.  I don't know if this is your problem, but I would not create such a formula if I were writing this report.

Instead, I would create AA and BB local fields.  AA & BB should be 'calculation fields', say 8 digits 3 decimals, or whatever makes sense in your environment.  Formula for AA is 'A';  Formula for BB is 'B'.  Now replace 'A' and 'B' in your  VAR_QTY and VAR_PCT with AA and BB.

Best Regards,

DB49

Former Member
0 Kudos

The field which you have defined has to support 'sign'. In this case if am right you have made the reference as requirement quantity, that field does not support sign.

Do the changes & you should be able to see the value.

Former Member
0 Kudos

Hi Vivek,

thanks for the response, i have change that to, and set it as "Calculation field with 3 digit and 2 deci, even though same result,

regards

Muhammad Shoaib

Former Member
0 Kudos

Hi Dogboy,

thanks again for your guidance, i tried your suggestion but no use, i even try the formula with original value as ;

( ( 4163.030 - 3850.000 ) / 4163.030 ) * 100     =   0.000

with Calculation Field  = D - 6 & Deci - 3

result remain same 

regards

Muhammad Shoaib

Former Member
0 Kudos

Please re-read what I have said. I said sign (i.e. + or -), not a number with decimal.

sjeevan
Active Contributor
0 Kudos

It doesn't matter what field you use as reference as long as it can accommodate packed number, in your case field A definitely can accommodate a packed number.

I'm not sure what you're doing wrong but your formula seems perfectly fine.

Here's a working example:

Former Member
0 Kudos

(A - B) will work, but if you notice the formula being used by Mr. Shoaib is (B - A) which seems to be the need in their business context.

Former Member
0 Kudos

Hi Vivek,

sry to misunderstanding, i have already also that, even the i have also use direct value instead in reference field. i.e. (no -ve value or sign) ;

( ( 4163.030 - 3850.000 ) / 4163.030 ) * 100     =   0.000

with Calculation Field  = D - 6 & Deci - 3

anyways thanks for your response and guide

regards

Muhammad Shoaib

sjeevan
Active Contributor
0 Kudos
Former Member
0 Kudos

Mr. Jeevan, agree with what you've posted.

But as per my initial posting the field which Mr. Shoaib has referenced might not be supporting the sign. If you re-look at the screenshot of the field definition I suspect the culprit is the Field Group, in turn it might be calling for a field which does not support signs.

sjeevan
Active Contributor
0 Kudos

Vivek Seelin wrote:

Mr. Jeevan, agree with what you've posted.

But as per my initial posting the field which Mr. Shoaib has referenced might not be supporting the sign. If you re-look at the screenshot of the field definition I suspect the culprit is the Field Group, in turn it might be calling for a field which does not support signs.

I suspected that too, but the OP mentioned in the later replies that he used as simple packed format of 6 digits and 3 decimals and still not working, so I think the problem might be somewhere else or maybe he's has duplicate fields in two different field groups and in one there is no formula, but I'm not sure.

Former Member
0 Kudos

Check the field group in your definition. Refer it to RESB, then it should work just fine as shown by Mr. Jeevan

Former Member
0 Kudos

hi Jeevan,

thanks a lot for the response, now i am much close the solution through your hint, as i am SAP PP functional Consultant, i am not much aware of technical in SQ01 or SQ02, pls guide me through how to create now Field Group in SQ02, and how to set field in it, and further required details

regards

Muhammad Shoaib

sjeevan
Active Contributor
0 Kudos

If one of your custom field (A-B) is working, this variance field should work too. I suggest you create a fresh field, with format as 6 digit and 3 decimals, try it again.

You add the local fields directly in the query (SQ01) and try again.

Former Member
0 Kudos

Hi,

Boss i have tried even you original value, my step are as follow,

  1. Create SQVI report
  2. Convert it into QuickView, in SQ01
  3. now add Local Fields, (where A - B with reference field "A" & Field Group Default and its works fine, not work with  per cent formula field.

Calculation:

( ( 4163.030 - 3850.000 ) / 4163.030 ) * 100     =   0.000

with Calculation Field  = D - 6 & Deci - 3

regards

Muhammad Shoaib

Former Member
0 Kudos

Muhammad,

I just duplicated your test using actual values in my current system, and I do not get zero.

I suggest that you may have not inserted spaces in your forumula where necessary.

Best regards,

DB49

Former Member
0 Kudos

Hi,

also check that thing too. , till i found the issue is with Field Group

regards

Muhammad Shaoib