‎2006 Jun 16 6:09 AM
I have a veriable 'var1' which holds a negative value. Im passing this variable to Sap Script through element to display the value. But its not displaying the -ve sign in the script display. In text element the variable is given as &var1& in the stardard paragraph.
‎2006 Jun 16 6:23 AM
Hi,
Change that variable as a character string and move it to layout from print program.
Regards,
Nandha
‎2006 Jun 16 6:25 AM
‎2006 Jun 16 6:35 AM
Hi,
Thanx Nandha. The -ve sign is coming, but im losing the output format. For eg '996,108,285.50-' is getting displayed as '996108285.50-' when i convert the type to character. Any suggestions.
Rajiv
‎2006 Jun 16 6:40 AM
‎2006 Jun 16 6:33 AM
Check the data type of your variable and check wheather data element allows negative sign,
Because you don't have to do any formatting in sapscript for displaying negative if you want to omit sign then the mask is &var1(S)& but if you want display then write simply &var1&.
check the data type and try to make it currency type betrg.
Regards,
Wasim Ahmed
‎2006 Jun 16 6:49 AM
HI
GOOD
CHECK WITH THE DRIVER PROGRAM FROM WHERE YOU R PASSING THE VALUE.
THE TEXT ELEMENT IS ONLY TO PRINT THE VALUE, THAT VALUE MAY BE THE POSITIVE VALUE OR THE NEGATIVE VALUE.
THANKS
MRUTYUN
‎2006 Jun 16 7:20 AM
Hi Rajiv,
it may also be due to the excess length of the variable,declare ur variable with sufficient length and then try printing the same in sapscript..
in sapscript, use something like
&var(20)&
hope it helps..