Spool output
Hi experts,
can any one of you help me out in resolving the issue regarding the spool output, right now iam generating a file in spool which has output for more than one page and the output has a blank line between the pages.
now my requirement is to avoid the blank line between the pages in the file, can any one send me a sample code for this.
many thanks in advance,
regards,
madan
hi,
Check your report any reserved line specified for each page. If it is there remove.
Thanks
Venkat
Similar Messages
-
Not generating a spool output in the background job
Hi Team,
I have an alv report and If I schedule the program using SM36 transaction it is not generating the spool ouput.
If I run the same program in background mode when we use se38 and select execute in background in program menu and it works successfully and generates alv grid list in the spool output.
But, user wants to schedule the job in sm36 and check the same output in spool. Please advise why it is not generating.
Note:I am using the cl_salv_table=>factory method to generate the output.
Thanks in advance,
Sunil Kumar.This is not really an ABAP question and you might want to ask your Basis admin for assistance. But I believe that spool will not be generated if you don't specify print parameters for a step. When you define the step in SM36, make sure to specify the print parameters.
-
ALV list display in a Background job - Spool output
Hi,
We are currently working on a report scheduled to be run in the background job, and the ALV list is displayed in the spool output.
ALV list in the spool does not look the same as front run job, the column headers are all crowded together, and there is no grid in-between different columns or rows. It's hard to read.
Is there a way to add grid for this kind of output?
Thanks!Hi Deepak:
I expanded your report into two rows display, and the grid in the spool display simply gone!
report zzscratch line-size 120 no standard page heading.
type-pools slis.
tables pa0001.
data : li_field type standard table of slis_fieldcat_alv,
gi_events type standard table of slis_alv_event,
gr_layout_bck type slis_layout_alv,
gr_save like disvariant,
gr_events type slis_alv_event.
types : begin of gtt_emp,
pernr type persno,
ename like pa0001-ename,
uname like pa0001-UNAME,
end of gtt_emp.
data : lr_field type slis_fieldcat_alv.
data : lc_rep like syst-repid.
data : li_emp type standard table of gtt_emp,
lr_emp type gtt_emp.
data : gv_ref_table type lvc_rtname.
gv_ref_table = 'CATSDB'.
lr_field-fieldname = 'PERNR'.
lr_field-ref_tabname = gv_ref_table.
lr_field-inttype = 'N'.
lr_field-outputlen = 8.
lr_field-seltext_l = 'EMPLOYEE Number'.
append lr_field to li_field.
lr_field-fieldname = 'ENAME'.
lr_field-ref_tabname = 'PA0001'.
lr_field-inttype = 'C'.
lr_field-outputlen = 40.
lr_field-seltext_l = 'EMPLOYEE Name'.
append lr_field to li_field.
lr_field-fieldname = 'UNAME'.
lr_field-ref_tabname = 'PA0001'.
lr_field-inttype = 'C'.
lr_field-outputlen = 12.
lr_field-seltext_l = 'User Name'.
lr_field-row_pos = 2.
lr_field-col_pos = 1.
append lr_field to li_field.
lc_rep = sy-repid.
gr_layout_bck-edit_mode = 'D'.
gr_save-report = sy-repid.
lr_emp-pernr = '00000001'.
lr_emp-ename = 'abc'.
lr_emp-uname = 'testus'.
append lr_emp to li_emp.
lr_emp-pernr = '00000002'.
lr_emp-ename = 'def'.
append lr_emp to li_emp.
lr_emp-pernr = '00000003'.
append lr_emp to li_emp.
lr_emp-pernr = '00000004'.
append lr_emp to li_emp.
lr_emp-pernr = '00000005'.
append lr_emp to li_emp.
lr_emp-pernr = '00000006'.
append lr_emp to li_emp.
lr_emp-pernr = '00000007'.
append lr_emp to li_emp.
lr_emp-pernr = '00000008'.
append lr_emp to li_emp.
end-of-selection.
Function module for ALV grid display
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_buffer_active = 'X'
i_callback_program = lc_rep
is_layout = gr_layout_bck
it_fieldcat = li_field
i_save = 'A'
is_variant = gr_save
it_events = gi_events
TABLES
t_outtab = li_emp[]
EXCEPTIONS
program_error = 1
others = 2.
if sy-subrc <> 0.
clear gr_messages.
message e023 into gr_messages.
append gr_messages to gi_messages.
endif. -
Changing the file format of spool output when scheduling a background job.
Hello Experts,
I have an issue. It is related to Spool output format. I created a job for one report program for which the output is a list output. I have added one recipient in the 'Spool list recipient' while creating the job SM36. After the job is finished the spool output is sent to the recipient mail id as .htm format as an attachment. But the attachment should be excel sheet or text file. No coding in the program should be used to convert the file format. Only settings in the spool while creating job should be manipulated. Please help me in solving this issue.
Regards.Hi Sunil,
You can use the logic for converting spool to PDF using program : RSTXPDFT4 . Alternatively you can use FM: CONVERT_ABAPSPOOLJOB_2_PDF . In this FM you need to pass the Spool id .
u can make use of these FM's SO_DOCUMENT_SEND_API1
SO_NEW_DOCUMENT_SEND_API1
Check out the following wiki:
https://wiki.sdn.sap.com/wiki/display/Snippets/ConvertsspoolrequestintoPDFdocumentand+emails
hope this will use full to you.
Thanks!! -
How to send the spool output to the specific user during ALE distribution
Hi All
In ALE internal order Configuration done by BAPI Method SAVEREPLICA Business object BUS2075whenever user changed the internal order which is moved to the destination system because of change data setting in data element fields.
I want to know how to send the spool output of the changed internal order to the specific user during ALE distribution.
Please help me to reslove the above issue
Thanks & Regards
KRISHGUNASolved by myself
-
Background job - Spool output screwed up.
Hi Friends,
i am running a report in background and i have 40 to 50 columns as a result the output of the back ground job spool output does not show in one lone but as soon as it reaches to the certain point it splits the line and shows one line as as two...
what could be the problem?
thank you,
pasala.Check
In your report
- [REPORT - list_options|http://help.sap.com/abapdocu_70/de/ABAPREPORT_LIST_OPTIONS.htm] [LINE-SIZE width|http://help.sap.com/abapdocu_70/de/ABAPREPORT_LIST_OPTIONS.htm#&ABAP_ADDITION_2@2@]
- [NEW-PAGE|http://help.sap.com/abapdocu_70/en/ABAPNEW-PAGE.htm] [LINE-SIZE width |http://help.sap.com/abapdocu_70/en/ABAPNEW-PAGE_OPTIONS.htm#&ABAP_ADDITION_4@4@]
In print parameter of the step/job
- [SUBMIT - spool_options |http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_PRINT_PARAMETERS.htm] [SPOOL PARAMETERS pri_params|http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_PRINT_PARAMETERS.htm#&ABAP_ADDITION_1@1@] or [LINE-SIZE width |http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_LIST_OPTIONS.htm#&ABAP_ADDITION_1@1@]
Also read [Printing Lists |http://help.sap.com/abapdocu_70/en/ABENPRINT.htm] and [SET_PRINT_PARAMETER|http://www.sdn.sap.com/irj/scn/advancedsearch?query=set_print_parameters] for LAYOUT and LINE_SIZE parameters.
Regards,
Raymond -
Page breaks appear in the spool output of report when run in the background
Hi All,
Report is using fm 'REUSE_ALV_GRID_DISPLAY' to display the report. parameters passed to this fm for display are :it_fieldcat,is_layout,it_events,t_outtab.
Page breaks appear in the spool output when report is run in the background.These page breaks needs to be removed. When executed in the background, the excel extract should be the same as if pulling directly from the report itself.
How to remove the page breaks in background?
Thanks & Regards,
Abhishek SinghHi
You can use the below code , which the reprt run in background. If you run the report in background thenyou need to use 'REUSE_ALV_LIST_DISPLAY'
if sy-batch = ' '.
call 'REUSE_ALV_GRID_DISPLAY'.
else.
call 'REUSE_ALV_LIST_DISPLAY'.
endif.
if you are using OO alv then write this code..
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING e_offline = off.
IF off IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
ENDIF.
Regards -
Spool output not appearing on one page
Hello Experts,
When program runs in foreground, I am getting correct output i.e. ALV blocks are displayed on one page only.
But when running same program in background, I got output in spool and when looked at spool output that time I realized that the ALV blocks are getting printed on new page.
So instead of displaying 4 pages it is displaying 8 pages in spool.
I ran the same report on quality in FOreground as well as background and output appears to be correct.
But not sure why it is giving distorted (printed on new pages) in SPOOL output.
Appreciate your help.
Thank you.
SaurabhHI Saurabh,
Check the Layout which you are passing which scheduling the job. It seems to be a different layout as compared to other system & hence the issue.
Thanks,
Best regards,
Prashant -
Spool output in Excel sheet format
Hi,
We have background job , which creates a spool output in Internet Explorer format. Customer needs this in Excel format.
Wondering, if any authorizations to be changed for file type? or this is a set in program level?
Thanks,
SamYes....Currently the customer email address is added to "Spool list Recipient" in SM37. This way, spool output is sent to customer through email. Currently it is in HTML format.
Thanks,
Sam -
Redirecting spool output to a file on app. server
I'm running a SAP report as a background job.
I hve a requirement to send the spool output to a file on app. server. This needs to happen automatically in background.
I'll appreciate any suggestion.Hi,
use report from Re: output to pdf format and substitute pc-download with file transfer
good luck
Andreas -
Hello, How do I tell sql+ to spool output file from windows to Unix server?
Hello, How do I tell sql+ to spool output file from windows to Unix server?
I am new to SQL+ and just learned how to spool the file. But file is saved in my local windows enviroment and since it's 2GB in size...I want to spool it directly to another remote unix server.
Pls answer in detail... I have been to most of the thread and didn't see relevant answer to above question.
Am I suppose to develope some script which FTP the spool file directly to the server I want to
or
i Have to use UTL_FILE Package ?
Thanks for replyYou may not be able to...
SQL*Plus can only spool to the local machine. If you have mapped a directory on the Unix server from your Windows machine, you can specify that directory in your SPOOL command.
You could telnet to the Unix server, run SQL*Plus there, and spool the file to a local (Unix) directory.
If the Unix server is also the Oracle database server, you could use the UTL_FILE package rather than using SQL*Plus to spool a file.
If the Unix server is also an FTP server, you could also FTP the file from your local machine to the server.
Of course, I would tend to re-examine a requirement to regularly generate a 2 GB text file. It seems likely that there is a better way...
Justin -
Need Spool output file in Excel format
Hi,
We have background job , which creates a spool output in Internet Explorer format. Customer needs this in Excel format.
Wondering, if any authorizations to be changed for file type? or this is a set in program level?
Thanks,
SamHi Sam,
This need to be fixed at the program level only,so you need an ABAPer to make the changes in out put. There is nothing to do with authorizations.
Regards,
Hari.
PS: Award points if helpful. -
How to suppress line #s fr. rows in SPOOL output file when I use GET
I'm having difficulty suppressing line #s which show up in my SPOOL output. That is, when I run the following
SPOOL MySpoolOutputFile.txt
GET SpoolHeader.txt LIST
where MySpoolOutputFile is my spool output destination and SpoolHeader is what I'm getting and displaying in the console.
I get a result like the following:
1 This is my first row
2 This is my second row
3 This is my third row
4 This is my fourth row
5 This is my fifth row
I have my environmental variables set to the following:
SET FEEDBACK OFF
SET TRIMSPOOL ON
SET LINESIZE 100
SET SQLNUMBER OFF
SET SQLPROMPT ''
I'd like to suppress the line numbers but can't find any other SQL*PLUS environment variable that seems to let me do this....
Thanks, in advance, for any advice!
Chris
null1. Is the first column in the select clause "rownum"?
--Stephen
null -
Spool Output Error - last 2 lines of the list were dropped on spool output
Hi,
I am having problem of printing a report in ALV format. The last 2 lines were dropped on the spool output. It was actually dropping the last 2 lines on every row break.
This problem occurs ever since we did a support pack upgrade to SAPKH47030 and SAPKB62064.
Please help.
Thanks
GianaApply OSS note 1100728 which was corrected in SAPKB62065.
Problem was caused by support pack SAPKB62063 and SAPKB62064. -
We are currently scheduling some standard reports in jobs. We would like to convert the spool output to PDF. Is there a way to parameterize the network location such that I can use the same PDF print driver to print to different locations specified in the print specifications in the job ? Is there such a PDF print driver for Windows which would allow me to pass the print location instead of a pop-up ?
Thanks
SridharHi,
Use the FM convert_otfspooljob_2_pdf
see this link for example Re: Download in PDF format
"Do not use CONVERT_ABAPSPOOLJOB_2_PDF for script or Smartforms
Prabhudas -
Convert spool output of ABAP list into excel and send email
Hello All,
I have a requirement where we need to
1. schedule a background job programtically
2. moniter backround job (if complete or not)
3. once its complete take spool output ,convert into excel and email.
I have following difficulties.
1. i have reached upto stage 3. However, i am not getting proper ouput of excel via mail. it contains junk characters. I searched SDN and tried various option but not successful.
2. AT last i have submited report and collected output in memory rather than submiting back ground job. Now excel out put is coming somewhat as required but while sending mail , i am getting limitation of 255 chars . My excel row has more than 255 line size.
Please suggest.
Thanks in advance,
jigs.
<<text removed>>
Edited by: Matt on Jul 1, 2009 3:52 PM - removed point offerI've edited your post. Please take the time to read the Rules of Engagement of these forums. Offering points is not permitted for reasons outline in the Rules of Engagement.
matt
Maybe you are looking for
-
Send java mail throws KM - problems sendMail
Hellow I implementing the Java send mail post in send mail throws NoClassDefFoundError: javax/mail/MessagingE But I have a little problem with the sentence: <b>sendMailSvc.sendMail(mailItem, iuser);</b> The stranger is that NetWeaver protests to me t
-
Query regarding Business Partner Address in SAP B1?
Hi Friends, WHile i extract SAP datas for my ETL Product,I found some issues..Hereby i m telling the steps to reproduce that in Demo database of OEC Computers.. 1.Open SAP B1 Business Partner data 2.Open C40001 Business partner data.. 3.Open Addresse
-
Row_number function not starting from 1
I have two row_number functions in my select statement both has same columns and condition for partition and order by, except one column in order by which is being ordered by DESC.below is function : row_number() over (partition by event_cd order by
-
Unable to Create Planning Level in BW3.5
Hi Friends: I am trying to use SEM-BPS in BW3.5. I am in the process of creating a PLanning Area. I created it and assigned a InfoCube to it. When i click on the Variables Tab of the Planning Area it asks me to register the object. I guess it assumes
-
Hi - I have a 1920x816 clip that I need to resize to 16:9 for a DVD. I would like it if possible to be full widescreen without letterboxing. What window size would be the best and is this something that I would resize using scale in FCP? Thanks.