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

aligning the fields

Former Member
0 Likes
1,024

hi,

i want to get matnr and spras fields in output,

but in output, im getting matnr field in the 1st column and spras field in the 20th column.

so i want to right align the matnr field.

is there any process?

9 REPLIES 9
Read only

Former Member
0 Likes
1,005

Kumar,

Plese be Specific about the query, are you talking about report or any thing else.

Read only

0 Likes
1,005

yes its about report.

Read only

Former Member
0 Likes
1,005

Hi,

Can u a bit clear abt your issue.

if it is regarding to report (ALV)

you can use "col_pos" in field catalog.

if it is normal report

you can manually do that.

Regards.

Read only

0 Likes
1,005

its regarding normal report.

manually means is it by specifying the column number or there is any other process?

Read only

0 Likes
1,005

use condense before write.

Condense lv_matnr.
Condense lv_spras.

check this and revert back.

Regards

Karthik D

Read only

0 Likes
1,005

Hi,

Just use write statement with fields in your required order .

Eg.

write :'matnr','spars',.....

write:itab-matnr,itab-spars,itab-....

Regards.

Read only

0 Likes
1,005

Hi Kumar,

If it is normal Classical report then in the write statment.

loop it_out.

write : \ matnr , spras .......

endloop.

if its is ALV in while filling fieldcatalouge there is field called COL_POS(Coloum Position) in that give the value as 1 2 3 etc.

Read only

Former Member
0 Likes
1,005

Hi,

While displaying the matnr field specify right-justified infront of your field in your write statement.

E.g. write 😕 itab-matnr right-justified.

Thanks & Regards

Read only

Former Member
0 Likes
1,005

Hi,

You mean you want the data of MATNR be right justified? If yes then do the following:

If you are using ALV to display your output then use JUST field of fieldcatalog to align the field to right.

For ex.:

wa_fieldcatalog-just = 'R'. -


> add this line in your fieldcatalog for MATNR

Otherwise explain your problem more specifically.

Regards,

Saba