on 05-25-2009 2:13 PM
Hi,
I am getting this error when saving SapScript as PDF file?
There is probably an error in the program
"ZSAPFM06P".
This program is triggered in the update task. There, the
following ABAP/4 statements are not allowed:
- CALL SCREEN
- CALL DIALOG
- CALL TRANSACTION
- SUBMIT
59 *-- Find out the spool number
60 PERFORM get_spool_number USING sy-repid
61 sy-uname
62 CHANGING mi_rqident.
63
-> SUBMIT rstxpdft4
65 WITH spoolno = mi_rqident "425
66 WITH p_file = 'C:\testPDF.pdf'
67 AND RETURN.
How can I solve this problem?
Thanks,
Adibo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
Thanks!
When calling FM in background nothing happens??
REPORT ZZ_TEST_AA1.
CALL FUNCTION 'Z_SAVE_SPOOL_AS_PDF'
IN BACKGROUND TASK DESTINATION 'NONE'. <------------------------
.
FUNCTION z_save_spool_as_pdf.
*"----------------------------------------------------------------------
*"*"Lokale interface:
*"----------------------------------------------------------------------
TABLES: tsp01.
DATA: mi_rqident TYPE tsp01-rqident.
DATA: pdf LIKE STANDARD TABLE OF tline WITH HEADER LINE,
pdf_bytecount TYPE i.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = '517'"mi_rqident "'430'
TABLES
pdf = pdf.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = pdf_bytecount
filename = 'C:\TEST.PDF'
filetype = 'BIN'
TABLES
data_tab = pdf[].
ENDFUNCTION.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ankur Parab,
I know, I just created Z program for testing.
Same happens when I call FM in ZSAPFM06P. I mean nothing happens. PDF is not saved..
ZSAPFM06P:
IF wa_eket-menge = lv_menge.
CALL FUNCTION 'ME_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
IMPORTING
ex_retco = ent_retco.
CALL FUNCTION 'Z_SAVE_SPOOL_AS_PDF'
IN BACKGROUND TASK DESTINATION 'NONE'.
.
ENDIF.
Edited by: Adibo A on May 26, 2009 2:52 PM
Hi,
Create a Z RFC FM and call it in background task.
In this FM use pass the relevant details and write the statement to submit.
When you call the FM in a bakground task in the update task; the FM will run in a separate task so your submit statement will work.
Regards,
Ankur Parab
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I believe you'vw insert your SUBMIT in a routine called in UPDATE TASK mode, here some statament are not allowed.
Where did you place your submit?
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.