How to convert the output of the report (program) to PDF file , Please HELP
Good Morning, ALL
I have done a small program in ABAP that lets the employee enters his information. Once the emplyee enters the information and executes the program, I want the result to be saved in a PDF file (in any kind of format). I did try to do this action BUT I couldn't. ( ABAP Beginner LOL ).
This is the code ( The main thing ):
SELECTION-SCREEN BEGIN OF BLOCK Yours WITH FRAME TITLE text-001.
PARAMETERS: NAME(15) TYPE C OBLIGATORY lower case,
CITY LIKE NAME OBLIGATORY ,
DATE LIKE SY-DATUM DEFAULT SY-DATUM MODIF ID ZZZ,
ID# TYPE C LENGTH 9,
PHONE TYPE C LENGTH 10.
SKIP 4.
SELECTION-SCREEN END OF BLOCK Yours.
SELECTION-SCREEN BEGIN OF BLOCK More WITH FRAME TITLE text-002.
PARAMETERS: MALE RADIOBUTTON GROUP G1 DEFAULT 'X',
FEMALE RADIOBUTTON GROUP G1.
SELECTION-SCREEN END OF BLOCK More.
SELECTION-SCREEN BEGIN OF BLOCK Details WITH FRAME TITLE text-003.
PARAMETERS: P_DATE TYPE DATUM,
Locate TYPE C LENGTH 30.
SELECTION-SCREEN END OF BLOCK Details.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ZZZ'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Any useful help will be appreciated, THANK YOU
Hi
Try the below code.
REPORT ztest_notepad.
"Variables
DATA:
l_lay TYPE pri_params-paart,
l_lines TYPE pri_params-linct,
l_cols TYPE pri_params-linsz,
l_val TYPE c,
l_no_of_bytes TYPE i,
l_pdf_spoolid LIKE tsp01-rqident,
l_jobname LIKE tbtcjob-jobname,
l_jobcount LIKE tbtcjob-jobcount,
spoolno TYPE tsp01-rqident.
*Types
TYPES:
t_pripar TYPE pri_params,
t_arcpar TYPE arc_params.
"Work areas
DATA:
lw_pripar TYPE t_pripar,
lw_arcpar TYPE t_arcpar.
DATA:
it_t100 TYPE t100 OCCURS 0 WITH HEADER LINE,
it_pdf TYPE tline OCCURS 0 WITH HEADER LINE.
"Start-of-selection.
START-OF-SELECTION.
l_lay = 'X_65_132'.
l_lines = 65.
l_cols = 132.
"Read, determine, change spool print parameters and archive parameters
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
in_archive_parameters = lw_arcpar
in_parameters = lw_pripar
layout = l_lay
line_count = l_lines
line_size = l_cols
no_dialog = 'X'
IMPORTING
out_archive_parameters = lw_arcpar
out_parameters = lw_pripar
valid = l_val
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF l_val space AND sy-subrc = 0.
lw_pripar-prrel = space.
lw_pripar-primm = space.
NEW-PAGE PRINT ON
NEW-SECTION
PARAMETERS lw_pripar
ARCHIVE PARAMETERS lw_arcpar
NO DIALOG.
ENDIF.
"Get data
SELECT *
FROM t100
INTO TABLE it_t100
UP TO 100 ROWS
WHERE sprsl = sy-langu.
" Writing to Spool
LOOP AT it_t100.
WRITE:/ it_t100.
ENDLOOP.
NEW-PAGE PRINT OFF.
CALL FUNCTION 'ABAP4_COMMIT_WORK'.
spoolno = sy-spono.
"Convert spool to PDF
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spoolno
no_dialog = ' '
IMPORTING
pdf_bytecount = l_no_of_bytes
pdf_spoolid = l_pdf_spoolid
btc_jobname = l_jobname
btc_jobcount = l_jobcount
TABLES
pdf = it_pdf.
"Download PDF file C Drive
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\itab_to_pdf.pdf'
filetype = 'BIN'
TABLES
data_tab = it_pdf
Hope this helps you.
Similar Messages
-
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 -
I'm getting this problem when trying to update my iphone 3gs it says that the iphone software could not be contacted and I went on youtube got some advise to go into my hard drive to fix the error I have nothing in my host file please help me if you can this is all new to me.
Read this: iOS 4: Updating your device to iOS 5 or later
... oh I think it is a 3gs or a 3
This makes a difference. What does it say in Settings > General > About? -
Re.problems with translator after converting pdf file.please help:-)
Please can someone help me.
i've converted a pdf file to a word document but it was a scanned document so word had to translate it but its come out as a load of gibberish.
i have over a hundred pages of corrections to make because of it so i was wondering if any of you could either tell me what i could of done wrong r tell me how to do it right:-)
thanks a bunch!!!You cannot use Reader to do what you want. Depending on the language of your original document, you might be able to convert the document from a scan to text with Acrobat Professional. You can also investigate programs that are dedicated to OCR.
-
How To Edit a .pdf file - Please Help!
When I Googled the above question, I was told to download the Adobe Acrobat XI.
I tried downloading the trial version. I was then told to download the Creative Cloud to be able to download Acrobat XI.
I downloaded Creative Cloud, then I was taken to the Adobe Applications Manager Page which show a bunch of apps to download.
I don't know which app I will need for the editing. I was looking for Acrobat XI, but it's not showing anywhere.
I tried downloading Photoshop. This took more than 2 hours. After the download was complete, I tried launching it, but nothing happened.
I went back & double-checked the instructions, & I'm directed & got stumped at the Applications Manager page once more.
I find this very frustrating. I wish it were not this complicated.
I just want to edit a .pdf file, and nothing else. I'm not sure if I want to go through all these maze, or just use FIVVER, pay $5.00 & AVOID all these hassles.@nikoledeon.
PLEASE HELP!Downloads available:
Suites and Programs: CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
Acrobat: XI, X | 9,8 | 9 standard
Premiere Elements: 12 | 11, 10 | 9, 8, 7
Photoshop Elements: 12 | 11, 10 | 9,8,7
Lightroom: 5.5 (win), 5.5 (mac) | 5.4 (win), 5.4 (mac) | 5 | 4 | 3
Captivate: 8 | 7 | 6 | 5
Contribute: CS5 | CS4, CS3
Download and installation help for Adobe links
Download and installation help for Prodesigntools links are listed on most linked pages. They are critical; especially steps 1, 2 and 3. If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'. -
Need help converting MAC OS 9 to MAC OS X sound files - PLEASE HELP
Hi,
I have some old MAC OS 9 sounds that I would like to convert to work with MAC OSX.
I noticed that these files I backed up on CD years ago are now reading as Unix Executable Files.
How do I convert them to work with MAC OS X?
Sincerely,
DrewDepending on the format, some sounds can be converted with iTunes or QuickTime Pro - see this Apple document for more information. For other formats, you can use third party converters such as SoundConverter.
-
To view the Flash(R) technology content in this PDF file
To view the Flash(R) technology content in this PDF file, please install this version of Flash Player that supports Adobe(R) Reader(R) and Acrobay(R). Options are "Proceed to download page" "Learn more" "Cancel" I tried them all.
I installed the latest flash player as it asked and still when I go to open the file this window always pops up.
Please help
Message was edited by: VictorguymYou need to install the right version - see http://acrobatninja.com/2013/02/flash-player-in-acrobat-family.html
-
Does anyone know how to convert the output from the standard report to xml?
Does anyone know how to convert the output from the standard SAP report to xml?
since it a standard report which you cannot modify you can only do the following.
submit report exporting list to memory
then
list from memory and then
use the returned itab along with CALL TRNSFORMATION key word to convert to xml.
but this only going to place the whole list content (including data and formating lines,etc) into a xml element and not the actual data alone in the list . -
How to get the output of the report in pdf format
how to get the output of the report in pdf format?
Thanks in advance,
madan.Refer these links
http://www.sap-img.com/bc037.htm
http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF -
How to make checkbox field inactive in the output of ALV report.
Dear All,
I am having one ALV report in whose output there are checkboxes against each record. Example: the output columns of my ALV report are:
Checkbox, Sales Document No, Billing Document No.
Now, my requirement is that if for the Sales Document No there exists any Billing Document No in the output then the Checkbox should be inactive but if the Billing document coloumn is empty for a particular Sales Document No then only the Checkbox field should become active.
Kindly guide me on how to make this checkbox field inactive.
Waiting for your reply.
Warm Regards,
N.JainHello,
Follow the below steps:
1.Define as--> GS_STATUS TYPE SLIS_STATUS,
2.check layout check box fieldname is not initial.
then set the status according to your logical conditions
GS_STATUS-FLG_CHECKBOXES_ACTIVE = 'X'
Hope this would help you.
Let me know your feedback.
Regards,
Raju -
How to download the output of a report along with column header
Hi,
Could someone please tell me on how to download the output of a report along with column header to .txt format. A download option needs to be given to the user using physical and logical file names .The report basically contains header details and item details and requirement is to download the same format into an .txt format.Hello,
Try this FM:
Data: being of itab occurs 0,
matnr like mara-matnr,
maktx like makt-maktx,
end of itab.
data:begin of fld_tab occurs 0,
fld_name(20),
end of fld_tab.
fld_tab = 'Material'.
append fld_tab.
fld_tab = 'Material Desc'.
append fld_tab.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = ' '
CODEPAGE = ' '
FILENAME = 'C:\1.txt '
FILETYPE = 'DAT'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = itab
FIELDNAMES = fld_tab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Naimesh -
How to hide the specified rows in the output of the report?
Hello all,
I have a requirement where i have to hide some of the lines (<b>initial 6 lines</b> that is <b>6 rows</b>) in the output of the report.
How would I go about doing this?
Thanks for you time.Hello Sai,
I believe this is query output ( e.g., )
Country Sales
India $100
USA $200
Germany $300
You want to hide the line Germany $300
Case 1:
If you can change the query, Filter on Country and exclude Germany
Case 2:
If you can not change the query, use url appending and filter out Germany
Check webapi reference for the exact commands
Case 3:
Only if you are using the NW2004s front-end, Report designer will be available for you. In this, you can delete the rows that you do not want and publish in web.
Case 1 and 2 solutions are available in older versions of front-end as well.
Regards,
Sheik Bilal -
How to get the output of the Send Separate Remittance Advices in XML in R12
Hi All,
I have a requirement where we want the output of the standard report 'Send Separate Remittance Advices' to come in XML, currently its coming in PDF format.
Can you please help?
Thanks,
Dilip
Edited by: 990784 on Mar 12, 2013 2:57 PMRefer these links
http://www.sap-img.com/bc037.htm
http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF -
Make the output of the BI report rtf file some fields non editable
Hello All,
I want to make some fields in the output of the BI report as editable and some non editable. Any output format is fine (PDF, RTF or HTML) Please let me know if anyone knows how to do it.
Thanks in advance..
AnuYou can add RTF to active allowed output type list (provided that your reporting system supports it) by going to CustomerReportExtensions.xml file and adding the following node right after ParameterTypes node:
<ActiveReportOutputTypes configChildKey="key">
<ActiveReportOutputType key="RTF" value="RTF" extension=".rtf"/>
</ActiveReportOutputTypes> -
How to generate the output of a BSP application in PDF format?
Hi,
I need to modify one BSP application, which generates its output in the form of PDF. I have checked all the methods in the bsp pages and its corresponding controller class's. I couldn't find any relevant method, which deals with generating the output in PDF.
Could you please share your valuable thoughts on this?
Again it would be helpful, If anyone of you share some knowledge on Interactive Adobe Forms.
Thanks,
John>
I am using oracle version 11.2.0.1, I have set a cronjob which will run on every 15 minutes and give us a log file mentioning the execution time taken for that SQL query:-
The above query will return the output as well as the time taken for execution of the query. I want to suppress the output of the query and only want the time taken to be printed. Is it possible by set commands. I have marked the output as bold and made it Italic.
>
How would that even be useful?
A query from a tool such as sql*plus is STILL going to send the output to the client and the client. You can keep sql*plus from actually displaying the data by setting autotrace to trace only.
But that TIME TAKEN is still going to include the network time it takes to send ALL rows that the query returns across the network.
That time is NOT the same as the actual execution time of the query. So unless you are trying to determine how long it takes to send the data over the network your 'timing' method is rather flawed.
Why don't you tell us WHAT PROBLEM you are trying to solve so we can help you solve it?
Maybe you are looking for
-
OS detected: AIX Jan 14, 2014 4:33:52 PM com.siebel.etl.etlmanager.DerivedConstants getDacDomainHome INFO: The DAC_DOMAIN_HOME set to /apps/DAC11g/dac Jan 14, 2014 4:33:52 PM com.siebel.etl.etlmanager.DerivedConstants getDacConfigLocation INFO: The D
-
when syncing iPad to MacBook Pro itunes says "this computer is no longer authorized for apps that are installed on the ipad" . When I enter my id and password it tells me the computer is authorized.
-
Can not update folio's since latest Folio Builder panel update
I want to add articles to my folio, but since the latest update after uploading one page (say vertical) the Folio Builder keeps spinning (see image) and if I log on to the website it syas articles are corrupt. Now I need this folio to be updated befo
-
Do anybody notice a problem with ios 6 autocorrect
It be correct sometimes and they will change it to what they think I meant, also it makes stupid errors like if I would put change it will correct it to changechange change oh words that aren't words.
-
Hi all - I have the latest version of Dreamweaver CC 2014 (6733 Build). It is frustratingly slow. I searched and found a lot of discussions on this, tried some recommendations, but have not found a resolution to this problem - and I need to get this