Is it possible to send data to ITS via POST?

Hi guys!
I need to call SAP transaction via thin client and I need to make a call via POST, cos' I need to send there some data to process. Is it possible?
Thanx, Peter

Hi Peter,
First some information about parameter transfer with ITS in general.
http://server:port/scripts/wgate/<service name>/!?transaction=<transaction_name>&<inputfieldname1>=<value1>&<inputfieldname2>=<value2>&okcode=<okcode>
The parameters can als be transferred as POST parameters. For this you need a form e.g.
<form name="<form name>" method="post" action="`wgateURL() ...
You might get some ideas by studying the login.html in the templast folder system of your ITS instance.
Thanks and regards,
Dieter

Similar Messages

  • Sending Data to BAM via web service

    Is it possible to send data to BAM data objects via web service / http soap ? I know we can call extenal web service from BAM, but I was thinking of doing a real time from source application to BAM via http-soap web service.

    Hi,
    I hope it es not too late for an answer ...
    Yes you can do that .... have a look to this example
    procedure UpSert_DO (do_name VARCHAR2, do_key VARCHAR2, xmlload VARCHAR2) is
    begin
    --'&lt;_NAME>HZ.01.10&lt;/_NAME>&lt;/_WS>
    http_post(
    'http://localhost/OracleBAM/Services/DataObject/DataObjectOperations.asmx',
    '<?xml version = ''1.0'' encoding = ''UTF-8''?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://xmlns.oracle.com/integration/bam">
    <env:Body><ns0:Upsert><ns0:dataObject>' || do_name || '</ns0:dataObject><ns0:keyCSV>do_key</ns0:keyCSV><ns0:xmlPayload>' || do_key ||
    xmlload ||
    '</ns0:xmlPayload></ns0:Upsert></env:Body></env:Envelope>',
    'text/xml; charset=UTF-8',
    null,
    null,
    'USER_NAME',
    'PASS_WORD',
    '"http://xmlns.oracle.com/integration/bam/Upsert"'
    end;

  • I'm not able to send emails with mail.ru. Receiving and reading is not a problem. When I create a email with mail.ru its not possible to send it although its stored in my mail.ru account as "still to be send". What can it be??

    I'm not able to send emails with mail.ru. Receiving is not a problem. Creating a mail is also not a problem and the mail will be stored at mail.ru as still to be send, only problem is its not possible to send. I noticed the buttons for sending change colour when used but they don't perform. What it is?

    Don't know what changed, but all of a sudden able to send emails by mail.ru ...... sorry for bothering.

  • Searching for a possibility to send data of an itab vial email

    Hello,
    i want to send data from an itab to an external emailadress. Does anybody know a FM or something other?
    Thanks for your help

    Below is the sample code for sending and email, just concatenate all the field line into one and pass that table to
    CONTENTS_BIN as attachment.
    DATA:
        L_DATE(10).
    DATA:
      LI_RECLIST         LIKE SOMLRECI1  OCCURS 5  WITH HEADER LINE,
      LI_OBJTXT          LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE,
      LI_OBJECT_CONT     LIKE SOLI       OCCURS 20 WITH HEADER LINE,
      LI_OBJPACK         LIKE SOPCKLSTI1 OCCURS 2  WITH HEADER LINE,
      LI_OBJHEAD         LIKE SOLISTI1   OCCURS 1  WITH HEADER LINE,
      LS_DOC_CHNG        LIKE SODOCCHGI1,
      LV_LINES           TYPE I,
      GI_OUTPUT          LIKE SOLISTI1   OCCURS 5  WITH HEADER LINE.
    DO 10 TIMES.
      GI_OUTPUT-LINE = 'Answerthink'.
      APPEND GI_OUTPUT.
    ENDDO.
    WRITE SY-DATUM TO L_DATE.
    LS_DOC_CHNG-OBJ_NAME  = 'ANGEBOT'.
    CONCATENATE 'ZMBIBC_CCMS_LOAD Error Report u2013'
                L_DATE
           INTO LS_DOC_CHNG-OBJ_DESCR.
    LI_OBJTXT = 'Please find the attached document'.
    APPEND LI_OBJTXT.
    CLEAR  LI_OBJTXT.
    DESCRIBE TABLE LI_OBJTXT LINES LV_LINES.
    READ TABLE LI_OBJTXT INDEX LV_LINES.
    LS_DOC_CHNG-DOC_SIZE = ( LV_LINES - 1 ) * 255 + STRLEN( LI_OBJTXT ).
    * Creation of the entry for the compressed document - body text
    CLEAR LI_OBJPACK-TRANSF_BIN.
    LI_OBJPACK-HEAD_START = 1.
    LI_OBJPACK-HEAD_NUM   = 0.
    LI_OBJPACK-BODY_START = 1.
    LI_OBJPACK-BODY_NUM   = LV_LINES.
    LI_OBJPACK-DOC_TYPE   = 'RAW'.
    APPEND LI_OBJPACK.
    DESCRIBE TABLE GI_OUTPUT LINES LV_LINES.
    LI_OBJHEAD = 'OUTPUT'.
    APPEND LI_OBJHEAD.
    LI_OBJPACK-TRANSF_BIN = 'X'.
    LI_OBJPACK-HEAD_START = 1.
    LI_OBJPACK-HEAD_NUM   = 1.
    LI_OBJPACK-BODY_START = 1.
    LI_OBJPACK-BODY_NUM   = LV_LINES.
    LI_OBJPACK-DOC_TYPE   = 'RAW'.
    LI_OBJPACK-OBJ_NAME   = 'ANLAGE'.
    LI_OBJPACK-OBJ_DESCR  = 'Output List'.
    LI_OBJPACK-DOC_SIZE   = LV_LINES * 255.
    APPEND LI_OBJPACK.
    LI_RECLIST-RECEIVER = 'give email address.
    LI_RECLIST-REC_TYPE = 'U'.
    LI_RECLIST-EXPRESS  = 'X'.
    APPEND LI_RECLIST.
    CLEAR LI_RECLIST.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA              = LS_DOC_CHNG
        PUT_IN_OUTBOX              = 'X'
      TABLES
        PACKING_LIST               = LI_OBJPACK
        OBJECT_HEADER              = LI_OBJHEAD
        CONTENTS_BIN               = GI_OUTPUT
        CONTENTS_TXT               = LI_OBJTXT
        RECEIVERS                  = LI_RECLIST
      EXCEPTIONS
        TOO_MANY_RECEIVERS         = 1
        DOCUMENT_NOT_SENT          = 2
        OPERATION_NO_AUTHORIZATION = 4
        OTHERS                     = 99.
    BREAK PANAKAPALLY.
    SUBMIT RSCONN01 WITH MODE   EQ 'INT'
                    WITH OUTPUT EQ SPACE
                     AND RETURN.
    COMMIT WORK AND WAIT.
    CASE SY-SUBRC.
      WHEN 0.
        LOOP AT LI_RECLIST.
          IF LI_RECLIST-RETRN_CODE = 0.
            MESSAGE S000(Z1) WITH 'The document was sent'.
          ELSE.
            MESSAGE S000(Z1) WITH 'The document could not be sent'.
          ENDIF.
        ENDLOOP.
      WHEN 1.
        MESSAGE S000(Z1) WITH 'No authorization for sending'
                              'to the specified number'
                             'of recipients'.
      WHEN 2.
        MESSAGE S000(Z1) WITH 'Document could not be'
                               'sent to any recipient'.
      WHEN 4.
        MESSAGE S000(Z1) WITH 'No send authorization'.
      WHEN OTHERS.
        MESSAGE S000(Z1) WITH 'Error occurred while sending'.
    ENDCASE.

  • Is it possible to send data from a webcam to a server via flash?

    I've been reading about the Flash CS3 Camera class and can't
    seem to find out if there is any way I can grab a frame or two off
    the camera and send it to a web server. Is this possible?

    sure. you can create a bitmap from the video stream and then
    you can upload it to your server (with some server-side scripting).
    you can search for help on those two topics to accomplish your
    task.

  • Is it possible to send data from an external application to a plug-in that executes a menu item?

    I want to pass some parameters from an external appliaction  to my own plug-in. The plug-in creates a menu item for adding electronic signature. The menu item is executed from my external application using MenuItemExecute("mymenutem").

    Since you control the application AND the plugin - you can define ANY method of communication you want.  Shared files, shared memory, IPC, named pipes, etc.

  • 8510C doesn't send data to PC via LabVIEW: why?

    I posted this morning regarding the driver for 8510c. even if you do not have the driver, I only need one tip/explanation.
    I can control the instrument, sending it commands via Labview (sweep, number of adta point, axis format, etc), but the PC doesn't receive any data back.
    If I use the NI measurement & automation tool, I can exchange data between 8510 and pc (query: OUTPDATA; I get several ASCII data back ). I can ask for ID as well (OUTPIDEN). If I use the same commands  in labview, I cannot get any data read by Labview (i.e with GPIB read command, the output data variable is left blank).
    I only need to be able to record to an excel sheet the S parameter traces, avoiding using the floppy to save data on it.
    Even if any of you has a labview 7 version: could you tell me how OUTPDATA; (or OUTPRAW OUTPFORM) work?
    THANK U

    I just posted a LabVIEW 6 version of the driver in response to your other question but if you can't get OUTPIDEN to work in LabVIEW, then you should check to make sure that you've got the correct address. Do you have the error connections wired up and do you get an error? How many bytes are you specifying for the GPIB Read? The driver uses VISA and you should use that but if for some reason, you want to use the low level GPIB commands, the code for getting the device id should look like the attachment below. After you get this to work, then move on to getting a measurement.
    Message Edited by Dennis Knutson on 11-29-2006 09:15 AM
    Attachments:
    ID Query.PNG ‏3 KB

  • How to send data back to publishing stream

    Hi,
    Environment: ActionScript3.0, FMS, Flash Project created in Flash Develop
    How to send data back to publishing stream? I need to send data back to publishing stream.
    Using NetStream.send() we can send data to subscribers but is it possible to send data from subscriber back to publisher using any NetStream method.
    One other solution to this is remoteSharedObject, but if it is possible with NetStream class then let me know.
    Thanks

    There are a number of ways to extract data from CRM On Demand including:
    * Export - manual process, generate CSV file containing CRM On Demand data
    * List/Analytics - manual process, export the contents of a report of list to a CSV
    * Web Services - programmatic, develop an application that queries for data within CRMOD
    * Integration Events - programmatic, use workflow to trigger event creation and then poll for events to know when an operation occurs on a record (i.e. Insert of new Account record)
    As for getting that data into another system, that will depend on the system and the methods available for inserting data that it makes available.
    Hope this helps.
    Thanks,
    Sean

  • Send CSV or table via email in daily job?

    Hello,
    I built a application where our employees can order meals. In case the whole application and everything crashes down, the DBA has 2 days to restore the application, database, etc...
    To "survive" the 2 days I want to make a daily export of the necessary data, that the kitchen can continue its work.
    Now I planned to make a view with the necessary data and export this as plain text in an email.
    Is there another better possibility? Maybe create a CSV file and attach this to a email and send it via a daily job? Or is it possible to send a whole table via email?
    Everything should work automatically via a job.
    Thank you so much,
    Lisa

    You could have a daily batch job run, where the job pulls the required info into a report, generates the report and sends it to required folks..: http://nzchaudhry.wordpress.com/2011/06/28/sending-report-as-email-attachment-in-oracle-apex/
    Thank you,
    Tony Miller
    Webster, TX
    There are two kinds of pedestrians -- the quick and the dead.
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Is it possible to create a Webservice in BI which takes XML as an input and gives PDF as output with an additional requirement that Siebel expecting the XSD from BI to send data in the BI requested format

    Is it possible to create a Webservice in BI which takes XML as an input and gives PDF as output with an additional requirement that Siebel expecting the XSD from BI to send data in the BI requested format. Siebel wants to send the data as xml to BI but not sure of the BI capabilities on giving WSDL embedded with XSD (input is a hierarchical)

    Hi All,
    I am able to fulfil above requirement. Now I am stuck at below point. Need your help!
    Is there any way to UPDATE the XML file attached to a Data Definition (XML Publisher > Data Definition) using a standard package or procedure call or may be an API from backend? I am creating an XML dynamically and I want to attach it to its Data Definition programmatically using SQL.
    Please let me know if there is any oracle functionality to do this.
    If not, please let me know the standard directories on application/database server where the XML files attached to Data Definitions are stored.
    For eg, /$APPL_TOP/ar/1.0/sql or something.
    Regards,
    Swapnil K.

  • Is it possible to create a virtual TCP port and send data to it?

    Is it possible to create a virtual TCP port and send data to it?
    My application is this:   I am reading a constant stream of waveform data from a device via a LabVIEW VI set and I need to get that streaming data to a .NET application.  I can poll a TCP port in .NET easily so is there a way I can create a virtual TCP port in LabVIEW and send the data there?

    Have a look at the example called simple data server and simple data client and see what you can get from that. I'm not really familiar with TCP myself.
    Joe.
    "NOTHING IS EVER EASY"

  • Possible to send POST data WITHOUT a submit button?

    Is it possible to send POST data without a submit button, but
    instead, using PHP redirect or PHP header?
    I need to process a form's POST values before sending some
    selected values to a third party web
    site. So I'd like to be able to send processed POST values to
    that site, without asking the user to
    click on a submit button again.
    how?...
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

    You can't send client-side data with server-side scripting, I
    think. You
    can do it with javascript, but then your form is dependent on
    js being
    enabled....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "(_seb_)" <[email protected]> wrote in message
    news:eosqf2$p0n$[email protected]..
    > Is it possible to send POST data without a submit
    button, but instead,
    > using PHP redirect or PHP header?
    > I need to process a form's POST values before sending
    some selected values
    > to a third party web site. So I'd like to be able to
    send processed POST
    > values to that site, without asking the user to click on
    a submit button
    > again.
    > how?...
    >
    >
    > --
    > seb ( [email protected])
    >
    http://webtrans1.com | high-end web
    design
    > Downloads: Slide Show, Directory Browser, Mailing List

  • My Iphone 4 at random times, just wont send messages for around an hour even if i have full service, its always up to date so its not that but any help on what this could be?

    My Iphone 4 at random times, just wont send messages for around an hour even if i have full service, its always up to date so its not that but any help on what this could be? It could just be my network being a pain in the *** but im not sure, help me out here people !

    never had that problem or heard about it so my bet is a network issue

  • How can I allow a sub-vi to run independent of the main program once it has been called while still sending data to the sub-vi

    I have a main program where I call a sub-vi. In this sub-vi, there is a while loop that is used to wait for commands in the sub-vi. While the while loop is running, I cannot continue with normal operation of the main program. I would like get the sub-vi to run independently once it has been called, but not hold up the main program. As well, I need to still be able to send data to the sub-vi

    One way is to use VI Server, which has been mentioned by others. This will allow you to start another VI (by name) and run it entirely independently of the calling VI. This is a good way to start various independent VIs from a main menu, for example. None of the VIs thus called need have any connection to the others.
    Another way it to have the SubVI in a separate while loop on the calling VI's BD. Then, use a local var to start this sub VI from the main loop. The calling VI sets a local START bit and continues running. The sub VI's while loop watches for this START bit to go true, and then runs the Sub VI. The advantage here is that one can more easily pass arguments to the SubVI when it is started, using local vars, which are preferable to globals. Once the Su
    bVI is running, however, you must use a global Stop Bit, set in the calling VI, to stop it when the calling VI exits, or the calling VI will hang up, waiting for the Sub VI to close and exit its while loop.
    If you need an example of this, email me. ([email protected]). I can also recommend Gary W. Johnson's excellent book which discusses this. ("LabVIEW Graphical Programming", 2nd Ed).
    Note: Where possible, I try to call a subvi from within the main VI, wait till it is done, then continue. It avoids the use of locals & globals, and results in cleaner code, with fewer "race" conditions. However, the main VI stops until the subVI is done, hence one should make the subVI modal.

  • Is it possible to send xls attach in mail in background ?

    is it possible to send xls attach in mail in background ?
    i build/copy program to send attach file in xls format  ,
    its work fine in foreground but do nothing in background  ,
    What can be the reason?
    the section of the sending  :
      DATA: LD_ERROR    TYPE SY-SUBRC,
            LD_RECIEVER TYPE SY-SUBRC,
            LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
            LD_EMAIL LIKE  SOMLRECI1-RECEIVER,
            LD_FORMAT TYPE  SO_OBJ_TP ,
            LD_ATTDESCRIPTION TYPE  SO_OBJ_NAM ,
            LD_ATTFILENAME TYPE  SO_OBJ_DES ,
            LD_SENDER_ADDRESS LIKE  SOEXTRECI1-RECEIVER,
            LD_SENDER_ADDRESS_TYPE LIKE  SOEXTRECI1-ADR_TYP,
            LD_RECEIVER LIKE  SY-SUBRC.
      LD_EMAIL   = P_EMAIL.
      LD_MTITLE = P_MTITLE.
      LD_FORMAT              = P_FORMAT.
      LD_ATTDESCRIPTION      = P_ATTDESCRIPTION.
      LD_ATTFILENAME         = P_FILENAME.
      LD_SENDER_ADDRESS      = P_SENDER_ADDRESS.
      LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_TYPE.
    Fill the document data.
      W_DOC_DATA-DOC_SIZE = 1.
    Populate the subject/generic message attributes
      W_DOC_DATA-OBJ_LANGU = SY-LANGU.
      W_DOC_DATA-OBJ_NAME  = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
      W_DOC_DATA-SENSITIVTY = 'F'.
    Fill the document data and get size of attachment
      CLEAR W_DOC_DATA.
      READ TABLE IT_ATTACH INDEX W_CNT.
      W_DOC_DATA-DOC_SIZE =
         ( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
      W_DOC_DATA-OBJ_LANGU  = SY-LANGU.
      W_DOC_DATA-OBJ_NAME   = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR  = LD_MTITLE.
      W_DOC_DATA-SENSITIVTY = 'F'.
      CLEAR T_ATTACHMENT.
      REFRESH T_ATTACHMENT.
      T_ATTACHMENT[] = PIT_ATTACH[].
    Describe the body of the message
      CLEAR T_PACKING_LIST.
      REFRESH T_PACKING_LIST.
      T_PACKING_LIST-TRANSF_BIN = SPACE.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM = 0.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE = 'RAW'.
      APPEND T_PACKING_LIST.
    Create attachment notification
      T_PACKING_LIST-TRANSF_BIN = 'X'.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM   = 1.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE   =  LD_FORMAT.
      T_PACKING_LIST-OBJ_DESCR  =  LD_ATTDESCRIPTION.
      T_PACKING_LIST-OBJ_NAME   =  LD_ATTFILENAME.
      T_PACKING_LIST-DOC_SIZE   =  T_PACKING_LIST-BODY_NUM * 255.
      APPEND T_PACKING_LIST.
    Add the recipients email address
      CLEAR T_RECEIVERS.
      REFRESH T_RECEIVERS.
      T_RECEIVERS-RECEIVER = LD_EMAIL.
      T_RECEIVERS-REC_TYPE = 'U'.
      T_RECEIVERS-COM_TYPE = 'INT'.
    T_RECEIVERS-NOTIF_DEL = 'X'.
    T_RECEIVERS-NOTIF_NDEL = 'X'.
      APPEND T_RECEIVERS.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = W_DOC_DATA
          PUT_IN_OUTBOX              = 'X'
          SENDER_ADDRESS             = LD_SENDER_ADDRESS
          SENDER_ADDRESS_TYPE        = LD_SENDER_ADDRESS_TYPE
          COMMIT_WORK                = 'X'
        IMPORTING
          SENT_TO_ALL                = W_SENT_ALL
        TABLES
          PACKING_LIST               = T_PACKING_LIST
          CONTENTS_BIN               = T_ATTACHMENT
          CONTENTS_TXT               = IT_MESSAGE
          RECEIVERS                  = T_RECEIVERS
        EXCEPTIONS
          TOO_MANY_RECEIVERS         = 1
          DOCUMENT_NOT_SENT          = 2
          DOCUMENT_TYPE_NOT_EXIST    = 3
          OPERATION_NO_AUTHORIZATION = 4
          PARAMETER_ERROR            = 5
          X_ERROR                    = 6
          ENQUEUE_ERROR              = 7
          OTHERS                     = 8.
    Populate zerror return code
      LD_ERROR = SY-SUBRC.
    Populate zreceiver return code
      LOOP AT T_RECEIVERS.
        LD_RECEIVER = T_RECEIVERS-RETRN_CODE.
      ENDLOOP.

    Try this example, not sure where I got this, but it works.
    report zmail_excel.
    parameters: p_email   type somlreci1-receiver
                                   default '[email protected]'.
    data: begin of it001 occurs 0,
          bukrs type t001-bukrs,
          butxt type t001-butxt,
          end of it001.
    data:   imessage type standard table of solisti1 with header line,
            iattach type standard table of solisti1 with header line,
            ipacking_list like sopcklsti1 occurs 0 with header line,
            ireceivers like somlreci1 occurs 0 with header line,
            iattachment like solisti1 occurs 0 with header line.
    start-of-selection.
      select bukrs butxt into table it001 from t001.
    *   Populate table with detaisl to be entered into .xls file
      perform build_xls_data .
    * Populate message body text
      clear imessage.   refresh imessage.
      imessage = 'Please find attached excel file'.
      append imessage.
    * Send file by email as .xls speadsheet
      perform send_email_with_xls tables imessage
                                          iattach
                                    using p_email
                                          'Example Excel Attachment'
                                          'XLS'
                                          'TestFileName'
                                          'CompanyCodes'.
    *      Form  BUILD_XLS_DATA
    form build_xls_data .
      constants: con_cret type x value '0D',  "OK for non Unicode
                 con_tab type x value '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
    *    con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    *    con_cret type c value cl_abap_char_utilities=>CR_LF.
      concatenate 'BUKRS' 'BUTXT'
             into iattach separated by con_tab.
      concatenate con_cret iattach into iattach.
      append  iattach.
      loop at it001.
        concatenate it001-bukrs it001-butxt
               into iattach separated by con_tab.
        concatenate con_cret iattach  into iattach.
        append  iattach.
      endloop.
    endform.
    *      Form  SEND_EMAIL_WITH_XLS
    form send_email_with_xls tables pit_message
                                              pit_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription.
      data: xdocdata like sodocchgi1,
            xcnt type i.
    * Fill the document data.
      xdocdata-doc_size = 1.
    * Populate the subject/generic message attributes
      xdocdata-obj_langu = sy-langu.
      xdocdata-obj_name  = 'SAPRPT'.
      xdocdata-obj_descr = p_mtitle .
    * Fill the document data and get size of attachment
      clear xdocdata.
      read table iattach index xcnt.
      xdocdata-doc_size =
         ( xcnt - 1 ) * 255 + strlen( iattach ).
      xdocdata-obj_langu  = sy-langu.
      xdocdata-obj_name   = 'SAPRPT'.
      xdocdata-obj_descr  = p_mtitle.
      clear iattachment.  refresh iattachment.
      iattachment[] = pit_attach[].
    * Describe the body of the message
      clear ipacking_list.  refresh ipacking_list.
      ipacking_list-transf_bin = space.
      ipacking_list-head_start = 1.
      ipacking_list-head_num = 0.
      ipacking_list-body_start = 1.
      describe table imessage lines ipacking_list-body_num.
      ipacking_list-doc_type = 'RAW'.
      append ipacking_list.
    * Create attachment notification
      ipacking_list-transf_bin = 'X'.
      ipacking_list-head_start = 1.
      ipacking_list-head_num   = 1.
      ipacking_list-body_start = 1.
      describe table iattachment lines ipacking_list-body_num.
      ipacking_list-doc_type   =  p_format.
      ipacking_list-obj_descr  =  p_attdescription.
      ipacking_list-obj_name   =  p_filename.
      ipacking_list-doc_size   =  ipacking_list-body_num * 255.
      append ipacking_list.
    * Add the recipients email address
      clear ireceivers.  refresh ireceivers.
      ireceivers-receiver = p_email.
      ireceivers-rec_type = 'U'.
      ireceivers-com_type = 'INT'.
      ireceivers-notif_del = 'X'.
      ireceivers-notif_ndel = 'X'.
      append ireceivers.
      call function 'SO_DOCUMENT_SEND_API1'
           exporting
                document_data              = xdocdata
                put_in_outbox              = 'X'
                commit_work                = 'X'
           tables
                packing_list               = ipacking_list
                contents_bin               = iattachment
                contents_txt               = imessage
                receivers                  = ireceivers
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
    endform.
    Regards,
    Rich Heilman

Maybe you are looking for