Smartform internal_error when merging forms into 1 spool request
Hi,
I have 2 smartforms - a letter and a certificate. The user has the option to print either one of these forms or both, per employee. I'm using 1 spool request.
As soon as I call the second smartform there is an INTERNAL_ERROR. Why does this happen and how do I solve the problem?
Please refer to the code sample below:
loop at i380.
make sure the spool is not closed
control_parameters-no_open = 'X'.
control_parameters-no_close = 'X'.
AT FIRST.
control_parameters-no_open = ' '.
ENDAT.
AT LAST.
control_parameters-no_close = ' '.
ENDAT.
call smartform 1
call function 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZLETTER'
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
endif.
CALL FUNCTION FM_NAME
EXPORTING
CONTROL_PARAMETERS = control_parameters
OUTPUT_OPTIONS = output_options
USER_SETTINGS = ' '
pernr = i380-pernr
IMPORTING
JOB_OUTPUT_INFO = otf_info
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
endif.
second smartform - certificate
call function 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZCERTIFICATE'
IMPORTING
FM_NAME = FM_NAME2
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
endif.
CALL FUNCTION FM_NAME2
EXPORTING
CONTROL_PARAMETERS = control_parameters
OUTPUT_OPTIONS = output_options
USER_SETTINGS = ' '
pernr = i380-pernr
IMPORTING
JOB_OUTPUT_INFO = otf_info
EXCEPTIONS
FORMATTING_ERROR = 1
<b> INTERNAL_ERROR = 2</b> SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
ENDIF.
endloop.
I cleared output_parameters, output_options and otf_info when calling form ZCERTIFICATE but this does not solve the problem. When ZCERTIFICATE is called seperately, there is no problem. The forms should be printed directly without conversion to PDF.
Your help will be appreciated.
Hi,
In the loop AT Last is in wrong place. May be that could be the reason for your problem. Then the second call to samrt from is will be working on a closed session.
regards
austin
Message was edited by: Joseph Austin Prabhu Paulthas
Similar Messages
-
All Labels in the Smartform should be printed under one spool request ?
Hi All,
I need to print the labels with some data .At a time I have to print 10 labels with the same Spool request. I have required data in one internal table .I am looping the internal table and printing the label.In this case every time control leading to Print prview, and when i click on PRINT button then only It is leading to the Spool.For each print it is creating a new spool .
But My requirement is , I need all the labels should be printed under only one spool .And I can see the print preview only once , and if I click on print button 10 labels(depending on the records in internal table) should be printed .Cotrol should not come again to the Print popup .
Thanks,
Suresh Kumar D.Hi,
As per your requirement, if you want to print 10 labels, in same spool request, design your smart form like that,
I mean design 10 labels in your smart forms.
I hope this is easy solution.
Regards,
Sreenu. -
I have a vendor database that I want to use to populate a pre-created PDF form in Adobe Pro XI. I figured out how to rename the form data fields and how import the data from my data set but can't figure out how to have it create another copy of the form for the next record in the data set.... if its even possible. Any help is appreciated!
This can be achieved with a mail-merge type script.
-
Hyperlink issues when merging RPTs into 1 RPT
Hi All,
Requirement:
We have a requirement such that we will have to combine 2 or more RPTs into 1 RPT such that the output of the combined RPT looks like output of the first individual RPT and then the output of second individual RPT.
Our ActionPlan:
We are planning to have the individual RPTs as subreports in the Detail section of the main RPT. There is a query in the main RPT which will return us rows equal to the number of reports to be merged in the main report. The main query returns a unique ExecutionId for each individual report and we are using a GroupExpert on this ExecutionId so that the multiple subreports, present in different DetailSection of the main RPT gets executed and we get the desired result.
We have different PageHeaders corresponding to individual RPTs. Also these PageHeaders have text controls which require a hyperlink to be done to the subreports.
Issues Faced:
1) Since the Group is on ExecutionId ,when we make a hyperlink(To another report object) from the PageHeader to the Details section subreport then it opens a new tab which is actually containing the entire data for that particular ExecutionId. Can I avoid the opening of the Hyperlink in the new tab?
2) The subreport can be clicked and viewed as a new tab in the Preview.This is a default behaviour of Crystal Reports. Can the opening of subreports in a new tab be avoided and they should not prompt for any Hand or something so that the user never clicks it?
Thanking you all in anticipation....
Regards.
Ajit.Hi All,
Thanks Stratos for the reply and my apologies for replying late to the thread (I went on a vacation and sorry for that).
My question was 'Can i disable the click of subreports when the report is previewed?'; Ur soution was that 'I should try to overlay the subreport with a transparent rectangle'. But the solution suggested does not serve the purpose. I have a subreport in the Detail section and then I inserted a Box in the Detail section such that the Box spreads over the subreport and also checked the property of Extend to Bottom of Section when printing. The Box now comes on top of the subreport in both Design and Preview. But the subreport is still clickable and no success there.
I am using Crystal reports 2008 version.
My first question relating to Hyperlink is still unanswered. I will explain it further to give you my exact requirement from the Designer perspective which would help us in clear understanding of the requirement.
The design of the report looks like
RH Index Page of the Merged report
PHa Report Title and the parameters of the report1
PHb Report Title and the parameters of the report2
GH1 Group1 on the ExecutionIDs (Always suppressed)
Details a SubReport containing the transactional data of Report1
Details b SubReport containing the transactional data of Report2
GF1a Subreport of AccountNames of Report1
GF1c Subreport of AccountNames of Report2
My 2 issues are :
1) I have to hyperlink a text object in PHa to the subreport present in GF1a. Since I cannot hyperlink a subreport directly, i tried using a dummy text object on top of subreport and then tried to hyperlink it to PHa, it opens as a new tab whereas I want it to navigate and hyperlink in the same report in the same tab like any other hyperlink to another report object.
2) Disable the click of subreport.
Incase i have written something incorrect then please do correct me and help me out.
Thanking all in anticipation.
Regards.
Ajit. -
How to get SapScript and Smartform printed in one spool request?
Hello experts,
I want to print the production order package in one spool request.
Print program consists of Smartform and SapScript.
First page is in landscape format with barcode(Smartform) and the rest is in portrait format(Sapscript).
In SAP documentation is written that it is possible for several Smartforms to be printed in one spool request.
Is it possible for 1 Smartform and 1 SapScript called from a single program to be printed in one spool request?
I have tested it with calling first the Smartform control-no_close= 'X' without success.
Can anyone tell me if this is possible and how?
Thank you.
Kind regards,
DanijelaHi
In the driver program .
*"Selection screen elements............................................
SELECTION-SCREEN BEGIN OF BLOCK block WITH FRAME.
PARAMETERS:
p_script RADIOBUTTON GROUP rad1,
p_smartform RADIOBUTTON GROUP rad1,
SELECTION-SCREEN END OF BLOCK block.
*"Selection screen elements............................................
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
PARAMETERS:
p_single RADIOBUTTON GROUP rad2, " All the spool request
p_ind RADIOBUTTON GROUP rad2.
SELECTION-SCREEN END OF BLOCK block1. " Single spool request
If p_script EQ 'x'.
w_form = 'Y_SCRIPT'.
Elseif p_smartfom EQ 'X'.
w_form = 'Y_SMARTFORM'.
ENDIF.
call function 'SSF_FUNCTION_MODULE_NAME'.
Call function 'SSFCOMP_OPEN'.
w_control-no_open = ' '.
w_control-no_close = ' '.
*"Single spool request..................................................
IF p_single EQ 'X'.
w_control-no_open = 'X'.
w_control-no_close = 'X'.
ELSE.
*"Individual spool request.............................................
IF w_flag NE '1'.
w_control-no_open = 'X'.
w_control-no_close = ' '.
w_flag = 1.
CALL FUNCTION ' '-----> smartform function module.
CALL FUNCTION 'SSFCOMP_CLOSE'.
Regards,
Sravanthi -
hi experts,
We faced PO printout problem during our Go Live. We have implemented SAP with new Plant/Company.
For all PO forms in existing company are printing fine, but for this new company, we are trying to print PO but it only goes with the spool request no.
Next problem, all PO is saving under 1 spool request no. so when you open the Spool request, all PO store in 1 spool.
can any tell me, what is this problem came from? set-up or from smartforms?
thanks in advance.
regards,
MaiaHi,
Spool Request- As per my knowledge u require spool request no to download the PO in Acrobat format. In messages only we do the settings
Goto messages- communication method- specify logical destination -tick print immediately- in SAP cover page select X Print and go to further data select despatch time - 4 send immediately save ur PO and and come out and go back to the PO and again click messages- go prcessing log u will get spool request no.
Check the above settings that u have made properly ornot.
ok -
Geting the output type of spool requests
Hi all:
I was wondering how to get the output type (called Message type "KSCHL" in table NAST) for a certain spool request (those are saved on table TSP01). It seems like these tables are unlinkables each other. When I print a smartform, I choose the output type (mail, printing, fax, etc.) but when I check the spool request on SP01 transaction, there aer not way to review the output type (KSCHL). Any idea? Thank you so much .Hello Gilberto,
U can get the output type of any billing doc or sales doc or invoice or purchase order thru table
NAST.
Re,Manas -
Converting OTF data from script to Spool Request
Hello,
Is there any way to convert OTF data into Spool Request.
Actual scenario is for the Order Acknowledgement form they have configured the output type for Print Medium and here the spool is generated through Close_Form . Based on the spool no they are converting the spool to PDF and then placing a copy in the Unix Directory.
They have also configured the form for Fax Medium , but here in the close_form they are getting the Fax number instead of spool number. As this way it just Fax the output to required destination , user require a copy of the output should be converted to PDF and then it has to be placed in Unix directory as it is happening for print medium.
The problem here in the close form for first case , i can see the spool id but in the second case that is not happening . So only OTF data is available with me. So is there any way where i can pass OTF data get spool id . So that if i have spool id rest will be taken care by my existing logic.
I Appreciate your valuable inputs.
Thanks,
SubashCheck this code snippet.
data : it_spool TYPE STANDARD TABLE OF rsporq ,
it_pdf TYPE STANDARD TABLE OF tline ,
v_objtype TYPE rststype-type ,
v_name TYPE rststype-name .
*& Form find_spool_request_id
FORM find_spool_request_id.
CALL FUNCTION 'RSPO_FIND_SPOOL_REQUESTS'
EXPORTING
allclients = '320'
datatype = '*'
has_output_requests = '*'
rq0name = nast-dsnam
rq1name = '*'
rq2name = '*'
rqdest = 'LOCL'
rqowner = sy-uname
TABLES
spoolrequests = it_spool
EXCEPTIONS
no_permission = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE i000 DISPLAY LIKE 'E' WITH text-002.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " find_spool_request_id
*& Form convert_spool_to_pdf
FORM convert_spool_to_pdf .
READ TABLE it_spool INTO wa_spool INDEX 1.
v_spoolno = wa_spool-rqident.
*Get Spool request attributes
SELECT SINGLE *
FROM tsp01
INTO tsp01
WHERE rqident EQ v_spoolno.
IF sy-subrc <> 0.
MESSAGE i000 DISPLAY LIKE 'E'
WITH text-003 v_spoolno text-034.
LEAVE LIST-PROCESSING.
ENDIF.
v_client = tsp01-rqclient.
v_name = tsp01-rqo1name.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
authority = 'SP01'
client = v_client
name = v_name
part = 1
IMPORTING
objtype = v_objtype
EXCEPTIONS
fb_error = 1
fb_rsts_other = 2
no_object = 3
no_permission = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE i000(zz) DISPLAY LIKE 'E'
WITH text-003 v_spoolno text-034.
LEAVE LIST-PROCESSING.
ENDIF.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = v_spoolno
no_dialog = ' '
TABLES
pdf = it_pdf
EXCEPTIONS
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 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 -
Converting the spool request to PDF format
Dear All ,
I am using RSTXPDF4 to convert a spool request to PDF format , when I execute this program by giving the spool number and dstdevic as Local , its giving the message as " Spool request XXXXX with PDF data created ".
But the problem is when I open this spool request its printing the Junk characters ..!!!
What could be the problem ?
Please give me the solution for this...
Thanks in advance.Hi Prem ,
I have checked the tranx SCOT there I have found the following settings..
Output Dev Type USE
format
PCL HPLJIIID Not Yet Used in Node Maintenance
PDF PDF1 Already Used in Node Maintenance
PS POST2 Not Yet Used in Node Maintenance
TXT ASCIIPRI Already Used in Node Maintenance
Is this OK ...or am I need to do any changes in the settings...??
One more thing when I tries to give this PDF1 Dev type in my RSTXPDF4 input parameters its not taking !!!
Please help... -
Spool request missing for Payment run
Hi SAP gurus,
I have executed one payment run, 87 payment orders have been generated. When i saw the spool request, it shows only 34 pages, rest other pages are missing. Even, system is showing status of spool as "waiting". I thought, it might be completed in few hours, already 1 day has been passed but no change. I generated spool couple of time but it always stuck at 34 page.
Can you please let me know, how can i print rest 43 remittance advice??? I would also like to know the cause of this error.
Many thanks for your quick response.
Regards,
SATVIR SINGH1. Check your variant in F110 (Have you restricted the vendor numbers in your variant on parameters) - Last tab on F110
2. If not, then in your spool, from menu bar, select:
Go to ==> Display Requests ==> Settings
Check the from page to to page. (Make to page as 999).
Ignore any warning messages. -
Acrobat Pro 9.4.5 crashes when merging files
Is anyone else experiencing this? Adobe Acrobat Pro 9.4.5 works for while when merging files into a single PDF but then starts crashing when saving the mreged file. (MacBook Air, 10.6.7)
how big is the PDF in MB (more or less according to the loose pages)?
what happens if you save to desktop as xyz_2.pdf for eg.
G -
Dear all,
I have a requirement, to download the list output in PDF format. I am using the following code. This program converts the list output into spool request. But the problem is it is having number of pages is 0(We can see in SP01).
Could you please let me know the reason why it is having the number of pages is 0. It shoud show number of pages is atleast 1(since its having some data).
Please help me at the earliest.
This is the code I am using.....
TABLES :mara, makt.
TYPES: BEGIN OF t_mara,
matnr LIKE mara-matnr,
meins LIKE mara-meins,
matkl like mara-matkl,
ersda LIKE mara-ersda,
ername LIKE mara-ernam,
END OF t_mara.
DATA: i_mara TYPE TABLE OF t_mara,
wa_mara LIKE LINE OF i_mara.
DATA: v_dest LIKE tsp01-rqdest,
v_handle LIKE sy-tabix,
v_spool_id LIKE tsp01-rqident,
v_rc TYPE c,
v_errmessage(100) TYPE c,
v_text(70) TYPE c,
gd_spool_nr LIKE tsp01-rqident.
START-OF-SELECTION.
SELECT matnr FROM mara INTO TABLE i_mara
UP TO 10 ROWS.
CALL FUNCTION 'RSPO_OPEN_SPOOLREQUEST'
EXPORTING
dest = 'LOCL'
layout = 'X_58_170'
name = ' LOCL'
suffix1 = 'LOCL'
suffix2 = 'Z_DOWNLOASUT'
copies = '1'
prio = '5'
immediate_print = 'X'
AUTO_DELETE =
TITLELINE =
RECEIVER =
DIVISION =
AUTHORITY =
POSNAME =
ACTTIME =
LIFETIME = '8'
APPEND =
COVERPAGE =
codepage = '1152'
doctype = 'LIST'
IMPORTING
handle = v_handle
spoolid = gd_spool_nr
rc = v_rc
errmessage = v_errmessage.
LOOP AT i_mara INTO wa_mara.
CONCATENATE wa_mara-matnr wa_mara-meins "i_mara-maktl
wa_mara-ersda wa_mara-ername INTO v_text SEPARATED BY space.
CALL FUNCTION 'RSPO_WRITE_SPOOLREQUEST'
EXPORTING
handle = v_handle
text = v_text
LENGTH =
CODEPAGE =
TRUNCATE =
IMPORTING
rc = v_rc
errmessage = v_errmessage
EXCEPTIONS
handle_not_valid = 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.
ENDLOOP.
CALL FUNCTION 'RSPO_CLOSE_SPOOLREQUEST'
EXPORTING
handle = v_handle
IMPORTING
rc = v_rc
errmessage = v_errmessage
EXCEPTIONS
handle_not_valid = 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.
COMMIT WORK.
SUBMIT rstxpdft4 WITH spoolno = gd_spool_nr
WITH download = 'X'
VIA SELECTION-SCREEN
AND RETURN.
Thanks And regards,
JanardhanoK
-
SP01 - display spool request, buffer too short
Dear all,
when trying to display spool request in transaction SP01, we are getting the error: internal error 0000000040/ 32 in spooler (buffer too short)
But the same request could be displayed via transaction SPO10.
R/3 4.6C.
Any idea ?
Thank you for the answer.
Pavol Simko
Edited by: Pavol Simko on Nov 3, 2009 3:18 AMIn SM37:
Goto>Display Requests>Settings...
Then in "Display area"-->"From page"
Set it to from page 1 - "no of pages" then try to display
the spool again. -
Direct Conversion of smartform into PDF system has to take spool request ?
does anybody know:
Direct Conversion of smartform into PDF, system has to take spool request dynamically..
i don't mean to use the SE38 calling PRG RSTXPDFT4 to transfer SAP sript into PDF.
thanks
SRIDHAR--strike Yes this is what I understood.
In the structure job_output_info of your function you'll find your OTF data :
st_ssfcrescl-otfdata --
CALL FUNCTION smartform_fonction_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = st_ssfctrlop
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = st_ssfcompop
user_settings = ' '
IMPORTING
document_output_info = st_ssfcrespd
job_output_info = st_ssfcrescl " This is the one which contains OTF data
job_output_options = st_ssfcresop
TABLES
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
-- Then you just have to convert, using something like that : --
* Convert OTF to PDF
LOOP AT otf_data INTO w_otf.
CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
INTO w_pdf.
APPEND w_pdf TO i_content_txt.
ENDLOOP.
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = 'OTF'
format_dst = 'PDF'
CHANGING
transfer_bin = w_transfer_bin
content_txt = i_content_txt
content_bin = i_content_bin
objhead = i_objhead
len = v_len_in
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
v_size = v_len_in.
pdf_itab_size = v_size.
it_pdfout[] = it_pdf[].
* Create the PDF File
CLEAR it_pdfdata.
REFRESH it_pdfdata.
* it_pdfdata[] = it_pdfout[].
LOOP AT it_pdfout.
MOVE it_pdfout-tline TO it_pdfdata-line.
APPEND it_pdfdata.
CLEAR it_pdfdata.
ENDLOOP.
-- The smartform creation and the PDF creation are done in the same time...--
OK, So what do'nt you want to use the RSTXPDFT4 program ?
Hope this helps,
Erwan
Edited by: Erwan LE BRUN on Aug 28, 2008 12:02 PM
Edited by: Erwan LE BRUN on Aug 28, 2008 12:03 PM -
Converting spool request into PDF forms
Hi gurus
i am working on upgrade project from 4.6C to ECC 6.0. Business had the functionality developed in 4.6C to " Convert the spool request into PDF forms and can be downloaded into local PC".
Moving to ECC 6.0, is there any standard functionality available in ECC 6.0 to "Convert spool request to PDF forms and download"?
Any help towards this is appreciable.
Thanks
AleemHello,
Yes. The program is RSTXPDFT4.
Sourabh
Maybe you are looking for
-
How do you know when your MacBook is infected?
Hey All. Well my question is how do you know when your MacBook is infected with a virus? I came off windows and i have norton antivirus so i have something to tell me there. But on the Mac OS you rarely get viruses and i dont have a anitvirus program
-
Change document to be opened on kBeforeOpenDocSignalResponderService
Hello, I want to change the document being opened by InDesign within kBeforeOpenDocSignalResponderService. This means the user opens a document stored on a fileserver (over a slow network), and I want to copy this file to a local drive and then open
-
URGENT:Convert a Single Struts Project to Multiple Struts - 10g
Hello, Currently, I have a single Struts config file. Can i Add more projects and convert it to a multiple struts config project. I followed the multiple struts config file in http://www.oracle.com/technology/products/jdev/howtos/10g/StrutsMultiConfi
-
How do I stop 4 other peoples apple id from popping up?
Please help...
-
Extracting array from loaded xml
I'm using Flex 4 in an AIR project and need to load the following xml text file <list> <month name="Jan-04" revenue="400263" average="80052"> <region name="APAC" revenue="46130"/> <region name="Europe" revenue="106976"/> <