05-05-2006 7:49 AM
Hi All,
I have some clarifications related to <b>ALV Reporting</b> in ABAP.
<b>Actually i have to create ALV report with Structure Length/Each record length is around 300 characters.</b>
Is it possible to create a ALV Report with <b>300</b> length for each record!
If possible which is the best<b>[ALV]</b> method for the same!
Can anybody give me the solution!
Thanks in advance.
Thanks & Regards,
Prasad.
05-05-2006 7:54 AM
Hai Prasad
Check with the code
&----
*& Report ZALV_PRAKASH_SAMP *
*& *
&----
*& *
*& *
&----
REPORT ZALV_PRAKASH_SAMP .
TABLES: MARA.
TYPE-POOLS : SLIS.
*----
Data declaration
*----
DATA: BEGIN OF I_MARA OCCURS 0.
INCLUDE STRUCTURE MARA.
DATA: END OF I_MARA.
DATA: V_REPID LIKE SY-REPID.
*----
selection-screen
*----
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR.
PARAMETERS: P_MTART LIKE MARA-MTART DEFAULT 'ROH'.
SELECTION-SCREEN END OF BLOCK B1.
*----
initialisation
*----
INITIALIZATION.
S_MATNR-LOW = '1400'.
S_MATNR-HIGH = '1500'.
APPEND S_MATNR.
V_REPID = SY-REPID.
*----
start-of-selection
*----
START-OF-SELECTION.
SELECT * FROM MARA
INTO TABLE I_MARA
WHERE MATNR IN S_MATNR AND
MTART = P_MTART.
CHECK SY-SUBRC = 0.
*----
end of selection
*----
END-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME = 'MARA'
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = I_MARA
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.
loop at i_mara.
write:/ i_mara.
endloop.
Thanks & Regards
Sreenivasulu P
05-05-2006 7:57 AM
Prasad,
Yes each record can be of length more than 300. The restriction is 255 columns or 1024 legnth (not sure of the second one).
I would say go OO controls for a ALV report as its more flexible and easy to handle.
Regards,
Ravi
Note : Please mark the helpful answers
05-05-2006 7:57 AM
HI
GOOD
GO THROUGH THESE LINKS I HOPE THIS WILL GIVE YOU SOME IDEA TO INCREASE THE LENGTH OF THE ALV OUT PUT.
http://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/how to make your abap code unicode-enabled
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAGTFLV/CAGTFLV.pdf
THNAKS
MRUTYUN
05-05-2006 7:57 AM
Hi prasad,
1. if there are many fields in your internal table,
then its better to use
REUSE_ALV_GRID_DISPLAY
(instead of REUSE_ALV_LIST_DISPLAY)
2. so that we can scroll horizontally properly in grid.
regards,
amit m.