Application Development and Automation 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: 
Read only

SAP SCRIPT

Former Member
0 Likes
785

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.

7 REPLIES 7
Read only

Former Member
0 Likes
570

Hi,

Change that variable as a character string and move it to layout from print program.

Regards,

Nandha

Read only

0 Likes
570

write like this...

<b>&var(<)&</b>

Read only

0 Likes
570

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

Read only

0 Likes
570

I tried &var1(<)&. This is not working.

Read only

dani_mn
Active Contributor
0 Likes
570

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

Read only

Former Member
0 Likes
570

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

Read only

Former Member
0 Likes
570

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..