02-12-2008 8:50 AM
hiii with list ALV please advise now to center column or
put it right hand side pleeaseee.
02-12-2008 9:16 AM
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
02-12-2008 8:54 AM
Hello,
Can you please explain your question clearly.
Regards
--
Sasidhar Reddy Matli.
02-12-2008 8:57 AM
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'.
02-12-2008 8:57 AM
02-12-2008 9:01 AM
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
02-12-2008 9:01 AM
02-12-2008 9:02 AM
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
02-12-2008 9:16 AM
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