03-26-2007 9:31 AM
Hi All,
Can anyone tell me :-
1) <b>the maximum charecters for the width in the output of a (traditional sap)standard report layout</b>.
2) <b>for an ALV report, is there any restriction? what if I wanna download it to EXCEL</b>
<i>please help me .</i>
03-26-2007 9:44 AM
Hi,
For ALV REPORT there is no restriction.
Go through the below report. After getting the output. U can find the icon to download the output into word or excel.
REPORT YMS_ALVEXCELWORDGRAPH message-id z0.
type-pools slis.
tables: t000.
data: itab_output like t000 occurs 0 with header line.
Data: alv_grid_variant type disvariant,
alv_grid_variant_save value 'U',
layout type slis_layout_alv,
fieldcat TYPE SLIS_T_FIELDCAT_ALV.
data: begin of fieldcat_rec.
include type slis_fieldcat_main.
include type slis_fieldcat_alv_spec.
data: end of fieldcat_rec.
*MAIN
start-of-selection.
PERFORM EXTRACT_DATA.
PERFORM OUTPUT-LIST.
&----
*& Form EXTRACT_DATA
&----
FORM EXTRACT_DATA.
refresh itab_output.
select * from t000 into table itab_output.
ENDFORM. " EXTRACT_DATA
&----
*& Form OUTPUT-LIST
&----
FORM OUTPUT-LIST.
*Build field catalog
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = 'T000'
CHANGING
CT_FIELDCAT = fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_LAYOUT = layout
it_fieldcat = fieldcat
I_SAVE = alv_grid_variant_save
IS_VARIANT = alv_grid_variant
TABLES
T_OUTTAB = ITAB_OUTPUT
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.
ENDFORM. " OUTPUT-LIST
Thanks,
Sankar M
03-26-2007 9:31 AM
1) 1024 characters.
U can find these from the system variables SY-LINSZ ( List width ),, SY-LINCT ( List Hieght ) for a particular report ...
U can overwrite these in the REPORT statement using
REPORT ZSAMPLE LINE-SIZE 255 LINE-COUNT 30.
go through this link..
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/dba23035c111d1829f0000e829fbfe/frameset.htm
2) Same is the case with ALV reports..
reward helpful answers
sai ramesh
03-26-2007 9:31 AM
hi,
You can have 1023 characters as output for a standard report.
Message was edited by:
veereshbabu ponnada
03-26-2007 9:44 AM
Hi,
For ALV REPORT there is no restriction.
Go through the below report. After getting the output. U can find the icon to download the output into word or excel.
REPORT YMS_ALVEXCELWORDGRAPH message-id z0.
type-pools slis.
tables: t000.
data: itab_output like t000 occurs 0 with header line.
Data: alv_grid_variant type disvariant,
alv_grid_variant_save value 'U',
layout type slis_layout_alv,
fieldcat TYPE SLIS_T_FIELDCAT_ALV.
data: begin of fieldcat_rec.
include type slis_fieldcat_main.
include type slis_fieldcat_alv_spec.
data: end of fieldcat_rec.
*MAIN
start-of-selection.
PERFORM EXTRACT_DATA.
PERFORM OUTPUT-LIST.
&----
*& Form EXTRACT_DATA
&----
FORM EXTRACT_DATA.
refresh itab_output.
select * from t000 into table itab_output.
ENDFORM. " EXTRACT_DATA
&----
*& Form OUTPUT-LIST
&----
FORM OUTPUT-LIST.
*Build field catalog
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = 'T000'
CHANGING
CT_FIELDCAT = fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_LAYOUT = layout
it_fieldcat = fieldcat
I_SAVE = alv_grid_variant_save
IS_VARIANT = alv_grid_variant
TABLES
T_OUTTAB = ITAB_OUTPUT
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.
ENDFORM. " OUTPUT-LIST
Thanks,
Sankar M
03-26-2007 9:59 AM