Application Development 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: 

How to align the number to the right

Former Member
0 Kudos

Hi,

Can anybody tell me ,

1. if the field is related to number, align the value to the right and complete it to the left with 0.

2. if the field is related to description, align the value to the left and complete it with "spaces".

Please reply ASAP.

Thanks,

Madhu

1 ACCEPTED SOLUTION

former_member156446
Active Contributor
0 Kudos

We have to use the following parameter to solve ur problem check it once..

wa_fileldcat-just = 'R' , " R :Right , L : Left , C : Center

append wa_filedcat to LVC_S_FCAT.

3 REPLIES 3

former_member156446
Active Contributor
0 Kudos

We have to use the following parameter to solve ur problem check it once..

wa_fileldcat-just = 'R' , " R :Right , L : Left , C : Center

append wa_filedcat to LVC_S_FCAT.

uwe_schieferstein
Active Contributor
0 Kudos

Hello Madhu

If a field has a numeric type its contents is, by default, right-aligned.

If a field has a alphanumeric type its contents is, by default, left-aligned.

In order to remove leading spaces (2) you can use the CONDENSE statement.

In order to add leading zero (1) you can use the OVERLAY statement.

For details please refer to: [Processing Character Strings|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3357358411d1829f0000e829fbfe/content.htm]

Regards

Uwe

Former Member
0 Kudos

Hi,

1. Numeric value: Assign value to numeric field, it will automatically provides zeros in the left.

2. Spaces on right: Assign value to character field, it will automatically provides right side space.