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

left allign values in internal table

Karan_Chopra_
Active Participant
0 Likes
1,727

how to left allign values in internal table

6 REPLIES 6
Read only

Former Member
0 Likes
991

Hi

By default the CHAR, NUMERIC,DATS,TIMS type fields are left justified

where as types Integer,Packed and Float are right justified.

so depending on the requirement move the fields to other data types and display as per the need

Regards

Anji

Read only

Former Member
0 Likes
991

Hi,

While moving to the Internal table use LEFT-JUSTIFIED with the field

Regards

Sudheer

Read only

Former Member
0 Likes
991

if u are displaying fields in ALv then there is a option in the Field Catalog..

FLDACT-just = 'ur choice'

ur choice = C - for Center

L - For left

R - for right....

reward points if useful...........

Read only

Former Member
0 Likes
991

if the fields are charecter fields then

before appending field.....do this....

<b>shift itab-field left deleting leading space.

append itab-field.</b>

if not move field to charecter field and do as above.......

Regards

vasu

Read only

Karan_Chopra_
Active Participant
0 Likes
991

i am using this ....

LOOP AT int_0002.

MOVE-CORRESPONDING int_0002 TO int_zeepersdata.

APPEND int_zeepersdata.

ENDLOOP.

how can i do this to all the fields of int_zeepersdata at once

Message was edited by:

Karan Chopra

Read only

0 Likes
991

Hi,

Declare another internal table say 'int_zeepersdata_c' similar to the internal table int_zeepersdata with all the fields having char type.

LOOP AT int_0002.

MOVE-CORRESPONDING int_0002 TO int_zeepersdata.

APPEND int_zeepersdata.

ENDLOOP.

LOOP AT int_zeepersdata.

MOVE-CORRESPONDING int_zeepersdata TO int_zeepersdata_c.

APPEND int_zeepersdata_c.

CLEAR int_zeepersdata_c.

ENDLOOP.

Hope this will resove your problem.

Cheers...