‎2009 Sep 25 10:32 AM
gst_print TYPE slis_print_alv.
IMPORTING
out_parameters = gst_print.
I'm getting GST_PRINT is the correct type, its length is incorrect.
Any idea why this dump?
‎2009 Sep 25 10:36 AM
‎2009 Sep 25 10:34 AM
‎2009 Sep 25 10:36 AM
‎2009 Sep 25 10:39 AM
Hi,
Change the declaration like this and check
gst_print TYPE pri_params.
Regards,
Vikranth
‎2009 Sep 25 10:43 AM
Hi,
Please have a look at the sample code
CONSTANTS : c_linsz LIKE sy-linsz VALUE '132', "Constant for line size
* Declaration of local constants
CONSTANTS : lc_paart LIKE sy-paart VALUE 'X_65_132', " Paper Format
lc_locl TYPE sypdest VALUE 'LOCL'. " Destination
* If print option is selected.
IF p_print IS NOT INITIAL.
MOVE c_x TO v_print.
ELSE.
CLEAR v_print.
ENDIF.
* Setup the Print Parmaters
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
authority = space
immediately = v_print
new_list_id = c_x
no_dialog = c_x
user = sy-uname
IMPORTING
out_parameters = v_print_parms
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc NE 0.
CLEAR : v_print_parms.
ENDIF.
* The printer destination has to be set up
IF v_print_parms-pdest = space.
v_print_parms-pdest = lc_locl.
ENDIF.
* Explicitly set line width, and output format so that
* the PDF conversion comes out OK
v_print_parms-linsz = c_linsz.
v_print_parms-paart = lc_paart.Regards,
Nagaraj
Edited by: Julius Bussche on Sep 25, 2009 1:16 PM
Code tags added...
‎2009 Sep 25 10:45 AM
Hi, Kumar
Sorry, we were not expecting code from you like this, you don't know ?
Faisal
‎2009 Sep 25 10:46 AM
‎2009 Sep 25 10:50 AM
Hi,
data : v_print_parms LIKE pri_params, "Structure for Passing
"Print Parameters
Regards,
Nagaraj
‎2009 Sep 25 10:50 AM
Hi,
I think the following way,
DATA: v_print_parms LIKE PRI_PARAMS.Faisal
‎2009 Sep 25 10:53 AM
Hi Faisal,
Sorry is not needed friend..I didn't know or see how to post the code thread..Thanks for notifying me.
Regards,
Nagaraj
‎2009 Sep 25 10:55 AM
v_print_parms LIKE PRI_PARAMS is not a valid structure for
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = gst_layout
it_fieldcat = gt_excelfieldcat[]
i_default = 'X'
i_save = 'A'
is_print = v_print_parms
thsi is creating a dump.
‎2009 Sep 25 11:23 AM
Hi,
Yes it will as the paramter u r passing is of different structure... u need pass is_print as SLIS_PRINT_ALV .Now declare a internal table with this structre and fill the option u want for printing.
The code which i gave u is for print output with Write statement.
Regards,
Nagaraj