Problem by  Sending an Email with attached Adobe Interactive Form (Code)

Thanks. I have written Programm, but it does not work as i want it to do. I will send an Email with attached Adobe Interactive Firm to [email protected]. I tried it with "*lo_recipient = cl_sapuser_bcs=>create( sy-uname )" at the marked(bold, fat) position. It worked but the Email was send to my SAP-Account, but i want to send to [email protected], so I tried this (see at code in bold, fat):
lo_rec TYPE adr6-smtp_addr VALUE '[email protected]'. " Empfänger Receiver
lo_recipient = cl_cam_address_bcs=>create_internet_address( lo_rec ).
But it doens`t send the email.
Can anybody help me please???
Kevin
Here my Code:
Report FP_EXAMPLE_01
Printing of documents using PDF based forms
REPORT z_example_02.
Data declaration
DATA: carr_id TYPE sbook-carrid,
customer TYPE scustom,
bookings TYPE ty_bookings,
connections TYPE ty_connections,
fm_name TYPE rs38l_fnam,
fp_docparams TYPE sfpdocparams,
fp_outputparams TYPE sfpoutputparams,
error_string TYPE string,
l_booking TYPE sbook,
t_sums TYPE TABLE OF sbook,
l_sums LIKE LINE OF t_sums,
fp_formoutput TYPE fpformoutput.
PARAMETER: p_custid TYPE scustom-id DEFAULT 38.
SELECT-OPTIONS: s_carrid FOR carr_id DEFAULT 'AA' TO 'ZZ'.
PARAMETER: p_form TYPE tdsfname DEFAULT 'FP_EXAMPLE_01'.
PARAMETER: language TYPE sfpdocparams-langu DEFAULT 'E'.
PARAMETER: country TYPE sfpdocparams-country DEFAULT 'US'.
Get data from the following tables: scustom(Flight customer)
sbook (Single flight reservation)
spfli (Flight plan)
SELECT SINGLE * FROM scustom INTO customer WHERE id = p_custid.
CHECK sy-subrc = 0.
SELECT * FROM sbook INTO TABLE bookings
WHERE customid = p_custid
AND carrid IN s_carrid
ORDER BY PRIMARY KEY.
SELECT * FROM spfli INTO TABLE connections
FOR ALL ENTRIES IN bookings
WHERE carrid = bookings-carrid
AND connid = bookings-connid
ORDER BY PRIMARY KEY.
Print data:
First get name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = p_form
IMPORTING
e_funcname = fm_name.
IF sy-subrc <> 0.
MESSAGE e001(fp_example).
ENDIF.
Set output parameters and open spool job
fp_outputparams-nodialog = 'X'. " suppress printer dialog popup
fp_outputparams-getpdf = 'X'. " launch print preview
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
Set form language and country (->form locale)
fp_docparams-langu = language.
fp_docparams-country = country.
*fp_docparams-fillable = 'X'.
*fp_docparams-langu = 'E'. "wird jetzt automatisch gesetzt, bzw. kann dynamisch verändert werden
*fp_docparams-country = 'GB'. "wird jetzt automatisch gesetzt, bzw. kann dynamisch verändert werden
currency key dependant summing
LOOP AT bookings INTO l_booking.
l_sums-forcuram = l_booking-forcuram.
l_sums-forcurkey = l_booking-forcurkey.
COLLECT l_sums INTO t_sums.
ENDLOOP.
Now call the generated function module
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
customer = customer
bookings = bookings
connections = connections
t_sums = t_sums
IMPORTING
/1bcdwb/formoutput = fp_formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
CALL FUNCTION 'FP_GET_LAST_ADS_ERRSTR'
IMPORTING
e_adserrstr = error_string.
IF NOT error_string IS INITIAL.
we received a detailed error description
WRITE:/ error_string.
EXIT.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
Close spool job
CALL FUNCTION 'FP_JOB_CLOSE'
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*********************Send the form*******************
*********************to the Customer*****************
*********************via Email***********************
*IF i_down = abap_true.
DATA: filename TYPE string,
path TYPE string,
fullpath TYPE string,
default_extension TYPE string VALUE 'PDF'.
Data:
lt_att_content_hex TYPE solix_tab.
*DATA: data_tab TYPE TABLE OF x255.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = fp_formoutput-pdf
TABLES
binary_tab = lt_att_content_hex.
CLASS cl_bcs DEFINITION LOAD.
DATA:
lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
lo_send_request = cl_bcs=>create_persistent( ).
DATA:
lt_message_body TYPE bcsy_text VALUE IS INITIAL.
DATA: lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
APPEND 'Dear Vendor,' TO lt_message_body.
APPEND ' ' TO lt_message_body.
APPEND 'Please fill the attached form and send it back to us.'
TO lt_message_body.
APPEND ' ' TO lt_message_body.
APPEND 'Thank You,' TO lt_message_body.
lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_message_body
i_subject = 'Vendor Payment Form' ).
DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
TRY.
lo_document->add_attachment(
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = 'Vendor Payment Form'
i_att_content_hex = lt_att_content_hex ).
CATCH cx_document_bcs INTO lx_document_bcs.
ENDTRY.
lo_send_request->set_document( lo_document ).
DATA:
lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
lo_send TYPE adr6-smtp_addr VALUE '[email protected]'. "Absender SENDER
lo_sender = cl_cam_address_bcs=>create_internet_address( lo_send ).
Set sender
lo_send_request->set_sender(
EXPORTING
i_sender = lo_sender ).
Create recipient
DATA:
lo_recipient type ref to if_recipient_bcs value is initial.
Data:
lo_rec TYPE adr6-smtp_addr VALUE '[email protected]'. " Empfänger Receiver
lo_recipient = cl_cam_address_bcs=>create_internet_address( lo_rec ).
*lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
Set recipient
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient
i_express = 'X' ).
*lo_send_request->add_recipient(
*EXPORTING
*i_recipient = lo_recipient
*i_express = 'X' ).
Send email
DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
lo_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = lv_sent_to_all ).
COMMIT WORK.
MESSAGE 'The payment form has been emailed to the Vendor' TYPE 'I'.

Hi Kevin,
Please try this code to send your mail, i wrote it and works well in many system.
Take care if in your profile you got an e-mail adress define .
Take care also of trnasaction SCOT customizing, are you able to send mail to e-mail adress ?
Let me know if it's works.
Best regards.
<i>**----
CLASS-DEFINITIONS
DATA: send_request       TYPE REF TO cl_bcs.
DATA: document           TYPE REF TO cl_document_bcs.
DATA: sender             TYPE REF TO cl_sapuser_bcs.
DATA: recipient          TYPE REF TO if_recipient_bcs.
INTERNAL TABLES
DATA: l_mailtext TYPE soli_tab.
DATA: iaddsmtp   TYPE TABLE OF bapiadsmtp.
DATA: ireturn    TYPE TABLE OF bapiret2.
VARIABLES
DATA: mail_line  LIKE LINE OF l_mailtext.
DATA: bapiadsmtp         TYPE bapiadsmtp.
DATA: subject    TYPE so_obj_des.
DATA : att_subject TYPE so_obj_des.
DATA : w_except TYPE REF TO cx_root .
CONSTANTS : c_defmail TYPE ad_smtpadr VALUE
                 '[email protected]' .
FIELD-SYMBOLS : <smtp> TYPE bapiadsmtp.
*Convert the pdf given by function module into Binary .
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
  EXPORTING
    buffer     = output-pdf "PDF file from function module
  TABLES
    binary_tab = hexa.
*Set subject of the mail
subject = 'Exemple de PDF interactif'.
Set text of the mail
mail_line = 'Merci de remplir le formulaire et nous le retourner'.
APPEND mail_line TO l_mailtext .
Set the name of the attached document
att_subject = 'Template du PDF'.
TRY.
Create persistent send request
    send_request = cl_bcs=>create_persistent( ).
Get sender object
    sender = cl_sapuser_bcs=>create( sy-uname ).
Add sender
    CALL METHOD send_request->set_sender
      EXPORTING
        i_sender = sender.
Read the E-Mail address for the user
    CALL FUNCTION 'BAPI_USER_GET_DETAIL'
      EXPORTING
        username = sy-uname
      TABLES
        return   = ireturn
        addsmtp  = iaddsmtp.
    LOOP AT iaddsmtp ASSIGNING <smtp> WHERE std_no = 'X'.
      CLEAR bapiadsmtp.
      MOVE <smtp> TO bapiadsmtp.
    ENDLOOP.
    CASE bapiadsmtp-e_mail.
      WHEN space.
No adress main for user, so send it to the default mail adress
        recipient =
     cl_cam_address_bcs=>create_internet_address( c_defmail ).
      WHEN OTHERS.
        recipient =
     cl_cam_address_bcs=>create_internet_address( bapiadsmtp-e_mail ).
    ENDCASE.
Add recipient with its respective attributes to send request
    CALL METHOD send_request->add_recipient
      EXPORTING
        i_recipient  = recipient
        i_express    = 'X'
        i_copy       = space
        i_blind_copy = space
        i_no_forward = space.
Set that you don't need a Return Status E-mail
    CALL METHOD send_request->set_status_attributes
      EXPORTING
        i_requested_status = 'E'
        i_status_mail      = 'E'.
set send immediately flag
    send_request->set_send_immediately( 'X' ).
*Build Document
    document = cl_document_bcs=>create_document(
                        i_type    = 'RAW'
                        i_text    = l_mailtext
                        i_subject = subject ).
    add attachment to document
    CALL METHOD document->add_attachment
      EXPORTING
        i_attachment_type    = 'PDF'
        i_attachment_subject = att_subject
        i_att_content_hex    = hexa.
Add document to send request
    CALL METHOD send_request->set_document( document ).
Send document
    CALL METHOD send_request->send( ).
    COMMIT WORK.
  CATCH cx_send_req_bcs INTO w_except.
  CATCH cx_address_bcs INTO w_except.
  CATCH cx_document_bcs INTO w_except.
ENDTRY.</i>

Similar Messages

  • Sending an email, containing an adobe interactive form, as a step in a gp

    I'm trying to create a process in gp.
    the first step is an interactive form that is submitted to netweaver and starts the gp process.
    second should be another interactive form that the system sends out to an email account.
    wstarting the process by interactive form is not a problem, but sending out emails seems impossible to me :-P...
    i tried by myself, but couldn't work anything out.
    then i searched for a while in the sdn and found the following article by ginger gatling:
    Guided Procedures:  Passing email address for Interactive Form step
    it doesnt help either. dunno what version of netWeaver she was using, but at least in version 7.0 it's not working like she describes. also it's not possible to insert an email adress via predefining the appropriate field in the attributes tab.
    i would be very glad if someone could provide me a hint to solve this problem.

    This is the way how to send the form through mail.
    Generate and Send the Form
    The next step is to write the ABAP program which will create the form and email it to the vendor so that it can be filled offline.
    The program will have the following steps:
    u2022 Data retrieval and processing : A select statement for the pre-populated information
    u2022 Obtain the name of the Generated Function Module of the form
    u2022 Start the form processing
    u2022 Call the Generated Function Module
    u2022 End form processing
    u2022 Send the form to the vendor using Business communication services (BCS)
    Data Retrieval and Processing
    This can be as simple as a select statement to complex data selection. In this example we select the vendor number, name and company code from the vendor table LFA1 based on the vendor from the selection screen
    Get vendor data
    select single lifnr name1 bukrs from lfa1 into wa_vndbnk where lifnr = p_lifnr.
    Get the Generated Function Module
    The next step is to get the generated function module. Call function module FP_FUNCTION_MODULE_NAME and pass the form name to it. The parameter e_funcname will contain the name of the generated function module name.
    First get name of the generated function module
    call function 'FP_FUNCTION_MODULE_NAME'
    exporting
    i_name = 'ZVK_TESTHD'
    importing
    e_funcname = fm_name.
    Start the Form Processing
    Form printing needs to be explicitly opened and closed. Use the function FP_JOB_OPEN to open the form for printing. The parameter ie_outputparams determines printer settings. This parameter is also where we ask the generated function module to return a PDF file back. Since this is an offline scenario and there is no printing involved we need to suppress the printer dialog popup as well. Optionally there is a parameter connection which can be used to determine the RFC destination for ADS.
    Set output parameters and open spool job
    fp_outputparams-nodialog = 'X'. " suppress printer dialog popup
    fp_outputparams-GETPDF = 'X'. " launch print preview
    call function 'FP_JOB_OPEN'
    changing
    ie_outputparams = fp_outputparams
    exceptions
    cancel = 1
    usage_error = 2
    system_error = 3
    internal_error = 4
    others = 5.
    Call the Generated Function Module
    This is similar to the generated function module in Smart Forms. Since the parameters of the function module are defined in the interface, this will vary from form to form. However, /1bcdwb/docparams is a standard parameter. This is used to set the forms locale. This is also where we tell the form that it is fillable. Once this parameter is set - if the ADS is configured correctly (including the credential) - a fillable savable form will be returned when the function module is executed.
    Set form language and country (->form locale)
    fp_docparams-langu = 'E'.
    fp_docparams-country = 'US'.
    fp_docparams-FILLABLE = 'X'.
    Now call the generated function module
    call function fm_name
    exporting
    /1bcdwb/docparams = fp_docparams
    Z_VNDBNK = wa_vndbnk
    importing
    /1BCDWB/FORMOUTPUT = fp_formoutput
    exceptions
    usage_error = 1
    system_error = 2
    internal_error = 3
    others = 4.
    End Form Processing
    Use the function FP_JOB_CLOSE to close the form for printing.
    Close spool job
    call function 'FP_JOB_CLOSE'
    exceptions
    usage_error = 1
    system_error = 2
    internal_error = 3
    others = 4.
    Send the Form to the Vendor
    The PDF file generated is available in the parameter fp_result which is returned by the generated function module. The next step would be to extract this PDF and send it to the vendor using BCS.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
    buffer = fp_formoutput-PDF "PDF file from function module
    TABLES
    binary_tab = lt_att_content_hex.
    CLASS cl_bcs DEFINITION LOAD.
    DATA:
    lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
    lo_send_request = cl_bcs=>create_persistent( ).
    Message body and subject
    DATA:
    lt_message_body TYPE bcsy_text VALUE IS INITIAL,
    lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
    APPEND 'Dear Vendor,' TO lt_message_body.
    append ' ' to lt_message_body.
    APPEND 'Please fill the attached form and send it back to us.'
    TO lt_message_body.
    append ' ' to lt_message_body.
    APPEND 'Thank You,' TO lt_message_body.
    lo_document = cl_document_bcs=>create_document(
    i_type = 'RAW'
    i_text = lt_message_body
    i_subject = 'Vendor Payment Form' ).
    DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
    TRY.
    lo_document->add_attachment(
    EXPORTING
    i_attachment_type = 'PDF'
    i_attachment_subject = 'Vendor Payment Form'
    I_ATTACHMENT_SIZE =
    I_ATTACHMENT_LANGUAGE = SPACE
    I_ATT_CONTENT_TEXT =
    I_ATTACHMENT_HEADER =
    i_att_content_hex = lt_att_content_hex ).
    CATCH cx_document_bcs INTO lx_document_bcs.
    ENDTRY.
    Add attachment
    Pass the document to send request
    lo_send_request->set_document( lo_document ).
    Create sender
    DATA:
    lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
    l_send type ADR6-SMTP_ADDR value 'email address',
    lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
    Set sender
    lo_send_request->set_sender(
    EXPORTING
    i_sender = lo_sender ).
    Create recipient
    *DATA:
    lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
    lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
    Set recipient
    lo_send_request->add_recipient(
    EXPORTING
    i_recipient = lo_recipient
    i_express = 'X' ).
    lo_send_request->add_recipient(
    EXPORTING
    i_recipient = lo_recipient
    i_express = 'X' ).
    Send email
    DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
    lo_send_request->send(
    EXPORTING
    i_with_error_screen = 'X'
    RECEIVING
    result = lv_sent_to_all ).
    COMMIT WORK.
    message 'The payment form has been emailed to the Vendor' type 'I'.

  • How to use Java with PL/SQL commands to send an email with attachment

    Apologizes in advance if this is the wrong place to ask the question.
    I need to use Java with PL/SQL commands to send an email with attachment. My java application runs from the command line and does some magic to gather info from an Oracle 11g db. If the DB has sendmail configured, I'd like to send the results of the data gathering as an attachment to the email addresses. I'm not sure how to do this. I've been reading up on on PL/SQL can send email with UTL_SMTP - with attachments. I'm just not sure how to translate that into being triggered by my Java application. Any suggestions or pointers on what I should read would be appreciated.
    Background - I've been programming in Java for 10+ years, but this is my first time using databases. I also have been on these forums for a long time, but lost my profile when it was switched to Oracle.
    Thanks for all help.

    user13726880 wrote:
    The original requirements were put together and given to me, an Oracle newbie. They expected the Java app to use something intrinsic to Oracle and Unix sendmail. To solve my problem, I use a JDBC connection to run some SQL commands. I take that data, format it and send the results by email to the user. By default the requirement is to send it as an HTML attachment using Unix 'sendmail'. So I do that using Runtime exec. I have also added JavaMail functionality as an alternative to sendmail. It works great and as expected.Sounds like a reasonable solution.
    Note however that PL/SQL itself can send email. And PL/SQL can call unix sendmail too.
    However myself I would have done it in java with JavaMail.

  • Need to send external email with attachment for workflow 20000075

    Hello Everyone,
    I am new to W/F, I Need to send external email with attachment for PO Release W/F 20000075. Currently Work item is being sent to SAP inbox of required user based on PO Release strategy configuration in SPRO. I tried to create Send mail step after PO release event but I am not sure how to arrive at Recipient type in send mail step(the mail should be sent to person in the release strategy). Everything looks fine all I need to do is to send external email with attachment instead of sending work item into SAP inbox.
    Your help will be highly appreciated.
    Thanks.

    You can use extended notifications to send an e-mail message with a link to the workitem. Search for extended notifications in SDN.
    Regards,
    Martin

  • Mail hangs sending an email, with attachment, to some Address Book entries

    I have just upgraded to Snow Leopard.
    Mail hangs when I send an email (with an attachment) to some contacts in my Address Book. If there isn't an attachment then it works fine.
    If I type in their full email address (i.e. not their name) into the To: field, it sends it just fine.
    Any suggestions please?

    I am seeing the same thing with SL but without an attachment. If I create a new email and type an email address in the To field then either hit tab or enter the programs freezes for around 8 seconds.
    I wonder if it is trying to lookup/verify the address with an external server? Apple mail is attached to an Exchange 2007 server here as well as Gmail. My address book contains both local and Exchange contacts.
    For me the problem seems to be intermittent.
    Message was edited by: DylanPenhale

  • Problem when send an email with mail client!

    Hi!
    My mail server have MTA front end and Message Store back end with version:
    ./imsimta version
    Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009)
    libimta.so 7u2-7.02 64bit (built 02:28:03, Apr 16 2009)
    Using /opt/sun/comms/messaging64/config/imta.cnf (compiled)
    SunOS SMSG 5.10 Generic_139556-08 i86pc i386 i86pcMy users and I are having problem following: Send an email very slow, mail client is connected to front end but mail is not delivered, after that, I stop and resend this email several times then it is can delivered. While the mail was not send, i can telnet to front end with port 25. My users and I are using Thunderbird and Microsoft Outlook. What is problem on my mail server ?
    I see time on MTA front end and Message Store are not synchronized, maybe this could be the problem?
    Thanks!

    NguyenPhuc wrote:
    Are you using any kind of MTA spam filter plugin?I removed plugin spam filter, now on MTA server don't have plugin spam or virus !Are you saying you did have a spam filter plugin enabled (if so which one(s)) and you have just disabled it?
    Are you receiving an excessive number of emails?No, total of number messages in my mailbox is about 1000 emails.I meant is the MTA receiving a large number of emails -- i.e. do you see a lot of emails coming in (mail.log_current)?
    Also try the following and see where the delay in accepting emails occurs:
    telnet <mta> 25
    mail from: [email protected]
    rcpt to: [email protected]
    data
    Subject: test email
    To: [email protected]
    From: [email protected]
    body
    .e.g.
    -bash-3.00# telnet server 25
    Trying 10.15.10.33...
    Connected to server.aus.sun.com.
    Escape character is '^]'.
    220 server.aus.sun.com -- Server ESMTP (Sun Java(tm) System Messaging Server 7u3-16.01 64bit (built Apr  6 2010))
    mail from: [email protected]
    250-2.5.0 No HELO/EHLO seen; continuing anyway, [10.15.10.33].
    250 2.5.0 Address Ok.
    rcpt to: [email protected]
    250 2.1.5 [email protected] OK.
    data
    354 Enter mail, end with a single ".".
    To: [email protected]
    From: [email protected]
    body
    250 2.5.0 Ok, envelope id [email protected]
    quit
    221 2.3.0 Bye received. Goodbye.
    Connection to server.aus.sun.com closed by foreign host.Regards,
    Shane.

  • How to send an email with attachment to dynamic emial address using PL/SQL

    Hi,
    i want to send an automated email with attachment everyday to differnet people so number people is not static.
    so is it any way using PL/SQL ?
    thanks for your support!

    i want to send an automated email with attachment everyday to differnet people so number people is not static.
    Why? Explain it.
    You can create a table and store your email id through front-end application day to day.
    The table should look like this ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.04
    satyaki>
    satyaki>
    satyaki>create table email_master
      2    (
      3       email_grp_header         varchar2(30) not null,
      4       craete_time                  timestamp,
      5       constraints pk_header primary key(email_grp_header)
      6    );
    Table created.
    Elapsed: 00:00:02.12
    satyaki>
    satyaki>create table email_chld
      2    (
      3       email_grp_header          varchar2(30) not null,
      4       email_recepient             varchar2(100),
      5       craete_time                   timestamp,
      6       constraint fk_header foreign key(email_grp_header) references email_master(email_grp_header)
      7    );
    Table created.
    Elapsed: 00:00:00.09
    satyaki>
    satyaki>
    satyaki>insert into email_master values('GRP_INVENTORY',systimestamp);
    1 row created.
    Elapsed: 00:00:00.07
    satyaki>
    satyaki>
    satyaki>insert into email_master values('GRP_PURCHASE',systimestamp);
    1 row created.
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>commit;
    Commit complete.
    Elapsed: 00:00:00.04
    satyaki>
    satyaki>select * from email_master;
    EMAIL_GRP_HEADER               CRAETE_TIME
    GRP_INVENTORY                  24-OCT-08 08.55.36.190000 PM
    GRP_PURCHASE                   24-OCT-08 08.55.54.481000 PM
    Elapsed: 00:00:00.18
    satyaki>
    satyaki>
    satyaki>insert into email_chld values('GRP_INVENTORY','[email protected]',systimestamp);
    1 row created.
    Elapsed: 00:00:00.07
    satyaki>
    satyaki>insert into email_chld values('GRP_INVENTORY','[email protected]',systimestamp);
    1 row created.
    Elapsed: 00:00:00.04
    satyaki>
    satyaki>insert into email_chld values('GRP_INVENTORY','[email protected]',systimestamp);
    1 row created.
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>insert into email_chld values('GRP_PURCHASE','[email protected]',systimestamp);
    1 row created.
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>insert into email_chld values('GRP_PURCHASE','[email protected]',systimestamp);
    1 row created.
    Elapsed: 00:00:00.11
    satyaki>commit;
    Commit complete.
    Elapsed: 00:00:00.05
    satyaki>
    satyaki>select * from email_chld;
    EMAIL_GRP_HEADER               EMAIL_RECEPIENT                                                                                      CRAETE_TIME
    GRP_INVENTORY                  [email protected]                                                                                      24-OCT-08 08.56.46.107000 PM
    GRP_INVENTORY                  [email protected]                                                                                         24-OCT-08 08.57.03.551000 PM
    GRP_INVENTORY                  [email protected]                                                                                    24-OCT-08 08.57.36.277000 PM
    GRP_PURCHASE                   [email protected]                                                                                      24-OCT-08 08.58.06.129000 PM
    GRP_PURCHASE                   [email protected]                                                                                    24-OCT-08 08.58.26.900000 PM
    Elapsed: 00:00:00.10
    satyaki>And, then based on the group header you can get the list of recipient and use it dynamically inside your PL/SQL Application.
    Regards.
    Satyaki De.

  • Problem setting an Open Password on an Adobe Interactive Form

    Hi,
    I'm generating a series of Adobe Interactive Forms using data pulled from R3 via BAPIs.  The PDFs are created without an issue but I want to put an Open Password on them (a password the user must enter in order to open the PDF). 
    From my reading of the APIs the following code should do this, however it doesn't.  The PDF which is created simply has no password protection at all.
    Does anyone have any suggestions?
                IWDPDFDocumentCreationContext creationContext = WDPDFDocumentFactory.getDocumentHandler().getDocumentCreationContext();
                creationContext.setTemplate(templateSourceOutputStream);
                creationContext.setData(dataSourceOutputStream);
                creationContext.setDynamic(true);
                creationContext.setProtection("openpasswordalias", null, null);
                IWDPDFDocument pdfDoc = creationContext.execute();
    Edit: My apologies, this should have been posted in the   Expert Forums  » SAP NetWeaver  » SAP Interactive Forms by Adobe  forum rather than here.  I have reposted this question there:
    Edited by: David Michell on May 9, 2008 9:02 AM

    sure you can. you can create that pdf within a webdynpro compoment with interface. that way information can be passed back and forth between the pdf and the webdynpro context and the gp context. how to create a pdf within webdynpro is very well documented on sdn as well as how to create a webdynpro with gp interface.

  • How do i send an email with attachment in PHP?

    Hello,
    I have a form that gets people name, emial, etc. Right now its working correctly, what it does is it sends a email to a seperate email account of the info entered. But what i want to do now is have the person submitting their info to receive an automatic email with an attachment sent to the email they provided. I could really use your help.
    Thank you.
    Here is the PHP script:
      <?php
    if(isset($_POST['email'])) {
    $email_to = "[email protected]";
    $email_subject = "Registration Form";
    function died($error) {
      echo "We are very sorry, but there were error(s) found with the form your submitted. ";
      echo "These errors appear below.<br /><br />";
      echo $error."<br /><br />";
      echo "Please go back and fix these errors.<br /><br />";
      die();
    if(!isset($_POST['first_name']) ||
      !isset($_POST['last_name']) ||
      !isset($_POST['email']) ||
      !isset($_POST['address']) ||
      !isset($_POST['city']) ||
      !isset($_POST['state']) ||
      !isset($_POST['zipcode']) ||
      !isset($_POST['comments'])) {
      died('We are sorry, but there appears to be a problem with the form your submitted.'); 
    $first_name = $_POST['first_name']; // required
    $last_name = $_POST['last_name']; // required
    $email_from = $_POST['email']; // required
    $address = $_POST['address']; // required
    $city = $_POST['city']; // required
    $state = $_POST['state']; // required
    $zipcode = $_POST['zipcode']; // required
    $comments = $_POST['comments']; // required
    $error_message = "";
    $email_exp = "^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$";
      if(!eregi($email_exp,$email_from)) {
       $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
    $string_exp = "^[a-z .'-]+$";
      if(!eregi($string_exp,$first_name)) {
       $error_message .= 'The First Name you entered does not appear to be valid.<br />';
      if(!eregi($string_exp,$last_name)) {
       $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
      if(strlen($error_message) > 0) {
       died($error_message);
    $email_message = "Form details below.\n\n";
    function clean_string($string) {
       $bad = array("content-type","bcc:","to:","cc:","href");
       return str_replace($bad,"",$string);
    $email_message .= "First Name: ".clean_string($first_name)."\n";
    $email_message .= "Last Name: ".clean_string($last_name)."\n";
    $email_message .= "Email: ".clean_string($email_from)."\n";
    $email_message .= "Address: ".clean_string($address)."\n";
    $email_message .= "City: ".clean_string($city)."\n";
    $email_message .= "State: ".clean_string($state)."\n";
    $email_message .= "Zip Code: ".clean_string($zipcode)."\n";
    $email_message .= "Comments: ".clean_string($comments)."\n";
    // create email headers
    $headers = 'From: '.$first_name."\r\n".
    'Reply-To: '.$email_from."\r\n" .
    'X-Mailer: PHP/' . phpversion();
    @mail($email_to, $email_subject, $email_message, $headers); 
    ?>

    Just search for 'php email attachement' and you'll find examples. Here's a few:
    http://www.codewalkers.com/c/a/Email-Code/PHP-Email-Attachment-v1/
    http://www.webcheatsheet.com/php/send_email_text_html_attachment.php
    http://www.devshed.com/c/a/PHP/Handling-Attachments-in-MIME-Email-with-PHP/2/

  • Sending an email with attachment with method SENDTASKDESCRIPTION.

    Hi everyone sorry for my english_;
    in custom workflow I set a Send Mail's step.
    If i try to send an email without attachments with method SENDTASKDESCRIPTION, the function SWW_SRV_MAIL_SEND return sy-subrc eq 0 and the email wa sent.
    If I try to attach a text, change binding for the step
    ATTACHOBJECTS -> &ATTACHMENTS& the step have an error in method SENDTASKDESCRIPTION execute the function SWW_SRV_MAIL_SEND; this function return an exception that had not defined.
    Thank's a lot.

    Hello.
    Take into acount that the attacment tha you pass to method has to be type of business object SOFM. The attachment is correctly created in the workflow container? Review the creation of the object to attach.
    How do you created the attachment?
    Regards.

  • How i can send an email with attachement of any type format file in form10g

    I developed an application in forms 10g my application send an email via outlook but i want to attach any type of PDF or WORD document how i can attach the file and send this
    email via outlook if any one know please share your valuable experience with me.
    Thanks.
    deemy

    Hello,
    There is a javamail bean in the Oracle Forms 10gR2 Demos available on OTN
    http://www.oracle.com/technology/sample_code/products/forms/index.html
    Francois

  • How i can send an email with attachement of any type format file in form10

    I developed an application in forms 10g my application send an email via outlook but i want to attach any type of PDF or WORD document how i can attach the file and send this
    email via outlook if any one know please share your valuable experience with me.
    Thanks.
    deemy

    Hello,
    There is a javamail bean in the Oracle Forms 10gR2 Demos available on OTN
    http://www.oracle.com/technology/sample_code/products/forms/index.html
    Francois

  • To send an email with attachment excel sheet

    Hi Friends,
    I am struk up at to send an eamil with Excel sheet.
    I used FM SO_DOCUMENT_SEND_API1.
    but is is sending an email but with out data
    how to work this senario kindly help me please.
    Thanks and Regards,
    Bhavani.

    Hi,
    https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=61243822
    Thanks,
    Krishna...

  • Sending two emails with attachment.

    Hello Manmeet Email variables are allowed only within the context of a session. I don't think you can use them in email task.  but for your requriment you can create dummy session insted of email task.   Thank You Ashish Amin

    Hi everyone, I got a requirement from client to send two emails having attachments. First I tried using email task, but what I observed is that "Email variables are used only within the context of a session". The email task is not allowing me to use any email variables(%a<>) which is used to attch a file in email..  So as an alternative approach, I have to use unix 'mailx' command to send out a mails. My question is how to achieve this scenerio with email task? or is it a drawback of email task to not allowing us to use email variables? Any help would be appriciable.  Note: I am using Informatica Powecenter 9.5.1

  • I cannot send an email with attachment from elements 11 via windows live mail 2012 on my windows 8.1 pc.  Can anyone help?

    I am using elements 11, windows live mail 2012 on a windows 8.1 PC.  When trying to attach an elements 11 image to an email via the sharing option in Organizer, I get a message that the email message cannot be completed, and to try Adobe mail.  I have set preferences to windows live mail, but no success.

    Hi,
    With Windows 8, the new message sometimes hides in the taskbar
    When you see the spinning circle, look at the taskbar to see if the Windows Live Mail has grown another task. Hover over the icon on the taskbar to shown the two images, right click on the right hand image and then select maximize. That should show the message ready for sending.
    Good luck.
    Brian

Maybe you are looking for

  • How to change font size in smartform and set layout of smartform

    Dear abapers,                        I want to change font size in smartform and also set the layout of smart form how can we do this.                                              Thank you sir.

  • Print Issue withing Oracle Apps

    Hi All, I have following inssue related XML Publisher PDF Report Print; 1) Submit XML Publisher Report , View Output Print on Printer1. Print Comes Fine. 2) Submit same XML Publisher Report, While Submiting Report I provide Printer1 and no of copies

  • App asks to have location services turned on but App does not appear in location list.

    I start the EZ Word Cheats and it starts with the menu open. I click on Quick Import and a blue box appears with the message to turn on Location services in settings. I start the settings app, click Privacy, click Location Services, but EZ Word Cheat

  • Database query from jsp

    hi! All i am making the following query to the MySQL database from a jsp page but I get error. please help. i am asking user to type in first few letters of person's first name and i use that string to find the match. String getName = request.getPara

  • Killed by fonts

    About every month I try to switch to Arch, and every month I give up after spending hours and hours trying to get firefox to display fonts properly.  The combinations of WM, LCD vs CRT, AUR, nVidia, font packages, results in a never ending  battle to