How can scripts and  smart forms send to mail and pdf?

HI i want to know how script and smartforms will send to mail and pdf formates>?

Dear Anees ,
                   Pleas pass on the parameter in itcpo - (getotf  ) structure while calling OPEN_FORM as 'X' .
I have answered it in detail in your earlier post .
also giving below sample program for sending SAPSCRIPT as PDFattachment in email  :
REPORT zsapscript_pdf_via_mail MESSAGE-ID zvele LINE-SIZE 68
NO STANDARD PAGE HEADING.
TABLES: itcpo.
Open your usual sapscript specifying that the output will be OTF
itcpo-tdgetotf = 'X'.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = ''
form = '............'
language = sy-langu
options = itcpo
EXCEPTIONS
canceled = 1
device = 2
form = 3
options = 4
unclosed = 5
OTHERS = 6.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = '............'
element = '............'
EXCEPTIONS
window = 1
element = 2.
DATA: BEGIN OF t_otfdata OCCURS 0.
INCLUDE STRUCTURE itcoo.
DATA: END OF t_otfdata.
Closing the Sapscript, we save data (OTF) in a table
CALL FUNCTION 'CLOSE_FORM'
TABLES
otfdata = t_otfdata
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
OTHERS = 5.
DATA: len_in LIKE sood-objlen,
len_out LIKE sood-objlen.
DATA: BEGIN OF t_pdfdata OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA: END OF t_pdfdata.
DATA: BEGIN OF t_otfdata2 OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA: END OF t_otfdata2.
Move OTF data to another table with lenght 255
LOOP AT t_otfdata.
CONCATENATE t_otfdata-tdprintcom t_otfdata-tdprintpar INTO t_otfdata2.
APPEND t_otfdata2.
ENDLOOP.
Convert OTF format to PDF
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = 'OTF'
format_dst = 'PDF'
devtype = 'PRINTER'
FUNCPARA =
len_in = len_in
IMPORTING
len_out = len_out
TABLES
content_in = t_otfdata2
content_out = t_pdfdata
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
Download on local directory
*CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = len_out
FILENAME = 'c:\test.pdf'
FILETYPE = 'BIN'
TABLES
data_tab = t_pdfdata.
Mail settings
DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINe.
DATA: doc_chng LIKE sodocchgi1.
DATA righe_attachment TYPE i.
DATA righe_testo TYPE i.
DATA z_email(80) TYPE c.
Receivers parameters
SELECT-OPTIONS: s_email FOR z_email LOWER CASE NO INTERVALS.
PARAMETERS rec_type LIKE reclist-rec_type
DEFAULT 'U'. " type of sending address
CLEAR: reclist, reclist[],
objhead, objhead[],
objtxt, objtxt[],
objbin, objbin[],
objpack, objpack[].
Attachment filling
LOOP AT t_pdfdata.
objbin-line = t_pdfdata.
APPEND objbin.
ENDLOOP.
DESCRIBE TABLE objbin LINES righe_attachment.
Text filling
objtxt = 'Testo della Mail - Riga 1'.APPEND objtxt.
objtxt = 'Testo della Mail - Riga 2'.APPEND objtxt.
objtxt = 'Testo della Mail - Riga n'.APPEND objtxt.
DESCRIBE TABLE objtxt LINES righe_testo.
Other filling
doc_chng-obj_name = 'URGENT'.
doc_chng-expiry_dat = sy-datum + 10.
doc_chng-obj_descr = 'Prova invio Mail con PDF'.
doc_chng-sensitivty = 'O'.
doc_chng-doc_size = righe_testo * 255.
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = righe_testo.
objpack-doc_type = 'RAW'.
APPEND objpack.
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = righe_attachment.
objpack-doc_type = 'PDF'.
objpack-obj_name = 'TEST'.
objpack-obj_descr = 'File.pdf'.
objpack-doc_size = righe_attachment * 255.
APPEND objpack.
Receivers filling
LOOP AT s_email WHERE sign = 'I'
AND option = 'EQ'
AND NOT ( low IS initial ).
CLEAR reclist.
IF sy-tabix > 1.
reclist-copy = 'X'.
ENDIF.
reclist-receiver = s_email-low.
IF rec_type IS INITIAL.
reclist-rec_type = 'U'. " Internet e-mail
ELSE.
reclist-rec_type = rec_type.
ENDIF.
reclist-notif_del = 'X'. " request delivery notification
reclist-notif_ndel = 'X'. " request not delivered notification
APPEND reclist.
ENDLOOP.
Mail Send
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
OBJECT_PARA =
OBJECT_PARB =
receivers = reclist
CONTENTS_HEX =
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

Similar Messages

  • How can I embed a form on my website and set up a submit button so that when people fill out and click Submit, the filled form will be emailed to me as an attached pdf file?

    How can I embed a form on my website and set up a submit button so that when people fill out and click Submit, the filled form will be emailed to me as an attached pdf file?
    Thank you!

    Hi;
    That is not a workflow that is supported by the Adobe forms solutions at this time.
    Thanks,
    Josh

  • How can i delete my gmail account from mail and add aol, how can i delete my gmail account from mail and add aol, how can i delete my gmail account from mail and add aol

    how can i delete my gmail account from mail and add aol, how can i delete my gmail account from mail and add aol, how can i delete my gmail account from mail and add aol

    Welcome to the Apple Support Communities
    To delete a mail account in Mail, open Mail, and go to Mail menu > Preferences > Accounts. Then, select the account you want to remove and press the - button.
    Then, press the + button to add the AOL mail account

  • How to integrate a Smart Form in Web Dynpro and how to view it on portal?

    Hi,
    I have created a Smart Form in ABAP. I need to use it in Web Dynpro. How can this be done?
    I want to integrate this Smart Form in a Web Dynpro Application and then display this Smart Form on the Portal (when I deploy the Web Dynpro application).
    Is it compulsory to first convert the Smart Form into PDF Format? Is there some other way ??
    Thanks in Advance.
    Regards,
    Harshada

    Hi,
    Go through Re: Web Dynpro and Smart Forms.
    Regards,
    Satyajit.

  • How can I store a form name with path and then call form from a table

    Is it possible that any form that I built I store that form in some table in DB and then call that form from table, if yes, then how can i get this functionality. I am not very experience in form and do not know if it can be done because i think if it is possible then this can be a good security for application and easy to handle as well.
    Thanks in advance
    Maz

    If you have a Forms block based on this table:
    declare
      module varchar2(100);
    begin
      module := :block.column;
      call_form ( module ) ;
    end;If you don't have any blok based on that table
    declare
      module varchar2(100);
    begin
      select  module_name
      into module
      from ...
      where ...
      call_form ( module ) ;
    end;Francois

  • How can i delete my old verify E-Mail and register with my new E-Mail into Creative Cloud App on the PC?

    I want to register with another Account into my Creative Cloud. When i download Creative Cloud, they always say that i must accept and verfiy my E-mail at my e-mail adress, but i have forgotten the whole password of my e-mail. So i created an new adobe account and wanted to login with this account into creative cloud. but everytime i am in creative cloud i only can accpet and verify the old email, i can't do something else. i uninstall creative cloud and install it again from the new accout, but everytime i only can verify the old email. Could anybody help me and say how i can register with my new email , so that i can verify with my new email?
    I got an PC with Win7.

    I did, but they can't help me too. I uninstall the App, and reinstall it like 10 times, and everytime it is this: (Screen: Screenshot by Lightshot)
    I don't know anymore the E-Mail Password, because it was just an fun E-Mail Adress.
    Could anybody help me and say how i can register in the Adobe Creative Cloud App on my Desktop with my new Account?
    But thanks for the help attempt Sheena.

  • How can I upgrade from Adobe Send Annual to Adobe PDF Pak monthly, it won't let me.  Just makes me choose annual.

    I would like to upgrade to the Adobe PDF Pak but on a monthly basis, even though it is a little more.  I currently have the Adobe Send on an annual basis with Auto renewal.  Even if I turn off auto renewal, it won't let me upgrade unless I turn auto renewal back on.  I didn't think it should be this difficult....
    Linda

    Hi lindag80498358,
    I just checked your account, and it looks like you've been taken care of with both an Adobe Send annual subscription, and an Adobe PDF Pack month-to-month. Please let us know if there's anything else we can do for you.
    Best,
    Sara

  • How can I remove my new iCloud e-mail and return my MS Outlook Contacts to my PC?

    Greetings all,
    Just got a new iPhone 5S.  Wanted to backup 4s to iCloud so I entered iCloud setup. In going through the iCloud set up process I created an iCloud e-mail account despite having no need for one.  It appeared as if it was a necessity ?,  I use MS Outlook 2010 for e-mail.  iCloud set up requested I create an iCloud e-mail, so i did.  I do not need an iCloud e-mail.  In the process of setting up the new iCloud e-mail, setup removed all my contacts from Outlook and sent them to the iCloud e-mail account, I assumed that the contacts would be copied, not moved. I no longer have any contacts in Outlook.  I would like to remove the new e-mail account from iCloud and ensure that the associated contacts are returned to my PC properly. All the iCloud e-mail help areas I have looked through have not provided any guidance on this issue. Perhpas I only went down ten layers of info and this info is in the 15th layer down?   Thanks for any guidance, Apple/PC folks.   Craig

    This is Craig 237B,
    I just found the contacts for my Outlook account hidden in an iCloud folder in Outlook. 
    I still would like advice to remove my new iCloud e-mail and return Outlook to it's previous state, if someone knows this?
    Thanks
    Craig

  • How can I stop Verizon from sending me texts and calling my phone?

    I am not the primary on the account. The primary has called and complained numerous times and was told each time, my number isn't in the system and I shouldn't be getting these, but the calls and texts keep coming, dozens per month, every month. When I get the calls, I push the number to let them know they are calling the wrong number, it tells me to wait for customer service and when they answer they wont talk to me because I am not the primary. I am so upset by being harassed by the 10 calls and messages per day and no one will help me. Somebody help stop these automated calls and get my number out of the automated call and text system! I need a solution.

    My next suggestion is to simply change your cell number on this line. However I frown upon doing so since I believe you may end up with a worst set of annoyance calls then you are receiving now. Its a crap shoot.
    Often times it takes almost 30 days for your number to be purged from verizons calling or marketing system. Just wait for that time to elapse before doing any number change.
    At my verizon you can block up to five text or telephone numbers for 90 days. If they are not internal verizon business numbers you can block them
    Please note these calls you receive can be external telemarketing calls who are pestering verizon customers via auto dial.
    You can send unwanted texts to #spam  and follow the instructions.
    Good Luck

  • Interactive Forms, send e-mail and attach the PDF document

    Hi all, 
    I've the form and I don't know if I can send an email, trough a button (Jscript or Formcalc), with in attachment my filled form in PDF format (further the XML Data)?   
    I don't now also if with Jscript, i can invoke the print and set automatically the print device that I want use to print.
    Thanks in advance,
    Antonello Didonna

    Hi Michal,
    Ok for the email...
    now I'm looking for something to attach a file at the mail.
    For printing, I've found this older code to set the printer:
    var pp = this.getPrintParams();
    pp.interactive = pp.constants.interactionLevel.automatic;
    pp.printerName = "hp officejet d series";
    this.print(pp);
    This code seems that is supported on Abode 6 or later.
    You know another method to set the printer?
    The target is print the PDF at file.
    I've seen also that there's also this method but I don't understand how I can use it!
    FilePrintSilent
    Prints all pages in a document, without displaying a print dialog box to the user. For PostScript printing, only Level 1 operators are used, only ASCII data is generated, and the documentu2019s pages are not shrunk to fit into the imageable area of the printed page.
    FilePrintSilent is also supported in Adobe Reader.
    Syntax
    [FilePrintSilent(char* fullPath)]
    Parameters
    fullPath
    The full path of the file to be printed.
    FilePrintSilent [here|http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?&accessible=true].
    Thanks so much,
    Antonello Didonna

  • How can I recovered a form that I delete by mistake?

    I nee someone help, How can I recovered a form that I create and later on I deleted by mistake? Thank you in advance for your prompt answer

    Hi;
    I am sorry to say that there isn't any method to recover a deleted form.  There is a confirmation dialog saying that this is a permanent deletion to ensure that is what you want to do, once you've confirmed the form is really deleted and not recoverable.
    Thanks,
    Josh

  • How to print " Duplicate " in FORM ( either Sap Script or Smart Forms )

    hi,
       How to print  " Duplicate " in FORM ( either Sap Script or Smart Forms ) if trying to take second Print Out and the FORM is already Printed.
    Please let me know the condition that we should go for.If possible let me know the SAMPLE code since this will be used in most of the FORMS.
    Regards
    Avi

    Hi
    It depends on which print you're working.
    If it's a print of standard document you can check the NAST (VSTAT field) table in order to know if the document was printed.
    If a message is created you can find the hit in NAST table:
    VSTAT = 0, document not printed;
    VSTAT = 1, documment printed
    VSTAT = 2, print is failed
    If you mean a custom print I believe you need to create a log like NAST table.
    Max

  • List of script and smart forms(except TNAPR) with output type or print prog

    How to find out List of SAP SCRIPT and SMART FORMS (except TNAPR)with output type or print program..I like to chk in output type WMTA  whch form should use.kindly help on this

    Hi
    WMTA is special msg and doesn't create any print: so you can't find a sapscript or smartform to link to it.
    WMTA is a message for delivery, so you can find it by NACE trx or TNAPR table (It's the same): infact here it can find only all messages of logistic modules (SD & MM).
    The routine ENTRY of RLAUTA20 is called by WMTA and creates a Transfer Order (for WM, Warehouse Management, module), so if you need to create a print for that msg you need to change prg RLAUTA20,
    Max

  • ? MSWORD as EDITOR in sap script and smart forms ?

    Hi friends,
    How to use MSWORD as EDITOR in sap script and smart forms.
    Edited by: Julius Bussche on Jul 17, 2008 12:45 PM

    hi,
    Call transaction I18N
    go to I18N Customizing -> MS Word as Editor.Choose the Help-Button and follow the instructions.
    If transaction I18N is not available in your system yet (see SAP Note 848036), you can also enable this feature via program RSCPINST.
    Call transaction SE38, enter program RSCPINST and press F8. On the next screen,select Goto -> Set MS Word as Editor.

  • What is the diff b/w Sap Scripts and Smart Forms

    Hi,
          Whats the diff b/w SAP Scripts and Smart Forms..
             I need the internal explanation for both Smart Forms and SAP Scripts mean when we execute what happens whether Print Program r Forms starts execution 1st  and SIMILARLY FOR SMARTFORMS WHETHER FM'S  R FORMS.
    Thanks & Regards,
    Gopi.

    Hi
    Difference with SMARTFORMS vs. SapScript(SE71)
    The Following are the differences :-
    a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
    b) It is possible to have a smartform without a main window .
    c) Labels cannot be created in smartforms.
    d) Routines can be written in smartforms tool.
    e) Smartforms generates a function module when activated.
    f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
    It was said that it was provided in CRM 3.0 version, but not available in R/3. You can download smartforms into Local PC in a XML format. In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.
    In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
    In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.
    For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people. What you can do is to create a Transport and then FTP down to your local harddisk. When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server. Finally, the Basis team, will tp it into your system.
    g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
    check out this link:
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    Reward points if helpful.
    Regards,
    Swathi.

Maybe you are looking for

  • HT1415 Movie rental question

    I rented "Now You See Me" last night at 8:30, and I want to watch it again before my time expires but I am not given that option. The only option I see is to rent it again. Shouldn't I be able to watch it as many times I want within the 24 hours?

  • ITunes Radio - wont play through MAC

    Hi I ususally listen to the Radio stations via a Roku Soundbridge (as well as other iTunes tracks etc) - with no issues. Today I wanted to play a station via iTunes directly but no joy - still plays via wireless SoundBridge so its streaming ok, but n

  • Security Update 2015-003: what is it

    App Store is presenting Security Update 2015-003 1.0 for installing. Any one know what it is about ?

  • How to retrieve "env-entry" in servlet code

    i have a pretty straight-forward web app, which contains a servlet, among other things. the web app is packaged in .war, and it in turn is part of a .ear file. i am using WAS 640 sneak preview on windows xp. in the web.xml file, i added the following

  • Problem compiling java programs

    when i run javc in command prompt it runs fine but when i try to compile any program through command prompt it gives following error: javac: file not found usage: java <options> <source file> use -help for list of attributes what shouls i do plz help