Skip to Content
avatar image
Former Member

Center Alignment for value of a field in SAP SCRIPT!

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 20, 2010 at 10:17 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 20, 2010 at 04:12 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 20, 2010 at 10:59 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 23, 2010 at 05:20 PM

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

    Add comment
    10|10000 characters needed characters exceeded