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: 

Right justify

Former Member
0 Kudos

In ALV display, material & quantity were displayed in single column like this.

024578960

2451.00

How to right justify the quantity & remove the decimal to make it as a whole number.

Thanx in Advance.

6 REPLIES 6

Former Member
0 Kudos

hi,

you can right-justify by modifying JUST field in field catalog. Then it applies to the MATERIAL also. You can not have different alignments to different values in the same column.

Regards,

Sailaja.

0 Kudos

Hai Sailaja,

How to remove the decimal & make it a whole number.

0 Kudos

hi John,

Pass that value on to a Integer field and display to make it a whole number ..


data : vaue type i,
       v_var type f value '123.4'.

 value = v_var.

 write : value.

REgards,

Santosh

Message was edited by: Santosh Kumar P

0 Kudos

Check this sample code:

DATA: ws_data TYPE p DECIMALS 3.

ws_data = CEIL( '29.901' ).

WRITE ws_data.

It will return 30.000

Also for making the right justification in the field catalog give ls_fcat-just = 'R'. L for Left and M for Middle.

Regards,

Prakash.

0 Kudos

ls_fieldcat-no_zero = 'X' .

ls_fieldcat-just = 'R' .

Former Member
0 Kudos

Hi,

write itab-qty to itab-qty decimals 0 right-

justified.

or

data var1 type i.

var1 = itab-qty.

write var1.

Regards

amole