This website is not affiliated with, sponsored by, or approved by SAP AG.

How to indicate a negative sign next to all values

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

How to indicate a negative sign next to all values

Postby Alicealice » Thu Dec 29, 2011 12:03 am

Dear All,

I would like to know how to indicate a negative sign next to the values?

Example:
1234 - (add negative sign when it is positive value)
1234 (no negative sign if it is negative value)

Could someone guide me please?

Thanks.
Alicealice
 
Posts: 72
Joined: Sun Oct 02, 2011 11:52 pm

Re: How to indicate a negative sign next to all values

Postby Rich » Sat Dec 31, 2011 5:32 am

Do you also have the Debit/Credit indicator SHKZG available ?

If so then just multiply the value by -1 dependant on the value of SHKZG S or H). If not then a simple if statement followed by a ultiplication would do the trick.
Regards

Rich

Image
Abap KC:http://www.richard-harper.me.uk/Kb
SFMDR:http://www.se37.com
Rich
 
Posts: 7112
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool

Re: How to indicate a negative sign next to all values

Postby Alicealice » Mon Jan 02, 2012 4:50 pm

Hi,

I'm not able to find the Debit/Credit indicator SHKZG, I don't think
it is available.

Below is one of code in my sapscript.
<H8><B>&'Total TVA 'PER1(2)'%'&,,</></>,,,,<H8>&v_vatamt_ch&</>

Could you please look into this problem? Could you provide an example?

Thanks.
Alicealice
 
Posts: 72
Joined: Sun Oct 02, 2011 11:52 pm

Re: How to indicate a negative sign next to all values

Postby Rich » Tue Jan 03, 2012 2:05 am

Hmmm,

Well, you could've said it was Sapscript in your original post.
Regards

Rich

Image
Abap KC:http://www.richard-harper.me.uk/Kb
SFMDR:http://www.se37.com
Rich
 
Posts: 7112
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool

Re: How to indicate a negative sign next to all values

Postby Gothmog » Tue Jan 03, 2012 2:06 am

I'm moving this to the Sapscript/Smartform forum.
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1941
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: How to indicate a negative sign next to all values

Postby abaper2009 » Sun Jan 29, 2012 10:50 pm

i face the same problem and here is the answer, hope its help
Leading Sign to the Left
The leading sign is normally displayed to the right of a numeric value, except in
the case of a floating point number. This option enables you to specify that the
leading sign should be placed to the left of the number.
Syntax
&symbol(<)&


we just put '(<)' sign in our variable or symbol

:D

http://www.google.com.my/url?sa=t&rct=j ... H9nB6ix3FA
abaper2009
 
Posts: 5
Joined: Sun May 17, 2009 9:24 pm

Re: How to indicate a negative sign next to all values

Postby messki678 » Mon Apr 23, 2012 4:33 am

hi,
i think so we do (-<) what you say?
messki678
messki678
 
Posts: 1
Joined: Mon Apr 23, 2012 4:31 am


Return to SAPscript/Smartforms

Who is online

Users browsing this forum: No registered users and 2 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.