cancel
Showing results for 
Search instead for 
Did you mean: 

SAPScript - center and align the value

Former Member
0 Kudos

Hello everyone,

I am trying to print a value, for eg. 100.00 in a SAP script.

I want it to be displayed as 100 and left justified into a box which is also to the left of the Main window. I tried &symbol(C)&, this is just centering the value and &symbol(.0)&, this is ignoring the decimal. How can I achieve both?

When I have boxes and data, how do I get the data into appropriate boxes?

/: BOX.....

ST field

/: BOX.....

ST field

This is how I did it, but in case the first value is blank the second value will move up. I don't want it to happen. Please help me with both the issues.

Thanks in advance,

Mohana.

Moderator message - One question per thread please

Edited by: Rob Burbank on Feb 1, 2010 12:15 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

All the symbols other than numeric values are Left-Justified. So just declare an variable of char type pass the value into the new variable just before printing it and then print the new variable.

Br,

Laxmi.Suryadevara

Former Member
0 Kudos

1) Specify left justified for that particular tab stop in the paragraph format.

2) Use the XPOS and YPOS parameters to dynamically specify the position of your box.

Rob

Former Member
0 Kudos

Hi Rob,

As it is one question per thread. I will concentrate on the second one.

My boxes are fine. I have them in place. its the data in the boxes.

when I have 4 values in the boxes and if first value is blank then the rest of the three values move up and take wrong places. Hope I am clear.

Regards,

Mohana.

Former Member
0 Kudos

Hi Mohana,

can you try keeping condition. Keep the variable in the If condition , if there is no data try using SPACE.

If this is not working check your paragraph format. Settings in the paragraph format has one option allow blank spaces. It has to be unchecked.

Br,

Laxmi. Suryadevara.

Former Member
0 Kudos

Check for the values you are printing with IF Condition.

If it has value print it & if it is blank, then print empty space.