cancel
Showing results for 
Search instead for 
Did you mean: 

Center Alignment for value of a field in SAP SCRIPT!

Former Member
0 Kudos

Hi All,

I need to align 6 fields using center alignment in SAP Scripts.

I mean center as the value should adjust it self like <---VALUE----> based on the the staring length.

I used all the oprions like paragraph with Center align and fileds like filed(20).

I also used TAB positions for each of the six fields.

It was easier in adobe forms by specifying value -> Center but seem to have no options for scripts.

Please help me resolving this.

Regards,

Pratyusha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use a paragraph format with Center alignment.

There may be more spaces in the field so it's not able to print on center.

Use below statement to remove unnecessary spaces:

SHIFT P_CHAR_VAL LEFT DELETING LEADING ' '.

If the field is integer then you can pass the values in the Char field and use above statement to remove the spaces.

So It will print on center of the field.

Edited by: Aparna Kagale on Sep 20, 2010 12:20 PM

Answers (3)

Answers (3)

Former Member
0 Kudos

I have used CONDENSE keyword and used LEFT alignment for paragraph, but defined TAB spaces with CENTER alignment. Thanks to all of you.

Former Member
0 Kudos

Hi there,

are you really sure you want to align values by center? When talking of values, people are used to have them either right aligned or aligned by decimal, so that according digits are underneath each others. This makes values much better comparable on a short view.

I wouldnt change such a essential thing.

Former Member
0 Kudos

Hi,

If it is number type it will always right alignment. So you need to convert it to character format while writing the variable use this syntax &variable(C)& try like this your problem may get resolved.

Regards,

Jagadeesh T.