2009 Feb 14 11:58 AM
Hi gurus,
I have a doubt . Does ALV GRID supports for PDF FILE dowmload of an alv report.I mean to say that is there any icon provided on alv grid to down load the report as pdf file to local disk.I know spread sheet down works.
kindly reply << Removed >>.
regards,
padmaja.
Edited by: Rob Burbank on Feb 15, 2009 9:52 PM
Hi gurus,
I have a doubt . Does ALV GRID supports for PDF FILE dowmload of an alv report.I mean to say that is there any icon provided on alv grid to down load the report as pdf file to local disk.I know spread sheet down works.
kindly reply << Removed >>.
regards,
padmaja.
Edited by: Rob Burbank on Feb 15, 2009 9:52 PM
2009 Feb 16 2:46 AM
Hi,
I do not think so that SAP directly supports download to pdf file. But you can print to pdf file. You just need to install small utility onto your computer.
Cheers
2009 Feb 17 3:09 AM
hi,
can u please tell me the procedure for that.
regards ,
padmaja.
2009 Feb 17 3:52 AM
Hi,
printing to PDF is not related to SAP. In Windows you can install some utility (use Google) to add virtual pritner driver. This driver will print to PDF file. So instead of choosing standard printer you will choose virtual printer.
Cheers
2009 Feb 17 3:38 AM
hi,
you can create on button in application toolbar for alv grid display.
write code to generate the PDF. but for that if you want to display in format create smartform for display and generate pdf from that. if you have dout please let me know.
thanks
2009 Feb 20 5:32 AM
hi ,
can u please explain me clearly.first i tried with normal report , I thought that if it works then i go for alv report.If u can give direct solution for alv report it will be very much helpful for me.
please go through the bellow program once.
I have written the bellow code to convert the report program to pdf file downloaded to c drive , but when i am opening that pdf file it is giving the bellow message
"adobe reader could not open 'REPORT.PDF'because it is either not a supported file type or because the file has been damaged( for example it was sent as a email attachementand wasn't correctly decoded)".
code is : for this code i created one set-pf-status with pushbutton 'PDF'.
REPORT ZPDF.
data: begin of i_list occurs 0,
line(255),
end of i_list.
data: v_variable(40).
v_variable = 'PDF CONVERSION OF REPORT'.
start-of-selection.
set pf-status 'PDFFILE'.
WRITE:/ V_VARIABLE.
at user-command.
if sy-ucomm = 'PDF'.
DO.
READ LINE SY-INDEX.
IF SY-SUBRC NE 0.
EXIT.
ELSE.
I_LIST = SY-LISEL.
APPEND I_LIST.
ENDIF.
ENDDO.
NEW-PAGE PRINT ON DESTINATION 'LP03' IMMEDIATELY ' ' COVER TEXT ' ' KEEP IN SPOOL 'X' NEW LIST IDENTIFICATION 'X' LINE-SIZE 132 LINE-COUNT 65 NO DIALOG.
LOOP AT I_LIST.
IF I_LIST-LINE IS INITIAL.
SKIP.
ELSE.
WRITE: I_LIST-LINE+0(132).
ENDIF.
ENDLOOP.
NEW-PAGE PRINT OFF.
DATA: SPOOL TYPE TSP01-RQIDENT.
SPOOL = SY-SPONO.
DATA: I_LIST1 LIKE TLINE OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = SPOOL
NO_DIALOG =
DST_DEVICE =
PDF_DESTINATION =
IMPORTING
PDF_BYTECOUNT =
PDF_SPOOLID =
LIST_PAGECOUNT =
BTC_JOBNAME =
BTC_JOBCOUNT =
TABLES
PDF = I_LIST1
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
.
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 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = 'C:/REPORT.PDF'
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
SHOW_TRANSFER_STATUS = ABAP_TRUE
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = I_LIST1
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif.
kindly explain me why my code is not giving pdf file.
thanks in advance,
padmaja.
2009 Feb 20 5:35 AM
It seems to install the ADS file a small patch - please call the basis guy for it.
Regards
Shashi
2009 Feb 20 5:42 AM
hi,
kindly check whether my code is correct or not.
thanks,
padmaja
2009 Apr 03 2:38 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |