on 01-02-2009 7:18 AM
Hi Experts,
My client wants 'Quotation' and 'Order Conformation' in pdf file, and they want to send it by mail to customer. can anybody guide me to do this.
Prashant.
Go to V/34 transaction select your output types then click on processing routines now system will take you to the processing routines overview screen here you can find Transm. Medium and Processing routines(Output program and Form routine)based on these routines and program you can check the functionality of that with the help of ABAPer.
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts,
I am getting very strong responce from you.
I thank to all of you and Happy New Year.
Prashant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can do this in various ways.
The concept is as follows.
When smartform or sapscript is updated with the values, the layout is available in OTF format. We can convert this format to various formats by making use of Function Modules available for this purpose. To make this to PDF, there is CONVERTOTFPDF function module. You can find this in SE37 if you just copy this and paste it in SAP. By using this FM, the output can be automatically converted to PDF and if needed, can be send as an email also to the customer.
There is also another way of sending it to spool and then convert the spool output into PDF file. There is also an FM for this SPOOLPDF*
Hope this helps you to achieve your purpose
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Prashant,
Just Check with:
T. Code: NACE
Select Application: V1 - Sales; and click Tab: Output Types
On to next screen, Select your Output Type (you may have your Z-Output) for Quotation/ Sales Order; and click Processing Routines (from Left-Hand Dialog Structure).
On to next screen, maintain entry as:
Medium--
1 Print output---/SMB40/RVADOR01
2 PDF
5 External send-/SMB40/RVADOR01
2 PDF
Best Reagrds,
Amit
Note: Have look, with:
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
A lots of suggestions, have provided. Check with best-suited, with your requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasant,
This can be acheived through the standard program provided by sap ie RSTXPDFT4. The drawback with this program is that for each spool request one pdf will be generated.
So you can ask Abaper to change the code in this program so that we can take the multiple spool requests in the same pdf.
I am sending you the code also..ask the Abaper to copy this code
REPORT zrstxpdft4 NO STANDARD PAGE HEADING LINE-SIZE 80 .
************************************************************************
TABLE DECLARATION *
************************************************************************
TABLES: tsp01.
************************************************************************
TYPES DECLARATION *
************************************************************************
TYPES : BEGIN OF ty_tsp01.
INCLUDE STRUCTURE tsp01.
TYPES : END OF ty_tsp01.
TYPES : BEGIN OF ty_tab.
INCLUDE STRUCTURE soli.
TYPES : END OF ty_tab.
TYPES : BEGIN OF ty_otf.
INCLUDE STRUCTURE itcoo.
TYPES : END OF ty_otf.
************************************************************************
TABLE DECLARATION *
************************************************************************
DATA : spool_tab TYPE STANDARD TABLE OF ty_tab,
spool_final TYPE STANDARD TABLE OF ty_tab,
spool_otf TYPE STANDARD TABLE OF ty_otf ,
it_tsp01 TYPE STANDARD TABLE OF ty_tsp01,
doc LIKE TABLE OF docs,
pdf LIKE tline OCCURS 100 WITH HEADER LINE,
doctab LIKE docs OCCURS 1 WITH HEADER LINE,
otf LIKE itcoo OCCURS 100 WITH HEADER LINE.
************************************************************************
WORKAREA DECLARATION *
************************************************************************
DATA : wa_tsp01 TYPE ty_tsp01,
spool_eof TYPE ty_tab,
wa_spool TYPE ty_tab,
wa_otf TYPE ty_otf.
************************************************************************
D A T A *
************************************************************************
DATA: numbytes TYPE i,
arc_idx LIKE toa_dara,
pdfspoolid LIKE tsp01-rqident,
jobname LIKE tbtcjob-jobname,
jobcount LIKE tbtcjob-jobcount,
is_otf,
cancel.
DATA: client LIKE tst01-dclient,
name LIKE tst01-dname,
objtype LIKE rststype-type,
type LIKE rststype-type,
lines TYPE i,
lv_tabix TYPE sy-tabix,
binsize LIKE soxpl-objlen,
path TYPE string,
action TYPE i,
fname TYPE string.
************************************************************************
S E L E C T - O P T I O N S / P A R A M E T E R S *
************************************************************************
SELECT-OPTIONS: spoolno FOR tsp01-rqident.
PARAMETERS: download AS CHECKBOX DEFAULT 'X',
p_file LIKE rlgrap-filename DEFAULT 'C:\temp\file.pdf'."#EC NOTEXT
************************************************************************
At Selection Screen *
************************************************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
EXPORTING
window_title = 'File Save'
default_extension = 'PDF'
DEFAULT_FILE_NAME = fname2
IMPORTING
filename = fname
path = path
user_action = action
.
CONCATENATE path fname INTO p_file SEPARATED BY '\'.
p_file = path.
************************************************************************
Start of selection
************************************************************************
START-OF-SELECTION.
check whether the spools entered through Selection Screen exists or not.
SELECT * INTO TABLE it_tsp01 FROM tsp01 WHERE rqident IN spoolno.
IF sy-subrc <> 0.
WRITE: / 'Spoolauftrag existiert nicht'(003)
COLOR COL_NEGATIVE.
EXIT.
ENDIF.
REFRESH : spool_tab,spool_final.
Loop input spools and fetch spool out for each spool and
Append them in seprate internal table.
LOOP AT it_tsp01 INTO wa_tsp01.
REFRESH spool_tab.
lv_tabix = sy-tabix.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = wa_tsp01-rqident
TABLES
buffer = spool_tab.
IF sy-subrc = 0.
DESCRIBE TABLE spool_tab LINES lines.
IF lv_tabix EQ 1.
READ TABLE spool_tab INDEX lines INTO spool_eof.
ENDIF.
DELETE spool_tab INDEX lines.
APPEND LINES OF spool_tab TO spool_final.
ENDIF.
ENDLOOP.
APPEND spool_eof TO spool_final.
CLEAR : wa_spool.
Append the Spool buffer data into OTF for PDF conversion.
LOOP AT spool_final INTO wa_spool.
CLEAR wa_otf.
wa_otf = wa_spool.
APPEND wa_otf TO spool_otf.
ENDLOOP.
FM Called to convert into PDF
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
use_otf_mc_cmd = 'X'
IMPORTING
bin_filesize = binsize
TABLES
otf = spool_otf
doctab_archive = doc
lines = pdf .
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*download PDF file *
CHECK download = 'X'.
PERFORM download_w_ext(rstxpdft) TABLES pdf
USING p_file
'.pdf'
'BIN'
numbytes
cancel.
IF cancel = space.
WRITE: / binsize, 'Bytes heruntergeladen in Datei'(009), p_file.
ENDIF.
END-OF-SELECTION.
Note : Code was written by my friend Gajendra
Regards,
Vveiks
Hi Prashant,
Ask your Abaper to use this program RSTXPDFT4 to convert the ABAP list spool job in to PDF file here you can specify the file name and also the path and the folder where you want the system to store the pdf file. From here you can send this pdf file as a mail to customers manually.
Regards,
Ranjith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please check these notes :
Note 960088 - FAQ: Sending SD messages externally
Note 753622 - Sending of body text and PDF attachment with medium 5
Note 1086090 - Disclosures for external communication
I hope this help you.
bye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.