Send RFQ as an PDF attachment through mail
Hi All,
I wanna send the quotation format to multiple vendors in PDF through mail.
I have developed RFQ using smartforms.
Please lemme know how to do this and wat r the steps to be taken.
Regards,
Priya
Hello,
you only need to convert your smartform into PDF and next send.
The sending can be seen for example here:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d
or you can just search for the sending code, you will find something like this:
http://monoceros85.blogspot.com/2009/04/send-email-in-abap-using-class-clbcs.html
Email using cl_bcs
Or direct example is here:
Multiple PDF attachments using CL_BCS Class
Regards, Otto
p.s.: please search the next time first and ask later
Similar Messages
-
Sending SAP Script output as a PDF attachment through mail
Dear Guru,
I am using SAP 4.0B version, DATABASE Oracle 8i, OS is sun solaris 7.5.
I want to send SAP script output as a
PDF attachement through mail.Please suggest a solution.
Regards,
RajeshHi Rajesh,
In your print program, while calling OPEN_FORM, pass options-TDGETOTF = 'X'. This is used for returning print output in OTF format.
Then in CLOSE_FORM, get the table OTFDATA returned from the function module. for example
DATA: OTF_DATA LIKE ITCOO OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = RESULT
TABLES
OTFDATA = OTF_DATA.
now you can convert this OTF data to PDF using function module CONVERT_OTF
Then send this data as attachment to a mail using function module SO_NEW_DOCUMENT_ATT_SEND_API1
Regards,
Komal. -
How to send pdf attachment through mail using Webdynpro-Java
How can i send the Adobe Interactive Form with data involved as a PDF attachment to mail? using Webdynpro-Java.
Is there any Adobe API or jar file for generating pdf?
Helpful answer is highly appreciable and rewarded with points.!Hi Sankar,
try [Offline Interactive PDF Form Using E-Mail|/docs/DOC-8061#49]
Michal -
Send Invoice email with pdf attachement through DI?
Hi all,
is it possible to send an Invoice email with pdf attachement through DI as it can be done through UI?
Best Regards,
VangelisHi Vangelis,
I Don't think that the DI API has that functionality (but I am not sure).
However with .Net's System.Net.Mail it should be quite easy to build.
Good luck,
Johan -
To send the Payload as PDF Attachment in mail in PI 7.1
Hi All,
I have to send a file as PDF attachment using a mail adapter. I gave the Content_Type as 'application.pdf'. I am receiving the mail, but I am unable to open the PDF. It says 'Could not open because the type is not supported or unable to decode'. How do I resolve this?
Thanks,
GeethaHi,
You need to perform the conversion usign the PayloadSwapBean in the Module tab.
Please refer to the following link
/people/sravya.talanki2/blog/2006/11/28/e-mail-xml-messages-in-pdf-format-from-sap-xi
http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cd/5af7c0c994e24fb0d0088443513de2/content.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm
hope this helps,
Regards,
Bhanu
Edited by: nanduri bhanu on May 21, 2009 5:21 AM -
Send PDF attachment through mail
i have one PDF document on my desktop, i want to sent that PDF as attachment to mail through SAP.
can anybody have idea how to get?i also had the same requirement... the following code is to attach a pdf file from PC. 'PDF' has been hard coded. to attach a text file change it to 'TXT'.
*& Report Y_FILE_FROM_PC
REPORT y_file_from_pc.
* This program will allowed you to send email with attachment.
First, specify the attachment file from your local hardisk and execute.
Next, specify the sender email address and click the send button.
DATA: method1 LIKE sy-ucomm,
g_user LIKE soudnamei1,
g_user_data LIKE soudatai1,
g_owner LIKE soud-usrnam,
g_receipients LIKE soos1 OCCURS 0 WITH HEADER LINE,
g_document LIKE sood4 ,
g_header LIKE sood2,
g_folmam LIKE sofm2,
g_objcnt LIKE soli OCCURS 0 WITH HEADER LINE,
g_objhead LIKE soli OCCURS 0 WITH HEADER LINE,
g_objpara LIKE selc OCCURS 0 WITH HEADER LINE,
g_objparb LIKE soop1 OCCURS 0 WITH HEADER LINE,
g_attachments LIKE sood5 OCCURS 0 WITH HEADER LINE,
g_references LIKE soxrl OCCURS 0 WITH HEADER LINE,
g_authority LIKE sofa-usracc,
g_ref_document LIKE sood4,
g_new_parent LIKE soodk.
DATA: BEGIN OF g_files OCCURS 10 ,
text(4096) TYPE c,
END OF g_files.
DATA : fold_number(12) TYPE c,
fold_yr(2) TYPE c, fold_type(3) TYPE c.
PARAMETERS ws_file(4096) TYPE c DEFAULT 'c:\debugger.PDF'.
can me any file fromyour pc ....either xls or word or ppt etc ...
g_user-sapname = sy-uname.
CALL FUNCTION 'SO_USER_READ_API1'
EXPORTING user = g_user
prepare_for_folder_access = ' '
IMPORTING
user_data = g_user_data
*EXCEPTIONS
user_not_exist = 1
parameter_error = 2
x_error = 3
OTHERS = 4
IF sy-subrc NE 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
fold_type = g_user_data-outboxfol+0(3).
fold_yr = g_user_data-outboxfol+3(2).
fold_number = g_user_data-outboxfol+5(12).
CLEAR g_files.
REFRESH : g_objcnt, g_objhead, g_objpara, g_objparb, g_receipients, g_attachments, g_references, g_files.
method1 = 'SAVE'.
g_document-foltp = fold_type.
g_document-folyr = fold_yr.
g_document-folno = fold_number.
g_document-objtp = g_user_data-object_typ.
*g_document-objyr = '27'.
*g_document-objno = '000000002365'.
*g_document-objnam = 'MESSAGE'.
g_document-objdes = 'attach file from pc'.
g_document-folrg = 'O'.
*g_document-okcode = 'CHNG'.
g_document-objlen = '0'.
g_document-file_ext = 'PDF'.
g_header-objdes = 'attach file from pc'.
g_header-file_ext = 'PDF'.
CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
EXPORTING method = method1
office_user = sy-uname
ref_document = g_ref_document
new_parent = g_new_parent
IMPORTING
authority = g_authority
TABLES
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
CHANGING
document = g_document
header_data = g_header
folmem_data =
receive_data =
file from the pc to send..
method1 = 'ATTCREATEFROMPC'.
g_files-text = ws_file.
APPEND g_files.
CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
EXPORTING
method = method1
office_user = g_owner
ref_document = g_ref_document
new_parent = g_new_parent
IMPORTING
authority = g_authority
TABLES
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
CHANGING
document = g_document
header_data = g_header.
method1 = 'SEND'.
g_receipients-recnam = 'ABAP'.
g_receipients-recesc = 'B'.
g_receipients-sndex = 'X'.
APPEND g_receipients.
CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
EXPORTING
method = method1
office_user = g_owner
ref_document = g_ref_document
new_parent = g_new_parent
IMPORTING
authority = g_authority
TABLES
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
CHANGING
document = g_document
header_data = g_header.
hope this helps! -
Sending smartform as pdf attachment through mail
Dear All,
Can anyone suggest me sample code of how an sap smartform output is sent as pdf attachment to a receipients email address?
Thanks
M Ahi,
chk this sample code.
* Internal Table declarations
DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
i_tline TYPE TABLE OF tline WITH HEADER LINE,
i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
* Objects to send mail.
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
* Work Area declarations
wa_objhead TYPE soli_tab,
w_ctrlop TYPE ssfctrlop,
w_compop TYPE ssfcompop,
w_return TYPE ssfcrescl,
wa_doc_chng typE sodocchgi1,
w_data TYPE sodocchgi1,
wa_buffer TYPE string,"To convert from 132 to 255
* Variables declarations
v_form_name TYPE rs38l_fnam,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen,
v_len_outn TYPE i,
v_lines_txt TYPE i,
v_lines_bin TYPE i.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZZZ_TEST1'
importing
fm_name = v_form_name
exceptions
no_form = 1
no_function_module = 2
others = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
CALL FUNCTION v_form_name
EXPORTING
control_parameters = w_ctrlop
output_options = w_compop
user_settings = 'X'
IMPORTING
job_output_info = w_return
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
i_otf[] = w_return-otfdata[].
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
* Fehlerhandling
if sy-subrc <> 0.
endif.
loop at i_tline.
translate i_tline using '~'.
concatenate wa_buffer i_tline into wa_buffer.
endloop.
translate wa_buffer using '~'.
do.
i_record = wa_buffer.
append i_record.
shift wa_buffer left by 255 places.
if wa_buffer is initial.
exit.
endif.
enddo.
* Attachment
refresh:
i_reclist,
i_objtxt,
i_objbin,
i_objpack.
clear wa_objhead.
i_objbin[] = i_record[].
******* Create Message Body
**** Title and Description
i_objtxt = 'test with pdf-Attachment!'.
append i_objtxt.
describe table i_objtxt lines v_lines_txt.
read table i_objtxt index v_lines_txt.
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
**** Main Text
* wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt )
clear i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
append i_objpack.
**** Attachment
* (pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
* Länge des Attachment ermitteln
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'smart'.
i_objpack-obj_descr = 'test'.
append i_objpack.
clear i_reclist.
i_reclist-receiver = '[email protected]'.
i_reclist-rec_type = 'U'.
append i_reclist.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
CONTENTS_BIN = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
Regards
Anver -
Problem in sending the file as an attachment through mail
Hi,
I have developed a Zreport. The functionality is like on executing this report it should send an e-mail with an attachment of the data in the xcel format.
So, while execting this report in background mode in ECC 5.0, it is able to send the mail as an attachment but the file doesn't contain the data in it But, the same report while trying to execute in back ground mode in ECC 6.0, it is able to send the mail with the attachment and the file also has the data.
So, my question is like are there any patches that has to be installed in ECC 5.0 system to get this successfully done.
Thanks in advance for your answers.
RohithHello,
Are you using the standad sap function module or using OLE objects to generate excel?
First try creating the excel file in foreground and see if the data is being populated.
Kind Regards,
Niky. -
Sending smartform as PDF attachment through email
Hi,
I have used the FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send the smartform as PDF attachment through email.In SOST transaction I can see that the mail has been sent to the reciepient,but the mail is not going to the mail box.What would be the reason for this?
Regards,
HemaThat should be the basis issue. They needs to do some settings. Please ask them to do so.
Pranav -
How to Send mail woth pdf attachment through workflow
Hi SDNer's,
I have a problem with pdf attachment through workflow. Please anybody help me to get solve my issue.Hi Suresh,
I just tried this thing in my systtem and it is working... BADI is trigerred everytime there is a change in the PO... even when you release there is a change in the PO so this BADI will be triggerred....
I suggest you should implement BADI in your dev system and place a break point in the POST method...
After that create a PO and release it using ME29N... thereafter when you save the PO... this method will trigger and you will have access to PO details...
PS: Remember this BADI wont work for transaction ME29...
Regards
Gautam -
Smartform - PDF attachment through E-mail issue
Hi,
A custom form and custom program was created to print the Purchase order information through ME21N, 22n and 23n.
It also has E-mail option. when output medium 5(Simple mail) and 7(External send), email will be send to respective mail-id's with the PDF attachment.
I have issue at the time of saving PO which processed with medium 5. when i save A popup appears "Express document update was terminated received from author". Brief message about it is
"Error Info... 00 671: ABAP/4 processor: COMMIT_IN_POSTING"
In Smartform driver program i am using below function modules to convert OTF into PDF and send through e-mail.
Function Module: CONVERT_OTF.
Function Module: SO_DOCUMENT_SEND_API1.
I am not sure, what i missed out. Can you guys tell is this the correct way to send PDF attachment through E-mail or i missed out any function module for commit.
Regards,
Hemanth.
Edited by: keerthipati hemanth on Jul 31, 2008 1:15 PM
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jul 31, 2008 3:14 PMHi Hemant,
Below is the code for the downloading of the smartform into the PDF Format.
* Program Name : ZPPREP_SHOPFLOOR_VIEWER_ZOOM
REPORT zppeerep_shorepfloor_viewer_zoom.
* T A B L E S D E C L A R A T I O N
*---Tables Used.
TABLES: afpo,
mara,
marc,
aufk,
afko,
itcoo,
nast, "Messages
*nast, "Messages
tnapr, "Programs & Forms
addr_key,
arc_params, "Archive parameters
toa_dara. "Archive parameters
* I N T E R N A L T A B L E S D E C L A R A T I O N
*--Internal Tables Used.
* D A T A D E C L A R A T I O N
*--Global Variables Used.
DATA: ws_matnr LIKE afpo-matnr,
ws_werks LIKE aufk-werks,
ws_mtart LIKE mara-mtart,
ws_wrkst LIKE mara-wrkst,
ws_fname TYPE rs38l_fnam,
ws_ctrlp TYPE ssfctrlop,
ws_optns TYPE ssfcompop,
w_padest LIKE tsp03l-padest. "BMC01+
DATA: da_message_printed(1) TYPE c,
da_preview_processed(1) TYPE c,
repeat(1) TYPE c,
da_subrc LIKE sy-subrc.
DATA: w_otfdata TYPE ssfcrescl.
DATA: BEGIN OF it_itcoo OCCURS 0.
INCLUDE STRUCTURE itcoo.
DATA: END OF it_itcoo.
DATA: w_otf TYPE itcoo.
*--Data Declaration for Printing Layout
DATA: ls_itcpo TYPE itcpo.
DATA: lf_repid TYPE sy-repid.
DATA: lf_device TYPE tddevice.
DATA: cf_retcode TYPE sy-subrc.
DATA: ls_recipient TYPE swotobjid.
DATA: ls_sender TYPE swotobjid.
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
DATA: ls_addr_key LIKE addr_key.
DATA: w_screen(1) TYPE c.
DATA: xscreen(1) TYPE c.
DATA: da_mess LIKE vbfs OCCURS 0 WITH HEADER LINE.
* C O N S T A N T S
CONSTANTS: c_fas1(8) TYPE c VALUE 'PRINTFAS',
c_fas2(15) TYPE c VALUE 'PRINTFASDRAWING',
c_wip1(8) TYPE c VALUE 'PRINTWIP',
c_wip2(15) TYPE c VALUE 'PRINTWIPDRAWING'.
* S E L E C T I O N - S C R E E N.
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-bl1.
* Production order
PARAMETERS: p_aufnr LIKE afpo-aufnr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK bl1.
START-OF-SELECTION.
*--Begin of Commenting "
*--Get Partially processed orders
MOVE: sy-mandt TO nast-mandt,
'V1' TO nast-kappl,
p_aufnr TO nast-objky,
p_aufnr TO nast-parnr,
sy-langu TO nast-spras,
sy-datum TO nast-erdat,
'1' TO nast-nacha,
'3' TO nast-vsztp,
'X' TO nast-manue,
sy-uname TO nast-usnam,
'DFLT' TO nast-ldest,
sy-langu TO nast-tdspras,
'Shop Floor Papers' TO nast-tdcovtitle,
'1' TO nast-tdarmod,
'BUS2032' TO nast-objtype.
*--Printer settings
CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
EXPORTING
pi_nast = nast
pi_repid = sy-repid
IMPORTING
pe_returncode = cf_retcode
pe_itcpo = ls_itcpo
pe_device = lf_device
pe_recipient = ls_recipient
pe_sender = ls_sender.
MOVE-CORRESPONDING ls_itcpo TO ls_composer_param.
ls_control_param-device = 'PRINTER'.
ls_control_param-no_dialog = 'X'.
ls_control_param-preview = 'X'.
ls_control_param-getotf = ls_itcpo-tdgetotf.
ls_control_param-langu = sy-langu.
*--End of Commenting "
*--Start of Addition "
CLEAR: ws_werks.
SELECT SINGLE werks
INTO ws_werks
FROM aufk
WHERE aufnr = p_aufnr.
CLEAR: ws_matnr.
SELECT SINGLE plnbez
INTO ws_matnr
FROM afko
WHERE aufnr = p_aufnr.
CLEAR: marc.
SELECT SINGLE matgr
INTO marc-matgr
FROM marc
WHERE matnr = ws_matnr
AND werks = ws_werks.
*--End of Addition "
* CHECK NOT ws_matnr IS INITIAL.
IF NOT ws_matnr IS INITIAL.
*--Start of Addition
SELECT SINGLE matgr
INTO marc-matgr
FROM marc
WHERE matnr = ws_matnr
AND werks = ws_werks.
*--Start of Addition BY Rapidigm01_01+
ELSE.
marc-matgr = c_wip1.
ENDIF.
*--End Of Addition BY Rapidigm01_01+
*--End of Addition "
END-OF-SELECTION.
PERFORM call_smartform.
* F O R M R O U T I N E S
*& Form call_smartform
* text
FORM call_smartform.
CLEAR: ws_ctrlp, ws_optns, ws_fname.
*--Start of Addition "
TRANSLATE marc-matgr TO UPPER CASE.
IF marc-matgr = c_fas1 OR
marc-matgr = c_fas2.
PERFORM call_paper_a.
ELSEIF marc-matgr = c_wip1 OR
marc-matgr = c_wip2.
PERFORM call_paper_b.
ENDIF.
*--End of Addition "
ENDFORM. "call_smartform
*& Form call_paper_a
* text
FORM call_paper_a.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
*>>BC SPARTA03 DATE: 19/05/2008
* formname = 'ZPPSF_SHOP_FLOOR_PAPER_A' "Rapidigm03_01-
formname = 'ZPPSF_SHOP_FLOOR_PAPER_C' "Rapidigm03_01-
*<<EC SPARTA03 DATE: 19/05/2008
* formname = 'ZPPSF_SHOP_FLOOR_PAPER_A_2893' "Rapidigm03_01+
IMPORTING
fm_name = ws_fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CHECK NOT ws_fname IS INITIAL.
CLEAR w_otfdata.
ls_control_param-getotf = 'X'.
CALL FUNCTION ws_fname
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = ' '
is_nast = nast
aufnr = p_aufnr
flag_orig = 'X'
IMPORTING
job_output_info = w_otfdata
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
LOOP AT w_otfdata-otfdata INTO w_otf.
APPEND w_otf TO it_itcoo.
ENDLOOP.
CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
TABLES
otf_table = it_itcoo.
ENDFORM. "call_paper_a
*& Form call_paper_b
* text
FORM call_paper_b.
DATA: ws_doknr TYPE draw-doknr,
ws_dokvr TYPE draw-dokvr.
CLEAR: ws_doknr, ws_dokvr.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZPPSF_SHOP_FLOOR_PAPER_B'
IMPORTING
fm_name = ws_fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CHECK NOT ws_fname IS INITIAL.
CLEAR w_otfdata.
ls_control_param-getotf = 'X'.
CALL FUNCTION ws_fname
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = ' '
is_nast = nast
aufnr = p_aufnr
doknr = ws_doknr
dokvr = ws_dokvr
flag_orig = 'X'
IMPORTING
job_output_info = w_otfdata
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
LOOP AT w_otfdata-otfdata INTO w_otf.
APPEND w_otf TO it_itcoo.
ENDLOOP.
CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
TABLES
otf_table = it_itcoo.
ENDFORM. "call_paper_b -
Sending Cheque as PDF attachment in Mail using F110.
Hi all,
We have a requirement to send the cheque as as PDF attachment in Mail while printing it through transaction F110.Mail has to be triggered when the payment run is done through F110.Is there any config setting to do this without doing any changes to Print program RFFOUS_C.
Thanks and Regards
KiranHi,
check below link
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/email%2bfrom%2bsap
Regards,
Madhu -
HR: Need to Send the Paysilp as a PDF file through Mail to Employees
Dear All ,
Need to Send the Paysilp as a PDF file through Mail to Employees.
can anyone please suggest any Standard Function Modules which takes the Payslip Form as input and convert it into PDF and can send it through mail to the concern employees.
Can anyone please explain the procedure in detail.
Thanks in Advance,
Regards.venu,
below is code which helps to generate pdf ,,,,hope u know how to use the mail sending function
data:
fm_name TYPE RS38L_FNAM, "Smart Forms: FM Name
sf_name TYPE TDSFNAME
value 'YOUR_FORM_NAME', "Smart Forms: Form Name
P_OUTPUT_OPTIONS TYPE SSFCOMPOP,
P_JOB_OUTPUT_INFO TYPE SSFCRESCL,
P_CONTROL_PARAMETERS TYPE SSFCTRLOP,
P_LANGUAGE TYPE SFLANGU value 'E',
P_E_DEVTYPE TYPE RSPOPTYPE.
data:
P_BIN_FILESIZE TYPE I,
P_BIN_FILE TYPE XSTRING,
P_OTF type table of ITCOO,
P_DOCS type table of DOCS,
P_LINES type table of TLINE,
name type string,
path type string,
fullpath type string,
filter type string,
guiobj type ref to cl_gui_frontend_services,
uact type i,
filename(128).
GET SMARTFORM FUNCTION MODULE NAME ---
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = sf_name
IMPORTING
FM_NAME = fm_name
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
I_LANGUAGE = P_LANGUAGE
I_APPLICATION = 'SAPDEFAULT'
IMPORTING
E_DEVTYPE = P_E_DEVTYPE.
P_OUTPUT_OPTIONS-XSFCMODE = 'X'.
P_OUTPUT_OPTIONS-XSF = SPACE.
P_OUTPUT_OPTIONS-XDFCMODE = 'X'.
P_OUTPUT_OPTIONS-XDF = SPACE.
P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.
P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
P_CONTROL_PARAMETERS-GETOTF = 'X'.
****...................................PRINTING.........................
CALL FUNCTION fm_name
EXPORTING
CONTROL_PARAMETERS = P_CONTROL_PARAMETERS
OUTPUT_OPTIONS = P_OUTPUT_OPTIONS
(....) <--- your form import parameters
IMPORTING
JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
****...................................CONVERT TO PDF...............
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
BIN_FILESIZE = P_BIN_FILESIZE
TABLES
OTF = P_OTF
DOCTAB_ARCHIVE = P_DOCS
LINES = P_LINES
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
now you can mail the pdf.
Reward points if helpful
Regards,
jinesh -
COMMIT_IN_POSTING error when sending PO as PDF attachment through me23n.
I am sending PO smartform as PDF attachment which is created when print preview option is selected in ME23n .
Problem is when i use
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
If I am using COMMIT_WORK = 'X' in this function module. then am able to send the mail ,but at the same time am not able to save any new PO in ME21N.
Iam getting error COMMIT_IN_POSTING.
IF I comment COMMIT_WORK = 'X'
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
then am able to save the new PO in ME21N but unable to send attachment as pdf.
Plzz provide me solution for the above,,...!
I have done changes in standard PO driver program from which am calling the samrtform using entry_enu form and with a nace configuration changes.Iam able to creat smartform output and also PDF file of smart form the only problem is sending mail while using 'SO_NEW_DOCUMENT_ATT_SEND_API1 and commit_work parameter.Moderator message - Duplicate post locked
Rob -
Sending log files for scheduled jobs as attachment through mail
Hi All,
Can any one please help me out to write a pl/sql program to send log files for scheduled jobs as attachment through mail.
Thanks.Why would anyone do that as this code has already been posted here a thousand times, it is all over the Internet, and the only thing you need to do is to search for it?
I agree it would cost you some effort, but you are getting paid for it, and we are not getting paid for delivering it on a golden plate on your doorstep, as you can not be bothered to use online resources.
Sybrand Bakker
Senior Oracle DBA
Maybe you are looking for
-
I have conneted both a 19-inch monitor and 32 inch tv. I find when I siwtch the reolution of one, it affects that of the other. Turn the 19 inch monitor to a small resolution gives me more possibilities for the Aqous TV. Assume that the G5 drives up
-
Adobe flash player not working- need help urgently
Hi I hope somebody would help me I have windows vista home premium, where few months back when I was using the computer it came for a message requesting me to upgrade my adobe flash player to version 10. which I did and its the biggest mistake Eversi
-
How do i edit voiceover in imovie
I am attempting to edit some voiceover audio that I have for a project that I'm working on. I need to edit because the voiceover is too long and i need several parts of the voiceover. Is this something that I'll be able to do?
-
T Code for Payment Slip?
HI Experts, Pls. let me know Tcode for <i><b>Print Payment Slip</b></i>. Bcoz, the Z_SmartForm is assigned to <i><b>RLB_INVOICE</b></i>(Print of a invoice by SAPscript SMART FORMS) with out put type ZD20. So, wanna to see the output of z_smartform.
-
Hello, I have been unable to burn playlists onto a cd from iTunes. I get a "Disc Burner or software not found" error. However, if I remove the Image Simulation drive from Device Manager, the error disappears but then iTunes freezes and will not burn