Problem in converting report output to pdf
Hi,
I'm managing to get the spool id and other requirements but could'nt get the output of the program converted to pdf format.When i'm trying to do this i'm getting the pdf format of the functional module which retrievs the header and item records and displays the numbers records in the header and item like for eg. header records 8 and item records 10 this its displaying in the format in which we get our funtional module output when we give some data into it.....
Can any one please tell me how to solve this for ur information i'm using hierarchail squential report with multiple reports in the same report.............
for instance i'm using the following coding please find the bug......
PARAMETER: p_email1 LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_sender LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_delspl AS CHECKBOX.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
Write statement to represent report output. Spool request is created
if write statement is executed in background. This could also be an
ALV grid which would be converted to PDF without any extra effort
WRITE 'Hello World'.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
Alternative way could be to submit another program and store spool
id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
to sap-spool
spool parameters %_print
archive parameters %_print
without spool dynpro
and return.
Get spool id from program called above
IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
ENDIF.
FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
FORM get_job_details *
FORM get_job_details.
Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
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.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
perform send_email using p_email2.
ENDFORM.
FORM send_email *
--> p_email *
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = 'Attachname'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Message Body text, line 1'.
APPEND it_mess_bod.
it_mess_bod = 'Message Body text, line 2...'.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
using p_email
'Example .xls documnet attachment'
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables it_message
it_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
data: t_packing_list like sopcklsti1 occurs 0 with header line,
t_contents like solisti1 occurs 0 with header line,
t_receivers like somlreci1 occurs 0 with header line,
t_attachment like solisti1 occurs 0 with header line,
t_object_header like solisti1 occurs 0 with header line,
w_cnt type i,
w_sent_all(1) type c,
w_doc_data like sodocchgi1.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
Please go throught the code ... this is my salary sending program to all the employees as pdf attach file of his salary breakup ...... it was so clear how the data is converted in th pdf format .... and more understanding way the internal tables are declared ....
DATA W_OPTIONS LIKE ITCPO OCCURS 0 WITH HEADER LINE.
DATA : z_itcpp LIKE itcpp OCCURS 0 WITH HEADER LINE.
DATA : otfdt like ITCOO OCCURS 0 WITH HEADER LINE.
DATA : pdfdt like TLINE OCCURS 0 with header line.
DATA: NUMBYTES TYPE I.
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
DATA: Begin of i_errors occurs 0,
type(1) type c,
descr(100) type c,
End of i_errors.
w_options-tdprinter = 'POSTSCPT'.
W_options-TDRDIDEV = 'XP45'.
W_options-TDGETOTF = 'X'.
APPEND W_options.
call function 'OPEN_FORM'
exporting
device = 'PRINTER'
dialog = ' '
form = 'ZHRPAYSLIP'
language = sy-langu
options = w_options
* IMPORTING
* LANGUAGE =
* NEW_ARCHIVE_PARAMS =
* RESULT =
exceptions
canceled = 1
device = 2
form = 3
options = 4
unclosed = 5
mail_options = 6
archive_error = 7
invalid_fax_number = 8
more_params_needed_in_batch = 9
others = 10 .
CALL FUNCTION 'CLOSE_FORM'
* IMPORTING
* RDI_RESULT =
TABLES
OTFDATA = otfdt
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
OTHERS = 4.
EXPORT otfdt TO MEMORY ID 'PDFT'.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
* MAX_LINEWIDTH = 132
* ARCHIVE_INDEX = ' '
* COPYNUMBER = 0
* ASCII_BIDI_VIS2LOG = ' '
* PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = NUMBYTES
* BIN_FILE =
TABLES
otf = otfdt
lines = pdfdt
* EXCEPTIONS
* ERR_MAX_LINEWIDTH = 1
* ERR_FORMAT = 2
* ERR_CONV_NOT_POSSIBLE = 3
* ERR_BAD_OTF = 4
* OTHERS = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF .
Refresh OBJTXT. clear OBJTXT.
Refresh OBJPACK. clear OBJPACK.
Refresh objbin. clear objbin.
Refresh OBJHEAD. clear OBJHEAD.
Refresh RECLIST. Clear RECLIST.
* Creation of the document to be sent
* File Name
DOC_CHNG-OBJ_NAME = 'PAYSLIP'.
* Mail Subject
DOC_CHNG-OBJ_DESCR = 'Payslip'.
* Mail Contents
OBJTXT = 'This e-mail was sent from an automated system...'.
APPEND OBJTXT.
OBJTXT = 'Do not reply to this message.'.
APPEND OBJTXT.
OBJTXT = 'Please open the attachment to view the Payslip'.
APPEND OBJTXT.
OBJTXT = ''.
APPEND OBJTXT.
if not msgtxt1 is initial.
OBJTXT = msgtxt1.
APPEND OBJTXT.
endif.
if not msgtxt2 is initial.
OBJTXT = msgtxt2.
APPEND OBJTXT.
endif.
if not msgtxt3 is initial.
OBJTXT = msgtxt3.
APPEND OBJTXT.
endif.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
* Creation of the entry for the compressed document
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
* Creation of the document attachment
CALL FUNCTION 'QCE1_CONVERT'
TABLES
t_source_tab = pdfdt
t_target_tab = objbin
EXCEPTIONS
convert_not_possible = 1
OTHERS = 2.
describe table objbin lines tab_lines.
OBJHEAD = 'Payslip.PDF'.
APPEND OBJHEAD.
** Creation of the entry for the compressed attachment
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 1.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'PDF'.
OBJPACK-OBJ_NAME = 'Payslip'.
OBJPACK-OBJ_DESCR = 'Payslip'.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
* Completing the recipient list
* Read table i_pa0105 with key pernr = pernr-pernr binary search.
loop at i_pa0105 where pernr = pernr-pernr and USRTY = '0010'.
endloop.
if sy-subrc = 0.
RECLIST-RECEIVER = i_pa0105-USRID_LONG.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
endif.
if RECLIST[] is initial.
loop at i_pa0105 where pernr = pernr-pernr and USRTY = 'MAIL'.
endloop.
if sy-subrc = 0.
RECLIST-RECEIVER = i_pa0105-USRID.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
endif.
endif.
if not RECLIST[] is initial.
* Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = ''
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
LOOP AT RECLIST.
* Concatenate pernr-pernr '-' RECLIST-RECEIVER(48)
into error1.
IF RECLIST-RETRN_CODE = 0.
* Concatenate error1 ': The document was sent' into
error1.
i_errors-descr = pernr-pernr.
i_errors-type = 'S'.
append i_errors.
ELSE.
Concatenate error1 ': The document could not be
sent' into error1.
i_errors-descr = error1.
i_errors-type = 'E'.
append i_errors.
ENDIF.
ENDLOOP.
WHEN 1.
Concatenate pernr-pernr '-' RECLIST-RECEIVER(48) into
error1.
Concatenate error1 ': No authorization for sending to the
recipients' into error1.
i_errors-descr = error1.
i_errors-type = 'E'.
append i_errors.
WHEN 2.
Concatenate pernr-pernr '-' RECLIST-RECEIVER(48) into
error1.
Concatenate error1 ': Document could not be sent to the
recipient' into error1.
i_errors-descr = error1.
i_errors-type = 'E'.
append i_errors.
WHEN 4.
Concatenate pernr-pernr '-' RECLIST-RECEIVER(48) into
error1.
Concatenate error1 ': No send authorization' into error1.
i_errors-descr = error1.
i_errors-type = 'E'.
append i_errors.
WHEN OTHERS.
Concatenate pernr-pernr '-' RECLIST-RECEIVER(48) into
error1.
Concatenate error1 ': Error occurred while sending' into
error1.
i_errors-descr = error1.
i_errors-type = 'E'.
append i_errors.
ENDCASE.
else.
error1 = pernr-pernr.
* Concatenate error1 ': Maintain Infotype 0105.' into error1.
i_errors-descr = error1.
i_errors-type = 'M'.
append i_errors.
endif.
girish
Similar Messages
-
Converting report output to pdf by submit spooland email to multiple vendor
Hi all,
my current program converting the report output to pdf and then downaloding andsending to vendor email.If user enter single vendor is o.k. but if suppose user enter multiple vendors,report is dipalying with multiple vendor information and all this information converting to one pdf file only.but i need particular vendor pdf have particular vendor info only excluding remaining vendor info.I am pasting my code.can anyone suggest?
TYPES: BEGIN OF type_data,
lifnr TYPE ekko-lifnr,
matnr TYPE lips-matnr,
vgbel TYPE lips-vgbel,
vgpos TYPE lips-vgpos,
mfrgr TYPE lips-mfrgr,
vbeln TYPE ekes-vbeln,
erdat TYPE ekes-erdat,
lfdat TYPE ekes-eindt,
lgort TYPE lips-lgort,
verur TYPE ekes-xblnr,
lfuhr TYPE ekes-uzeit,
lfimg TYPE lips-lfimg,
meins TYPE lips-meins,
posnr TYPE lips-posnr,
kdmat TYPE lips-kdmat,
dabmg TYPE ekes-dabmg,
eindt TYPE eket-eindt,
* Add by liza DEVK989704
park TYPE ZPO_PARK-menge,
* End by liza DEVK989704
END OF type_data.
DATA: gt_data TYPE STANDARD TABLE OF type_data.
DATA: gw_data LIKE LINE OF gt_data.
form display_list.
DATA: lv_maktx TYPE makt-maktx,
lv_adv(01) TYPE c.
DATA: lv_menge TYPE zomm_t0104m-menge.
*-- Set titles
title1 = 'Shipping notifications'.
title2 = '(Formerly Known As Matsushita Industrial )'.
title3 = sy-title.
IF NOT pa_fax IS INITIAL.
NEW-PAGE LINE-SIZE 120 LINE-COUNT 44.
title3 = 'Outstanding shipping notifications by supplier'.
ENDIF.
SORT gt_data BY lifnr lfdat matnr vgbel vgpos eindt.
LOOP AT gt_data INTO gw_data.
AT NEW lifnr.
NEW-PAGE.
sy-pagno = 1.
*-- Get the vendor name
CLEAR: gv_name1,
gv_telf1,
gv_telfx.
SELECT SINGLE name1 telf1 telfx
INTO (gv_name1, gv_telf1, gv_telfx)
FROM lfa1
WHERE lifnr = gw_data-lifnr.
ENDAT.
AT NEW matnr.
*-- Get the material description
CLEAR lv_maktx.
SELECT SINGLE maktx INTO lv_maktx
FROM makt
WHERE matnr = gw_data-matnr
AND spras = sy-langu.
ENDAT.
*-- If "only pending shipping notifications" is selected, remove all
* entries with no pending quantity
IF gw_data-lfimg LE gw_data-dabmg AND
pa_pend = 'X'.
CONTINUE.
ENDIF.
*-- Highlight entries where the SN delivery date is before the PO
* delivery date
IF gw_data-lfdat < gw_data-eindt.
FORMAT INTENSIFIED ON.
lv_adv = 'X'.
ELSE.
FORMAT INTENSIFIED OFF.
CLEAR lv_adv.
ENDIF.
lv_menge = gw_data-lfimg - gw_data-dabmg.
* Add by liza DEVK989704
clear: PARKING, T_PARK.
refresh: T_PARK.
Select * from ZPO_PARK into T_PARK
where vbeln = gw_data-vbeln
and lifnr = gw_data-lifnr
and matnr = gw_data-matnr.
Append T_PARK.
Endselect.
Loop at T_PARK.
PARKING = PARKING + T_PARK-menge.
Endloop.
gw_data-park = PARKING.
* End by liza DEVK989704
IF pa_fax IS INITIAL.
WRITE:/2(18) gw_data-matnr,
(40) lv_maktx,
gw_data-vgbel,
gw_data-eindt,
(04) gw_data-mfrgr,
(18) gw_data-verur,
gw_data-vbeln,
gw_data-lfdat,
(07) gw_data-lfimg UNIT gw_data-meins,
(07) gw_data-dabmg UNIT gw_data-meins,
(07) lv_menge UNIT gw_data-meins,
gw_data-lgort,
gw_data-erdat,
(01) lv_adv,
* Add by liza DEVK989704
(08) gw_data-park.
* End by liza DEVK989704
ELSE.
WRITE:/2(12) gw_data-matnr,
(26) lv_maktx,
gw_data-vgbel,
(16) gw_data-verur,
gw_data-vbeln,
gw_data-lfdat,
(07) gw_data-lfimg UNIT gw_data-meins,
(07) gw_data-dabmg UNIT gw_data-meins,
(07) lv_menge UNIT gw_data-meins,
gw_data-lgort.
ENDIF.
PERFORM write_vline.AT END OF lifnr.
If pa_dtim NE '000000'.
ULINE.
SKIP.
WRITE:/12 TS_VEND.
WRITE:/12 TS_ATT.
WRITE:/12 TS_FROM.
SKIP. "D01K934099
WRITE:/12'DELIVERY TIME:',pa_dtim. "D01K934099
SKIP. "D01K934099
WRITE:/12 TS_TEXT1.
WRITE:/12 TS_TEXT2.
WRITE:/12 TS_TEXT3.
WRITE:/12 TS_TEXT4.
Else.
ULINE.
SKIP.
WRITE:/12 TS_VEND.
WRITE:/12 TS_ATT.
WRITE:/12 TS_FROM.
WRITE:/12 TS_TEXT1.
WRITE:/12 TS_TEXT2.
WRITE:/12 TS_TEXT3.
WRITE:/12 TS_TEXT4.
Endif.
ENDAT.
move-corresponding gw_data to t_data.
move : lv_maktx to t_data-maktx,
lv_menge to t_data-menge,
lv_adv to t_data-adv,
parking to t_data-park.
append t_data.
L_X = 'X'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
NO_DIALOG = L_X
IMPORTING
OUT_PARAMETERS = GS_PRINT_PARAMS
VALID = G_VALID
IF SY-SUBRC 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
GS_PRINT_PARAMS-PAART = 'X_65_80'.
GS_PRINT_PARAMS-LINSZ = '185'.
* /*----------store the current selection screen details---------/
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = SY-REPID
TABLES
SELECTION_TABLE = T_RSPARAMS
EXCEPTIONS
NOT_FOUND = 1
NO_REPORT = 2
OTHERS = 3
IF SY-SUBRC 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* /*--- importing variable value set at first time to restrict the infinite loop --------/.
IMPORT VAR FROM MEMORY ID 'abc' .
VAR = VAR + 1 .
P_UNAME = SY-UNAME .
P_REPID = SY-REPID .
* /*------checking variable to restricted scecond time exction of this block of code---------/
IF VAR = 1 .
V_MEMID = 1 .
EXPORT VAR TO MEMORY ID 'abc' .
* /*-----------submitting the spool request--------------/
SUBMIT (P_REPID) WITH SELECTION-TABLE T_RSPARAMS
TO SAP-SPOOL
SPOOL PARAMETERS GS_PRINT_PARAMS
WITHOUT SPOOL DYNPRO
AND RETURN.
endif.
FREE MEMORY ID 'abc'.
* /*-------Calculating the lenth of report name--------/
v_len = STRLEN( P_REPID ) .
* /*-------consutrucing the database variable rq2name to search the spool request---------/
IF v_len >= 9 .
CONCATENATE P_REPID+0(9)
P_UNAME+0(3) INTO LC_RQ2NAME .
ELSE.
V_LEN1 = 9 - V_LEN .
DO V_LEN1 TIMES .
CONCATENATE V_TEMP '_' INTO V_TEMP .
ENDDO.
CONCATENATE P_REPID V_TEMP
P_UNAME INTO LC_RQ2NAME .
ENDIF.
* /*--------selecting the spool request using the above constructed variable----------/
SELECT * FROM TSP01 INTO TABLe IT_TSP01
WHERE RQ2NAME = LC_RQ2NAME .
* /*--------sorting the internal table-----------/
SORT it_tsp01 BY RQCRETIME DESCENDING .
* /*--------reading the first spool request-------/
READ TABLE IT_TSP01 INDEX 1.
* /*--------Convert Spool to PDF-----------/
IF GS_PRINT_PARAMS-PDEST IS INITIAL.
GS_PRINT_PARAMS-PDEST = 'LOCL'.
ENDIF.
CONCATENATE P_DEST T_DATA-LIFNR '.PDF' INTO G_FILENAME.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = IT_TSP01-RQIDENT
NO_DIALOG = SPACE
IMPORTING
PDF_BYTECOUNT = G_BYTECOUNT
TABLES
PDF = T_PDF
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. -
Problem in converting smartforms output in pdf
Hi all..
I am trying to convert smartform's output in PDF file..
I am able to convert smartforms's output in PDF but after that i can't see Print Preview..
Code is following...
REPORT ZMM_R402_FORM_TEST11.
TABLES : VBRK,J_1IEXCHDR.
SELECTION-SCREEN : BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-000.
*PARAMETERS : EXNUM TYPE EXNUM OBLIGATORY.
SELECT-OPTIONS : EXNUM FOR J_1IEXCHDR-EXNUM NO-EXTENSION OBLIGATORY.
PARAMETERS : EXDAT LIKE J_1IEXCHDR-EXDAT OBLIGATORY.
PARAMETERS : KUNNR LIKE VBRK-KUNAG OBLIGATORY.
PARAMETERS : SR_NO(12) TYPE C.
PARAMETERS : DATE1 TYPE EXDAT.
SELECTION-SCREEN : END OF BLOCK BLK.
DATA : FM_NAME(30) TYPE C.
DATA : SR(12) TYPE C.
UNPACK EXNUM-LOW TO EXNUM-LOW.
UNPACK EXNUM-HIGH TO EXNUM-HIGH.
DATA:
it_otf TYPE STANDARD TABLE OF itcoo,
it_docs TYPE STANDARD TABLE OF docs,
it_lines TYPE STANDARD TABLE OF tline.
Declaration of local variables.
DATA:
st_job_output_info TYPE ssfcrescl,
st_document_output_info TYPE ssfcrespd,
st_job_output_options TYPE ssfcresop,
st_output_options TYPE ssfcompop,
st_control_parameters TYPE ssfctrlop,
v_len_in TYPE so_obj_len,
v_language TYPE sflangu VALUE 'E',
v_e_devtype TYPE rspoptype,
v_bin_filesize TYPE i,
v_name TYPE string,
v_path TYPE string,
v_fullpath TYPE string,
v_filter TYPE string,
v_uact TYPE i,
v_guiobj TYPE REF TO
cl_gui_frontend_services,
v_filename TYPE string,
v_fm_name TYPE rs38l_fnam.
CONSTANTS c_formname TYPE tdsfname VALUE 'ZTEST'.
*CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = v_language
i_application = 'SAPDEFAULT'
IMPORTING
e_devtype = v_e_devtype.
st_output_options-tdprinter = v_e_devtype.
st_control_parameters-no_dialog = ' '.
st_control_parameters-getotf = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZMM_402_FORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
**WRITE:/ FM_NAME.
CALL FUNCTION FM_NAME
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
EXNUM = EXNUM-LOW
EXNUM1 = EXNUM-HIGH
DATE = EXDAT
KUNNR = KUNNR
SR = SR_NO
DATE1 = DATE1
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_job_output_options
DOCUMENT_OUTPUT_INFO = W_RETURN
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
.........................CONVERT TO OTF TO PDF.......................
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = v_bin_filesize
TABLES
otf = st_job_output_info-otfdata
doctab_archive = it_docs
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
........................GET THE FILE NAME TO STORE....................
CONCATENATE 'smrt' '.pdf' INTO v_name.
CREATE OBJECT v_guiobj.
CALL METHOD v_guiobj->file_save_dialog
EXPORTING
default_extension = 'pdf'
default_file_name = v_name
file_filter = v_filter
CHANGING
filename = v_name
path = v_path
fullpath = v_fullpath
user_action = v_uact.
IF v_uact = v_guiobj->action_cancel.
EXIT.
ENDIF.
..................................DOWNLOAD AS FILE....................
MOVE v_fullpath TO v_filename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_bin_filesize
filename = v_filename
filetype = 'BIN'
TABLES
data_tab = it_lines
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.
ENDIF.
Please Help me ..
How can i see print preview..use like this:
call function lf_fm_name
exporting
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param "Smart Forms: Control structure
mail_recipient = ls_recipient
mail_sender = ls_sender "Structure for Object ID
output_options = ls_composer_param "SAP Smart Forms: Smart Composer (transfer) options
user_settings = ' '
is_dlv_delnote = ls_dlv_delnote "Delivery Note Data: Transfer-Structure for Smartform
is_nast = nast "Nast
exceptions formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
if sy-subrc <> 0.
error handling
cf_retcode = sy-subrc.
perform protocol_update.
get SmartForm protocoll and store it in the NAST protocoll
perform add_smfrm_prot. "INS_HP_335958
endif.
*To read the Spool Number generated
read table it_job_output_info-spoolids into v_rspoid index 1.
concatenate 'aBC.pdf' into v_file_name.
submit rstxpdft4 and return
with spoolno = v_rspoid
with p_file = v_file_name.
clear: v_rspoid. -
I have a problem in converting smartform output to pdf format.
Hi,
While converting the smartform output to pdf format.
It is showing this error.
otf end command // missing in otf data.
I have used this function.
Assigning the OTFDATA to OTF Structure table
CLEAR gt_otf.
gt_otf[] = gs_otfdata-otfdata[].
Convert the OTF DATA to SAP Script Text lines
CLEAR gt_pdf_tab.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = gv_bin_filesize
TABLES
otf = gt_otf
lines = gt_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Please help me in this regard. Thanks in advance.Hi ,
I am getting this exception "err_conv_not_possible"
CALL FUNCTION f_name " '/1BCDWB/SF00000092'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = st_control_parameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = st_output_options
USER_SETTINGS = 'X'
ZST_TEXTSYMBOLS = ZST_TEXTSYMBOLS
wa_kna1 = wa_kna1
wa_claim_header = wa_claim_header
IMPORTING
DOCUMENT_OUTPUT_INFO = st_document_output_info
JOB_OUTPUT_INFO = st_job_output_info
JOB_OUTPUT_OPTIONS = st_job_output_options
TABLES
IT_CLAIM_VERSION = IT_CLAIM_VERSION
IT_CLAIM_ITEM = IT_CLAIM_ITEM
IT_CLAIM_PARTNER = IT_CLAIM_PARTNER
IT_FINAL = IT_FINAL
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
IMPORTING
BIN_FILESIZE = v_bin_filesize
TABLES
OTF = st_job_output_info-OTFDATA[]
DOCTAB_ARCHIVE = it_docs
LINES = it_lines
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
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.
HERE when i tried to debug it i got SY-SUBRC = 1.
Please help me in this regard. Thanks in advance. -
Converting simple report output to PDF print layout issue
Hi all,
I am converted one report output to PDF format, it is working fine in one DEV sever, but when we moved it to other server the layout of output preview & font size is not coming properly (as same in DEV server) in the new server. I am using the below code, please check & correct me if anything is wrong.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
copies = '1'
cover_page = space
destination = 'LOCL'
expiration = '1'
immediately = space
mode = space
new_list_id = 'X'
no_dialog = 'X'
user = sy-uname
line_size = 200
line_count = 65
* layout = 'Z_65_230'
layout = 'X_58_170'
sap_cover_page = 'X'
IMPORTING
out_parameters = mstr_print_parms
valid = mc_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc EQ 0.
**--Creating Spool Request.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_job_name
IMPORTING
jobcount = lv_job_count
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
**--Submitting the Report & Get the Output.
SUBMIT zpsr_submit_prcng WITH SELECTION-TABLE t_ebeln TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS mstr_print_parms
USER sy-uname " User for runtime authorizations
VIA JOB lv_job_name
NUMBER lv_job_count
AND RETURN.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_job_count
jobname = lv_job_name
strtimmed = 'X'
IMPORTING
job_was_released = lv_job_released.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Thanks & Regards
Avish
Moderator Message: Please use code tags when pasting code snippets. Also paste relevant portions of the code
Edited by: Suhas Saha on Jul 13, 2011 3:05 PMDear Alexander,
Thanks for the reply.
In this I am using the FM 'CONVERT_ABAPSPOOLJOB_2_PDF'. I have checked the settings from SPAD that is also same in both servers for particular output device. But the patches are diffrennt in both the servers, the server from which layout is not coming properly having the high level patches in compare to the other server(which is working fine). -
PAYABLES NOT GETTING THE REPORT OUTPUT IN PDF AFTER APPLYING RUP5 R12
Hi All,
RDBMS:10.2.0.3.0
Oracle Apps :12.0.4
OS:AIX 5.3
Problem Description:
We are presently facing an issue in Payables not getting the report output in PDF esp for the reports "Invoice Register", Invoice Hold Report and also other reports. We were able to generate the reports till our last test performed on last Thursday. This instance was cloned over the last weekend and probably the new upgrade to RUP5 R12,would have impacted it.
Concurrent Programs submitted are completed normal but on clicking "view output" results in Blank PDF output.
The error message what was shown is as below:
"Adobe Reader could not open 'AcrC.tmp' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)".
Where could we locate ther above 'AcrC.tmp' of Adobe Reader..
could anyone please share such an experience encountered for resolution..
Would appreciate an early response..
Thanks for your time!
Regards,I suggest you speak to your DBA/sysadmin. This is not likely to be a reports problem.
Check that you can see the output from apps through the viewer (the report may not hav output anything)
Check whether you can print anything on that printer from apps.
May also be worth checking to see if you can print to another printer from this report. -
Convert Report Program to PDF file
Hi All,
I need example of converting Report program to PDF file.
I am beginner so please give simple example to understand it properly ..
Please write the description along with the code so that i can understand it...
no long long programs please.
Thanks.
RajHi,
report zabap_2_pdf.
*-- Enhancements: only allow to be run with variant. Then called
*-- program will be transparent to users
*-- TABLES
tables:
tsp01.
*-- STRUCTURES
data:
mstr_print_parms like pri_params,
mc_valid(1) type c,
mi_bytecount type i,
mi_length type i,
mi_rqident like tsp01-rqident.
*-- INTERNAL TABLES
data:
mtab_pdf like tline occurs 0 with header line,
mc_filename like rlgrap-filename.
*-- SELECTION SCREEN
parameters:
p_repid like sy-repid, " Report to execute
p_linsz like sy-linsz default 132, " Line size
p_paart like sy-paart default 'X_65_132'. " Paper Format
start-of-selection.
concatenate 'c:'
p_repid
'.pdf'
into mc_filename.
*-- Setup the Print Parmaters
call function 'GET_PRINT_PARAMETERS'
exporting
authority= space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
in_archive_parameters = space
in_parameters = space
layout = space
mode = space
new_list_id = 'X'
no_dialog= 'X'
user = sy-uname
importing
out_parameters = mstr_print_parms
valid = mc_valid
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
*-- Make sure that a printer destination has been set up
*-- If this is not done the PDF function module ABENDS
if mstr_print_parms-pdest = space.
mstr_print_parms-pdest = 'LOCL'.
endif.
*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
mstr_print_parms-linsz = p_linsz.
mstr_print_parms-paart = p_paart.
submit (p_repid) to sap-spool without spool dynpro
spool parameters mstr_print_parms
via selection-screen
and return.
*-- Find out what the spool number is that was just created
perform get_spool_number using sy-repid
sy-uname
changing mi_rqident.
*-- Convert Spool to PDF
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid= mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
importing
pdf_bytecount = mi_bytecount
tables
pdf = mtab_pdf
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.
call function 'DOWNLOAD'
exporting
bin_filesize = mi_bytecount
filename = mc_filename
filetype = 'BIN'
importing
act_filename = mc_filename
tables
data_tab = mtab_pdf.
* FORM get_spool_number *
* Get the most recent spool created by user/report *
* --> F_REPID *
* --> F_UNAME *
* --> F_RQIDENT *
form get_spool_number using f_repid
f_uname
changing f_rqident.
data:
lc_rq2name like tsp01-rq2name.
concatenate f_repid+0(8)
f_uname+0(3)
into lc_rq2name separated by '_'.
select * from tsp01 where rq2name = lc_rq2name
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
endform." get_spool_number
Regards
Sudheer -
Is there a way to merge 3 or more report output in PDF into one
Hi All,
I know about the report sectioning. I am wondering is there any other way to merge 3 or more report output in pdf form to a single document.
I have seen that there are many thrid party tools. Wondering is there anything from Oracle reports feature or any Oracle product for this?
Thank You
Rajesh ALexIf not changing the reports design, third party tools is the only options. AFAIK, there is no Oracle proprietary tool for merging PDF files..
-
Oracle HTMLDB report output in PDF format using FOP
Hi,
We are currently using Oracle HTMLDB1.6.I am trying to implement the HTMLDB report output in PDF format.I got at document but it is not clear.Could you please let use know wheether anybody has already used in their organization.
Appreciate your response.
Regards
MuraiHey Murai,
did you read the technote:
http://www.oracle.com/technology/pub/notes/technote_htmldb_fop.html
There is anything explained!
greets,
tim -
Problem while converting smartform out to PDF.
Hi,
I have an issue while converting smartform output to PDF. After converting samrtform out to PDF, apostrophe(') is appearing as # in the pdf file. For example the word Indian's is getting printed as Indian#s. I'm using Helvetica font for printing this text.
How ever print preview is coming fine.
Could anybody provide me some inputs to solve this.
Thanks,
Rick.I'm using FM: CONVERT_OTF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lv_filesize
TABLES
otf = ls_job_info-otfdata
lines = lt_pdf_table
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF. -
Alignment problem in converting smartform printpreview into PDF
Hi all,
I am getting some alignment problem in converting smartform printpreview into PDF format, i.e the format of PDF is different from printpreviw of smartform.
kindly suggest something so that alignment is not changed while converting to PDF.
Regards,
Sumalathause below f.m to convert it into 255 characters....
CALL FUNCTION 'QCE1_CONVERT'
TABLES
t_source_tab = i_tline
t_target_tab = so_ali[]
EXCEPTIONS
convert_not_possible = 1
OTHERS = 2. -
Report output in PDF format instead of TEXT
Hello every1,
I am using oracle application E-bS version 11.5.10.2 and i want ORACLE reports output in PDF format instead of standard 'text' default format(the place where v register concurrent programs). so can any one tell me what changes should i do to achieve my goal i had change format as pdf in concurrent program and run report but it shows error as follows:
REP-3000: Internal error starting Oracle Toolkit.
REP-3000: Internal error starting Oracle Toolkit.
Plz. share your knowledge regarding.
Radhi
Edited by: user713 on Jun 20, 2011 9:32 AMHi,
check this support note.
Reference
Master Note : Comprehensive REP-3000 Troubleshooting and Overview Guide (Doc ID 200474.1)
Regards, roberto -
Printing report output in PDF format
Hi,
I want to know what are the settings needed to print a report output in PDF format, while executing the report from Oracle applications (Ver 11.5.6).
Report is executed as a concurrent request from Oracle applications.
Normally when we run the report from Oracle applications, output will be opened in a internet browser(IE) in HTML format. But I want the output to be opened in PDF format instead of HTML.
OS: Sun Solaris 2.8.
Thanks & Regards,
SarishHi Sarish
Please contact Oracle Support for an answer or to customise your application so that it prints a report output in PDF Format.
To get PDF output you must run report/job with DESFORMAT=PDF in the command line instead of DESFORMAT=HTML/HTMLCSS.
Regards
Sripathy -
Converting servlets output to PDF fle
How to convert Java Servlets output html file to PDF file or a Word document.
not sure what u mean by 'convert' the output to PDF or word document
Do you mean you want to force the browser to open file using MSWord / PDF viewer? If yes :
For showing output as a word document, you can set the servlet response MIME type to 'application/ms-word' and set its extension to .rtf . You can then use a RTF template to build servlet output (since RTF is flat file format). By replacing placeholder tags in RTF template, you can generate content.
For showing output as PDF, you'll need some library for PDF writing.
hth,
Subodh -
Save Oracle Report Output as PDF format in the system folder
Hi,
Is it possible to Save Oracle Reports Output as PDF(file_name.pdf) format in the system folder(say C:\temp\file_name.pdf).
I am using Repors 10g R2.
Note : i dont want to open the report preview as PDF, just i want to save the PDF file in the a specified location.
Regards,
Suresh.VHello,
Yes, it is possible.
Execute the Reports passing the parameters :
DESFORMAT=PDF DESTYPE=FILE DESNAME=C:\temp\file_name.pdf
Regards
Maybe you are looking for
-
IPhone 3g won't sync to iTunes or App store.
i bought my iPhone 3G this morning. it synced to the apple store computer and gave me somebody's ID that was playing with the computer's at Apple. now i'm at work and can't buy any music or apps on my account cause it won't sync my account on the iPh
-
Please help!! I have iPhone 4 so does my wife, we each have our own apple id's for these devices. We have just got an ipad to share for at home use. Is there a way to have both our id's on the ipad to share our music photos etc?
-
Java applets in reports?
I'm working with a client who's using a product that stores strings of data that are translated to simple floor plan drawings. They'd like to be able to print reports with these drawings in them, but the only display tool I have available is a Java a
-
Retrieving BEx Query Results Area for use in Excel formulas
Hello, I run BEx queries in workbooks and then use Excel formulas ( mostly VLOOKUP(LookupValue, ResultsArea, ColumnReturned,) ) to retrieve certain information from the query ResultsArea. ****Problem: Depending on the query parameters, the query "Res
-
Problems syncing iTunes 10.5 with Photoshop Elements
Hi all, I've used the "Sync Photos from Photoshop Elements" option in iTunes for a long time to sync photos with my iPhone and iPad. Something's gone wrong with this since I upgraded to iTunes 10.5. I use Photoshop Elements 7. For the iPhone, I sync