How to send scripts via email(Internet Address)

Dear all,
I want to send scripts/smart forms via email (Internet Address). How can I do that …please advice…?
If any one has worked on it please send me sample code for the same.
Thanks in Advance…
Thanks and Regards:
M.Manohar

Hi Manohar,
Check this Program.
REPORT zptpfrm202p_pogr_pr_instr MESSAGE-ID zmm.
TABLES *
Database table made for getting information about PRINTPREVIEW and
PRINT command more than one times
TABLES: zgr_table.
TYPE-POOLS:syscr.
GLOBAL TYPE DECLARATION *
DATA: zdoc_output_info TYPE ssfcrespd, "SF:Return Document Inf.
zjob_output_info TYPE ssfcrescl, "SF:Return value at end of
form printing
i_control TYPE ssfctrlop ,
i_output_options TYPE ssfcompop,
zjob_output_opts TYPE ssfcresop. "SF:Return value at start
of form printing
*This internal table is used for storing Document Segment: Material
DATA: BEGIN OF i_mseg.
INCLUDE STRUCTURE mseg.
DATA: END OF i_mseg.
This internal table is used for storing Header: Material Document
DATA: BEGIN OF i_mkpf.
INCLUDE STRUCTURE mkpf.
DATA: END OF i_mkpf.
*Variables
DATA flag(1) TYPE c.
DATA: vfile TYPE string.
SELECTION-SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
PARAMETERS:p_mblnr TYPE mkpf-mblnr OBLIGATORY MATCHCODE OBJECT zganesh,
p_mjahr TYPE mkpf-mjahr OBLIGATORY MATCHCODE OBJECT zganesh1,
p_zeile TYPE mseg-zeile OBLIGATORY MATCHCODE OBJECT zganesh2.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 10.
PARAMETER:r_disp RADIOBUTTON GROUP g1 USER-COMMAND u1 DEFAULT 'X'.
SELECTION-SCREEN:COMMENT 15(10) text-002 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 10.
PARAMETERS: r_down RADIOBUTTON GROUP g1.
SELECTION-SCREEN:COMMENT 15(10) text-003.
*PARAMETERS: v_file LIKE rlgrap-filename .
*SELECTION-SCREEN:COMMENT 70(50) text-005.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 10.
PARAMETERS: r_print RADIOBUTTON GROUP g1 .
SELECTION-SCREEN:COMMENT 15(10) text-004.
SELECTION-SCREEN END OF LINE.
PARAMETERS: v_file LIKE rlgrap-filename MODIF ID g12.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR v_file.
DATA : wlv_field_name LIKE dynpread-fieldname,
wlv_file_name LIKE ibipparms-path.
wlv_field_name = v_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = wlv_field_name
IMPORTING
file_name = wlv_file_name.
IF sy-subrc EQ 0.
vfile = wlv_file_name.
v_file = wlv_file_name.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'V_FILE'.
IF r_disp EQ 'X' OR r_print EQ 'X'.
screen-input = 0.
ELSE.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION EVENT *
START-OF-SELECTION.
CALLING CONVERSION FUNCTION MODULE 'CONVERSION_EXIT_ALPHA_INPUT' *
*Conversion function module for appending 00 befor MBLNR FIELD
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_mblnr
IMPORTING
output = p_mblnr.
Call subroutine for fetching data from database
PERFORM get_data.
END-OF-SELECTION EVENT *
END-OF-SELECTION.
Call subroutine for calling and processing smartform
PERFORM call_smartform.
*& Form get_data
Subroutine for fetching data from database
FORM get_data .
Fetching data from MKPF table with using parameters MBLNR and MJAHR
SELECT SINGLE * FROM mkpf
INTO i_mkpf
WHERE mblnr = p_mblnr
AND mjahr = p_mjahr.
IF sy-subrc EQ 0.
Fetching data from MSEG with using parameters MBLNR,ZEILE and MJAHR
SELECT SINGLE * FROM mseg
INTO i_mseg
WHERE mblnr = i_mkpf-mblnr
AND mjahr = i_mkpf-mjahr
AND zeile = p_zeile.
IF sy-subrc NE 0.
CLEAR i_mseg.
ENDIF.
ELSE.
MESSAGE i000.
EXIT.
ENDIF.
ENDFORM. " get_data
*& Form call_smartform
Subroutine for calling smartform
FORM call_smartform .
Local template used in the processing output of smartform
TYPES: BEGIN OF lt_ztable,
mandt TYPE sy-mandt,
mblnr TYPE mseg-mblnr,
flag(1) TYPE c,
END OF lt_ztable.
CONSTANTS: c_x(1) TYPE c VALUE 'X'.
Workarea
DATA: lw_ztable TYPE lt_ztable.
*Variable used in the smartform
DATA: lv_form(30) TYPE c,
lv_fm_name(30) TYPE c.
lv_form = 'ZPTPFRM202L_POGR'.
*Calling function module SSF_FUNCTION_MODULE_NAME which gives new name
*to the function module that will generated by smartform.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lv_form
IMPORTING
fm_name = lv_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.
*Calling function module that will be generated by smartform
IF r_disp = c_x.
i_output_options-tdimmed = space.
i_output_options-tdnewid = c_x.
i_output_options-tddest = 'LOCL'.
i_control-no_dialog = 'X'.
i_control-preview = 'X'.
ELSEIF r_print = c_x.
i_output_options-tdimmed = c_x.
i_output_options-tddest = 'LOCL'.
i_control-no_dialog = c_x.
ELSE.
i_output_options-tdimmed = space.
i_output_options-tdnewid = c_x.
i_output_options-tddest = 'LOCL'.
i_control-getotf = 'X'.
i_control-preview = space.
i_control-no_dialog = c_x.
flag = c_x.
ENDIF.
CALL FUNCTION lv_fm_name
EXPORTING
control_parameters = i_control
output_options = i_output_options
user_settings = space
zmkpf = i_mkpf
zmseg = i_mseg
IMPORTING
document_output_info = zdoc_output_info
job_output_info = zjob_output_info
job_output_options = zjob_output_opts
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.
Modify the database table if it found the print command
IF zjob_output_opts-tdpreview NE c_x.
lw_ztable-mandt = sy-mandt.
lw_ztable-mblnr = p_mblnr.
lw_ztable-flag = c_x.
MODIFY zgr_table FROM lw_ztable.
CLEAR lw_ztable.
ENDIF.
IF flag EQ c_x.
DATA: li_lines LIKE tline OCCURS 100 WITH HEADER LINE.
DATA: lv_file TYPE string,
lbin_fsiz TYPE i.
lv_file = v_file.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lbin_fsiz
TABLES
otf = zjob_output_info-otfdata
lines = li_lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 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.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = lbin_fsiz
filename = lv_file
filetype = 'BIN'
TABLES
data_tab = li_lines
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " call_smartform
Hope this resolves your query.
Reward all the helpful answers.
Regards

Similar Messages

  • Sending Script via Email

    Hi Folks,
                 I am able to send Script via mail to yahoo id with PDF attachment but not able to recieve the pdf attachment in gmail i.e. I get the mail in gmail but not with PDF attachment.
    Well in scot the output type is PDF.
    Thanks for responses in Advance
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Feb 4, 2009 9:24 AM

    Hi,
    check below links,
    /people/erwan.lebrun/blog/2007/04/16/tips-tricks-email-fax-through-the-same-output-type
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/mail%2bsend%2bthrough%2boutput%2bcontrols
    Regards,
    Madhu

  • How to send notification via email

    As we know, there is one step type "Sent Mail" in the workflow builder. However, the notification can only be sent to business workplace.  Any one knows how to let sap automatically send the notificatfion to both business workplace and email box of the user.

    If the SAP User Id is maintained with a valid email address in SU01d transaction and everything is properly configured in SCOT then you will receive mail on both Workplace and email inbox provided you are using SAP User Id as an agent assignment.
    Thanks
    Arghadip

  • Just completed a podcast via a Skype call. Mixed it in GarageBand, and not sure how to send it via email.

    Would love to know how to save the podcast into a manageable audio file and share it with the site administrator of my new website.  Is it easier to upload it to Itunes and then direct the admin. to the podcast to download? Any help will be greatly appreciated. Thanks.

    You'd export it like any other project. Go to the "Share" menu. Choose "Export Song to Disk...". You can choose to compress it as an mp3 or aac file, depending on your preference. Typically you'll want to use mp3 so it's compatible with as many players/users as possible. Then you can just include the exported mp3 in email like a normal attachment.

  • Trying to figure out how to send photo via email but it says I have the wrong password user name combo

    So I am rryi

    accounts preference file for your e-mail client - for example for iPhoto as the client - iPhoto preferences ==> accounts
    LN

  • Sending PAYSLIP Via Email from HRFORMS transaction

    Hi All,
    Can anyone explain me how to send Payslip via email froom Transaction Code: HRFORMS. I know how to send an email from a program. But i don't know how can we send it from HRFORMS. The program generated in HRFORMS is not a Zprogram. I appriciate your thoughts.
    Thanks in Advance
    Regards
    Raj

    Hi,
    Any news about how to send an hrforms via email.
    Thanks and Best Regards,
    Miguel

  • To convert Sap Script output to PDF format and send it via email.

    Hi Friends,
    Could any one please tell me, how to convert the Sap Script output to PDF format and send it via email. If any one have the code, kindly mail me to [email protected]
    Thanks & Regards,
    John

    Plese check this sample code from other thread.
    REPORT zzz_jaytest .
    Types Declaration
    TYPES : BEGIN OF ty_pa0001,
    pernr TYPE pa0001-pernr,
    bukrs TYPE pa0001-bukrs,
    werks TYPE pa0001-werks,
    END OF ty_pa0001.
    Internal Table Declaration
    DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
    i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
    i_content_txt TYPE soli_tab, "Content
    i_content_bin TYPE solix_tab, "Content
    i_objhead TYPE soli_tab,
    Work Area Declaration
    w_pa0001 TYPE ty_pa0001, "For pa0001 Details
    w_res TYPE itcpp, "SAPscript output
    "parameters
    w_otf TYPE itcoo, "For OTF
    w_pdf TYPE solisti1, "For PDF
    w_transfer_bin TYPE sx_boolean, "Content
    w_options TYPE itcpo, "SAPscript output
    "interface
    Variable Declaration
    v_len_in TYPE so_obj_len,
    v_size TYPE i.
    Constants Declaration
    CONSTANTS : c_x TYPE c VALUE 'X', "X
    c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
    c_otf TYPE sx_format VALUE 'OTF', "OTF
    c_pdf TYPE sx_format VALUE 'PDF', "PDF
    c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
    c_bin TYPE char10 VALUE 'BIN', "BIN
    c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
    "File Name
    c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
    START-OF-SELECTION.
    Selecting the records from pa0001
    SELECT pernr bukrs werks FROM pa0001
    INTO TABLE i_pa0001 UP TO 10 ROWS.
    Setting the options
    w_options-tdcopies = 1 ."Number of copies
    w_options-tdnoprev = c_x."No print preview
    w_options-tdgetotf = c_x."Return of OTF table
    w_options-tddest = c_locl."Spool: Output device
    Opening the form
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    form = c_form
    device = c_printer
    language = sy-langu
    OPTIONS = w_options
    IMPORTING
    RESULT = w_res.
    LOOP AT i_pa0001 INTO w_pa0001.
    Writting into the form
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    element = 'MAIN'
    window = 'MAIN'.
    ENDLOOP.
    Closing the form
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT = w_res
    TABLES
    otfdata = i_otf
    EXCEPTIONS
    unopened = 1
    bad_pageformat_for_print = 2
    send_error = 3
    spool_error = 4
    codepage = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Converting OTF data to single line
    LOOP AT i_otf INTO w_otf.
    CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
    INTO w_pdf.
    APPEND w_pdf TO i_content_txt.
    ENDLOOP.
    Converting to PDF Format
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
    format_src = c_otf
    format_dst = c_pdf
    devtype = c_printer
    CHANGING
    transfer_bin = w_transfer_bin
    content_txt = i_content_txt
    content_bin = i_content_bin
    objhead = i_objhead
    len = v_len_in
    EXCEPTIONS
    err_conv_failed = 1
    OTHERS = 2.
    v_size = v_len_in.
    Downloading the PDF File
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    bin_filesize = v_size
    filename = c_name
    filetype = c_bin
    TABLES
    data_tab = i_content_bin.
    The extension is put the it_mailpack-obj_name parameter of 'SO_NEW_DOCUMENT_ATT_SEND_API1'.

  • I am finish my project and want to end to another person by email the project so that they can burn a dvd to be displayed at our Church. Normally I would burn the DVD myself but have to send it via email. how to they press it to dvd.Thanks

    I have finished my FCP X project and in the past I would burn a copy but since I am out of town I need to send it via email. The peron is able to view the project when it comes by email but I am wondering how can they burn a dvd copy of it to display at the Church for our announcements.  The person I am sending it to has a Mac too. Thanks

    First off, you're not likely to be able to email it. Most email systems limit the size of messages (and their attachments) since email isn't really designed for large transfers. It's not uncommon to see 50MB as a cap. Unless you're working on an especially small project you're likely to exceed this limit.
    Instead you should consider creating a disk image of your DVD and using a public file service such as DropBox or YouSendIt.
    If you create a disk image (.dmg) file that simulates a full burned DVD, the reciever can burn that to disk using Disk Utility on their machine. They don't need FCP X on their side.

  • How come I can't send Numbers via email?

    how come I can't send Numbers via email?

    Are you trying to send by Gmail? Gmail will not accept Numbers 3 documents as attachments. There is some incompatibility in the format.
    Have you considered sharing a link via iCloud?
    The recipient can either view online in a browser or download the document via the Tools menu:
    SG

  • How do I get videos that I recorded off of my iPhone so I can upload them to Facebook? I cannot send them via email nor MMS because it says they're too big.

    How do I get videos that I recorded off of my iPhone so I can upload them to Facebook? I cannot send them via email nor MMS because it says they're too big.

    iTunes is not used to move photos and videos from an iPhone to a computer (it is used to move them the other direction).
    Also note that a connected phone or camera does not show in the Finder on a Mac. It should show in Image Capture or iPhoto.
    The following has instructions on how to move them: iOS: Import personal photos and videos from iOS devices to your computer
    Another option is 3rd party software such as http://www.photosync-app.com

  • How can i make an action to send photos via email?

    hi
    under windows xp
    how can i make an action to send photos via email?
    i know there is a Export Actions
    i tried to copy a link of "C:\Programs\Outlook Express\msimn.exe"
    but lightroom export the file & open the client , but doesn't open the dialog to send email
    how can i do it?

    For Outlook Express use MAPIMailer from
    Lightroom Extra at Downloads/Other Goodies/MAPIMailer
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • I can no longer send photos via email on my iPhone 5, any suggestions how to fix this?

    sending photos via email on my iPhone 5 was so easy once upon a time, now it is impossible, any advice?

    Chris
    thanks to your prompting, i found another mail icon that when touched requested a password. i now can send photos once again
    woohoo
    thanks again
    bpb

  • How do I remove my phone number from iMessage so that I could only send/receive via email?

    I Need to do this because my postpaid line has recently been disconnected and after updating to IOS8, I couldn't activate iMessage anymore. I know that everytime we active iMessage and Facetime the carrier sends an international text to Apple for activation; so I'd like to temporarily delete my mobile number (since it won't activate yet) and only send / receive via email - so I can still use iMessage.
    I Couldn't tick on the number because its greyed out.
    Hope someone can help me. Thanks.

    This article explains what to do:
    http://support.apple.com/kb/HT5661

  • To convert Smart Form output to PDF format and send it via email.

    Hi Friends,
    Could any one please tell me, how to convert the Smart Forms output to PDF format and send it via email to customer. If any one have the code, kindly mail me to [email protected]
    Thanks & Regards,
    John

    Refer the links -
    how to convert smartform into pdf and send through mail
    Smartform as PDF attachment to a mail.
    smartform pdf and mail
    smartform to pdf to mail
    Regrads,
    Amit
    Reward all helpful replies.

  • TS3276 how to send a group email with iPhone 5

    how to send a group email with iPhone 5

    I have a new OSX 27" iMac that is running Maverick. 
    RE: group emails, I am trying to omit individual recients and have tried the following options without success.
    1) Mail- Composing- checked "Automatically- Bcc"
    2) Mail- Composing- unchecked "when sending to a group, show all member addresses"
    The result is that all names continue to show up with email addresses for group emails.
    HELP!  HELP!  HELP!
    Lynn 

Maybe you are looking for

  • Deviation bars in legend

    How can I remove the deviation bars for my measurement data out of the legend. If I add x and y deviations to my data I also get a deviation cross in the legend above the signs (Square, circle etc.).

  • To download the query output to falt file

    Hi all, i have a query which i know will give more than 65k records as the output for a selection. i cannot run this query in excel due to its limitation. if i run on web i cannot download this as downloading is happening to excel file only. The cust

  • How to make a appointment on line

    I have a problem on the screen on ipad, how to make a appointment on line for fixing it ? Could you show me the link ?

  • Modifying animated text in iDVD themes

    In themes with animated text, such as "Pass Through" (a v6.0 theme), what text object is used to define the actual text that is animated? and if that text object is deleted, how can it be re-added? (presuming that the undo function cannot be used due

  • How to use a calc script to work around Implicitly share members

    I have a hierarchy which has some implicitly shared members( one child per parent) For example my cost center dimension is built the following way CostCenter | |-------------------CostCenter1 | | | |--------------Member A( child of COst Center 1) ---