on 12-20-2008 12:31 PM
hi friends
i have to run my smartform in background mode and there is a requirement to fax and emailing
the output. how to make my form run in background , email n fax ?
thanks & regards
thirupai
Edited by: rafi md on Dec 20, 2008 1:32 PM
HI
you may use the FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF' to convert the fom
into PDF.
But first to get the printed form from the spool, use FUNCTION
'RSPO_FIND_SPOOL_REQUESTS'.
Then you may send it to your PC, email, fax, etc by reading the record in
the lines of table IT_PDF_OUTPUT.
Note: You may also use program RSTXPDFT4 as a reference to get code
examples which uses different functions to perform the creation of PDFand
download the form to the PC,etc.
An example:
CALL FUNCTION 'RSPO_FIND_SPOOL_REQUESTS'
EXPORTING
RQOWNER = SY-UNAME
TABLES
SPOOLREQUESTS = SPOOL_REQUESTS.
READ TABLE SPOOL_REQUESTS INDEX 1.
GD_SPOOL_NR = SPOOL_REQUESTS-RQIDENT.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = GD_SPOOL_NR
NO_DIALOG = C_NO
IMPORTING
PDF_BYTECOUNT = GD_BYTECOUNT
PDF_SPOOLID = PDFSPOOLID
BTC_JOBNAME = JOBNAME
BTC_JOBCOUNT = JOBCOUNT
TABLES
PDF = IT_PDF_OUTPUT
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.
CHECK SY-SUBRC = 0.
Hope this will help send you in the right direction
Regards
Alok
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
U should make an habit of searching SDN before posting such queries,
since u have registered recently i am posting the previous discussion on the topics u have mentioned they will solve ur problem.
The search terms i gave, would have given u the answers if u tried to search.
So next time search the sdn before posting* also read the rules of posting https://www.sdn.sap.com/irj/scn/wiki?path=/display/home/rulesofEngagement *
search term = email smartform
search term = fax smartform
search term = smartform in background
Edited by: kartik tarla on Dec 20, 2008 6:10 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.