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: 

center column in ALV

Former Member
0 Kudos

hiii with list ALV please advise now to center column or

put it right hand side pleeaseee.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

i newbie,

there ais a component in fieldcatalogue which is used to jutify the text and column text..

here is the documentation

Just (justification): This parameter is used for alignment of the contents of the output table. This is only relevant for CHAR or NUMC fields in the output internal table. The justification of the column header always follows the justification of the columns. Independent justification of the column header is not possible.

Value set: SPACE, 'R', 'L', and ‘C’.

' ' = Default justification for this data type

'R' = right-justified output

'L' = left-justified output

'C' = centered output.

CODE TO USE IT

                                                    • FIRST COLUMN *************************

l_fieldcat-col_pos = '1'. " POSITION OF THE COLUMN

l_fieldcat-fieldname = 'VBELN'. " FIELD FOR WHICH CATALOG ID FILLED

l_fieldcat-tabname = 'I_SALES_FINAL'. " INTERNAL TABLE BELONGS TO

l_fieldcat-key = 'X'. " SO THAT this field is not scrollable hiddable.

l_fieldcat-just = 'L'. " FOR JUSTIFICATION

*l_fieldcat-hotspot = 'X'. " MARK THIS field as hotsopt

l_fieldcat-lzero = 'X'. " OUTPUT WITH leading zeros.

l_fieldcat-seltext_l = 'Sales Document'. " long text for header.

l_fieldcat-outputlen = 20. " SET THE output length.

l_fieldcat-ref_tabname = 'VBAK'. " FOR F1 & F4 help as

append l_fieldcat to p_i_fieldcat.

clear l_fieldcat.

THIS IS QUANTITY FIELD HENCE RIGHT JUSTIFIED

**********************SECOND COLUMN **************************

l_fieldcat-col_pos = '2'. " POSITION OF THE COLUMN

l_fieldcat-fieldname = 'NETWR'. " FIELD FOR WHICH CATALOG ID FILLED

l_fieldcat-tabname = 'I_SALES_FINAL'. " INTERNAL TABLE BELONGS TO

l_fieldcat-just = 'R'. " FOR JUSTIFICATION

*l_fieldcat-hotspot = 'X'. " MARK THIS field as hotsopt

l_fieldcat-lzero = 'x'. " OUTPUT WITH leading zeros.

l_fieldcat-seltext_l = 'Net Value in Document Currency'. " long text for header.

l_fieldcat-seltext_m = 'Net Value in Document Currency'. " medium text for header.

l_fieldcat-seltext_s = 'Net Value in Document Currency'. " sort text for header.

l_fieldcat-outputlen = 20. " SET THE output length.

l_fieldcat-ref_tabname = 'VBAK'. " FOR F1 & F4 help as

append l_fieldcat to p_i_fieldcat.

clear l_fieldcat.

reward points if HELPFUL

Rohan malik

7 REPLIES 7

Former Member
0 Kudos

Hello,

Can you please explain your question clearly.

Regards

--

Sasidhar Reddy Matli.

Former Member
0 Kudos

In the field catalog use JUST field .

it is of char(1) field we can us 'C' or 'R', 'L'.

just(1) type c, " (R)ight (L)eft (C)ent

example:

wa_afield-just = 'R'.

Former Member
0 Kudos

Hi,

Pls explain it clearly.

Regards,

Sivappriya.

Former Member
0 Kudos

set fieldcatalog property "JUST" ((R)ight (L)eft (C)ent)

eg.

WA_FIELDCAT-just = 'R'.

or

WA_FIELDCAT-just = 'L'

or

WA_FIELDCAT-just = 'C'

fieldcatalog-fieldname = 'MATNR'.

fieldcatalog-seltext_m = 'Material Number'.

fieldcatalog-col_pos = 4.

fieldcatalog-just = 'R' " Right justified"

append fieldcatalog to fieldcatalog.

clear fieldcatalog.

Hope this helps. award points if its helpful

Edited by: Anurag Joshi on Feb 12, 2008 2:40 PM

Former Member
0 Kudos

Hi,

Put fieldcat-just = 'C' for that particular field.

Rgds,

Bujji

Former Member
0 Kudos

Hi ,

to make entry in center or right u should use field catalog property just

for

right put 'R'

for center put 'C'.

for left put 'L'.

LIKE BELOW

x_fldcat-just = 'R'.

Thanks and regrads

vijay dwivedi

Former Member
0 Kudos

i newbie,

there ais a component in fieldcatalogue which is used to jutify the text and column text..

here is the documentation

Just (justification): This parameter is used for alignment of the contents of the output table. This is only relevant for CHAR or NUMC fields in the output internal table. The justification of the column header always follows the justification of the columns. Independent justification of the column header is not possible.

Value set: SPACE, 'R', 'L', and ‘C’.

' ' = Default justification for this data type

'R' = right-justified output

'L' = left-justified output

'C' = centered output.

CODE TO USE IT

                                                    • FIRST COLUMN *************************

l_fieldcat-col_pos = '1'. " POSITION OF THE COLUMN

l_fieldcat-fieldname = 'VBELN'. " FIELD FOR WHICH CATALOG ID FILLED

l_fieldcat-tabname = 'I_SALES_FINAL'. " INTERNAL TABLE BELONGS TO

l_fieldcat-key = 'X'. " SO THAT this field is not scrollable hiddable.

l_fieldcat-just = 'L'. " FOR JUSTIFICATION

*l_fieldcat-hotspot = 'X'. " MARK THIS field as hotsopt

l_fieldcat-lzero = 'X'. " OUTPUT WITH leading zeros.

l_fieldcat-seltext_l = 'Sales Document'. " long text for header.

l_fieldcat-outputlen = 20. " SET THE output length.

l_fieldcat-ref_tabname = 'VBAK'. " FOR F1 & F4 help as

append l_fieldcat to p_i_fieldcat.

clear l_fieldcat.

THIS IS QUANTITY FIELD HENCE RIGHT JUSTIFIED

**********************SECOND COLUMN **************************

l_fieldcat-col_pos = '2'. " POSITION OF THE COLUMN

l_fieldcat-fieldname = 'NETWR'. " FIELD FOR WHICH CATALOG ID FILLED

l_fieldcat-tabname = 'I_SALES_FINAL'. " INTERNAL TABLE BELONGS TO

l_fieldcat-just = 'R'. " FOR JUSTIFICATION

*l_fieldcat-hotspot = 'X'. " MARK THIS field as hotsopt

l_fieldcat-lzero = 'x'. " OUTPUT WITH leading zeros.

l_fieldcat-seltext_l = 'Net Value in Document Currency'. " long text for header.

l_fieldcat-seltext_m = 'Net Value in Document Currency'. " medium text for header.

l_fieldcat-seltext_s = 'Net Value in Document Currency'. " sort text for header.

l_fieldcat-outputlen = 20. " SET THE output length.

l_fieldcat-ref_tabname = 'VBAK'. " FOR F1 & F4 help as

append l_fieldcat to p_i_fieldcat.

clear l_fieldcat.

reward points if HELPFUL

Rohan malik