*.CSV attachments scrambled

Hi,
Am having trouble with automated reports being sent out in *.CSV format.
The emails are going out to suppliers and the reports are being attached in CSV format. However in some instances the attachments are being scrambled and received by the supplier as scrambled text within the email body with no attachment reaching them. Most of the reports are reaching their destinations without issue.
Can anyone tell me what is causing this and what can be done to rectify it?
If it is a problem on the suppliers end (ie a firewall issue) is there an easy fix that I can advise them to implement?
Cheers.

Outlook 2007 is what I have tested with - the other end might be 2003, 2007 or 2010 on the windows side - and 2011 on hte Mac side.
Yes send windows attachemnt was checked and makes no difference.
Yes zip is an option.
Opening and saving each file in xls format is an option - however, I would have to do that operation at least a dozen times a day - which coudl get annoying - maybe a folder action setup to open each csv and resave it as an xls automatically might work.
The output file that I send gets copied and pasted into another doc - and then is not needed - so the extra work involved in converting the csv in advance seems inefficient.
Not using email to share the files might be an option.
For the moment the simplest option is for me to NOT use Apple Mail to send - or to instruct the folks on the other end to NOT use Outlook to receive.
Over the past decade or so I have created about 12,000 csv files - and while that is only about 1,200 a year or an average of about 5 a day - i am not the only one creating them and there is more than one person on the team that needs to process the files. So I am looking for the simplest - easiest - most comprehensive solution.
This was not a problem in the past because we all used Windows OS and MS Office Professional - a number of us have recently switched to Mac OS and not using MS Office (or at least not using Outlook).

Similar Messages

  • Need to send CSV attachments in a single mail to the Rcvr

    Hi All,
         Currently we are using 7.1 release of PI system. The scenario is from IDOC to ANSI Format. All the files recieved from IDOC should be sent as an attachment in  CSV format in a single mail .Could anyone please let me know how to proceed with this. If there is any javamapping needed for this? If yes, could you please provide the code for the  same,
    Regards,
       Pavithra

    Hi Pavithra,
    How to Guide for sending mails:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d0964d7c-e66e-2910-24bb-ac535e4a5992
    Use StrictXML2PlainBean in the module processor to convert the data to CSV:
    /people/pooja.pandey/blog/2009/02/23/xml-to-text-conversion-made-easy-by-strictxml2plainbean
    http://help.sap.com/saphelp_nwpi711/helpdata/en/44/748d595dab6fb5e10000000a155369/content.htm
    Regards,
    Aravind

  • Csv attachments

    There does not seem to be a separate category for the Mail app that is included with Mac OS.
    There was an earlier thread on this but it is archived.
    When I attached csv files to an email - and send it to folsk on windows - the file gets extra lines inserted - this causes problems for them processing the file.
    The file is NOT created by Excel - but it is read into Excel - so changing the way the file is saved is not an possibility - and opening each file just to save it with different format is also not an option as the number of files to be processed makes that too time consuming.
    Mail is doing something to the file that it likely does not need to be doing. If I attached the exact same file to a Mac Mail email and also to an email sent from a different email client - and open them both on Windows from Outlook - the Mac Mail file has extra lines and the other does not.
    Yes I could remove the extension - or compress - or use a file sharing option instead of email attachment - the trouble is that there are many other folks involved in the process and it may be too difficult to change too much of the process.
    Short term - I will simply not use the Mail client included with Mac OS X.

    Outlook 2007 is what I have tested with - the other end might be 2003, 2007 or 2010 on the windows side - and 2011 on hte Mac side.
    Yes send windows attachemnt was checked and makes no difference.
    Yes zip is an option.
    Opening and saving each file in xls format is an option - however, I would have to do that operation at least a dozen times a day - which coudl get annoying - maybe a folder action setup to open each csv and resave it as an xls automatically might work.
    The output file that I send gets copied and pasted into another doc - and then is not needed - so the extra work involved in converting the csv in advance seems inefficient.
    Not using email to share the files might be an option.
    For the moment the simplest option is for me to NOT use Apple Mail to send - or to instruct the folks on the other end to NOT use Outlook to receive.
    Over the past decade or so I have created about 12,000 csv files - and while that is only about 1,200 a year or an average of about 5 a day - i am not the only one creating them and there is more than one person on the team that needs to process the files. So I am looking for the simplest - easiest - most comprehensive solution.
    This was not a problem in the past because we all used Windows OS and MS Office Professional - a number of us have recently switched to Mac OS and not using MS Office (or at least not using Outlook).

  • Convert .csv-attachments

    Hi!
    I would like to convert a .csv-file which is received as an email-attachment. The problem is that the .csv-file is not recognized as I am not able to define the structure of the .csv-file. At the moment it is converted to one long string with all fields which can not be used for further processing.
    If I transmit the attachment via FTP it is no problem as I have the possibility to use "file content conversion" as message protocol in the file adapter.
    Does anyone know if there is a possibility of file content conversion while using the mail adapter?
    Regards
    Chris

    Hi Joachim,
    thank you very much for your answer.
    On page 3 of the Howto-guide for JMS adapter i found the "Module Sequence in the Sender Channel". I only used the line with "Plain2XML" and set all parameter values from page 4. The last line (xml.fieldFixedLengths) was changed to xml.fieldSeparator with parameter value ";" as a CSV file should be converted.
    During the test the adapter received the email with the attachment and I received the following feedback from the mail adapter:
    <b>running: [2005-11-09T15:22:52Z] 1 new messages found among 1 messages in total; processing message 1... done; action completed</b>
    I think that the conversion was done successfully but I can`t find the message in the RWB.
    Do you know where to find the converted message?
    Best regards
    Chris

  • Archive the CSV attachments in mail

    Hi,
    I need to archive the CSV attachements that I am sending by mail
    Please suggest how to go about this???
    If not possible archiving of selected mails will also do....

    part-2
        CONCATENATE 'Display Message' ' ' INTO IT_OBJTXT
        SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CLEAR IT_OBJTXT.
        IT_RECLIST-RECEIVER = 'emailaddress'.
        IT_RECLIST-REC_TYPE = 'U'.
        IT_RECLIST-EXPRESS  = ' '.
        IT_RECLIST-COM_TYPE = 'INT'.
        APPEND IT_RECLIST.
        CONCATENATE 'Display Message' ' ' INTO IT_OBJTXT
        SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CLEAR IT_OBJTXT.
        IT_RECLIST-RECEIVER = 'email address'.
        IT_RECLIST-REC_TYPE = 'U'.
        IT_RECLIST-EXPRESS  = ' '.
        IT_RECLIST-COM_TYPE = 'INT'.
        APPEND IT_RECLIST.
        CLEAR: W_TEXT.
        DOC_CHNG-OBJ_DESCR = 'Successfull  Message display'.
        DOC_CHNG-OBJ_NAME  = 'INBOUND'.
        DESCRIBE TABLE IT_OBJTXT LINES TAB_LINES.
        READ TABLE IT_OBJTXT INDEX TAB_LINES.
        DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( IT_OBJTXT ).
        CLEAR: W_LONGTEXT.
        W_LONGTEXT = 'name of report for testing'.
        IT_OBJBIN = W_LONGTEXT.
        APPEND IT_OBJBIN. CLEAR IT_OBJBIN.
        APPEND IT_OBJBIN. CLEAR IT_OBJBIN.
        APPEND IT_OBJBIN. CLEAR IT_OBJBIN.
        CLEAR TEXT.
        MOVE: 'User:'  TO TEXT,
              SY-UNAME TO TEXT+6.
        IT_OBJBIN = TEXT.
        APPEND IT_OBJBIN. CLEAR IT_OBJBIN.
        CLEAR: w_status, W_MATNR,
                 W_MTART, w_werks, w_lgort .
       w_sno   = 's no'.
        w_status = 'status'.
        W_MATNR = 'Mat No.'.
        W_MTART = 'Mat Type'.
        W_werks = 'werks'.
        w_lgort = 'lgort'.
        CONCATENATE  w_status W_MATNR  W_MTART W_werks w_lgort
                   INTO W_LONGTEXT SEPARATED BY ','.
        IT_OBJBIN = W_LONGTEXT.
        APPEND IT_OBJBIN. CLEAR IT_OBJBIN.
        LOOP AT IT_TAB2.
          DO.
            ASSIGN COMPONENT SY-INDEX OF STRUCTURE IT_TAB2 TO <FIELD>.
            IF SY-SUBRC <> 0.
              EXIT.
            ENDIF.
            SEARCH <FIELD> FOR ',' IN CHARACTER MODE.
            IF SY-SUBRC = 0.
              CONCATENATE '"' <FIELD> '"' INTO <FIELD> IN CHARACTER MODE.
            ENDIF.
            IF SY-INDEX = 1.
              I_DLOAD-DLOAD = <FIELD>.
              SHIFT: I_DLOAD-DLOAD  LEFT DELETING LEADING SPACE.
            ELSE.
              SHIFT: I_DLOAD-DLOAD  LEFT DELETING LEADING SPACE.
              CONCATENATE I_DLOAD-DLOAD <FIELD> INTO I_DLOAD-DLOAD
                          SEPARATED BY ',' IN CHARACTER MODE.
            ENDIF.
          ENDDO.
          IT_OBJBIN = I_DLOAD-DLOAD.
          APPEND IT_OBJBIN. CLEAR IT_OBJBIN.
        ENDLOOP.
      ENDIF.
    ENDIF.

  • Read multi-tabbed excel file attachments from Sender Mail Adapter.

    There is a need to read excel attachments from incoming email to a
    mailbox. We know we can use Sender Mail adapter to easily read .xml, .txt
    or .csv attachments.
    For excel attachments we know from SDN that you have to write
    adapter modules to handle excel. However the excel file we need to read has
    multiple worksheets(tabs) and data may be contained in any of them.
    Is it possible to use SAP XI Mailsender adapter to read such a file as an attachment? What kind of module development would we need for this? I am not much of a Java programmer so examples or links to other documentation would help.
    Thanks,
    Rudra

    Rudra,
    Use Java Mapping.  There is a free java api available called JExcelAPI to achieve this. 
    Shabarish's blog describes about this.  This might be helpful to you
    /people/shabarish.vijayakumar/blog/2009/04/05/excel-files--how-to-handle-them-in-sap-xipi-the-alternatives

  • Issue with 3 attachments in an email

    Hi All,
    Anybody can send me the program which generates 3 excel sheets as an attachment. i wrote one program which geberates .txt files as an atatchmetns.
    thanks,
    maheedhar

    hi,
    following is the code which uses both formats PDF and CSV OR XLS.
    *&  Report  Z_SEND_JOB.                                                &*
    *& Title            : Send spool lists with PDF / CSV attachments.     &*
    *& Program name     : Z_SEND_JOB.                                      &*
    *& Source Code Type : Report                                           &*
    report  z_send_job.
    *                           INCLUDE                                    *
    include z_send_job_data.
    include z_send_job_pai.
    *                    AT SELECTION-SCREEN.                              *
    at selection-screen.
      if s_email1[] is initial.
        message s899(mm) with 'Please Enter E-Mail id'.
        stop.
      endif.
      if p_spool is initial and p_tcode is initial and p_pgna is initial and p_sch is initial.
        message s899(mm) with 'Please enter Spool Number or Tcode or Program name or created by'.
        stop.
      endif.
    *                    START-OF-SELECTION.                               *
    start-of-selection.
      perform get_job_details.
      if not p_pdf is initial.
    *process to send as pdf attachment
        perform convert_spool_to_pdf.
        perform process_email.
      else.
    *process to send as excel attachment
        perform convert_spool_excel.
        if not it_spool_xls_return[] is initial.
          perform process_email.
        else.
          message i000(0) with 'Cannot Send this spool as an Excel File'.
        endif.
      endif.
    *iinclude z_send_job_data.
    *&  Include           Z_SEND_JOB_DATA
    *                       Tables Workarea                                *
    tables: somlreci1,
             tbtcp.
    *                       TYPE-POOLS                                     *
    type-pools: truxs.
    *                           CONSTANTS                                  *
    constants: c_no(1) type c value ' ',
               c_device(4) type c value 'LOCL'.
    *                   GLOBAL DATA DECLARATIONS                           *
    data : gd_recsize type i.
    data : l_format(3) type c.
    *Job Runtime Parameters
    data : gd_eventid like tbtcm-eventid,
           gd_eventparm like tbtcm-eventparm,
           gd_external_program_active like tbtcm-xpgactive,
           gd_jobcount like tbtcm-jobcount,
           gd_jobname like tbtcm-jobname,
           gd_stepcount like tbtcm-stepcount,
           gd_error type sy-subrc,
           gd_reciever type sy-subrc.
    data : w_recsize type i.
    data : gd_subject like sodocchgi1-obj_descr,
           it_mess_bod like solisti1 occurs 0 with header line,
           it_mess_att like solisti1 occurs 0 with header line,
           gd_sender_type like soextreci1-adr_typ,
           gd_attachment_desc type so_obj_nam,
           gd_attachment_name type so_obj_des.
    *Spool to PDF conversions
    data : gd_spool_nr like tsp01-rqident ,
           gd_destination like rlgrap-filename,
           gd_bytecount like tst01-dsize,
           gd_buffer type string.
    data : gv_client type tsp01-rqclient,
           gv_name   type tsp01-rqo1name,
           gv_type   type  rststype-type,
           gv_objtype   type  rststype-type,
           gv_is_otf(1) type  c value ' ',
    *         GV_SPOOL   type  i,
           gv_pdfspoolid type tsp01-rqident,
           gv_jobname    type tbtcjob-jobname,
           gv_jobcount   type tbtcjob-jobcount.
    *                       Field Strings                                  *
    *Spool IDs
    types: begin of t_tbtcp.
            include structure tbtcp.
    types: end of t_tbtcp.
    *for excel
    types: begin of t_spool.
            include structure bapixmspoo.
    types: end of t_spool.
    *                     Internal Tables                                  *
    data: it_tbtcp type standard table of t_tbtcp initial size 0,
          wa_tbtcp type t_tbtcp.
    *Binary store for PDF
    data: begin of it_pdf_output occurs 0.
            include structure tline.
    data: end of it_pdf_output.
    data t_spools type standard table of t_spool with default key.
    data : it_spool_xls        like   t_spools with header line.
    data : it_spool_xls_return type   truxs_t_text_data.
    data: wa_spool_xls_return(255) type c.
    data:   it_message type standard table of solisti1 initial size 0
                    with header line.
    data:   it_attach type standard table of solisti1 initial size 0
                    with header line.
    data : begin of gt_spool_file occurs 0,
               tdline(2500) type c,
           end of gt_spool_file.
    *                    Selection Screen                                  *
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_email1 for  somlreci1-receiver
                                  no intervals.
    parameter: p_spool like tbtcp-listident,
               p_tcode like tstc-tcode,
               p_pgna like tstc-pgmna,
               p_sch like tbtcp-sdluname default sy-uname.
    selection-screen end of block b1.
    selection-screen begin of block b2 with frame title text-002.
    parameter: p_pdf radiobutton group g1 default 'X',
               p_excel radiobutton group g1.
    selection-screen end of block b2.
    *include z_send_job_pai
    *&  Include           Z_SEND_JOB_PAI
    *&      Form  GET_JOB_DETAILS
    form get_job_details .
      data : l_spool(10) type c.
      if p_spool is initial.
    *IF USER ENTER tcode get program name
        if not p_tcode is initial.
          select single pgmna into p_pgna from tstc
                                          where tcode = p_tcode.
        endif.
    *get spool if for program name.
        if not p_pgna is initial.
          if p_sch is initial.
            select listident into l_spool from tbtcp    "GD_SPOOL_NR
                                    up to 1 rows
                                    where progname = p_pgna
                                    order by listident descending.
            endselect.
            if sy-subrc eq 0.
              move : l_spool to gd_spool_nr.
            endif.
          else.
            select listident into l_spool from tbtcp
                                up to 1 rows
                                where progname = p_pgna
                                and sdluname = p_sch
                                order by listident descending.
            endselect.
            if sy-subrc eq 0.
              move : l_spool to gd_spool_nr.
            endif.
          endif.
        endif.
    *get spool id with usr name
        if not p_sch is initial and p_pgna is initial.
          select listident into l_spool from tbtcp
                                  up to 1 rows
                                  where sdluname = p_sch
                                  order by listident descending.
          endselect.
          if sy-subrc eq 0.
            move : l_spool to gd_spool_nr.
          endif.
        endif.
      else.
        gd_spool_nr = p_spool.
      endif.
      if gd_spool_nr is initial.
        message s899(mm) with 'Spool not found'.
        stop.
      endif.
    endform.                    " GET_JOB_DETAILS
    *&      Form  CONVERT_SPOOL_TO_PDF
    form convert_spool_to_pdf .
      call function 'RSPO_RETURN_SPOOLJOB'
        exporting
          rqident              = gd_spool_nr
          first_line           = 1
          last_line            = 1000
          desired_type         = 'RAW'
        tables
          buffer               = gt_spool_file
        exceptions
          no_such_job          = 1
          job_contains_no_data = 2
          selection_empty      = 3
          no_permission        = 4
          can_not_access       = 5
          read_error           = 6
          type_no_match        = 7
          others               = 8.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      select single rqclient
                    rqo1name
                    into (gv_client, gv_name)
                    from tsp01
                    where rqident = gd_spool_nr.
      call function 'RSTS_GET_ATTRIBUTES'
        exporting
          authority     = 'SP01'
          client        = gv_client
          name          = gv_name
          part          = 1
        importing
          type          = gv_type
          objtype       = gv_objtype
        exceptions
          fb_error      = 1
          fb_rsts_other = 2
          no_object     = 3
          no_permission = 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.
      if gv_objtype(3) = 'OTF'.
        gv_is_otf = 'X'.
      else.
        gv_is_otf = space.
      endif.
      if gv_is_otf eq 'X'.
        call function 'CONVERT_OTFSPOOLJOB_2_PDF'
          exporting
            src_spoolid   = gd_spool_nr
            no_dialog     = ' '
          importing
            pdf_bytecount = gd_bytecount
            pdf_spoolid   = gv_pdfspoolid
            btc_jobname   = gv_jobname
            btc_jobcount  = gv_jobcount
          tables
            pdf           = it_pdf_output.
      else.
        call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
          exporting
            src_spoolid              = gd_spool_nr
            no_dialog                = c_no
            dst_device               = c_device
          importing
            pdf_bytecount            = gd_bytecount
          tables
            pdf                      = it_pdf_output
          exceptions
            err_no_abap_spooljob     = 1
            err_no_spooljob          = 2
            err_no_permission        = 3
            err_conv_not_possible    = 4
            err_bad_destdevice       = 5
            user_cancelled           = 6
            err_spoolerror           = 7
            err_temseerror           = 8
            err_btcjob_open_failed   = 9
            err_btcjob_submit_failed = 10
            err_btcjob_close_failed  = 11
            others                   = 12.
      endif.
      if sy-subrc eq 0.
    * Transfer the 132-long strings to 255-long strings
        loop at it_pdf_output.
          translate it_pdf_output using ' ~'.
          concatenate gd_buffer it_pdf_output into gd_buffer.
        endloop.
        translate gd_buffer using '~ '.
        do.
          it_mess_att = gd_buffer.
          append it_mess_att.
          shift gd_buffer left by 255 places.
          if gd_buffer is initial.
            exit.
          endif.
        enddo.
      endif.
    endform.                    " CONVERT_SPOOL_TO_PDF
    *&      Form  PROCESS_EMAIL
    form process_email .
      if not p_pdf is initial.
        describe table it_mess_att lines gd_recsize.
      else.
        describe table it_spool_xls_return lines gd_recsize.
      endif.
      check gd_recsize > 0.
      perform send_email.
    endform.                    " PROCESS_EMAIL
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
    form send_file_as_email_attachment
         tables it_message
                it_attach
         using p_mtitle
               p_format
               p_filename
               p_attdescription
               p_sender_address
               p_sender_addres_type
               changing p_error
               p_reciever.
      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.
      data: t_packing_list         like sopcklsti1 occurs 0 with header line,
            t_contents             like solisti1 occurs 0 with header line,
            t_receivers            like somlreci1 occurs 0 with header line,
            t_attachment           like solisti1 occurs 0 with header line,
            t_object_header        like solisti1 occurs 0 with header line,
            w_cnt                  type i,
            w_sent_all(1)          type c,
            w_doc_data             like sodocchgi1.
      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.
    * do the follwoing 3 times with three different internal tables.
      t_attachment[] = it_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.
      loop at s_email1.
        t_receivers-receiver   = s_email1-low.
        t_receivers-rec_type   = 'U'.
        t_receivers-com_type   = 'INT'.
        t_receivers-notif_del  = 'X'.
        t_receivers-notif_ndel = 'X'.
        append t_receivers.
      endloop.
      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.
      if ld_error ne 0.
        message s899(mm) with 'Error while sending email'.
        stop.
      else.
        message s899(mm) with 'Email sent succesfully'.
      endif.
    * Populate zreceiver return code
      loop at t_receivers.
        ld_receiver = t_receivers-retrn_code.
      endloop.
    endform.                    " SEND_FILE_AS_EMAIL_ATTACHMENT
    *&      Form  SEND_EMAIL                                               &*
    form send_email. " USING  P_EMAIL.
      data p_sender like somlreci1-receiver.
      data l_sub(50) type c.
      refresh it_mess_bod.
    * Default subject matter
      if not p_pdf is initial.
        gd_subject = 'SAP Report Spool Output - .pdf File Attachment'.
        gd_attachment_desc = 'spooldata'.
        it_mess_bod = 'SAP Report Spool Output - .pdf File Attachment'.
        append it_mess_bod.
      else.
        gd_subject = 'SAP Report Spool Output - .xls File Attachment'.
        gd_attachment_desc = 'spooldata'.
        it_mess_bod = 'SAP Report Spool Output - .xls File Attachment'.
        append it_mess_bod.
      endif.
    * If no sender specified - default blank
      if p_sender eq space.
        gd_sender_type = space.
      else.
        gd_sender_type = 'INT'.
      endif.
      if not p_tcode is initial.
        concatenate 'Attachment from TNS' p_tcode into l_sub separated by space.
      elseif not p_pgna is initial.
        concatenate 'Attachment from program' p_pgna into l_sub separated by space.
      elseif not p_spool is initial.
        concatenate 'Attachment from spool' p_spool into l_sub separated by space.
      else.
        concatenate 'Attachment from user' p_sch into l_sub separated by space.
      endif.
      if not p_pdf is initial.
        l_format = 'PDF'.
      else.
        l_format = 'XLS'.
        it_mess_att[] = it_spool_xls_return[].
      endif.
    * Send file by email according to the selection file format (.PDF,.XLS File)
      perform send_file_as_email_attachment
              tables it_mess_bod
                     it_mess_att
              using l_sub
                    l_format
                    gd_attachment_name
                    gd_attachment_desc
                    p_sender
                    gd_sender_type
              changing gd_error
                    gd_reciever.
    endform.                    " SEND_EMAIL
    *&      Form  convert_spool_excel                                      &*
    form convert_spool_excel .
      data : lv_spool like tsp01-rqident,
             l_count  type sy-tfill,
             l_tabix  type sy-tabix.
      lv_spool = gd_spool_nr.
      call function 'RSPO_RETURN_ABAP_SPOOLJOB'
        exporting
          rqident              = lv_spool
          first_line           = 1
        tables
          buffer               = it_spool_xls
        exceptions
          no_such_job          = 1
          not_abap_list        = 2
          job_contains_no_data = 3
          selection_empty      = 4
          no_permission        = 5
          can_not_access       = 6
          read_error           = 7
          others               = 8.
      if sy-subrc ne 0.
        message s899(mm) with 'Error while reading spool'.
        stop.
      endif.
      call function 'SAP_CONVERT_TO_CSV_FORMAT'
        exporting
          i_field_seperator    = '|'
          i_line_header        = '-'
          i_filename           = 'TEST'
        tables
          i_tab_sap_data       = it_spool_xls
        changing
          i_tab_converted_data = it_spool_xls_return
        exceptions
          conversion_failed    = 1
          others               = 2.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      data : l_length(3) type c.
    *change the format to excel by using the object classes
      loop at it_spool_xls_return into wa_spool_xls_return.
        condense wa_spool_xls_return.
    *  l_length = strlen( wa_spool_xls_return ).
    *  l_length = l_length - 3.
    **delete header lines if contains any
        if  wa_spool_xls_return cp '|--*--|'
        or  wa_spool_xls_return np '*|*|*|*'.
          delete it_spool_xls_return.
          clear wa_spool_xls_return.
    *      concatenate cl_abap_char_utilities=>newline wa_SPOOL_XLS_RETURN
    *      into wa_SPOOL_XLS_RETURN.
    *      modify it_spool_xls_return from wa_spool_xls_return.
    *      clear wa_spool_xls_return.
        else.
    *If not new line then replace '|' by tabs
          if not wa_spool_xls_return eq cl_abap_char_utilities=>newline.
            if wa_spool_xls_return ca '|'.
              concatenate cl_abap_char_utilities=>newline wa_spool_xls_return
    *        cl_abap_char_utilities=>horizontal_tab
              into wa_spool_xls_return.
              replace all occurrences of '|' in wa_spool_xls_return
              with cl_abap_char_utilities=>horizontal_tab.
    *get rid of '-' symbol if contains any
    *        if wa_SPOOL_XLS_RETURN CA '-'. "or not wa_SPOOL_XLS_RETURN CA '|'.
    *          CLEAR wa_SPOOL_XLS_RETURN.
    *          concatenate cl_abap_char_utilities=>newline wa_SPOOL_XLS_RETURN
    *          cl_abap_char_utilities=>horizontal_tab
    *          into wa_SPOOL_XLS_RETURN.
    *        endif.
              replace all occurrences of '.' in wa_spool_xls_return
              with space.
              condense wa_spool_xls_return.
              modify it_spool_xls_return from wa_spool_xls_return.
    *          wa_SPOOL_XLS_RETURN = cl_abap_char_utilities=>newline.
    *          IF l_count NE 0 .
    **        l_tabix = l_tabix + 1.
    **Insert new line for the excel data
    **        if sy-tabix gt 1.
    **          INSERT wa_SPOOL_XLS_RETURN INTO it_SPOOL_XLS_RETURN INDEX l_tabix.
    **        endif.
    *            l_count = l_count - 1.
    *          ENDIF.
              clear wa_spool_xls_return.
            else.
              delete it_spool_xls_return.
              clear wa_spool_xls_return .
    *          concatenate cl_abap_char_utilities=>newline wa_SPOOL_XLS_RETURN
    **        cl_abap_char_utilities=>horizontal_tab
    *          into wa_SPOOL_XLS_RETURN.
    *          modify it_SPOOL_XLS_RETURN from wa_SPOOL_XLS_RETURN.
    *          clear wa_SPOOL_XLS_RETURN.
            endif.
          endif.
        endif.
      endloop.
    endform.                    " convert_spool_excel

  • Sender mail adapter - attachment name

    Hi there
    We have configured a sender email adapter to receive text/csv attachments and save them to a file system. What we are having a problem with is reading the attachment name. So we are using Dynamis Configuration to create the file name using the subject line - Which is not ideal. Ideally we would like to use the same name as the origianl attachment but haven't found any way of doing that. We even tried using Content-type in the Variable Header (XHeaderName1) suing variable transport binding but it doesn't show up in the Dynamic Config part of the SOAP message.
    Is there any way of reading the name of the file attachment? We are on PI release 7.0.
    Any help would be appreciated.
    Cheers
    Salil

    Hi Vitor
    There are 2 scenarios that I can think of -
    1. You are saving the email attachment as a file. In that case use step 3 in the earlier reply to get the attachment name and save the file witht that name.
    2. You are sending the XML straight to a receiver using HTTP, IDOC, JDBC etc. in which case you would need the attachment name much earlier that step 3. For that I guess you would have to write another adapter module on the sender mail adapter(at Position 3 where position1 = payloadswap bean, 2 = custom module to get the attachment name) and add an xml tag to your incoming message. These adapter modules are really powerful and are like user exits in ABAP. In that case you would have to change the Data Type in the Integration repository to reflect that extra tag. Here is some code from a module we wrote to totally change the structure of the xml coming in. The key thing to remember is this module is that you can read the whole message byte by byte. There might be smarter ways of doing it (like using the SAP XML parser factory class) but since I'm not a Java programmer I stuck to the basics. Here's the code( you could also look at the example given in sap help where they remove (or add I'm not sure) CR(carriage return) from CRLF (CR Line feed).
    Created on Aug 8, 2007
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package jdbcPackage;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.mp.module.*;
    import com.sap.aii.af.ra.ms.api.*;
    @author Salil.Mehta Soltius NZ Ltd
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class jdbcClass implements SessionBean, Module {
         private SessionContext myContext;
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
         public void ejbCreate() throws CreateException {
         public ModuleData process(
              ModuleContext moduleContext,
              ModuleData inputModuleData)
              throws ModuleException {
              //        put your code here
              try {
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   XMLPayload payload = msg.getDocument();
                   String payEnc = payload.getEncoding();
                   byte[] payByte = payload.getContent();
                   byte[] payByteOut = new byte[payByte.length];
                   byte[] payByteTemp = new byte[payByte.length];
                   int i;
                   int j;
                   int actualCount = 0;
                   char xmlTagFound = ' ';
                   char endXmlTagFound = ' ';
                   char tagFound = ' ';
                   System.arraycopy(payByte, 0, payByteTemp, 0, payByte.length);
                   // Step 1 - Conversions 
                   // convert   "&lt; to <"    and     "&gt; to >"
                   // convert   &quot; to "
                   // This will remove any carriage returns and line feeds
                   // and the <XML* and </XML* tags plus the <row> and </row> tags
                   for (i = 0; i < payByte.length; i++) {
                        // convert   &lt; to <    and     &gt; to >
                        if (payByteTemp<i> == '&') {
                             if (payByteTemp[i + 1] == 'l') {
                                  if (payByteTemp[i + 2] == 't') {
                                       if (payByteTemp[i + 3] == ';') {
                                            payByteTemp<i> = '<';
                                            payByteTemp[i + 1] = '\n';
                                            payByteTemp[i + 2] = '\n';
                                            payByteTemp[i + 3] = '\n';
                        if (payByteTemp<i> == '&') {
                             if (payByteTemp[i + 1] == 'g') {
                                  if (payByteTemp[i + 2] == 't') {
                                       if (payByteTemp[i + 3] == ';') {
                                            payByteTemp<i> = '>';
                                            payByteTemp[i + 1] = '\n';
                                            payByteTemp[i + 2] = '\n';
                                            payByteTemp[i + 3] = '\n';
                        if (payByteTemp<i> == '&') {
                             if (payByteTemp[i + 1] == 'q') {
                                  if (payByteTemp[i + 2] == 'u') {
                                       if (payByteTemp[i + 3] == 'o') {
                                            if (payByteTemp[i + 4] == 't') {
                                                 if (payByteTemp[i + 5] == ';') {
                                                      payByteTemp<i> = '"';
                                                      payByteTemp[i + 1] = '\n';
                                                      payByteTemp[i + 2] = '\n';
                                                      payByteTemp[i + 3] = '\n';
                                                      payByteTemp[i + 4] = '\n';
                                                      payByteTemp[i + 5] = '\n';
                        // This will take in the initial xml declaration from the Byte array
                        // And we also don't want the stuff after the xml declaration till
                        // we reach the first <row> tag     
                        if (xmlTagFound == ' ') {
                             if (payByteTemp<i> == '>') {
                                  xmlTagFound = 'X';
                             payByteOut[actualCount++] = payByteTemp<i>;
                             if (xmlTagFound == 'X') {
                                  payByteOut[actualCount++] = '\r';
                             continue;
                        if (xmlTagFound == 'X') {
                             if (payByteTemp<i> == '<') {
                                  if (payByteTemp[i + 1] == 'r') {
                                       if (payByteTemp[i + 2] == 'o') {
                                            if (payByteTemp[i + 3] == 'w') {
                                                 if (payByteTemp[i + 4] == '>') {
                                                      xmlTagFound = 'Y';
                                                 } else {
                                                      continue;
                                            } else {
                                                 continue;
                                       } else {
                                            continue;
                                  } else {
                                       continue;
                             } else {
                                  continue;
                        // Carriage return and line feed
                        if ((payByteTemp<i> == '\r') || (payByteTemp<i> == '\n')) {
                             continue;
                        // <XML_*> tag
                        if (payByteTemp<i> == '<') {
                             if (payByteTemp[i + 1] == 'X') {
                                  if (payByteTemp[i + 2] == 'M') {
                                       if (payByteTemp[i + 3] == 'L') {
                                            tagFound = 'X';
                                            endXmlTagFound = ' ';
                                            continue;
                        // </XML_*> tag
                        if (payByteTemp<i> == '<') {
                             if (payByteTemp[i + 1] == '/') {
                                  if (payByteTemp[i + 2] == 'X') {
                                       if (payByteTemp[i + 3] == 'M') {
                                            if (payByteTemp[i + 4] == 'L') {
                                                 tagFound = 'X';
                                                 endXmlTagFound = 'X';
                                                 continue;
                        // <row> tag
                        if (payByteTemp<i> == '<') {
                             if (payByteTemp[i + 1] == 'r') {
                                  if (payByteTemp[i + 2] == 'o') {
                                       if (payByteTemp[i + 3] == 'w') {
                                            if (payByteTemp[i + 4] == '>') {
                                                 tagFound = 'X';
                                                 continue;
                        // </row> tag
                        if (payByteTemp<i> == '<') {
                             if (payByteTemp[i + 1] == '/') {
                                  if (payByteTemp[i + 2] == 'r') {
                                       if (payByteTemp[i + 3] == 'o') {
                                            if (payByteTemp[i + 4] == 'w') {
                                                 if (payByteTemp[i + 5] == '>') {
                                                      tagFound = 'X';
                                                      continue;
                        if ((payByteTemp<i> == '>') && (tagFound == 'X')) {
                             tagFound = ' ';
                             continue;
                        if (tagFound == ' ') {
                             if (endXmlTagFound == 'X') {
                                  continue;
                             payByteOut[actualCount++] = payByteTemp<i>;
                   byte[] payByteExp = new byte[actualCount];
                   System.arraycopy(payByteOut, 0, payByteExp, 0, actualCount);
                   payload.setContent(payByteExp);
                   msg.setDocument(payload);
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {
                   ModuleException me = new ModuleException(e);
                   throw me;
              return inputModuleData;

  • Email with HTML in body

    Hi.
    I'm look for a way to send an Email with an HTML not as an attachment (this I know how to do) but in the email body.
    The reason is that sometimes we want to allow the user to see the data without having to open their HTML browser.
    I've searched this forum and other and couldn't find anything relevant.
    By the way I'm on 4.6c.
    thanx in advance.
    ayal.

    Dear Vijay.
    I've tried it before I posted this message and also now I copied Rich's code to make sure I haven't left anything.
    I get the Email allright, but instead of seing an HTML I see the HTML code itself in the body.
    Do I need to do some system configuration like the conversion we do for CSV attachments?
    thanx
    ayal.

  • Send  mail through PL/SQL

    hi,
    I am working in oracle9i and linux 2.4. I need to send a mail from pl/sql along with attachments.
    I wrote a pl/sql procedure about how to send a mail with out attachments..
    but i want to send a mail from pl/sql along with (csv )attachments ..
    That file we have to retrive it from the Directory in the database and to send it through pl/sql using smtp configuration....
    Regs

    APC,
    When I was making use of your sample on OTN that is called 'demo_mail.sql', I got these issues (when compiling the package header against one 10g DB)
    21/19 PL/SQL: Declaration ignored
    21/65 PLS-00201: identifier 'UTL_TCP' must be declared
    22/19 PL/SQL: Declaration ignored
    23/47 PLS-00201: identifier 'UTL_TCP' must be declared
    47/3 PL/SQL: Declaration ignored
    52/16 PLS-00201: identifier 'UTL_SMTP' must be declared
    55/3 PL/SQL: Declaration ignored
    55/46 PLS-00201: identifier 'UTL_SMTP' must be declared
    60/3 PL/SQL: Declaration ignored
    60/49 PLS-00201: identifier 'UTL_SMTP' must be declared
    64/3 PL/SQL: Declaration ignored
    64/45 PLS-00201: identifier 'UTL_SMTP' must be declared
    72/3 PL/SQL: Declaration ignored
    72/52 PLS-00201: identifier 'UTL_SMTP' must be declared
    81/3 PL/SQL: Declaration ignored
    81/54 PLS-00201: identifier 'UTL_SMTP' must be declared
    95/3 PL/SQL: Declaration ignored
    95/57 PLS-00201: identifier 'UTL_SMTP' must be declared
    102/3 PL/SQL: Declaration ignored
    102/47 PLS-00201: identifier 'UTL_SMTP' must be declared
    Bst Rgds,
    HuaMin

  • Attachments in Apple Mail scrambled

    When I try to look at attachments (PDFs and Word docs) in Apple Mail they sometimes (but not always) get converted into scrambled text that is embedded at the bottom of the email. Like this....
    ----NEXT_BM_AB726E6E67FB42CBAC2285AF00AF803D
    Content-Type: application/pdf; name="=?iso-8859-1?Q?Travel_Itinerary_-_,1094144.pdf?="
    Content-Transfer-Encoding: base64
    Content-Description: =?iso-8859-1?Q?Travel_Itinerary_-_,1094144.pdf?Content-Disposition: attachment; filename="=?iso-8859-1?Q?_Travel_Itinerary_-,1094144.pdf?="
    Content-ID: <B00E5BC3912B47F89037FC84414DADBD>
    JVBERi0xLjMgCiXi48/TIAoxIDAgb2JqIAo8PCAKL1R5cGUgL0NhdGFsb2cg
    Ci9QYWdlcyAyIDAgUiAKL1BhZ2VNb2RlIC9Vc2VOb25lIAovVmlld2VyUHJl
    ZmVyZW5jZXMgPDwgCi9GaXRXaW5kb3cgdHJ1ZSAKL1BhZ2VMYXlvdXQgL1Np
    bmdsZVBhZ2UgCi9Ob25GdWxsU2NyZWVuUGFnZU1vZGUgL1VzZU5vbmUgCj4+
    IAo+PiAKZW5kb2JqIAo1IDAgb2JqIAo8PCAKL0xlbmd0aCAxNzEzIAovRmls
    dGVyIFsgL0ZsYXRlRGVjb2RlIF0gCj4+IApzdHJlYW0KeJzdWN9T2zgQfs9f
    sY90jriSLMl2ns6EUKA0hcQc0xteTCLA18SmtkOP++tvJdnGSRzo3E3bmxsG
    cFarb3/qWzkUCP5Q/PUCBrOl+Uggv+vZh8m7HvUcX+Cj8KTjQl/r5ap31Ut7
    DE57FL72mHQk9F3CnECA4MzxBPQlcajQmlOEOtU6uJlTqcGWPSED/VALFqjl
    W4lwmcNaGvZzS0EK5pA2RiXQKl96jGtfKANKXSeAvt1UOUy5E0hqQ8ZHjKRR
    ny1xs17wtEDWOy5Q2iVvJELHXAsdJojvGvw+fvACl5sPBtwlTrXEqHky/3Dp
    bbK8IwCHGVq7eAVEPxggs7lx8mKn80bKMNFiXdsNhEkeJUKXiwa+TkOz9SDq
    VXmCRhNThpoROnwDvkMhuu3thXO1iJO5gss0eQPRH2gPFTEEiOa9vTP1qBbA
    97d
    If I look on webmail the attachment is there as a PDF and can be opened and read OK, but on Apple Mail its all messed up.
    What can I do to stop this happening?

    HI that is the way many attachments would look in Raw Source...
    Content-Type: image/jpeg; name="image001.jpg"
    Content-Description: image001.jpg
    Content-Disposition: inline; filename="image001.jpg"; size=1823;
        creation-date="Mon, 01 Aug 2011 23:02:12 GMT";
        modification-date="Mon, 01 Aug 2011 23:02:12 GMT"
    Content-ID: <[email protected]>
    Content-Transfer-Encoding: base64
    /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a
    HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy
    MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAApAEoDASIA
    AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA
    AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3
    Only thing that looks strange there is the last part of this...
    application/pdf; name="=?

  • 100% mail environment (imap) some attachments arrive in scrambled type unicode others do not (docx and pdf) files.

    I tested this feature by sending a known (problem file) to my gmail as well as a user in the office. I could read it 100% in gmail, then I just forwarded it to the user that couldnt read it orginially and BAM! they could read it??
    Keep in mind this was a FORWARD that original user couldnt read...
    This happens with SOME .docx files and SOME .pdf files..
    Rebuild mailbox?

    This is what the scrambled attachment looks like (a small sample)
    --Apple-Mail=_1FAB09C6-0D1D-4DF3-9213-96338807C5EF
    Content-Disposition: attachment;
    filename=Document3.docx
    Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document;
    name="Document3.docx"
    Content-Transfer-Encoding: base64
    UEsDBBQABgAIAAAAIQC4K8zjmQEAAEcGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAAC
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

  • When sending a gmail the text and jpeg attachments are scrambling

    Does anyone know why this is?

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.    

  • Attachments not showing up in Mail

    Do anyone have a usable solution for getting attachments to show up correctly in Mail? Every time I receive emails with an Excel or .csv, or for that matter .psd, .pdf or .doc files in them, the attachments never show up in the message body field or listed among the attachments.
    To give you an example: My list view of emails show the email with the paper clip icon and "4 items", but only 3 items are visible from both the preview window and when I open the email.
    I know there is a work around by selecting File > Save attachments, but come on that is not really a viable solution in an office setting when I receive 100-200 html emails with attachments, logos and other stuff on a daily basis.
    Do any of you kind superusers found a usable solution for this problem that doesn't involve saving everything attached from the File menu?
    Br,
    Christian
    And Apple... come on... you have got to be kidding with this #€#%!!! How can you be expected to be taken seriously as a productivity tool when something as simple as receiving attachments doesn't work. I feel like an idiot having purchased a MacBook Pro but still have to use Entourage because the most basic stuff isn't working as intended! (end of rant)

    This sounds like either the sender's or the recipient's (your) mail server is scrambling the attachments. This is becoming more and more common as ISPs try to scan for viruses and phishing attempts. If this is what is going of, it is very easy to detect. If you want, you can send one of these messages to me and I can tell you if my hypothesis is correct. Send the message to info at etresoft dot com and use the "Send Again" feature, not "Forward".

  • How Can I Export Our WIki in a CSV Format?

    Victims of our own success: what was originally created as internal content on our private OS X Server wiki now is being requested for presentation on an externally hosted web service. Management wants this content to be accessible to constituents on the outside in a searchable database on a completely different service not administered by us on the inside.
    The developer building the database has asked for this content to be exported in CSV for easy import into the new database: page title, tags (a.k.a. keywords, not to be confused with HTML formatting tags), and page content.
    Sadly, according to the Wiki Server Admin Guide (p. 73), the Wiki service does not appear to store page content in any kind of database, but rather in separate files. Thus I can't see a way to provide the requested data short of copying and pasting content from each individual wiki page on the OS X Server.
    Considering that we're talking about ~200 pages of content, I'd like to avoid a manual process of that kind. I've been through the official Wiki Server Admin Guide, but it offered no help for exporting content in the way I need.
    I'm fairly comfortable with AppleScript, less so with shell/bash scripting. Since I'm trying to save time, I'm not sure that's my answer on this scale. Debugging a script (for me) might take longer than a simple copy/paste of 200 items (maybe I'm wrong).
    Does anyone have a different way of looking at this I haven't thought of? Am I missing something?
    Thanks in advance,
    Axiom

    Unfortunately, exporting the wiki data into a format that databases can understand is not a trivial process. Pages are stored as a collection of folders that contain the wiki text, the HTML for display, the change history, the comments, and the attachments.
    In a default setup, the page folders are under /Library/Collaboration/Groups/{groupname}/wiki . All folders under Groups can only be viewed by using root access permissions.
    For example, for a wiki page accessed by:
    http://yourserver.com/groups/general/wiki/abc12/mywikipage.html
    Under /Library/Collaboration/Groups/general/wiki
    abc12.page - folder for wiki page
    !- attachments - folder for attachments
    !- images - folder for images
    ! page.html - html (probably a cache) for display
    ! page.plist - property list file with all notes on the
    ! revisions.db - SQLite database file that contains all the revisions.
    You would need a script that runs as the _teamserver user to read every .page directory, parse the .plist files, and generate a SQL statement to preserve all the text, markup, and quotations. If you program really well, you could search for the URLs in every .plist file and record the embedded attachments and images, and copy them to another location.
    For my first project, I parsed the .plist files just to get a map of the random page URL and the title. I also found out about "deleted" and "tombstoned" states, and elected to ignore those.
    If I get a moment I'll write about that next.

Maybe you are looking for

  • Get Row Data from a selected Row in an ALV Grid

    Hello, I create a Custom Control from an intern table. When i do a double click on a row, i call another dynpro. The data of the marked line should be written into an internal table. How i implement this? I tried things like: Call method alv_list->GE

  • HT204053 Need help getting my music from iCloud match to my new macbook

    I recently bought a new MacBook Pro.     I'm finally leaving Wintel behind.  Yay!    Anyway, on my soon-to-be history PC, through my iTunes app on the PC, I paid the 29.95 to join iCloud Match, and it spent a few hours syncining all my itunes songs u

  • New Report including Serial numbers

    Hi all Need to develop a new report Feilds to be included are - PO number, Material code, Serial number , GRN , Goods issue note, text feild what are  the most suiatable tables that i can collect the above information Thanks and Regards Sasika

  • Call to pa_project_pub.add_task

    Dear Experts, I am Trying to Add Task ..That Procedure Runing Everything Fine.. I am Trying to Assign the Attribute Value Through Add Task Program ..That Values are not Updated... Kindly Advice Me.. Given Below The source Code Body { pa_project_pub.a

  • Is it possible to edit the .ini of an executable and be able to add the desired ip addresses for browser access?

    Hi, I created an executable and would like to add browser access ip addresses. Can this be done by editing the corresponding .ini file if so how should I add a new line or can I modified an existing one (key). Thanks