Creating spool before displaying output
Hi,
I want to create spool while executing the program in online ( NOT IN BACKGROUND OR BACTCH JOB) and before displaying out put ( list ).
Means before writing or displaying the output from final internal table. I want create a spool for final internal table.
Please provide sample code to create spool for normal report online report ( not background )
we required created spool number also
Thanks,
Raju
Hi Raju,
Use this sample code to solve your problem.
TYPE-POOLS: slis.
TYPES: BEGIN OF str_mara,
matnr TYPE mara-matnr,
ersda TYPE mara-ersda,
ernam TYPE mara-ernam,
laeda TYPE mara-laeda,
aenam TYPE mara-aenam,
vpsta TYPE mara-vpsta,
END OF str_mara.
DATA: i_mat TYPE TABLE OF str_mara,
wa_mat LIKE LINE OF i_mat.
DATA:params LIKE pri_params.
DATA: days(1) TYPE n VALUE 2,
valid TYPE c.
DATA: obj TYPE REF TO cl_salv_table.
SELECT matnr
ersda
ernam
laeda
aenam
vpsta
UP TO 10 ROWS FROM mara INTO CORRESPONDING FIELDS OF TABLE i_mat.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = obj
CHANGING
t_table = i_mat.
CATCH cx_salv_msg .
ENDTRY.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = 'QAS'
list_name = 'ZTEST_VERTEX'
list_text = 'TEST'
no_dialog = 'X'
immediately = ' '
expiration = days
IMPORTING
OUT_ARCHIVE_PARAMETERS =
out_parameters = params
valid = valid
VALID_FOR_SPOOL_CREATION =
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 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.
TRY .
NEW-PAGE PRINT ON PARAMETERS params NO DIALOG.
CATCH cx_sy_nested_print_on .
ENDTRY.
CALL METHOD obj->display.
NEW-PAGE PRINT OFF.
Regards,
Vijay
Similar Messages
-
Display logo In PDF output ( Spool to PDF output )
Hi Experts,
In my requirement i am using 'REUSE_ALV_GRID' to display logo.
In our functionality we are executing report in background and we are converting spool into PDF output. Now our requirement is to display LOGO in PDF output.
Any pointers on this are appreciated.
Regards,
Bhanu.RHello,
Use the top-of-page parameter of the FM 'REUSE_ALV_GRID_DISPLAY' and use the FM REUSE_ALV_COMMENTARY_WRITE to add the logo to the I_LOGO export parameter to get the logo in the ALV output. Now convert this to spool and to pdf and you can get the logo in the pdf as well
Vikranth -
SAP Query: How to filter records from SAP Query output before display
Hi Friends,
Can I delete records from an SAP query basic list before it is displayed?
For example I want to delte all the orders whose system status is "RELEASED" before the basic list of that SAP query is displayed.
I have gone through SAP help and found out that we can write some code in <b>END code</b> section which will execute before the basic list of the query is displayed. But I could not figure out how the code this...following is an excerpt form SAP help.
<b>"The END-OF-SELECTION code consists of two parts (Before list output and After list output). The first part is processed before the list is output and the second part afterwards."</b>
Can anybody help me?
Regards,
Bharat.
Message was edited by:
Bharat Reddy VTry this simple procedure. <b>Hope</b> this should work for you.
You do the slection of the status in the List-Processing. say your final field of status flag is GF_STATUS.
Immediatly after that use this within the List-Processing.
CHECK GF_STATUS EQ '<RELEASED STATUS>'
How it works:
SELECT <> "<-------Query processing(system code).
*< Your code put in the List processing
CHECK GF_STATUS EQ '<RELEASED STATUS>' "< --only released records passed.
*>
ENDSELECT "<-----Query endselect(system code).
Please let me know the result.
Regards,
A.Singh
Message was edited by:
Amarjit Singh -
Hiding few columns before displaying alv grid output
Hi All,
I struck up at hiding few columns before displaying alv output. I have used used FM: REUSE_ALV_GRID_DISPLAY. By using this i am displaying 29 fields to the output. But before displaying the output i want to hide few columns among them, and also those fields have to be avialable for further selection by the user by using layout.
Kindly help me in this,
Regards
Srinivas KHi,
In field catalog set NO_OUT='X' for all the columns you want to hide. They will be available when changing layout for ALV, so you can show them at any time.
Regards
Marcin -
Pop problem while creating spool request in reuse_alv_grid_display
Hi Experts,
I am trying to create a spool request of alv
and problem is that i do not want pop-up window for asking output devices,
actually i am calling reuse alv in loop and following steps i have done:
w_print-print = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_BYPASSING_BUFFER = 'X'
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = FIELDCAT[]
I_DEFAULT = 'X'
I_SAVE = 'X'
is_print = w_print
TABLES
T_OUTTAB = T_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
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 give the solution.
Thanks
PankajHi,
Use FM GET_PRINT_PARAMETERS , and use command NEW-PAGE PRINT ON PARAMETERS <wa_params> NO DIALOG. before calling the alv FM.
ls_print-print = 'X'.
DATA: lwa_params TYPE pri_params,
lv_valid TYPE c.
CLEAR: lwa_params, lv_valid.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
in_parameters = lwa_params
layout = 'X_65_132'
line_count = 65
line_size = 132
no_dialog = 'X'
IMPORTING
out_parameters = lwa_params
valid = lv_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
MOVE-CORRESPONDING lwa_params TO ls_print-print_ctrl-pri_params.
ls_print-print_ctrl-pri_params-pdest = 'LP01'. " your printr device
NEW-PAGE PRINT ON PARAMETERS lwa_params NO DIALOG.
then call FM CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'.
this will work.
refer link [ALV - print - create spool request;
Regards,
Ravi. -
Create spool number for sap script
how to create a spool number for a SAP script. What is the program name which we should modify to write the code logic for spool creation for the tcode ME9F ?
Hi,
Spool Request in Transaction SP01 and there by generated a Spool Request Number.
Spool request is a document for which a print function has been selected. However, it has not yet been output to a printer or another device. The output data for the print document is stored partly formatted in a data store until an output request is created, that is, until it is sent to a particular output device.
The spool system uses a spool request to store the print data temporarily and to access it. The data is stored in a temporary format. You can also display the print document. The system automatically assigns a 10-digit ID number to a spool request.
Output request: From the point of view of the SAP spool system, an output request outputs the print data of a spool request to a particular output device.
Multiple output requests may exist for a single spool request. Each represents an instance of the output of the same spool request. Each of these output requests may have different attributes, such as the target printer or number of copies.
By differentiating between spool request and output requests, the spool system provides a means of storing the data temporarily.
You will get the spool no. in the parameter JOB_OUTPUT_INFO after calling the smartform function module in print program. The spool ids of the prints is stored in table JOB_OUTPUT_INFO-SPOOLIDS.
Also if this spool is being generated internal to your program, then SY-SPONO should have the value.
You need to create an Adobe Form Application, get the data from the backend based on Spool request number.
You can create an application in Webdynpro, wherein when you click on a button and the Adobe Form is displayed with all the data from the backend and you should be able to print it.
Does that answer your question ?
Cheers,
PANKAJ -
How to create spool in an online report
Hi All,
I have a requirement where the ALV report output has customers and details related to it.For example My report output has three customers(with a check box against it) and each customer has 5 line items.The user will select first and the last customer and press a push button provided.Once he clicks this push button, I should get the customers which are selected by the users and the line items related to this customers.I am able to capture all this.Now the real problem here is that I have to create a pdf document for each customer along with line items and send it as an email.In effect, in this scenario I have to create two pdf documents since the user has selected two customers on the output screen and send it to the email of that particular customer.Is there any FM available to create spool in the background for each of these customers(along with line items data) and make use of this spool number to generate a pdf document using CONVERT_ABAPSPOOLJOB_2_PDF.Once I get this I can send the email.
Please help!
Thanks in advance
SandeepThe following steps shows how to download the output data in to PDF.
1.Provide Spool Parameters using following function module 'GET_PRINT_PARAMETERS'.
--This function module will provide the print parameters for creating the output in the spool; the required parameters are passed to the OUT_PARAMETERS import parameter.
2.Submit the report to generate the output in the spool.
SUBMIT (sy-repid) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS wa_mstr_print_parms
WITH SELECTION-TABLE i_int_tab
AND RETURN.
--Submit the report to generate the output in the spool as i_int_table is an internal table with structure RSPARAMS. As variant allows you to set the names and contents of the parameter and selection options dynamically at runtime, we need to use the function module RS_REFRESH_FROM_SELECTOPTIONS to read the contents of the parameters and selection options of the current program into an internal table i_int_table with the structure RSPARAMS and pass that internal table in above manner.
3.To Find the spool number from the table TSP01
Data: l_rq2name LIKE tsp01-rq2name.
*Concatenate the report and User name as per the value available in the table
TSP01.
CONCATENATE f_repid+0(9)
f_uname+0(3)
INTO l_rq2name.
*Fetch the most recent spool from the TSP01 table
SELECT * FROM tsp01 WHERE rq2name = l_rq2name
ORDER BY rqcretime DESCENDING.
l_rqident = tsp01-rqident.
EXIT.
ENDSELECT.
4.Convert Spool to PDF using the FM : CONVERT_ABAPSPOOLJOB_2_PDF.
5.Download to local file by using the FM : DOWNLOAD
This function module returns an internal table data_tab contains the PDF formatted output.
Using above points your can create the output in the PDF from there you can send the email.
Hope your reqirement can met using the above five points.
Reward points please
Thanks,
Ravi Kanth -
Create spool in a program and read spool in same program
hi all,
i have a requirement like i have to create a spool in a program and should read that spool and send a email in same program.
i m done with creating spool and sending email but the problem is when i execute a program the spool is created only after total program execution, is there a way to create a compleate spool before finishing the report execution.
thanks,Solution:
call function 'GET_PRINT_PARAMETERS'
exporting
destination = 'LP01'
copies = count
list_name = 'ZTEST'
list_text = 'ZTESTSPOOL'
immediately = ' '
release = 'X'
new_list_id = 'X'
expiration = days
line_size = 90
line_count = 65
layout = 'X_PAPER'
sap_cover_page = 'X'
receiver = 'SAP*'
department = 'System'
no_dialog = 'X'
importing
out_parameters = params
valid = valid.
new-page print on parameters params no dialog.
write : hi this is the test for spool.
new-page print off.
commit work.
write : / sy-spono. "system variable for spool no
solved thanks
anupama. -
How to Fill value in Input fields before displaying ADOBE FORM
Hi to all,
Please can anyone tell me how to fill the entry in ADOBE FORM before displaying?
I have written a program to generate ADOBE FORM, but I need while displaying ADOBE FROM some input field should already be filled by value and can not be changed.
Please can anyone tell me how to do that in program?
Below is the program.
DATA: fm_name TYPE rs38l_fnam,
fp_docparams TYPE sfpdocparams,
fp_outputparams TYPE sfpoutputparams.
Parameters: p_pdf_form_name type fname.
fp_docparams-langu = 'E'.
fp_docparams-country = 'IN'.
fp_outputparams-preview = 'X'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = p_pdf_form_name
IMPORTING
e_funcname = fm_name.
E_INTERFACE_TYPE = E_INTERFACE_TYPE
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
IMPORTING
/1BCDWB/FORMOUTPUT = fp_outputparams
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3.
CALL FUNCTION 'FP_JOB_CLOSE'
IMPORTING
E_RESULT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
I shall be thankful to you for this.
Regards
Pavneet Rana
Edited by: pavneet rana on Jul 25, 2011 2:57 PMHello,
you need to provide the information via the interface, which you create for the Adobe form.
And then pass this values via the following function module inside your generation report.
CALL FUNCTION fm_name
check standard report : FP_EXAMPLE_01 as an example! -
Saving a delivery, does not create spool request
Hi,
I have a delivery and 2 output types. The print program of first output type already exists and I created one for the second one.
When I save the delivery, spool request gets created for the first output type but doesn for the one I created. Can anyon tell why?hi,
It has to be assigned to the second output type, the first one is for a different purpose.
Is there any change need to be done in program to correct it?
But, It does work when run through transaction. -
How to create Spool through ABAP program
How to create spool request for Smartforms through program. So I can go in TCODE SP01 and see the output of my smartforms.
Include the below code in ur program .......
DATA: PRINT_PARAMETERS TYPE PRI_PARAMS,
VALID_FLAG TYPE C LENGTH 1.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
IMMEDIATELY = 'X' "C_IMMEDIATELY
*LAYOUT = 'Z_48_144'
*LINE_COUNT = '48'
LINE_SIZE = '255'
*NEW_LIST_ID = C_NEW_LIST_ID
NO_DIALOG = 'X'
RELEASE = 'X'
IMPORTING
OUT_PARAMETERS = PRINT_PARAMETERS
VALID = VALID_FLAG
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4 .
G_PDEST = PRINT_PARAMETERS-PDEST.
NEW-PAGE PRINT ON PARAMETERS PRINT_PARAMETERS
NO DIALOG.
List of write statements to be output.......
NEW-PAGE PRINT OFF.
Reward if useful.............. -
Turn off external display output?
I've bought a nice big LCD TV mainly for consoles. Because I have it next to my iMac i've also connected that to the TV using a mini-dvi adapter and a dvi-hdmi cable.
It works great but I only want to use it for playing downloaded video and the like on the big tv.
When I'm not using it I want my iMac to free up the resources it must be using to achieve screen spanning but I cannot figure out a way to tell the iMac to disable external display output.
I've tried display mirroring figuring that it won't be eating up video RAM, but it causes page tearing on my mac when dragging windows around for example.
Even when the TV is unplugged from the mains the mac seems to be outputting to the dvi out, the only way to stop it is the yank the mini-dvi connecter from the back.
Are there any hacks or utilities that can manually turn dvi support on and off?Hello Mark
I'm using a 27" flat screen TV, mini DVI and 12' S-Video cable.
Mostly I watch DVD movies on that Display while working at the iMac's 17" it's also great for iPhoto Slideshows and PowerPoint.
Not to worry the TV supports it's own display and all you are doing is sending a signal to it's video card. Just turn it off or change the channel.
I tend to stay away from mirroring for the same reasons, but also because the TV's across the room.
Again not to worry the TV supports it's own display and all you are doing is sending a signal to it's video card. Just leave it connected up to prevent damage to DVI port, Adapter and cable. "yank not"
Just be sure to gather up all your windows back to the iMac Display befor shutting off or changing the channel.
Dennis
17" iMac Intel Core Duo 1.5GB Ram Mac OS X (10.4.9) Maxtor 300GB FireWire Creative Inspire 2.1 2G Nano -
MWA: Issue while capturing the values entered, before displaying the LOV
I have created a LOV in Mobile Web Application using PL/SQL procedure.
I'm not able to get the values entered by the user before displaying the List of values.
I need the values entered to pass it to the query.
There might be a seeded event or method to capture these values.
Any help would be appreciated.
Thanks,Before invoking Input task, I have created a transformation to initailize the payload elements, so that in the UI these field elements will be become editable.
I have an ADF table which is used to insert account details elements which is initialized in the transformation with namespace.You can simple use a ADF form to do this. Create ADF editable input fields in a panelFormLayout and wehn user enters values and clicks ona button .. pass those values to BPM payload.
See - http://andrejusb.blogspot.com/2010/10/initializing-oracle-bpm-11g-process.html -
"Filter Before Display" Erroring out in ARXRWRCT.fmb
Hi All,
We had a performance issue with the Reciepts screen in AR Superuser responsibility and according to the metalink note 418873.1, we made changes to the form ARXRWRCT.fmd. The change is given below:
ON-SITE Fix instructions: ARXRWRCT.fmb
1.Open the form.
2.Navigate to LOV's.
3.Select the LOV "RGW_BILLING_NUMBER". Open up the property palette. Change the property "filter before
display" from "NO" to "YES".
4.Save the changes, compile the form ARXRWRCT.fmb and ARXRWMAI.fmb to pickup these changes. Test the issue.
Now, when we compile the above mentioned forms after making changes, we are encountering the below errors.
For Form ARXRWRCT
FRM-30048: Unable to find record group .
LOV RGW_EXCHANGE_RATE_TYPE
Form: ARXRWRCT
FRM-30085: Unable to adjust form for output.
For Form ARXRWMAI
FRM-30048: Unable to find record group .
LOV RGW_EXCHANGE_RATE_TYPE
Form: ARXRWMAI
FRM-30085: Unable to adjust form for output.
I have tried copying all the standard libraries and referencing them, but it did not help.
Any help in this regard is appreciated.
JithinWe never figured this out and are waiting for the EBS upgrade to fix this. hence closing this thread.
Thanks,
Jithin -
Help! one to many relationship table and display output as exists
I have two tables:
Table1: LOCATION with field locn_id
Table2: TRACKING with field from_locn and to_locn
Example
locn_id from_locn to_locn
26001A 26001A 26002A
26002A 26001A 26001B
26001B 26001A 26001C
26001C
I am linking locn_id to from_locn.
I want to display output as:
If locn_id exists in from_locn (I dont care how many records), display Y. If locn_id does not exist then display N.
So in above case, output should be
26001A Y
26002A N
26001B N
26001C NHere is my try:
create table LOCATION(locn_id VARCHAR2(10));
create table TRACKING(locn_id VARCHAR2(10), from_locn VARCHAR2(10), to_locn VARCHAR2(10));
insert into LOCATION values('26001A');
insert into LOCATION values('26002A');
insert into LOCATION values('26001B');
insert into LOCATION values('26001C');
insert into TRACKING values('26001A', '26001A', '26002A');
insert into TRACKING values('26002A', '26001A', '26001B');
insert into TRACKING values('26001B', '26001A', '26001C');
insert into TRACKING values('26001C', '', '' );
select l.locn_id,
(select decode(count(*), 0, 'N', 'Y') from tracking t where l.locn_id = t.from_locn ) exists_flag
from location l
LOCN_ID E
26001A Y
26002A N
26001B N
26001C N
4 rows selected.Edited by: Thomas Morgan on May 31, 2013 3:43 PM
Maybe you are looking for
-
I have also gone to adobe and tried to download the latest update there, but when I load the zip file, and try to open the .exe, it just gives me an "error loading updater workflow". Help. I would like to be able to eventually use my new camera in
-
Link to an unsampled asset?
I'm getting the message "This document contains a link to an asset being unsampled. You should resize it smaller or right-mouse click on the asset in the Assets Panel to see additional options." Anyone know what this is referring to?
-
Most efficient way to do multiple crops on many images?
I have a large number of images shot in the default 4:3 aspect ratio. I need to print almost 200 as 4x6, and and undetermined but certainly large number as 8x10, so I have a lot of cropping to do. What would seasoned Aperture users suggest as the mos
-
Open & executin a c prg in server & tranfer output to client
Please tell me how to execute a C program inside a Java program. That is, inside a server program in Java, and transfer the output of that program to the client and display it there... if you can with sample program Tel me...
-
Share from ipad to home?
share from ipad to home?