Application Development 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: 

Number are not adding up in custom report

Former Member
0 Kudos
233

I have a custom report and I have noticed that it is not adding up since the "-" is behind the number and not in the front. How can I change the numbering format in the column "Pre Tax Amt"? The total is supposed to be in the "Pre Tax Totals" and it is coming out to zero all the time.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
188

Hi,

If you are using standard reference field for the amount column displayed in the custom report, then totaling it shouldn't be any problem ideally. If you want to try adjusting the '-'ve sign you can make use of SHIFT-- RIGHT CIRCULAR.

Regards,

Rohan

14 REPLIES 14

Former Member
0 Kudos
189

Hi,

If you are using standard reference field for the amount column displayed in the custom report, then totaling it shouldn't be any problem ideally. If you want to try adjusting the '-'ve sign you can make use of SHIFT-- RIGHT CIRCULAR.

Regards,

Rohan

0 Kudos
188

I tried that but it's giving me an error "PRE_TAX" must be a character-type field (data, C, N, D or T).

*        pre_tax(9) type p decimals 2, "03/27/03pj must be a char data
*                                                  obj
*        pre_tax(6) TYPE P DECIMALS 2,
*        PRE_TAX type n,
*        PRE_TAX(15), "02/16/2016 ShawnR
          PRE_TAX     TYPE P DECIMALS 10 VALUE '000.0001-',
*        PRE_TAX(10) TYPE C,

Jelena_Perfiljeva
Active Contributor
0 Kudos
188

I have noticed that it is not adding up since the "-" is behind the number and not in the front.

How exactly did you arrive at such conclusion?

This is the standard SAP format (Excel doesn't like it though). As long as you assign the correct data types to the fields being summarized and to the total field, simple summation should work just fine. (By the way, if you have positive and negative amounts then total could also be 0.)

Sorry, but this seems like one of those questions that can be easily answered by debugging and using simple logic. You might want to make a bit more effort before posting such questions on SCN, going forward.

0 Kudos
188

Quite right. The minus sign coming after the number is fairly basic to ABAP programming.

former_member197916
Active Participant
0 Kudos
188

Hi,

Using SAP standards there will be no problem in addition of fields,please check your logic.If you want to display the sign in front fm ‘CLOI_PUT_SIGN_IN_FRONT’ will suffice your requirement but you would need to convert your field to char because the fm uses basic string operations.

Hope it helps

Former Member
0 Kudos
188

Hi Shawn,

From which table are you fetching these values ? Can you check if there is debit/credit indicator there ( field SHKZG). this field will have values H - credit and S - debit.

This may help you with your calculations.

Regards

Meenakshi

former_member185537
Participant
0 Kudos
188

Hi Shawn,

Abishek is right. You can do either of it only. The sign in front works only with Character types and hence you cannot sum up. If you maintain number format, sign in front cannot be done. Check with the user on which one is preferred.

0 Kudos
188

Pras Venkat wrote:

Check with the user on which one is preferred.

Don't you mean 'Check with the user to see what he wants to do with the report ?'  He might prefer the sign to be in front but also want to sum the column....

Also Shawn,  numbers are generally right justified so that the decimal points line up.

Rich

former_member185537
Participant
0 Kudos
188

Richard has just repeated my post. The number displays sign at last which I said. It is better to confirm on choosing either of it

0 Kudos
188

Pras Venkat wrote:

Richard has just repeated my post.

No, he didn't. Instead of asking "where do you want your minus sign?" we need to ask "what do you want to achieve with this?".

Anyway, it's probably best to wait for OP to reply here. For all we know he might have moved on already, just didn't close the thread.

0 Kudos
188

Thank you Madamoiselle.

0 Kudos
188

I was half expecting an abuse report!

0 Kudos
188

Who Moi ??

0 Kudos
188

No - that you'd be the subject of one-