Smartforms thru EMAIL
Hi frnds,
how to send the smartforms thru email?
please send me the documents or links or materials to my id.
[email protected]
thanks in advance.
Regards,
Balu
Hi Reddy,
Use 'SO_NEW_DOCUMENT_SEND_API1 F.M
Please go through the code.
data declaration
c_u(1) VALUE 'U', "Value U
c_int(3) VALUE 'INT', "Value Int
c_saprpt(6) VALUE 'SAPRPT', "Heading
c_f(1) VALUE 'F', "Value F
c_raw(3) VALUE 'RAW'. "Doc Type
getting the data from TVARV
CONCATENATE 'CBSI_FILE_NAME' '0227' INTO l_var_name SEPARATED BY '_'.
CALL FUNCTION 'Z_GET_TVARV_ENTRIES'
EXPORTING
i_name = l_var_name
i_type = 'P'
I_MSGTY =
IMPORTING
e_parameter = l_file.
TABLES
t_tvarv =
p_file = l_file .
Sending email
PERFORM send_file_as_email_attachment
USING v_email
'SM0003 Control Total Data'
'SM0003 Control Total Data'
Send email
-->P_GV_EMAIL Email id
-->P_TEXT_003 Subject
-->P_TEXT_003 Subject
-->P_6200 text
FORM send_file_as_email_attachment
USING p_email TYPE somlreci1-receiver
p_mtitle TYPE sodocchgi1-obj_descr
p_filename TYPE so_obj_des
p_attdescription TYPE so_obj_nam.
*Local varibales
DATA: lv_mtitle TYPE sodocchgi1-obj_descr,
lv_email TYPE somlreci1-receiver,
lv_attdescription TYPE so_obj_nam ,
lv_attfilename TYPE so_obj_des ,
lv_sent_all TYPE sonv-flag.
*move values
it_attach[] = it_output[].
lv_sent_all = c_x.
lv_email = p_email.
lv_mtitle = p_mtitle.
lv_attdescription = p_attdescription.
lv_attfilename = p_filename.
Fill the document data.
it_docchange-doc_size = 1.
Populate the subject/generic message attributes
it_docchange-obj_langu = sy-langu.
it_docchange-obj_name = c_saprpt.
it_docchange-obj_descr = lv_mtitle .
it_docchange-sensitivty = c_f.
Fill the document data and get size of attachment
READ TABLE it_attach
INDEX v_chr_entries
TRANSPORTING NO FIELDS.
it_docchange-doc_size =
( v_chr_entries - 1 ) * 255 + STRLEN( it_attach ).
it_docchange-obj_langu = sy-langu.
it_docchange-obj_name = c_saprpt.
it_docchange-obj_descr = lv_mtitle.
it_docchange-sensitivty = c_f.
Describe the body of the message
CLEAR wa_objpack.
REFRESH it_objpack.
wa_objpack-transf_bin = space.
wa_objpack-head_start = 1.
wa_objpack-head_num = 0.
wa_objpack-body_start = 1.
DESCRIBE TABLE it_message LINES v_objpackbody.
wa_objpack-doc_type = c_raw.
APPEND wa_objpack
TO it_objpack.
Create attachment notification
wa_objpack-transf_bin = c_x.
wa_objpack-head_start = 1.
wa_objpack-head_num = 1.
wa_objpack-body_start = 1.
DESCRIBE TABLE it_attach LINES v_objpackbody.
wa_objpack-obj_descr = lv_attdescription.
wa_objpack-obj_name = lv_attfilename.
wa_objpack-doc_size = wa_objpack-body_num * 255.
APPEND wa_objpack
TO it_objpack.
Add the recipients email address
REFRESH it_reclist.
LOOP AT it_mailid .
wa_reclist-receiver = it_mailid-low.
wa_reclist-receiver = '[email protected]'.
wa_reclist-rec_type = c_u.
wa_reclist-com_type = c_int.
wa_reclist-notif_del = c_x.
wa_reclist-notif_ndel = c_x.
APPEND wa_reclist
TO it_reclist.
CLEAR wa_reclist.
ENDLOOP.
IF 1 = 2.
ENDIF.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = it_docchange
document_type = c_raw
put_in_outbox = c_x
commit_work = c_x
IMPORTING
sent_to_all = lv_sent_all
TABLES
object_content = it_attach
receivers = it_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.
IF sy-subrc NE 0.
MESSAGE e114 ."Unable to send An Email with Session Log.
ENDIF. "IF sy-subrc NE 0.
ENDFORM. "send_file_as_email_attachment
Thanks & Regards,
Padmaja
Similar Messages
-
If anybody aware of sending smartform thru email then pls mail me a sample document. I have a code which is generating mail request but finally i am not receiving the mail at the given id. Please help.
Sutapa Sengupta
[email protected]Thanks a lot for the quick response. I have tried this code. My mail request is getting created successfully but i cannot see any mail waiting in SCOT neither can i see it SO01 - outbox . In this code in the third subroutine the object is not getting created. Please throw some light.
Thanks again. -
How do I send reminders to customers thru email directly thru SAP
Please help me find a solution to a problem that : -
I want to send letters / statements / reminders directly to customers / vendors of smartforms thru email using SAP.
Kindly tell me how do I write program in ABAP. Is there any function module for sending smartforms thru email.
Please help me
Thanks in advance
SK DanielWe can send smartforms thru mail.
Find the below code.
CONSTANTS: lc_getotf_ex TYPE tdgetotf VALUE 'X',
lc_no_dialog TYPE tdsfflag VALUE 'X',
lc_preview TYPE tdpreview VALUE 'X'.
Set Control Parameters and composer Parameters for requirement.
gwa_control_param-no_dialog = space.
gwa_control_param-preview = lc_preview.
gwa_composer_param-tdimmed = gc_ex.
If the File Save Path Is Specified Smart Form to Covert to PDF.
IF gv_fullpath IS NOT INITIAL.
gwa_control_param-getotf = lc_getotf_ex.
gwa_control_param-no_dialog = lc_no_dialog.
ENDIF.
call Smart Form Function Module
CALL FUNCTION gv_smart_form_fm
EXPORTING
control_parameters = gwa_control_param
mail_recipient = gt_recipient
mail_sender = gt_sender
output_options = gwa_composer_param
user_settings = space
gv_summary = gv_summary
gv_detail = gv_detail
gv_multi = gv_multi
IMPORTING
job_output_info = gwa_job_output_info
TABLES
gt_costsheet = gt_costsheet
gt_firstcost_sf = gt_firstcost_sf
gt_costload_sf = gt_costload_sf
gt_misc = gt_misc
gt_cost = gt_cost
gt_totals = gt_totals
gt_zxparam = gt_zfico
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> gc_subrc.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
If the File Save Path Is Specified
Function Module to Convert Smart Form Output to PDF Formate.
IF gv_fullpath IS NOT INITIAL.
LOOP AT gwa_job_output_info-otfdata INTO gwa_otf.
APPEND gwa_otf TO gt_otf.
ENDLOOP.
Function Module To Conver Smart Form To PDF Formate.
PERFORM call_convert_otf_2_pdf.
ENDIF.
CONSTANTS: lc_tilt1(2) TYPE c VALUE '~ ',
lc_tilt2(2) TYPE c VALUE ' ~'.
DATA: lv_filesize TYPE i,
lv_otf_cmd TYPE c VALUE 'X'.
Conversion From Smart Form to PDF Formate
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
use_otf_mc_cmd = lv_otf_cmd
IMPORTING
bin_filesize = lv_filesize
TABLES
otf = gt_otf
doctab_archive = gt_doc
lines = gt_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
IF sy-subrc <> gc_subrc.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF lv_filesize = 0.
EXIT.
ENDIF.
LOOP AT gt_lines INTO gwa_lines.
TRANSLATE gwa_lines USING lc_tilt2.
CONCATENATE gv_buffer gwa_lines INTO gv_buffer.
ENDLOOP.
TRANSLATE gv_buffer USING lc_tilt1.
DO.
SHIFT gv_buffer LEFT BY 255 PLACES.
IF gv_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO. -
Hi Gurus,
How to send sales Order thru email , wht r the settings ?
Thanks & Regards,
VikasHi,
This is similar to any other output that is sent. Pls goto NACE transaction select Sales - then output types, then select your output type and give the transmission medium as Mail and then you need to have the right processing routines and forms. If you have any standard texts which need to come in the order the same can be set as well and called in the print programs.
Hope it helps. -
Sending messages thru email and SMS without using XMS APIs
Hi,
I already have some working code that sends messages thru email and SMS. But currently it uses XMS APIs therefore I have a dependency on files like wdk.jar. I want to try and eliminate using the XMS APIs and only use soap to send these messages. I was wondering if there is some documentation available on how I can do this. Also if there a lot of code that needs to be written to do that.
I primarily want a very simple application that sends only string messages and reduce my dependencies.
I would really appreciate all the advice.
Thanks,
Sonali NathHi,
You may refer to the following links to check if they help:
Sending SCCM Status Messages from MDT Scripts.
Send SCCM task sequence email report
Regards,
Sabrina -
I have already contacted apple thru email, twice. I don't see that they have an option for a call back for a missing iTunes balance, I did however see where I could get a call back(and did) for not being able to sign in on another device to make a purchase. This problem was resolved quickly for this device. I told this rep about the unresolved problem of the missing iTunes balance and he said he could transfer me but the wait times are very long. In my 2 email correspondences on this missing balance issue both times I was told to check my balance history- which does not resolve the issue that I am having to go thru a huge hassle to get my missing balance back prior to my card purchase. I had a balance of $5.86 show on my ipad2 and on my Mac book pro prior to applying the $25 gift card. Then the balance showed only $25 after apply my gift card, now here's what's weird: aprox. A week and a half later I sign in on my iPod touch and shows a balance of $5.30!, but when it has me resign into iTunes that balance disappeared, and the $25 gift card balance shows up. I made NO PURCHASES to use the $5.86/ or $5.30- so I want my money to equal $30.30/ or $30.86 as it should, and I want to not go thru so much to take care of it. To just hope Apple would have a call back option for this type of issue. I won't be buying iTunes gift cards or purchasing thru iTunes if my balance disappears when I do so.
When you tried to contact Support with the card's images how were you trying to do it, on your phone or a browser on your computer ? And have you tried a different browser to see if you get the same error message ?
As well as images of the card they might also want an image of its receipt.
And to contact Support you were using : http://www.apple.com/support/itunes/contact/ , and clicked on Contact iTunes Store Support on the right-hand side of the page, then iTunes Cards And Codes ? -
How do I save my project and share it thru email?
I saved and rendered my video but when I send it thru email it can't be opened. Please help!
It sounds like you may be trying to e-mail the project file. That won't work.
It's also probably not a good idea to send videos through e-mail in any event. The files are too much.
It's much wiser to post your video to a site like Youtube or Vimeo and then e-mail a link to it.
Do you know how to post a video to YouTube or Vimeo? -
Sending PDF thru email with password protection in our SAP system
Need solution for sending PDF thru email with password protection in our SAP ecc 6
Or maybe you have found any other way? You can check here:
Password protect PDF file:
Re: Password protected PDF file
pdf with password encryption
Regards Otto -
Send smartforms via email using action profiles
hi,
i am trying to send smartforms via email using action profiles and i would like to know if anyone has any document or know any steps to do the same. i have created the smartform and i created the action in an action profile. i selected the option "Smartforms Mail". and i have mentioned my smartform in it.
I have previously worked with action profiles to trigger workflows which sent a mail. That was relatively easier as i could mention that the mail be sent to my mailbox. But in the smartforms option, i dont know how to give the instruction that it be sent to my mailbox.. is there any place i can set it? The action is not person dependant and is done whenever saving a document.
Please guide.
Thanks,
NishaHi Nisha,
As u worked on Action profiles, i recommend u use action profile with permitted Process type as Smart Forms Mail to send the mails which contains the data in Smartform u created.
Use below mail setting
Form Name (u r ZSmartform)
Processing Class CL_DOC_PROCESSING_CRM_ORDER
Processing Method CRM_ACTIVITY_EXEC_SMART_FORM
Archive Mode 1 Mail only User
In Action definition details u can mentioned the Processing time, Partner dependent for action to who u want to send the mail, further in action condition using schedule and start condition u can set the criteria to mail trigger.
Hope it'll help u.
Regards,
Dipesh. -
Hi all,
Request you send me the detail customization step to be done for sending the PO to vendor thru email.
What are the settings to be done in MM?
And on BASIS side what are the customizations needed?
Step to be followed for end user.
Pl. guide.
Regards,
SPYou can send purchase order via e-mail in SAP system, there are some configurations and pre-requisites to do as follow:
1. You must maintain an e-mail address in the address in the vendor master.
2. The same applies to your own user master. You also have to specify an e-mail address there in order to identify the sender.
Note that it is not possible to change the e-mail address of the vendor via the SAP purchase order transaction (ME21N, ME22N, and so on). The system only uses the e-mail address of the vendor that is maintained in the vendor master!
3. For the output type for default values, a communication strategy needs to be maintained in the Customizing that supports the e-mail. You can find the definition of the communication strategy in the Customizing via the following path: (SPRO -> IMG -> SAP Web Application Server -> Basic Services -> Message Control -> Define Communication Strategy). As a default, communication strategy CS01 is delivered. This already contains the necessary entry for the external communication. Bear in mind that without a suitable communication strategy it is not possible to communicate with a partner via Medium 5 (external sending).
4. Use the standard SAP environment (program 'SAPFM06P', FORM routine 'ENTRY_NEU' and form 'MEDRUCK') as the processing routines.
5. In the condition records for the output type (for example, Transaction MN04), use medium '5' (External send).
6. You can use Transaction SCOT to trigger the output manually. The prerequisite for a correct sending is that the node is set correctly. This is not described here, but it must have already been carried out.
7. To be able to display, for example, the e-mail in Outlook, enter PDF as the format in the node.
For more details, check out the OSS note :191470
Regards,
Priyanka.P -
Disable all print apps, but still print thru email
On my new HP Photosmart 6520 e-All-in-One printer, I want to disable all print apps, but not all web services: I still want to keep the ability to print photos and other files from all my devices thru email, as well as on my wireless LAN at home.
Is there a way to do this without removing every print app individually?Hi,
That can be done by removing each app indicidualy as listed below:
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02940901&tmp_task=setupCategory&cc=us&dlc=en&lc...
Other thean that, the only option to disable any of the print apps is to disable and re-enable the Web Services for your printer, however be aware that by performing a such you will need to select a different ePrint email address for your device as the current one will be locked for 6 months and will not be able to be used due to security reasons.
Shlomi
Say thanks by clicking the Kudos thumb up in the post.
If my post resolve your problem please mark it as an Accepted Solution -
Why do YouTube videos stop? I have restarted,reset, played thru email and played thru app. It plays on my desktop fine.
Okay... No flash... understand...
So I went ahead and installed YouTube app on my IPhone... but now when I select the youtube video from Facebook I get into youtube and I can see the video I 'm trying to play, but now a message appears over the video "The content owner has not made this video available on mobile. Add to playlist to watch it later on a PC." At that point I was able to seach & select other videos by the artist (George Strait) off youtube and play them pkay on my Iphone, but not this particular one posted on facebook. Oh well.. I've spent enough time on this one, I know when I can't get there from here..
Thanks razmee209 for your help, its much appreciated..
Marvin -
Sending smartform through email as PDF attachment
Hi,
I want to send a smartform through email as pdf attachment.In the code I have hardcoded the receiver mail id.But I don't want this to be sent only to a particular receiver.I want this to be sent as many people as I can without hardcoding their mail id's in the program.How can I do that?
Regards,
Hema**Data Declarations
**Internal Table
DATA : BEGIN OF it_spfli OCCURS 0,
carrid LIKE spfli-carrid,
connid LIKE spfli-connid,
END OF it_spfli.
DATA: it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
it_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
storing receivers
it_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
**storing file attachment data
it_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE, gd_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
l_gntxt LIKE t357g_t-gntxt,
lv_message(100) TYPE c.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE. "storing mail body
DATA : psubject(30) TYPE c VALUE 'Sample Mail'. "subject of the mail
DATA : ld_format TYPE so_obj_tp , "file format
ld_attfilename TYPE so_obj_des, "file name
w_cnt TYPE i.
**Selecting the data
SELECT carrid connid INTO TABLE it_spfli FROM spfli WHERE carrid EQ 'AA'.
**Perform for populating mail body
PERFORM populate_message.
**Perform for populating file attachment
PERFORM populate_attachment.
**Perform for populating mail characteristic info
PERFORM populate_pack.
**Perform for populating receivers
PERFORM populate_receivers.
**Perform to send mail
PERFORM send_mail.
*& Form populate_message
text
--> p1 text
<-- p2 text
FORM populate_message .
**Populating the body
lv_message = 'Sample mail for testing purpose.'.
APPEND lv_message TO it_message.
ENDFORM. " populate_message
*& Form populate_attachment
text
--> p1 text
<-- p2 text
FORM populate_attachment .
**Populating the attachment file with the data from final intenal table
CONCATENATE 'CARRIER ID'
'CONNECTION ID'
INTO it_attachment SEPARATED BY
cl_abap_char_utilities=>horizontal_tab.
CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO
it_attachment.
APPEND it_attachment.
LOOP AT it_spfli.
CONCATENATE it_spfli-carrid it_spfli-connid INTO it_attachment SEPARATED BY
cl_abap_char_utilities=>horizontal_tab.
CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO
it_attachment.
APPEND it_attachment.
ENDLOOP.
ENDFORM. " populate_attachment
*& Form populate_receivers
text
--> p1 text
<-- p2 text
FORM populate_receivers .
**Populating Mail Recepients
**If there are more than one mail recepient then loop and append them to it_receivers
it_receivers-receiver = '[email protected]'.
it_receivers-rec_type = 'U'.
it_receivers-com_type = 'INT'.
it_receivers-notif_del = 'X'.
it_receivers-notif_ndel = 'X'.
it_receivers-express = 'X'.
APPEND it_receivers.
ENDFORM. " populate_receivers
*& Form populate_pack
text
--> p1 text
<-- p2 text
FORM populate_pack .
**File Type
ld_format = 'XLS'.
**File Name
ld_attfilename = 'File1'.
Fill the document data.
gd_doc_data-doc_size = 1.
Populate the subject/generic message attributes
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SAPRPT'.
gd_doc_data-obj_descr = psubject .
gd_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR gd_doc_data.
Populate the subject/generic message attributes
gd_doc_data-obj_langu = sy-langu.
READ TABLE it_attachment INDEX w_cnt.
gd_doc_data-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_attachment ).
gd_doc_data-obj_name = 'SAPRPT'.
gd_doc_data-obj_descr = psubject.
gd_doc_data-sensitivty = 'F'.
Describe the body of the message
CLEAR it_packing_list.
REFRESH it_packing_list.
it_packing_list-transf_bin = space.
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES it_packing_list-body_num.
it_packing_list-doc_type = 'RAW'.
APPEND it_packing_list.
**Describe the attachment info
it_packing_list-transf_bin = 'X'.
it_packing_list-head_start = 1.
it_packing_list-head_num = 1.
it_packing_list-body_start = 1.
DESCRIBE TABLE it_attachment LINES it_packing_list-body_num.
it_packing_list-doc_type = ld_format.
it_packing_list-obj_name = ld_attfilename.
it_packing_list-obj_descr = ld_attfilename.
it_packing_list-doc_size = it_packing_list-body_num * 255.
APPEND it_packing_list.
ENDFORM. " populate_pack
*& Form send_mail
text
--> p1 text
<-- p2 text
FORM send_mail .
**Function Module to send mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_packing_list
contents_bin = it_attachment
contents_txt = it_message
receivers = it_receivers
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.
ENDFORM. " send_mail -
Hi,
I have a requirement to send the smartform through email as PDF attachment.I have declared
DATA: lt_lines TYPE TABLE OF tline WITH HEADER LINE.
for the PDF data.
But lt_lines field is not getting populated with values.
Can anyone tell me what would be the reason for this?hi,
First thing would be try to debug ur code by putting the break point at Convert_Otf.... and c whether u r getting any data into the internal table once u execute that fm...
second option would be...
There are lot of sample codes in SDN for the same scenario... go through it once and try to find where exactly it is going wrong... in that fashion u can easily solve ur prob. -
Hi Gurus,
I want to send MC.9 Stock report thru email. It give a runtime error in Basic List. Can anybody help me ?
Thanks & Rgds
VikasHi Erwan,
I m putting email id, systems takes it as U Internet address, when I am sending the mail, message is shown as Document Sent, but actually in PDF I am not getting any report. It is a blank PDF file.
Thanks & Regards,
Vikas
Maybe you are looking for
-
What more is there to say? I was given an address to use in a project I am working on. It does NOT include www in the address. Every time I try to get to the site, I enter the address and firefox inserts www into the address and if I click on it, I a
-
10.4.11 problems
Hey there, the new upgrade really knocked my computers for a loop. I have two separate issues that I need some ideas on how to handle. 1. My wife's laptop (G4 Powerbook) no longer sees the airport card - I only get the 'No AirPort hardware found' mes
-
Can't see the podcast picture and episodes on iTunes
Hi, My podcast feed was added to iTunes store about a week ago. It was working well for a couple of days, and now, I can't see my episodes and my podcast picture on iTunes catalogue. I was wondering what might be the problem? Here's the XML file crea
-
Palm Pre 2 Unlocked Compatibil​ity With AT&T
Hi, This information is probably on the site somewhere but I didn't see it. Is the new unlocked GSM Palm Pre 2 fully compatible with the AT&T network? Can it use AT&T 3G? Is it also fully compatible with T-Mobile? Can it use T-Mobile's 4G network as
-
Sending to multiple addresses and using BCC
I'm using Mail and Address book to send a basic email (no images or anything like that) to my mailing list. I beleive my server (Sympatico) has a restriction on the number of recipients - 99. But I'm sending to less than that. When I put the addresse