FM "open form ; how to craete create SPOOL REQUEST
Hi.
I have a Z program n layout . We have used a FM "open form."
But when I run, i dont get spool
In this case I want to create SPOOL REQUEST whenever I run program.Can anyone
suggest what fields I need to mark in ITCPO and NAST or more than these.
Hi,
Check this link :
http://www.thespot4sap.com/articles/SAPscript_example_code.asp
Regards
Appana
Similar Messages
-
How to see the spool request number
hi experts,
how to see the spool request number of any object......
may be form or report........U can go to SP01/SP02.
For generating spool u can look into this code.
FORM write_to_spool.
DATA : l_f_list_name LIKE pri_params-plist,
l_f_destination LIKE pri_params-pdest,
l_f_spld LIKE usr01-spld,
l_f_layout LIKE pri_params-paart,
l_f_line_count LIKE pri_params-linct,
l_f_line_size LIKE pri_params-linsz,
l_f_out_parameters LIKE pri_params,
l_f_valid.
l_f_line_size = 255.
l_f_line_count = 65.
l_f_layout = 'X_65_255'.
l_f_list_name = sy-repid.
to get defult spool device for the user
SELECT SINGLE spld INTO l_f_spld FROM usr01 WHERE bname = sy-uname.
IF sy-subrc = 0.
MOVE l_f_spld TO l_f_destination.
ENDIF.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
ARCHIVE_ID = C_CHAR_UNKNOWN
ARCHIVE_INFO = C_CHAR_UNKNOWN
ARCHIVE_MODE = C_CHAR_UNKNOWN
ARCHIVE_TEXT = C_CHAR_UNKNOWN
AR_OBJECT = C_CHAR_UNKNOWN
ARCHIVE_REPORT = C_CHAR_UNKNOWN
AUTHORITY = C_CHAR_UNKNOWN
COPIES = C_NUM3_UNKNOWN
COVER_PAGE = C_CHAR_UNKNOWN
DATA_SET = C_CHAR_UNKNOWN
DEPARTMENT = C_CHAR_UNKNOWN
destination = l_f_destination
EXPIRATION = C_NUM1_UNKNOWN
immediately = 'X'
IN_ARCHIVE_PARAMETERS = ' '
IN_PARAMETERS = ' '
layout = l_f_layout
line_count = l_f_line_count
line_size = l_f_line_size
list_name = l_f_list_name
LIST_TEXT = C_CHAR_UNKNOWN
MODE = ' '
NEW_LIST_ID = C_CHAR_UNKNOWN
NO_DIALOG = C_FALSE
RECEIVER = C_CHAR_UNKNOWN
RELEASE = C_CHAR_UNKNOWN
REPORT = C_CHAR_UNKNOWN
SAP_COVER_PAGE = C_CHAR_UNKNOWN
HOST_COVER_PAGE = C_CHAR_UNKNOWN
PRIORITY = C_NUM1_UNKNOWN
SAP_OBJECT = C_CHAR_UNKNOWN
TYPE = C_CHAR_UNKNOWN
USER = SY-UNAME
IMPORTING
OUT_ARCHIVE_PARAMETERS =
out_parameters = l_f_out_parameters
valid = l_f_valid
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.
IF l_f_valid NE space.
NEW-PAGE PRINT ON PARAMETERS l_f_out_parameters.
WRITE : /5 'Material No.',
25 'Message Type',
40 'Message Issued'.
ULINE.
LOOP AT g_t_message_table WHERE type = 'E'.
WRITE : / g_t_message_table-matnr UNDER 'Material No.',
g_t_message_table-type UNDER 'Message Type',
g_t_message_table-message UNDER 'Message Issued'.
ENDLOOP.
NEW-PAGE PRINT OFF.
ENDIF.
ENDFORM. " WRITE_TO_SPOOL
Regards -
How to hide "Create Requisition Request" link in MSS
Hi All
How to hide "Create Requisition Request" link which is in Recruiting services in MSS?
Rgrds
SriHello,
Create Requisition Request is triggered by Home Page framework service MSS_HCM_RECRUITING_NEWREQ_REQUEST.
In order to deactivate it, in customizing:
SPRO-IMG:
Cross-Application Components
Homepage Framework
Services
Assign Services to Subareas
On the entry :
MSS_HCM_RC_REQREQUEST MSS_HCM_RECRUITING_REQ_STATUS_OV 20
You can set the position as blank, so it will not show up. You can also delete this entry.
Regards,
Bentow. -
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. -
Oracle Forms - How can I create a Data Block with query
Dear friends I have a question, I couldn't do this..
I have a sql query, I want to show the datas of the query.. How can I do this. ?
Data Block Wizard wants a table, view or stored procedure, but I have a query, how can I create a data block with my query.. I m waiting your helps..? Please...
SemihHi,
You have two options
1. create a view and base the block on the view
2. create a block with a query Data Source Type of 'FROM clause query'
Hope this helps
Neil -
How to genrate the spool request for the smart form.
Hi Friends,
I have a page to FAX to vendor for which i have made a smartform for the page to be send. For this purpose i have to genrate the spool request without displaying the output of the smartform. The program should give the spool number genrated.
can you please suggest somthing.
Regards,
Vidya.hi
for this when u r callin the form write some code in u r program
IF RADIOBUTTON = 'X' . "GET THE SPOOL
CONTROL_PARAMETERS-NO_DIALOG = 'X'.
ELSE.
CONTROL_PARAMETERS-NO_DIALOG = ' '.
ENDIF.
and pass this to the calling form.
Please Close this thread.. when u r problem is solved. Reward if Helpful
Regards
Naresh Reddy K -
Creating spool requests using smartforms
hi folks,
I need help in this area...
I have an ABAP print program that I run to create monthly statements. There are two categories while running the monthly statements identified by the code '6' or '7' Now, i have to create separate spool requests so that while running the print program for these monthly customers.
How can I do this?
SanthoshOk, first lets say that ACCITAB has the records that are printed in the main window of the form. The number of pages for each customer depends on how many records are present in the ACCITAB for the customer.
For example.... ACCITAB.
<b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
1234 08/26/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
1234 08/27/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/21/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/22/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/23/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/24/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/25/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/26/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
Lets say we have two customers in our table, customer 1234 has only two records associated with him, customer 5678 has like 75 lets say. Here you will need to loop at this table and count how many records are there for each customer and store it in another internal. Maybe you can have a separate internal table for each category.
Types: begin of titab,
kunnr type kna1-kunnr,
count type i,
end of titab.
Data: itab_1 type table of titab with header line.
Data: itab_2_5 type table of titab with header line.
Data: itab_6_M type table of titab with header line.
One for 1 pagers, one of 2-5 pagers, and one for 6 and more pages.
Now loop thru ACCITAB and at the end of a customer you need to write a record to one of these tables with the record count. Use the AT END statement. You will need to determine the maximum number of printed lines that your form handles in the MAIN window. Example, how many printed lines does it take to make the form go to the next page. You need to find what this number is.
When you have this number, now you can do some logic which will split the customers into there categorys.
Let's say that the max is 50 lines per page.
Data: counter type i.
LOOP AT ACCITAB.
counter = counter + 1.
at end of kunnr.
IF counter < '50'.
itab_1-kunnr = accitab-kunnr.
itab_1-count = counter.
append itab_1.
elseif counter => '51'
and counter =< '250'.
itab_2_5-kunnr = accitab-kunnr.
itab_2_5-count = counter.
append itab_2_5.
elseif counter => '251'.
itab_6_m-kunnr = accitab-kunnr.
itab_6_m-count = counter.
append itab_6_m.
ENdif.
clear counter.
endat.
ENDLOOP.
Now you have the customers split out into separate internal tables depending on how many pages for thier statement. Now you can start printing.
call fucntion 'OPEN_FORM'.
Loop at itab_1.
* Do the logic which prints your form.
endloop.
call fucntion 'CLOSE_FORM'.
call fucntion 'OPEN_FORM'.
Loop at itab_2_5.
* Do the logic which prints your form.
endloop.
call fucntion 'CLOSE_FORM'.
call fucntion 'OPEN_FORM'.
Loop at itab_6_m.
* Do the logic which prints your form.
endloop.
call fucntion 'CLOSE_FORM'.
Please remember to award points for helpful answers. Thanks.
Regards,
Rich Heilman -
Storing the adobe form output permanently just as spool request does...
my requirement is as follows...
1.user runs a transaction which generates an adobe print form..
2.when this happens the generated print form should be stored permanently on the application server just as spool requests are stored....
3.how can i store this adobe form on application server permanently so that the user can directly print that form in future with out executing the transaction..?
please help me as soon as possible....Hi Sudheer
there is no standard persistence mechanism for a generated PDF. If you need to store the PDF for later usage, you need to create the business logic to do so. Every SAP application and all customers store their documents in different way, which is why it is currently not feasible to provide 'standard' persistence.
Best regards,
Markus Meisl
SAP NetWeaver Product Management -
How to delete the spool request number
HI Masters,
My program creates a spool request. And i want to delete that spool request number? How to delete that??
Thanks in advance.hi
good
The program are RSPO0041 or RSPO1041.
This is handy whenever you encounter a user who managed to create a lot of spool requests which are choking your system.
Deleting them with SP01 will be too slow and you will get time out if it exceed the online time limit specify by your basis people.
<b><REMOVED BY MODERATOR></b>
thanks
mrutyun^
Message was edited by:
Alvaro Tejada Galindo -
How to get the spool request number ?
Hi All,
I am working on a smart-forms. I am using a custom transaction to print these smartforms. When I execute
the transaction the print screen comes where I can do
print preview or print.
Now to convert this Smart Form to PDF I need to know the spool request number to use in the report called RSTXPDFT5.
How do I get the spool request number ?
Do I need to do some changes in spool control options of print screens to get the spool request number or something else ?
Please let me know.
Answers will be awarded...
TusharHi,
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.
Regards,
Gagan -
How to print the spool request with a given file name.
Dear Experts;
I used FM RSPO_OUTPUT_SPOOL_REQUEST to print spool request. And the device type is a local pdf printer. By default, the download file name will be the spool id. How can I change the download file name? Thanks!
Convert 'CutePrinter' to qualify the format.
CALL FUNCTION 'CONVERSION_EXIT_SPDEV_INPUT'
EXPORTING
input = 'CutePrinter'
IMPORTING
output = lv_device.
Downloading as pdf by printer
CALL FUNCTION 'RSPO_OUTPUT_SPOOL_REQUEST'
EXPORTING
device = lv_device
spool_request_id = pa_spool
EXCEPTIONS
archive_dest_invalid = 1
archive_dest_not_found = 2
archive_dest_no_right = 3
cannot_archive = 4
change_archdest_no_right = 5
change_copies_no_right = 6
change_dest_no_right = 7
change_devtype_no_right = 8
change_prio_no_right = 9
change_telenum_no_right = 10
change_title_no_right = 11
dest_invalid = 12
dest_not_found = 13
dest_no_right = 14
internal_problem = 15
invalid_fax_attribute = 16
invalid_parameters = 17
non_owner_no_right = 18
no_layout = 19
no_spool_request = 20
out_again_no_right = 21
spooler_problem = 22
OTHERS = 23SELECT SINGLE * FROM tsp01 into rq WHERE rqident = p_spool .
* To get attributes of spool request
CALL FUNCTION 'RSPO_GET_ATTRIBUTES_SPOOLJOB'
EXPORTING
rqident = p_spool "Spool Request Number
IMPORTING
rq = rq "Consists the Spool Document Type Details
TABLES
attributes = dummy
EXCEPTIONS
no_such_job = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
*Convert spool request into PDF, dependent on document type
IF rq-rqdoctype = 'OTF' OR rq-rqdoctype = 'SMART'. "Doc Type is of Sap Script or Smart form
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = p_spool "Spool Request Number
no_dialog = 'X'
pdf_destination = 'X'
no_background = 'X'
IMPORTING
pdf_bytecount = bin_size
bin_file = pdf_xstring "This fm will convert the spool data into
TABLES
pdf = it_pdf . "PDF Format in this importing string
ELSEIF rq-rqdoctype = 'LIST'. "Doc Type of List
* Convert spool to PDF
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = p_spool "Spool Request Number
no_dialog = ' '
dst_device = 'LOCL'
pdf_destination = 'X'
no_background = 'X'
IMPORTING
pdf_bytecount = bin_size
bin_file = pdf_xstring "This fm will convert the spool data into
"PDF Format in this importing string
TABLES
pdf = it_pdf.
ENDIF.
* Downloading file to p_file loation in PDF foramt
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_size
filename = w_filename "Custom File name
filetype = 'BIN'
TABLES
data_tab = it_pdf
Prabhudas -
How to use Create input request Activity
Hi,
I want to get inputs from the users .
I want to display a form were user can select a input from drop down list.
That selected item i want to store it in a variable and use across the flow.
How to do that using create input request or is there any other way to do that.You should be using "Input Request" to do what you are trying to do.
Add "Create Input Request" to your workflow
Configure the question you want the user to see in the Web Console. For example, "Select make of your dream car"
Add "questions" to your input request. For the "drop-down" selection, chose to add new question of type "Select". This will bring up the dialog box that will allow you to configure the unique ID for your question, the free form text (label) and the list of selection choices to show in the drop-down.
In the activities that follow "Create Input Request" you can retrieve the actual values that the user chose/typed by looking at the values in the [Workflow.Create Input Request.Task.Questions] table property. It has several columns: Id, Question, Value (that correspond to the fields you've configured)
If you have Input request with several questions, you can use Select from Table activity to choose the specified question (by ID) that you want the value for. If you have only one question in the input request, you can get to the value (entered by the end user) by referencing this property [Workflow.Create Input Request.Task.Questions.First Row.Value] -
How to raise create role request in OIM 11gR2?
How can I let a user to raise a create role request in OIM 11gR2?
If I assigned the Role Viewer or Role Authorizer admin role to the user, the create button for role is disabled.
If I assign the user as Role Administrator, the role will be directly created without raising any request.
If I assign the user as SPML Admin, the create button is enabled, but after filling the form and clicking the "save" button, an exception will be thrown saying "IAM-3054100 : The logged-in user AA10127 does not have createRole permission on Role entity."Hi,
i have changed identity page logo by using customize option, But in sysadmin page there no such option, is it possible to change image same as identity console. -
ALV - print - create spool request
Hi all,
We have made SAP Query (The majority and 'was written in ABAP code), a report using ALV grid (function 'REUSE_ALV_GRID_DISPLAY'). There is a 'Print' button on the grid. If the user presses this button the system will send a screen where the user can choose print parameters (name of printer, printing, direct or not, etc..) If the user presses 'Continue' a spool request is then created.
But the users do not want to see the screen parameters.
After pressing the button 'Print' on the grid, the spool request should be immediately created using the parameters seted in the ABAP program, the same program that creates ALV.
Any idea how to do this?
Thanks in advanceHi,
Please refer to the link to add button in the ALV tool bar:
[http://www.sapalv.net/2009/07/sap-alv-tutorial-4-%E2%80%93-add-button-to-toolbar/]
For creating spool on click of this pushbutton you can use the following:
* Set the Spool Parameters
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.
IF sy-subrc EQ 0.
NEW-PAGE PRINT ON PARAMETERS lwa_params NO DIALOG.
* Write code for displaying the ALV here......
NEW-PAGE PRINT OFF.
ENDIF.
Regards,
Aparna Alashe. -
How to know the spool requests generated from my program?
hi
I want to get the spool request(s) that are generated from my report that's run either in foreground or background? how to know this? i know that we can go to sm37 and see, but is there any table or fm which stores this data? if i give my program name that's run on a particular date, i should get the spool request numbers. tsp01 only has the spool no. and not the program name..pl suggest...thanks all
Sathish. RHi ,
The system field sy-spono contains the spool numbers .
If you have such requirement, you can create one custom table with fields :
spool no, program , date , time
whenever you run ur program update this table ,
with system fields . spono , sy-repid , sy-datum and sy-uzeit .
Thaks .
Maybe you are looking for
-
5 error while checking job status
Hi, We are getting the following error when we are trying to check the status of the process chain through FM 'RSPC_API_CHAIN_GET_STATUS': 5 error while checking job status. The real scenario is we are using an abap screen with a button on it. when t
-
Number of DaqTasks required??
I am developing a 16 channel data acquistion application using a cDaq9184 with a 9205 module. So far, I have one DaqTask set up in my .NET project along with one DaqComponent on the form for setting up the first AI channel. Each channel will have i
-
Dreamweaver MX Tech WANTED in Salt Lake City
Our website needs a little help (and) we need somone local (Salt Lake City, UT) to make sure that our Dreamweaver program is able to both access from and upload to the site effectively.
-
Variable to calculate quarterwise fiscalyear?
Hi experts, I got a requirement to caluculate the based on fiscal year quarterwise! In short which is the variable to use based on quarterwise like Q1,Q2,Q3,Q4 it is on 3months wise. I find out this variable as:Current Quarter (Season) for Fiscal Ye
-
hi, what i m trying to do is as follows: String str = "5.00"; double db = Double.parseDouble(str); then db = 5.0; but i want the double value in two digits means like 5.00. So how can i get the numeric value in two digit if value after decimal is 00