Mail sending using sender importing parameter using so_object_send function

Hi all,
        I using so_object_send function module to send mail. My requirement is with respect to any user 
        logged in the sender mail address should be taken by V_SENDER parameter in exporting
        parameter.
<code>
CALL FUNCTION 'SO_OBJECT_SEND'
       EXPORTING
            folder_id                  = wa_folder_id
            forwarder                  = w_forwarder
            object_fl_change           = wa_object_fl_change
            object_hd_change           = wa_object_hd_change
            object_id                  = wa_object_id
            object_type                = w_object_type
            outbox_flag                = w_outbox_flag
            owner                      = w_owner
            store_flag                 = w_store_flag
       IMPORTING
            object_id_new              = wa_object_id_new
            sent_to_all                = w_sent_to_all
            sender                     =  v_sender
       TABLES
            objcont                    = i_objcont
            objhead                    = i_objhead
            objpara                    = i_objpara
            objparb                    = i_objparb
            receivers                  = i_receivers
       EXCEPTIONS
            active_user_not_exist      = 1
            communication_failure      = 2
            component_not_available    = 3
            folder_not_exist           = 4
            folder_no_authorization    = 5
            forwarder_not_exist        = 6
            note_not_exist             = 7
            object_not_exist           = 8
            object_not_sent            = 9
            object_no_authorization    = 10
            object_type_not_exist      = 11
            operation_no_authorization = 12
            owner_not_exist            = 13
            parameter_error            = 14
            substitute_not_active      = 15
            substitute_not_defined     = 16
            system_failure             = 17
            too_much_receivers         = 18
            user_not_exist             = 19
            originator_not_exist       = 20
            x_error                    = 21
            OTHERS                     = 22.
  IF sy-subrc  0.
  ENDIF.
</code>    
My Requirement is V_SENDER can be any user of that SAP system,noot particularly logged in user.
I tried using this functionality my sy-subrc is zero. but i am not able to get any mails with that user name in V_SENDER.
Do i need to do any further settings or any more code is required.
Even i tired giving SUBMIT rsconn01 .
still its not working.
Please suggest any solutions if we have.
Thanks,
satish

Hi,
to send mails check this:
FORM docu_send_email USING pv_otfdata TYPE tsfotf
pv_emailid TYPE any
pv_formname TYPE any.
DATA: lv_filesize TYPE i,
lv_buffer TYPE string,
lv_attachment TYPE i,
lv_testo TYPE i.
DATA: li_pdfdata TYPE STANDARD TABLE OF tline,
li_mess_att TYPE STANDARD TABLE OF solisti1,
li_mtab_pdf TYPE STANDARD TABLE OF tline,
li_objpack TYPE STANDARD TABLE OF sopcklsti1,
li_objtxt TYPE STANDARD TABLE OF solisti1,
li_objbin TYPE STANDARD TABLE OF solisti1,
li_reclist TYPE STANDARD TABLE OF somlreci1,
li_objhead TYPE soli_tab.
DATA: lwa_pdfdata TYPE tline,
lwa_objpack TYPE sopcklsti1,
lwa_mess_att TYPE solisti1,
lwa_objtxt TYPE solisti1,
lwa_objbin TYPE solisti1,
lwa_reclist TYPE somlreci1,
lwa_doc_chng TYPE sodocchgi1.
CONSTANTS: lc_u TYPE char1 VALUE 'U',
lc_0 TYPE char1 VALUE '0',
lc_1 TYPE char1 VALUE '1',
lc_pdf TYPE char3 VALUE 'PDF',
lc_raw TYPE char3 VALUE 'RAW',
lc_ordform TYPE char15 VALUE 'ZORDCONFIRM_01',
lc_attachment TYPE char10 VALUE 'ATTACHMENT'.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = lc_pdf
max_linewidth = 132
IMPORTING
bin_filesize = lv_filesize
TABLES
otf = pv_otfdata
lines = li_pdfdata
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.
LOOP AT li_pdfdata INTO lwa_pdfdata.
TRANSLATE lwa_pdfdata USING ' ~'.
CONCATENATE lv_buffer lwa_pdfdata INTO lv_buffer.
CLEAR lwa_pdfdata.
ENDLOOP.
TRANSLATE lv_buffer USING '~ '.
DO.
lwa_mess_att = lv_buffer.
APPEND lwa_mess_att TO li_mess_att.
CLEAR lwa_mess_att.
SHIFT lv_buffer LEFT BY 255 PLACES.
IF lv_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Object with PDF.
REFRESH li_objbin.
li_objbin] = li_mess_att[.
DESCRIBE TABLE li_objbin LINES lv_attachment.
Object with main text of the mail.
lwa_objtxt = space.
APPEND lwa_objtxt TO li_objtxt.
CLEAR lwa_objtxt.
DESCRIBE TABLE li_objtxt LINES lv_testo.
Create the document which is to be sent
lwa_doc_chng-obj_name = text-008.
lwa_doc_chng-obj_descr = text-008.
lwa_doc_chng-sensitivty = lc_0.
lwa_doc_chng-obj_prio = lc_1.
lwa_doc_chng-doc_size = lv_testo * 225.
Pack to main body.
CLEAR lwa_objpack-transf_bin.
header
lwa_objpack-head_start = 1.
The document needs no header (head_num = 0)
lwa_objpack-head_num = 0.
body
lwa_objpack-body_start = 1.
lwa_objpack-body_num = lv_testo.
lwa_objpack-doc_type = lc_raw.
APPEND lwa_objpack TO li_objpack.
CLEAR lwa_objpack.
Create the attachment.
Fill the fields of the packing_list for the attachment:
lwa_objpack-transf_bin = gc_x .
header
lwa_objpack-head_start = 1.
lwa_objpack-head_num = 1.
body
lwa_objpack-body_start = 1.
lwa_objpack-body_num = lv_attachment.
lwa_objpack-doc_type = lc_pdf.
lwa_objpack-obj_name = lc_attachment.
lwa_objpack-obj_descr = text-008.
lwa_objpack-doc_size = lv_attachment * 255.
APPEND lwa_objpack TO li_objpack.
CLEAR lwa_objpack.
lwa_reclist-receiver = pv_emailid.
lwa_reclist-rec_type = lc_u.
lwa_reclist-notif_del = gc_x.
lwa_reclist-notif_ndel = gc_x.
APPEND lwa_reclist TO li_reclist.
IF li_reclist IS NOT INITIAL.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = lwa_doc_chng
put_in_outbox = gc_x
TABLES
packing_list = li_objpack
object_header = li_objhead
contents_bin = li_objbin
contents_txt = li_objtxt
receivers = li_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 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " DOCU_SEND_EMAIL

Similar Messages

  • How to use ET_ATTACH importing parameter Function module BBP_PD_SC_CREATE

    hi,
    how to use ET_ATTACH importing parameter of Function module BBP_PD_SC_CREATE, my requirement is to create SC with attachment.
    an example would really help.
    Kind Regards,
    Kailash.

    Hi,
    Generally we create the SC from ITS or Portal, and there in the Create SC screen , once you add the item into the shopping cart , in the Item details, there is the section called , Documents and Attachements, where in you can upload the attachments which ever you want. Sometimes the extn .DOC, .pdf and .xls are allowed. but that also you can check which are the Authorized files extns avaialbe in Backend R/3.
    Using the FM RFC_READ_TABLE, in table pass TDWP and in the i_field pass 'APPSFX' and then you can get the authorized file formats. in Backend Transaction DC30 you can verify which are the allowed file formats.
    Moreover for restricting the User from uploading the attachment BADI BBP_ITEM_CHECK_BADI can be implemented for raising the error message if required.
    Regarding the ET_ATTACH, it is the structure of type BBPT_PDS_ATT_T,  so you have to provide the complete details for this structure. Like : GUID, P_GUID ,LOGICAL_SYSTEM, DESCRIPTION, URL, TYPE,DISP_URL, PHIO_EXT ,etc.
    Once all the entries are fine.
    You can create the SC, but the recommeded way for creating the SC is thru ITS or Portal.
    I hope this will help. Feel Free while asking questions.
    Thanks and Regards,
    Ankur Goyal

  • Use of exporting parameter VIA_T777D in function module RH_READ_INFTY

    Hi,
    Can any one explain me the use of exporting parameter VIA_T777D in the function module RH_READ_INFTY.
    Regards,
    Aravind

    Closing.

  • Table type in import parameter in rfc function module

    Hi we don't have the table type in our system which exist in the other system which is the import parameter of the rfc function module.so how can we pass the parameter. shell we create the same table type in our system also.it is a table type for a deep structure.

    Hello,
    I donot have access to CRM box I cannot view the FM. You can verify with the CRM counterpart what exactly is the TYPE for param DATA.
    Else you can define a generic internal table (TYPE TABLE) & try calling the FM.
    BR,
    Suhas

  • Using prepareStatement with parameter in existsNode() function

    Hello,
    I have an xml file like the following:
    <MyDocRoot id="myId" xmlns="..." xmlns:xsi="..." xsi:schemaLocation="...">
    </MyDocRoot>
    I am retrieving my documents from an XMLType table with aquery like:
    SELECT OBJECT_VALUE FROM MY_TABLE
    WHERE existsNode(OBJECT_VALUE, '/MyDocRoot[@id="myId"]') = 1;
    When I run it using oracle client everything works fine and great.
    Now I would like to execute that query from a Java application, using prepared statement, so with a query now like:
    SELECT OBJECT_VALUE FROM MY_TABLE
    WHERE existsNode(OBJECT_VALUE, '/MyDocRoot[@id="?"]') = 1;
    And passing the id value as the parameter at execution time.
    The problem I am facing is that it seems that the prepare statement does not recognize the parameter at that place. I get an error specifying that one parameter was provided but none was expected.
    I get the same problem when I try to update a document in the database. In this case I have the query is:
    UPDATE MY_TABLE SET OBJECT_VALUE = XMLType(?)
    WHERE existsNode(OBJECT_VALUE, '/MyDocRoot[@id="?"]') = 1
    The error I receive specify that 2 parameters were provided but only one was expected (the parameter in the XMLType() is recognized but not the one in the XPATH expression)
    Does anybody have an example on how to use prepare statement with parameters in XPATH expression like above?

    Try this
    package com.oracle.st.xmldb.pm.examples;
    import com.oracle.st.xmldb.pm.common.baseApp.BaseApplication;
    import oracle.jdbc.OraclePreparedStatement;
    import oracle.jdbc.OracleResultSet;
    import oracle.xdb.XMLType;
    import oracle.xml.parser.v2.XMLDocument;
    public class GetXMLType extends BaseApplication
       public void doSomething(String[] Args) throws Exception
         OraclePreparedStatement  statement = null;
         String statementText;
         statementText = "select object_value from PURCHASEORDER where existsNode(object_value,'/PurchaseOrder[Reference=\"' || :1 || '\"]') = 1";
         OracleResultSet resultSet = null;
         XMLDocument  doc = null;
         XMLType xml;
         statement = (OraclePreparedStatement) getConnection().prepareStatement(statementText);
         statement.setString(1,"AHUNOLD-20040817185414366GMT");
         resultSet = (OracleResultSet) statement.executeQuery();
         while (resultSet.next())
            xml = (XMLType) resultSet.getObject(1);
            doc = (XMLDocument) xml.getDocument();
            doc.print(System.out);
           resultSet.close();
           statement.close();
           getConnection().close();
      public static void main (String[] args)
        try
          GetXMLType example = new GetXMLType();
          example.initializeConnection();
          example.doSomething(args);
        catch (Exception e)
          e.printStackTrace();
    }Gives
    C:\TEMP>
    C:\oracle\product\11.1.0\db_1\jdk\bin\javaw.exe -client -classpath C:\xdb\JDeveloper\Classes;C:\oracle\product\11.1.0\db_1\jdbc\lib\ojdbc5.jar;C:\oracle\product\11.1.0\db_1\LIB\xmlparserv2.jar;C:\oracle\product\11.1.0\db_1\RDBMS\jlib\xdb.jar;C:\oracle\JDeveloper\j2ee\home\oc4j.jar;C:\oracle\JDeveloper\j2ee\home\lib\servlet.jar -Dcom.oracle.st.xmldb.pm.ConnectionParameters=C:\\xdb\\jdeveloper\\SimpleExamples\\LocalConnection.xml -Dhttp.proxyHost=www-proxy.us.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=localhost|us.oracle.com|*.oracle.com -Dhttps.proxyHost=www-proxy.us.oracle.com -Dhttps.proxyPort=80 -Dhttps.nonProxyHosts=localhost|us.oracle.com|*.oracle.com com.oracle.st.xmldb.pm.examples.GetXMLType -mx2048M
    Using connection Parameters from : C:\\xdb\\jdeveloper\\SimpleExamples\\LocalConnection.xml
    ConnectionProvider.establishConnection(): Connecting as SQLLDR/SQLLDR@jdbc:oracle:oci8:@(description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(service_name=ORA11GR1.xp.mark.drake.oracle.com)(server=DEDICATED)))
    ConnectionProvider.establishConnection(): Database Connection Established
    <PurchaseOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://localhost:8080/home/SCOTT/poSource/xsd/purchaseOrder.xsd">
       <Reference>AHUNOLD-20040817185414366GMT</Reference>
       <Actions>
          <Action>
             <User>AHUNOLD</User>
          </Action>
       </Actions>
       <Reject/>
       <Requestor>Alexander Hunold</Requestor>
       <User>AHUNOLD</User>
       <CostCenter>A60</CostCenter>
       <ShippingInstructions>
          <name>Elizabeth Bates</name>
          <address>Magdalen Centre, The Oxford Science Park,
    Oxford,
    Oxford OX9 9ZB
    United Kingdom</address>
          <telephone>980-985-4081</telephone>
       </ShippingInstructions>
       <SpecialInstructions>Next Day Air</SpecialInstructions>
       <LineItems>
          <LineItem ItemNumber="1">
             <Description>Farewell, My Concubine</Description>
             <Part Id="717951002723" UnitPrice="19.99" Quantity="3"/>
          </LineItem>
          <LineItem ItemNumber="2">
             <Description>Willy Wonka and the Chocolate Factory</Description>
             <Part Id="85392229123" UnitPrice="19.99" Quantity="4"/>
          </LineItem>
          <LineItem ItemNumber="3">
             <Description>Best In Show</Description>
             <Part Id="85391895121" UnitPrice="19.99" Quantity="3"/>
          </LineItem>
          <LineItem ItemNumber="4">
             <Description>The Reggae Movie</Description>
             <Part Id="13023004597" UnitPrice="19.99" Quantity="1"/>
          </LineItem>
       </LineItems>
    </PurchaseOrder>
    Process exited with exit code 0.

  • Handle multiple material numbers as import parameter in a function module

    Hello Folks,
    I want to handle multiple material numbers as import parameters.. I have tried using table types but having problem while reading the data....
    My requirement is user will input say 10 materials , now i need to get all the information for that particular material ..
    I am unable to use for all entries as it is saying that it is not internal table... I have found table types which is having sigon , option, low and high fields but user doesn't want it... He wants to enter only materials... Currently am using this MD_T_MATNR(table type)
    I am stuck up here..
    Appreciate any kind of help.
    Regards,
    Raj

    Hi,
    it looks like you are on a good way, just something little is missing. Type MD_T_MATNR is suitable for your issue. I have tried it and probably your problem is that You have to use
    SELECT ... FOR ALL ENTRIES IN it_matnr WHERE mara~matnr EQ it_matnr~table_line.
    instead of
    SELECT ... FOR ALL ENTRIES IN it_matnr WHERE mara~matnr EQ it_matnr~matnr.
    In this example I suppose that a name of your variable of type MD_T_MATNR is it_matnr. Problem is that table line is not structure, but data element, therefore You have to use ~table_line instead of ~matnr.
    Hope it helps.
    Adrian

  • Importing subtemplate using http url - how to make it server agnostic

    I am trying to include a subtemplate into my rtf template:
    <?import http://appservername:port/bitemplate/test.xsl?>
    This is fine for now - for a particular server and port.
    To be able to port this template on different servers, we need to get the server and port dynamically.
    Is there a way to do so?

    The scenario is as follows:
    Instance A:
    Oracle EBS 11i10 - on its rgular tech stack
    Instance B:
    A Custom App, which is built using the Oracle Fusion Middleware with Weblogic 11g/ADF/BPEL, etc.
    The Custom App could have been built into Apps 11i10 tech stack, but the chosen path has been the OFM, hence the second instance.
    Both the instance are using the same DB instance.
    Now the Problem:
    We need to build a print functionality, using the BI-Publisher APIs, and the layout templates. We are able to access the layout templates from the XDO_LOBS (since we are using the same DB instance), and generate the report in PDF /HTML etc. using the xml pub apis.
    So far so good.
    Now, we need to include a xsl stylesheet into the RTF template.
    If it was in Apps context, we would have done that using the <?import:xdo: ?> construct.
    But, in this context to initiate the print from the Instance B, the xdo:// context does not work.
    So, we used the import construct using the file path, which works. But, this would lead to portability issues.
    The other option is to use the http construct, which is fine, but needs a server and port to work, and hardcoding that would again lead to portability issues.
    We do not have xdo.cfg in the Intance B, to be able to set a property that could be used in the RTF template for the server/port names - as suggested in the reply above.
    We would have to update all the templates to change the file path or the server /port to make it work on any new instance.
    Hope this clarifies the issue.
    We need to be able to derive the server and port at runtime, so the solution is portable to other instances. IT might be fine to set a property or maybe a file somewhere.
    Rgds...
    Edited by: app_tsaifee on Feb 14, 2010 8:57 PM

  • Import Parameter as Select Option for a FM in ECC 6.0

    Hi All,
    Can someone help me get the import parameter of a function module to be of the type select-options( the way it is used in reports) in ECC 6.0.
    Thanks for all your help in advance.
    Divya

    What I do is as following....
    I create two parameters...One for <b>START</b> and the other for <b>END</b>....Then, inside my FM I create a RANGE...
      DATA: BEGIN OF r_datum OCCURS 1,
            sign(1),
            option(2),
            low  TYPE vekp-vhilm,
            high TYPE vekp-vhilm,
            END OF r_datum.
    Passing the START to low and END to high....
    P.S: Don't forget to assign points to useful answers.
    Greetings,
    Blag.
    Message was edited by:
            Alvaro Tejada Galindo

  • JCA: how to find out that import parameter is structure?

    Hello,
    I'm using JCA to obtain import parameter of some function (com.sapportals.connector.metadata.functions.IParameter). Now, I'd like to switch program flow depend on kind of this import parameter (scalar, structure, table). Especially, I'm interested in finding out that import parameter is structure. In API I was only locate getStructure() method in IParameter. I tried to compare with null value, but it didn't solve my problem.
    Best Regards,
    Josef Motl

    I have come along this post so many times that now that I have solved it myself I will have to reply to it, even after 5 years.
    MappedRecord output = (MappedRecord) ix.execute(ixspec, input);
    //Now we want to read the output.
    //If we deal with a structure, we get an IRecord Object
    IRecord addressStructure = (IRecord) output.get("ADDRESS");
    //Otherwise we would get an IRecordSet Object (Field)
    I hope it will help all those searching as well.
    BR
    Sigi

  • Adding Select-Option as an import parameter of the Fm

    Hi Abappers,
    I have to add Select-option variable in the import parameter of the function module.
    How should i do this?
    Please reply.
    Thanks and Regards,
    Rahul

    Create a import parameter of RSSELECT.
    this will give u the fields which are present in .. an selection option.

  • Modification to import parameter

    Hi All ,
    Can anyone tell me ,is it possible to modify and thus alter the record coming in the exit as import parameter in a function module exit.The modification is thus written under source code in the same function module exit.The records in the import parameter is coming as values not optional.
    Warm regards,
    Thank you,
    Sudipta

    Hi Sudipta,
    No it is not possible. That value will not passed back to calling program.
    Regards,
    Atish

  • "Changing" parameter and "Tables" parameter defintions in function module

    If one defines "Changing" or "tables" parameters, they are treated as reference parameters.
    It becomes obvious for "tables" parameters where one does not have option to check box for "Pass by Value". But for "Changing" parameters, they provide the checkbox for "Pass by Value". Even when you select this option, the function module seems to handle the parameter as a reference parameter (whatever changes you make to it in the function module are retained when you return back to a calling program).
    My question is why then SAP has provided the checkbox of "Pass by Value" for "Changing" parameter?
    Thanks.
    Jitendra Mehta

    Hi Chaiphon:
    Thanks for explanation but I know the theory of "Pass by reference" versus "Pass by Value".
    Let me rephrase my question.
    When I use the importing parameter (say as a table with a dictionary table type) with reference (not "passing by value"), and if I modify the value of the parameter, the calling program (which calls function module) receives the changed value after the call.
    When I use the importing parameter with "Pass by Value" box checked, the modifications made to the table inside the function module is not retained after the code leaves function module and returns to the calling program.
    My question is why not the same behaviour with the "Changing parameter" in function module definition?
    And if Changing parameters are always reference parameters, then why SAP has provided the "Pass by Value" check box?

  • Send high priority/importance mails using wf_mail.send

    Hello All,
    I wish to using wf_mail.send to send emails with p_content_type => wf_notification.doc_html
    I am getting the mails , however I need the mails to be sent with high importance or priority flag.
    (For eg: In outlook we have high importance flag)
    How can I do this using wf_mail.send ? In which parameter I need to mention this ?
    If this is not possible in wf_mail.send, Is there an alternative?
    Please help.
    Thanks.

    On the Message there is a field called Priority, choose High, Normal, or Low for the default priority of the message. The priority level simply informs the recipient of the urgency of the message. It does not affect the processing or delivery of the message.
    Or if you don't want the default set, you can change it on the insertion of the Notification in a Process.  It is on the tab "Node"

  • How do I send "unlimited" text in a parameter using "POST" in Ajax

    I'm trying to send large amounts of text data to the server using POST rather than GET, using Ajax
    However, I am only able to send a max of 9.76 kb
    I start with a jsp page, which calls a javascript method that utilises Ajax, which sends the text in a parameter in a XMLHttpRequest object
    to a servlet. The text is derived from options values in a multi select combo box.
    Here's my code:
    Code snippet from .jsp page:
            <table>
            <form name="form1" id="form1" method="POST">
               <tr>
                  <td>
                 <select name="sel" id="sel" multiple="multiple" size="0"></select>
              </td>
              <td>
                 <input type="button" id="sendOpts" name="sendOpts" value="Send Options" onClick="jsObj.sendOpts()">
              </td>
              </tr>
           </form>
           </table>Code snippet from jsObj.js file:
    //=================================================
    // jsObj object
    //=================================================
    jsObj = new jsObj();
    function jsObj() {
         this.sendOpts = function() {
              if(!confirm('Send Option Values?'))
                   return;
              if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
                   xmlhttp=new XMLHttpRequest();
              } else { // code for IE6, IE5
                   xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
              xmlhttp.onreadystatechange=function() {
                   if(xmlhttp.readyState==4) { // 4 = The request is complete
                        if (xmlhttp.status==200 || window.location.href.indexOf("http")==-1) {
                             alert(xmlhttp.responseText); // When I copy and paste all the text from this alert to text editor and save the file, the largest the file can be is 9.76 kb.
              var url = 'testSize'; // Servlet that simply retrieves the sent String in a parameter and sends it back to this method
              var sel = document.getElementById('sel');
              var str = sel.name + '=';
              var delim = ':';
              for(var i = 0; i < sel.length; i++) {
                   str += encodeURIComponent(sel.options.value + delim); // 'encodeURIComponent' encodes any special characters within the parameter values
              xmlhttp.open("POST",url,true);
              xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); // This is needed for any POST request made via Ajax
              xmlhttp.send(str); // send the parameter and it's value to the servlet
    }Code snippet from 'testSize' servlet:package test;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.util.*;
    public class TestSize extends HttpServlet {
         public synchronized void doGet(HttpServletRequest request,
              HttpServletResponse response) throws ServletException,IOException {
              PrintWriter out = null;
              try {
                   response.setContentType("text/html");
              out = response.getWriter();
                   String str = request.getParameter("sel");
                   str = str.substring(0, str.length()-1); // cut off last delimiter
                   out.println(str);
                   } catch (Exception e) {
         public synchronized void doPost(HttpServletRequest request,
              HttpServletResponse response) throws ServletException, IOException {
              doGet(request, response);
    }Any help greatly appreciated.
    Edited by: Irish_Fred on Feb 25, 2010 5:14 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Yes, I tried that.
    I set the "ACTION" of the form to the servlet and then used the form.submit() method to POST the text to the servlet.
    i.e.: I selected many options in the select combo, concatenated them to one string, set the 'value' property of a form text field to
    this string, did a 'form.submit()' to the servlet and I was able to send a much larger amount of text.
    ( The .txt file I saved from the resulting text equaled about 30 kb in size, so obviously I can send much more
    data this way. )
    However, I want to use Ajax, so I don't have to reload the page. I 'borrowed' the Ajax part of the code from a website:
    http://www.javascriptkit.com/dhtmltutors/ajaxgetpost2.shtml
    and I presumed that because the author used "POST" as opposed to "GET", I would be able to send larger
    chunks of data. Obviously not, or there's another reason for the limit of data I can send using my present code,
    which I'm not seeing. I'm fairly new to jsp, Ajax & Servlets, so this is no surprise.
    If anyone can point out to me where I'm going wrong, I'd greatly appreciate it. Cheers.

  • How many mails i can send at a time per day using APEX mail system?

    HI,
    I am working on application, when i have written a process to send mail, i have a project where i have to send mail at a time for all the email id's
    given list there are upto 5000 email id's where text body also include certain set of data from a report. thinking at a time 3000 its difficult i divided
    it region wise, but still each region have 2000 odd email id's. during testing when i run the process just 950 mails i could send then i got a error
    saying "ORA-20001: You have exceeded the maximum number of email messages per workspace. Please contact your administrator." so please
    can any one help me to know How many mails i can send at a time per day using APEX mail system?
    Thanks in advance
    Gowthami

    Hi jfosteroracle,
    You are getting the error may be the following reason,
    Check the following,
    Login as ADMIN and Goto -->Manage Instance-->Instance Settings--> Mail-->Maximum Emails per workspace
    Actually this number denotes the Number of mails can be sent per 24 hour for the workspace,It may exceeded.
    It may be the reason.
    Thank you.     
    Regards,
    Gurujothi
    Edited by: Gurujothi on Jun 27, 2012 5:54 AM

Maybe you are looking for

  • Application not listed in iOS- Settings- "Use Cellular data for"

    Hello, When i install the IPA of my application, it is not listed in the "Use Cellular data for" list in Cellular data Settings. I would like to know how to add my application to this list. Also, is it possible to get the Enabled/Disabled status of t

  • Need information about retail project

    hi all tommorow i had a interview with my client. i need information about retail  project. like terms and business process overview . documentaiton can be sent to:   [email protected] points will awarded for sure. kiran

  • BI 7 Workbook Format

    Hi, Is there anyway by which the workbooks can be formated (font,color,size) along with the option 'Apply format' option.In 3.5 there is an option by which we can format the layout of workbooks.Is there anything similar to that in Bi7.0. Thanks, Purb

  • Problem with SMB share

    Hi! I have a problem when connecting to a SMB file share on a Windows 2003 R2 server (also acting as a Domain Controller for the Active Directory domain) using OS X 10.5.2. I've just reinstalled Leopard to rule out any problems with messy configurati

  • HT3702 Why do I have an extra payment showing on my bank statement?

    Why do I have an extra payment showing on my bank statement?