Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

error while giving print

Former Member
0 Likes
1,345

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.

12 REPLIES 12
Read only

Former Member
0 Likes
1,314

what is the error message in the dump ?

Read only

0 Likes
1,314

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....

Read only

0 Likes
1,314

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.

Read only

0 Likes
1,314

i have used ur code but still i'm getting same problem......

Read only

0 Likes
1,314

have you checked what format it is picking up when you select the print function ?

Read only

0 Likes
1,314

same print output i'm getting which i used to get previously.......

Read only

Former Member
0 Likes
1,314

@ venkat

Is it showing all the fields of tab in preview?

Regards,

Sumit.

Read only

0 Likes
1,314

its not showing all fields in print preview......

Read only

0 Likes
1,314

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 ?

Read only

0 Likes
1,314

@ranu

in the pop window format defined is X_65_255.

Read only

Former Member
0 Likes
1,314

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

Read only

Former Member
0 Likes
1,314

Issue Resolved