Application Development and Automation 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: 
Read only

Right justify

Former Member
0 Likes
684

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
Read only

Former Member
0 Likes
652

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.

Read only

0 Likes
652

Hai Sailaja,

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

Read only

0 Likes
652

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

Read only

0 Likes
652

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.

Read only

0 Likes
652

ls_fieldcat-no_zero = 'X' .

ls_fieldcat-just = 'R' .

Read only

Former Member
0 Likes
652

Hi,

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

justified.

or

data var1 type i.

var1 = itab-qty.

write var1.

Regards

amole