‎2009 Aug 06 6:45 AM
i have written a report program using ALV grid output...i'm getting the output but when i'm giving print its giving dump error...
can anyone let me know the below given code is correct or not....
the below giving function module is which i used in program...
CONSTANTS : c_save(1) TYPE c VALUE 'A'.
CONSTANTS:
BEGIN OF cs_callback,
program TYPE syrepid VALUE 'ZVEN_SR2',
pf_status_set TYPE slis_formname VALUE '',
user_command TYPE slis_formname VALUE '',
top_of_page TYPE slis_formname VALUE '',
END OF cs_callback.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_interface_check = ' '
i_bypassing_buffer = ' '
i_buffer_active = ' '
i_callback_program = cs_callback-program
i_callback_pf_status_set = cs_callback-pf_status_set
i_callback_user_command = cs_callback-user_command
i_callback_top_of_page = cs_callback-top_of_page
is_layout = ls_layout
it_fieldcat = t_fieldcat
IT_SORT =
i_save = c_save
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
‎2009 Aug 06 6:52 AM
‎2009 Aug 06 7:23 AM
i'm getting the print output but only 3 output fields are printing out of all..i have used the same function module in other alv reports also there i'm getting print perfectly....
‎2009 Aug 06 7:28 AM
check the page format that is being used when printing.
Else you can set the page format in the report header like this
report XXXX line-size 120 line-count 90.
‎2009 Aug 06 7:42 AM
i have used ur code but still i'm getting same problem......
‎2009 Aug 06 7:48 AM
have you checked what format it is picking up when you select the print function ?
‎2009 Aug 06 7:50 AM
same print output i'm getting which i used to get previously.......
‎2009 Aug 06 7:51 AM
@ venkat
Is it showing all the fields of tab in preview?
Regards,
Sumit.
‎2009 Aug 06 8:02 AM
‎2009 Aug 06 12:41 PM
When you click the print button a pop up window opnes with print details, in that pop up window what is the format defined there ?
‎2009 Aug 26 12:21 PM
‎2009 Aug 06 8:00 AM
Hi,
Hope,the sample code below will be useful for you.
DATA: OK_CODE LIKE SY-UCOMM.
TYPES: BEGIN OF ISQALS1,
PRUEFLOS LIKE QALS-PRUEFLOS,
MATNR LIKE QALS-MATNR,
REVLV LIKE QALS-REVLV,
KTEXTMAT LIKE QALS-KTEXTMAT,
EBELN LIKE QALS-EBELN,
MBLNR LIKE QALS-MBLNR,
LOSMENGE LIKE QALS-LOSMENGE,
MENGENEINH LIKE QALS-MENGENEINH,
PASTRTERM LIKE QALS-PASTRTERM,
UMDAT LIKE MDTB-UMDAT,
MNG01 LIKE MDTB-MNG01,
DELNR LIKE MDTB-DELNR,
STPRS LIKE MBEW-STPRS,
TVALUE LIKE MBEW-STPRS.
TYPES: END OF ISQALS1.
DATA: ITQALS1 TYPE TABLE OF ISQALS1 WITH HEADER LINE,
WAQALS1 TYPE ISQALS1.
G_CONTAINER TYPE SCRFNAME VALUE 'grid_CONT1',
GRID1 TYPE REF TO CL_GUI_ALV_GRID,
G_CUSTOM_CONTAINER TYPE REF TO
CL_GUI_CUSTOM_CONTAINER.
***********
whole set of code, now data is in ITQALS1.
********
MODULE PBO OUTPUT.
SET PF-STATUS 'MAIN100'.
IF G_CUSTOM_CONTAINER IS INITIAL.
CREATE OBJECT G_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = G_CONTAINER.
CREATE OBJECT GRID1
EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING I_STRUCTURE_NAME = 'ISQALS1'
CHANGING IT_OUTTAB = ITQALS1.
ENDIF.
ENDMODULE.
Thank You.
Regards,
Dhanalakshmi L
‎2010 May 29 1:21 PM