2010 Apr 22 12:21 PM
HI....
I have created CLASSICAL REPORT and font is very small.
Is there any way to increase the font or HIGHLIGHTING field.
Thank you in Advance
Hi Smriti,
please check the below code, hope this will help u..
report zfont_style.
Include for all style values
INCLUDE <cl_alv_control>.
Internal table for final output data
DATA: i_flight TYPE STANDARD TABLE OF sflight.
Internal table for field catalog info
DATA: i_fields TYPE lvc_t_fcat.
Field symbol for field catalog
FIELD-SYMBOLS: <wa_fields> TYPE lvc_s_fcat.
Select data
SELECT * FROM sflight
INTO TABLE i_flight
UP TO 100 ROWS.IF sy-subrc = 0.
Get field catalog
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
ct_fieldcat = i_fields
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3
.
IF sy-subrc = 0.
Changing the style of field catalog
LOOP AT i_fields ASSIGNING <wa_fields>.
IF sy-tabix > 4.
<wa_fields>-style = ALV_STYLE_FONT_ITALIC.
ELSE.
<wa_fields>-style = ALV_STYLE_FONT_BOLD.
ENDIF.
ENDLOOP. ENDIF.
Calling the FM to display ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'SFLIGHT'
i_grid_title = 'Style demo'(001)
it_fieldcat_lvc = i_fields
TABLES
t_outtab = i_flight
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.ENDIF.
Regards
Neha
2010 Apr 22 12:26 PM
Hi,
Please the refer the program DD_STYLE_TABLE ........ but works only with the custom controls
Reagrds,
Padmasri.
2010 Apr 22 12:29 PM
2010 Apr 22 12:32 PM
>
> I have created CLASSICAL REPORT and font is very small.
> Is there any way to increase the font or HIGHLIGHTING field
Hi Smriti,
"Increase font size": Big NO.
"Highlight Text": May be. Check the SAP formatting options: [http://help.sap.com/abapdocu_70/en/ABAPWRITE_EXT_OPTIONS.htm].
BR,
Suhas
2010 Apr 22 12:46 PM
Hi,
In design settings ( Screen icon) , you have option of increasing the font, but this is for all screens.
2010 Apr 22 12:59 PM
Hi,
U can highlight the text which u want. Check out the sample coding.
But font may be not possible.
Example:
FORMAT COLOR 1 ON.
WRITE:/'|',COMPANY_CODE-BUKRS ,16 '|',18 FINAL-HKONT ,
36 GL_DES-MCOD1,67 '|',70 FINAL-DMBTR,88'|'.
FORMAT COLOR 1 OFF.
Syntax of color value in col color
0 GUI-specific
{ 1 | COL_HEADING } 1 Gray-blue
{ 2 | COL_NORMAL } 2 Light gray
{ 3 | COL_TOTAL } 3 Yellow
{ 4 | COL_KEY } 4 Blue-green
{ 5 | COL_POSITIVE } 5 Green
{ 6 | COL_NEGATIVE } 6 Red
{ 7 | COL_GROUP } 7 Violet
Regards,
Ankur.
2010 Apr 22 1:03 PM
2010 Apr 22 1:13 PM
Hi Smriti,
please check the below code, hope this will help u..
report zfont_style.
Include for all style values
INCLUDE <cl_alv_control>.
Internal table for final output data
DATA: i_flight TYPE STANDARD TABLE OF sflight.
Internal table for field catalog info
DATA: i_fields TYPE lvc_t_fcat.
Field symbol for field catalog
FIELD-SYMBOLS: <wa_fields> TYPE lvc_s_fcat.
Select data
SELECT * FROM sflight
INTO TABLE i_flight
UP TO 100 ROWS.IF sy-subrc = 0.
Get field catalog
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
ct_fieldcat = i_fields
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3
.
IF sy-subrc = 0.
Changing the style of field catalog
LOOP AT i_fields ASSIGNING <wa_fields>.
IF sy-tabix > 4.
<wa_fields>-style = ALV_STYLE_FONT_ITALIC.
ELSE.
<wa_fields>-style = ALV_STYLE_FONT_BOLD.
ENDIF.
ENDLOOP. ENDIF.
Calling the FM to display ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'SFLIGHT'
i_grid_title = 'Style demo'(001)
it_fieldcat_lvc = i_fields
TABLES
t_outtab = i_flight
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.ENDIF.
Regards
Neha
2010 Apr 22 1:24 PM
Smriti,
Is there any way to increase the font or HIGHLIGHTING field1) NO its not possible to increase font size.
2) Press F1 on INTENSIFY to use for highlighting.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |