Formating string inside email body

Hi All
How can I format the text that it will be placed in lines at the same level regardless of their length
I have several lines with several length ,that will be sent per mail.
for example
cost per shirt                    100
cost per trousers               200
Total                    300
I have tried with several string functions but the without luck.
Thanks.
Edited by: Malu Mader on Dec 6, 2011 10:14 AM

Hi Soumyaprakash
This could be the solution , but when I am sending the mail I have already my text in a string table
I am looping into it and appending the string I have in the table into the mail body
so I did in this way but the whole string is comming out including the <td> and so on
lt_mailtxt = '<table border="0">' .
APPEND lt_mailtxt.
CLEAR lt_mailtxt.
LOOP AT it_string.
  lt_mailtxt = '<tr>'.
  APPEND lt_mailtxt.
  clear lt_mailtxt .
lt_mailtxt = '<td>' .
  APPEND lt_mailtxt.
   CLEAR lt_mailtxt.
    lt_mailtxt = it_string.
    APPEND lt_mailtxt.
    CLEAR lt_mailtxt.
lt_mailtxt = '</td>' .
  APPEND lt_mailtxt.
lt_mailtxt = '</tr>' .
  APPEND lt_mailtxt.
  ENDLOOP.
lt_mailtxt = '</table>' .
APPEND lt_mailtxt.
CLEAR lt_mailtxt.
What  am I missing... ?
BR

Similar Messages

  • Conditional formatting an html email body

    Hi,
    I'm pulling some data out of a database and creating an email with an html body.  I'd like to highlight some of the rows in a colour if for example a particular column is flagged with a zero, I can call the column "expired".  I need it
    highlighted in html because the users who will be receiving the emails need it as easy as possible....
     I don't know a lot of HTML but do know a little SQL and Powershell.  Here is my code
      #Send email Function    
    function sendMail($messagebody) {
         Write-Host "Sending Email"
         #SMTP server name
         $smtpServer = "xxxxx"
         #Creating a Mail object
         $msg = new-object Net.Mail.MailMessage
         #Creating SMTP server object
         $smtp = new-object Net.Mail.SmtpClient($smtpServer)
         #Email structure
         $msg.From = "sdfsdfs@sdfsdfs"
         $msg.ReplyTo = "dfgfdgdf@dfgdfgd"
         $msg.To.Add("dfgdfg@dfgdfgdf")
         $msg.subject = "**:-)**"
         $msg.IsBodyHtml = $true
         $msg.body = $messagebody
         #Sending email
         $smtp.Send($msg)
    $TableHeader = "e Services"          ##The title of the HTML page
    $OutputFile = "C:\MyReport.htm"         ##The file location
    ##set HTML formatting
    $a = @"
    <style>
    BODY{background-color:white;}
    TABLE{border-width: 1px;
      border-style: solid;
      border-color: black;
      border-collapse: collapse;
    TH{border-width: 1px;
      padding: 0px;
      border-style: solid;
      border-color: black;
      background-color:#C0C0C0
    TD{border-width: 1px;
      padding: 0px;
      border-style: solid;
      border-color: black;
      background-color:white
    </style>
    $body = @"
    <p style="font-size:25px;family:calibri;color:#ff9100">
    $TableHeader
    </p>
    $connString = "Data Source=Localhost\SQLEXPRESS,1433;Initial Catalog=Logons;User Id=Matrix; Password=Q@v652500;"
    $QueryText = "exec dbo.LancasterWayBuildingRelated"
    $SqlConnection = new-object System.Data.SqlClient.SqlConnection
    $SqlConnection.ConnectionString = $connString
    $SqlCommand = $SqlConnection.CreateCommand()
    $SqlCommand.CommandText = "EXEC dbo.LancasterWayBuildingRelated"
    $DataAdapter = new-object System.Data.SqlClient.SqlDataAdapter $SqlCommand
    $dataset = new-object System.Data.Dataset
    $dataAdapter.Fill($dataSet)
    $connection.Close()
    ##Return all of the rows and pipe it into the ConvertTo-HTML cmdlet, and then pipe that into our output file
    $messagebody = $dataSet.Tables | Select-Object -Expand Rows |
    ConvertTo-HTML -head $a –body $body 
    $messagebody | Out-File $OutputFile
    #Write-Host $DataAdapter.Fill($dataset) ' records have been exported.'
    #[string]$all = $dataset.tables[ 0 ] | Out-String
    #Calling email function
    if (!$messagebody) {} else
    {sendMail $messagebody}
    Alter De Ruine

    Hi Sir,
    I would like to check if you need further assistance .
    Best Regards,
    Elton JI
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] .

  • Format of email body in bursting control file

    Hi,
    I am hoping this is a simple question for someone that is not as new as I am to bursting...
    What is the new line character I should be using to format the outgoing email body within the bursting control file.
    At present, the entire email body appears as one paragraph regardless of whether I have included new lines or not. I am no doubt missing something simple given that it is 5.20pm on a Friday.
    Any help is appreciated.
    Kind regards,
    Wes

    Version 11.5.10.2
    XML/BI Publisher Version : 5.6.3
    i have put the log file here for your reference
    XML/BI Publisher Version : 5.6.3
    Request ID: 1691733
    All Parameters: ReportRequestID=1691732:DebugFlag=Y
    Report Req ID: 1691732
    Debug Flag: Y
    Updating request description
    Updated description
    Retrieving XML request information
    Node Name:COLFARMT
    Preparing parameters
    null output =/u3010/app/oracle/UAT/common/admin/out/UAT1_colfarmt/o1691733.out
    inputfilename =/u3010/app/oracle/UAT/common/admin/out/UAT1_colfarmt/o1691732.out
    Data XML File:/u3010/app/oracle/UAT/common/admin/out/UAT1_colfarmt/o1691732.out
    Set Bursting parameters..
    Temp. Directory:/u0350/app/apps/UAT/xx/1.0/log
    [033108_044049404][][STATEMENT] Oracle XML Parser version ::: Oracle XDK Java 9.0.4.0.0 Production
    Start bursting process..
    [033108_044049410][][STATEMENT] /u0350/app/apps/UAT/xx/1.0/log
    [033108_044049474][][STATEMENT] BurstingProcessor ::: Property Key ---> burstng-source
    [033108_044049475][][STATEMENT] Inside burstingConfigParser
    [033108_044049482][oracle.apps.xdo.batch.BurstingProcessorEngine][STATEMENT] ========================> startElement() ::: startDocument is entered <========================
    [033108_044049688][oracle.apps.xdo.batch.BurstingProcessorEngine][STATEMENT] ========================> startElement() ::: startDocument is entered <========================
    [033108_044050177][][STATEMENT] template File/u0350/app/apps/UAT/xx/1.0/data/PurchaseOrder.rtf
    [033108_044050245][][STATEMENT] Logger.init(): *** DEBUG MODE IS OFF. ***
    [033108_044050731][][STATEMENT] [ PDF GENERATOR ]---------------------------------------------
    [033108_044050732][][STATEMENT] XDO version = Oracle XML Publisher 5.6.3
    [033108_044050732][][STATEMENT] java.home = /usr/j2sdk1.4.2_08/jre
    [033108_044050732][][STATEMENT] XDO_TOP = null
    [033108_044050732][][STATEMENT] Config Path = null
    [033108_044050732][][STATEMENT] Debug Cfg Path= null
    [033108_044050733][][STATEMENT] Font dir = /usr/j2sdk1.4.2_08/jre/lib/fonts/
    [033108_044050733][][STATEMENT] Locale = en
    [033108_044050733][][STATEMENT] Fallback font = type1.Helvetica
    [033108_044050733][][STATEMENT] [ PDF GENERATOR PROPERTIES ]----------------------------------
    [033108_044050736][][STATEMENT] digit-substitution=null(not set)
    [033108_044050736][][STATEMENT] font.ALBANY WT J.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ALBANWTJ.ttf
    [033108_044050736][][STATEMENT] font.ALBANY WT K.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ALBANWTK.ttf
    [033108_044050737][][STATEMENT] font.ALBANY WT SC.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ALBANWTS.ttf
    [033108_044050737][][STATEMENT] font.ALBANY WT TC.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ALBANWTT.ttf
    [033108_044050737][][STATEMENT] font.ALBANY WT.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ALBANYWT.ttf
    [033108_044050737][][STATEMENT] font.ANDALE DUOSPACE WT J.normal.bold=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOJB.ttf
    [033108_044050737][][STATEMENT] font.ANDALE DUOSPACE WT J.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOJ.ttf
    [033108_044050738][][STATEMENT] font.ANDALE DUOSPACE WT K.normal.bold=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOKB.ttf
    [033108_044050738][][STATEMENT] font.ANDALE DUOSPACE WT K.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOK.ttf
    [033108_044050738][][STATEMENT] font.ANDALE DUOSPACE WT SC.normal.bold=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOSCB.ttf
    [033108_044050738][][STATEMENT] font.ANDALE DUOSPACE WT SC.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOSC.ttf
    [033108_044050739][][STATEMENT] font.ANDALE DUOSPACE WT TC.normal.bold=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOTCB.ttf
    [033108_044050739][][STATEMENT] font.ANDALE DUOSPACE WT TC.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOTC.ttf
    [033108_044050739][][STATEMENT] font.ANDALE DUOSPACE WT.normal.bold=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOB.ttf
    [033108_044050739][][STATEMENT] font.ANDALE DUOSPACE WT.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUO.ttf
    [033108_044050739][][STATEMENT] font.CG TIMES.italic.bold=type1.Times-BoldItalic
    [033108_044050739][][STATEMENT] font.CG TIMES.italic.normal=type1.Times-Italic
    [033108_044050740][][STATEMENT] font.CG TIMES.normal.bold=type1.Times-Bold
    [033108_044050741][][STATEMENT] font.CG TIMES.normal.normal=type1.Times-Roman
    [033108_044050741][][STATEMENT] font.COURIER NEW.italic.bold=type1.Courier-BoldOblique
    [033108_044050741][][STATEMENT] font.COURIER NEW.italic.normal=type1.Courier-Oblique
    [033108_044050741][][STATEMENT] font.COURIER NEW.normal.bold=type1.Courier-Bold
    [033108_044050741][][STATEMENT] font.COURIER NEW.normal.normal=type1.Courier
    [033108_044050742][][STATEMENT] font.COURIER.italic.bold=type1.Courier-BoldOblique
    [033108_044050742][][STATEMENT] font.COURIER.italic.normal=type1.Courier-Oblique
    [033108_044050742][][STATEMENT] font.COURIER.normal.bold=type1.Courier-Bold
    [033108_044050742][][STATEMENT] font.COURIER.normal.normal=type1.Courier
    [033108_044050742][][STATEMENT] font.DEFAULT.italic.bold=type1.Helvetica-BoldOblique
    [033108_044050742][][STATEMENT] font.DEFAULT.italic.normal=type1.Helvetica-Oblique
    [033108_044050743][][STATEMENT] font.DEFAULT.normal.bold=type1.Helvetica-Bold
    [033108_044050743][][STATEMENT] font.DEFAULT.normal.normal=type1.Helvetica
    [033108_044050743][][STATEMENT] font.HELVETICA.italic.bold=type1.Helvetica-BoldOblique
    [033108_044050743][][STATEMENT] font.HELVETICA.italic.normal=type1.Helvetica-Oblique
    [033108_044050743][][STATEMENT] font.HELVETICA.normal.bold=type1.Helvetica-Bold
    [033108_044050743][][STATEMENT] font.HELVETICA.normal.normal=type1.Helvetica
    [033108_044050743][][STATEMENT] font.MONOSPACE.italic.bold=type1.Courier-BoldOblique
    [033108_044050744][][STATEMENT] font.MONOSPACE.italic.normal=type1.Courier-Oblique
    [033108_044050744][][STATEMENT] font.MONOSPACE.normal.bold=type1.Courier-Bold
    [033108_044050744][][STATEMENT] font.MONOSPACE.normal.normal=type1.Courier
    [033108_044050744][][STATEMENT] font.SANS-SERIF.italic.bold=type1.Helvetica-BoldOblique
    [033108_044050744][][STATEMENT] font.SANS-SERIF.italic.normal=type1.Helvetica-Oblique
    [033108_044050744][][STATEMENT] font.SANS-SERIF.normal.bold=type1.Helvetica-Bold
    [033108_044050745][][STATEMENT] font.SANS-SERIF.normal.normal=type1.Helvetica
    [033108_044050745][][STATEMENT] font.SERIF.italic.bold=type1.Times-BoldItalic
    [033108_044050745][][STATEMENT] font.SERIF.italic.normal=type1.Times-Italic
    [033108_044050745][][STATEMENT] font.SERIF.normal.bold=type1.Times-Bold
    [033108_044050745][][STATEMENT] font.SERIF.normal.normal=type1.Times-Roman
    [033108_044050745][][STATEMENT] font.SYMBOL.normal.normal=type1.Symbol
    [033108_044050746][][STATEMENT] font.TIMES NEW ROMAN.italic.bold=type1.Times-BoldItalic
    [033108_044050746][][STATEMENT] font.TIMES NEW ROMAN.italic.normal=type1.Times-Italic
    [033108_044050746][][STATEMENT] font.TIMES NEW ROMAN.normal.bold=type1.Times-Bold
    [033108_044050746][][STATEMENT] font.TIMES NEW ROMAN.normal.normal=type1.Times-Roman
    [033108_044050746][][STATEMENT] font.TIMES.italic.bold=type1.Times-BoldItalic
    [033108_044050746][][STATEMENT] font.TIMES.italic.normal=type1.Times-Italic
    [033108_044050747][][STATEMENT] font.TIMES.normal.bold=type1.Times-Bold
    [033108_044050747][][STATEMENT] font.TIMES.normal.normal=type1.Times-Roman
    [033108_044050747][][STATEMENT] font.ZAPFDINGBATS.normal.normal=type1.ZapfDingbats
    [033108_044050747][][STATEMENT] pdf-changes-allowed=0
    [033108_044050749][][STATEMENT] pdf-compression=true
    [033108_044050749][][STATEMENT] pdf-enable-accessibility=true
    [033108_044050749][][STATEMENT] pdf-enable-copying=false
    [033108_044050749][][STATEMENT] pdf-encryption-level=0
    [033108_044050749][][STATEMENT] pdf-font-embedding=true
    [033108_044050749][][STATEMENT] pdf-hide-menubar=false
    [033108_044050750][][STATEMENT] pdf-hide-toolbar=false
    [033108_044050750][][STATEMENT] pdf-no-accff=false
    [033108_044050750][][STATEMENT] pdf-no-cceda=false
    [033108_044050750][][STATEMENT] pdf-no-changing-the-document=true
    [033108_044050750][][STATEMENT] pdf-no-printing=false
    [033108_044050750][][STATEMENT] pdf-open-password=
    [033108_044050751][][STATEMENT] pdf-permissions=0
    [033108_044050751][][STATEMENT] pdf-permissions-password=
    [033108_044050751][][STATEMENT] pdf-printing-allowed=0
    [033108_044050751][][STATEMENT] pdf-replace-smartquotes=true
    [033108_044050751][][STATEMENT] pdf-security=false
    [033108_044050751][][STATEMENT] ------------------------------------------------------
    [033108_044051077][oracle.apps.xdo.common.font.FontFactory$FontDef][STATEMENT] Type1 font created: Helvetica
    [033108_044051091][oracle.apps.xdo.common.font.FontFactory$FontDef][STATEMENT] Type1 font created: Times-Roman
    [033108_044051237][][STATEMENT] WARNING: Old RTF version detected, nested table disabled
    [033108_044052301][][STATEMENT] WARNING: Old RTF version detected, nested table disabled
    [033108_044052383][oracle.apps.xdo.template.rtf.RTF2XSLParser][STATEMENT] Time spent: 1665
    [033108_044052394][oracle.apps.xdo.common.font.FontFactory][STATEMENT] type1.Helvetica closed.
    [033108_044052394][oracle.apps.xdo.common.font.FontFactory][STATEMENT] type1.Times-Roman closed.
    [033108_044052649][][STATEMENT] Logger.init(): *** DEBUG MODE IS OFF. ***
    [033108_044052649][oracle.apps.xdo.template.FOProcessor][STATEMENT] FOProcessor constructor is called.
    [033108_044052901][oracle.apps.xdo.template.FOProcessor][STATEMENT] FOProcessor has been initialized without default config.
    [033108_044052901][oracle.apps.xdo.template.FOProcessor][STATEMENT] FOProcessor.setTemplate(String) is called with '/u0350/app/apps/UAT/xx/1.0/log/033108_044049420/xdo2.tmp'.
    [033108_044052916][][STATEMENT] Logger.init(): *** DEBUG MODE IS OFF. ***
    [033108_044052916][oracle.apps.xdo.template.FOProcessor][STATEMENT] FOProcessor.setData(String) is called with '/u0350/app/apps/UAT/xx/1.0/log/033108_044049420/xdo0.tmp'.
    [033108_044052920][oracle.apps.xdo.template.FOProcessor][STATEMENT] FOProcessor.setOutput(String)is called with '/u0350/app/apps/UAT/xx/1.0/log/033108_044049420/PurchaseOrder 6023571.pdf'.
    [033108_044052948][oracle.apps.xdo.template.FOProcessor][STATEMENT] FOProcessor.setOutputFormat(byte)is called with ID=1.
    [033108_044052950][oracle.apps.xdo.template.FOProcessor][STATEMENT] FOProcessor.generate() called.
    [033108_044052950][oracle.apps.xdo.template.FOProcessor][STATEMENT] createFO(Object, Object) is called.
    [033108_044053858][oracle.apps.xdo.common.xml.XSLT10gR1][STATEMENT] oracle.xdo Developers Kit 10.1.0.3.0 - Production
    [033108_044053859][oracle.apps.xdo.common.xml.XSLT10gR1][STATEMENT] Scalable Feature Disabled
    [033108_044055032][oracle.apps.xdo.template.fo.FOProcessingEngine][STATEMENT] Using proxy for PDF Generator
    [033108_044055064][oracle.apps.xdo.template.FOProcessor][STATEMENT] Calling FOProcessingEngine.process()
    [033108_044055065][][STATEMENT] Using optimized xslt
    [033108_044055100][oracle.apps.xdo.template.fo.datatype.AttrKey][STATEMENT] WARNING: Found undetermined AttrKey: xmlns:xlink
    [033108_044055108][][STATEMENT] [ PDF GENERATOR ]---------------------------------------------
    [033108_044055108][][STATEMENT] XDO version = Oracle XML Publisher 5.6.3
    [033108_044055108][][STATEMENT] java.home = /usr/j2sdk1.4.2_08/jre
    [033108_044055109][][STATEMENT] XDO_TOP = null
    [033108_044055112][][STATEMENT] Config Path = null
    [033108_044055112][][STATEMENT] Debug Cfg Path= null
    [033108_044055112][][STATEMENT] Font dir = /usr/j2sdk1.4.2_08/jre/lib/fonts/
    [033108_044055112][][STATEMENT] Locale = en
    [033108_044055112][][STATEMENT] Fallback font = type1.Helvetica
    [033108_044055112][][STATEMENT] [ PDF GENERATOR PROPERTIES ]----------------------------------
    [033108_044055115][][STATEMENT] digit-substitution=null(not set)
    [033108_044055115][][STATEMENT] font.ALBANY WT J.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ALBANWTJ.ttf
    [033108_044055116][][STATEMENT] font.ALBANY WT K.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ALBANWTK.ttf
    [033108_044055116][][STATEMENT] font.ALBANY WT SC.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ALBANWTS.ttf
    [033108_044055116][][STATEMENT] font.ALBANY WT TC.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ALBANWTT.ttf
    [033108_044055116][][STATEMENT] font.ALBANY WT.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ALBANYWT.ttf
    [033108_044055116][][STATEMENT] font.ANDALE DUOSPACE WT J.normal.bold=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOJB.ttf
    [033108_044055116][][STATEMENT] font.ANDALE DUOSPACE WT J.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOJ.ttf
    [033108_044055116][][STATEMENT] font.ANDALE DUOSPACE WT K.normal.bold=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOKB.ttf
    [033108_044055130][][STATEMENT] font.ANDALE DUOSPACE WT K.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOK.ttf
    [033108_044055130][][STATEMENT] font.ANDALE DUOSPACE WT SC.normal.bold=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOSCB.ttf
    [033108_044055131][][STATEMENT] font.ANDALE DUOSPACE WT SC.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOSC.ttf
    [033108_044055137][][STATEMENT] font.ANDALE DUOSPACE WT TC.normal.bold=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOTCB.ttf
    [033108_044055137][][STATEMENT] font.ANDALE DUOSPACE WT TC.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOTC.ttf
    [033108_044055137][][STATEMENT] font.ANDALE DUOSPACE WT.normal.bold=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUOB.ttf
    [033108_044055138][][STATEMENT] font.ANDALE DUOSPACE WT.normal.normal=truetype./usr/j2sdk1.4.2_08/jre/lib/fonts/ADUO.ttf
    [033108_044055138][][STATEMENT] font.CG TIMES.italic.bold=type1.Times-BoldItalic
    [033108_044055138][][STATEMENT] font.CG TIMES.italic.normal=type1.Times-Italic
    [033108_044055138][][STATEMENT] font.CG TIMES.normal.bold=type1.Times-Bold
    [033108_044055138][][STATEMENT] font.CG TIMES.normal.normal=type1.Times-Roman
    [033108_044055138][][STATEMENT] font.COURIER NEW.italic.bold=type1.Courier-BoldOblique
    [033108_044055138][][STATEMENT] font.COURIER NEW.italic.normal=type1.Courier-Oblique
    [033108_044055138][][STATEMENT] font.COURIER NEW.normal.bold=type1.Courier-Bold
    [033108_044055138][][STATEMENT] font.COURIER NEW.normal.normal=type1.Courier
    [033108_044055139][][STATEMENT] font.COURIER.italic.bold=type1.Courier-BoldOblique
    [033108_044055139][][STATEMENT] font.COURIER.italic.normal=type1.Courier-Oblique
    [033108_044055139][][STATEMENT] font.COURIER.normal.bold=type1.Courier-Bold
    [033108_044055139][][STATEMENT] font.COURIER.normal.normal=type1.Courier
    [033108_044055139][][STATEMENT] font.DEFAULT.italic.bold=type1.Helvetica-BoldOblique
    [033108_044055139][][STATEMENT] font.DEFAULT.italic.normal=type1.Helvetica-Oblique
    [033108_044055139][][STATEMENT] font.DEFAULT.normal.bold=type1.Helvetica-Bold
    [033108_044055139][][STATEMENT] font.DEFAULT.normal.normal=type1.Helvetica
    [033108_044055139][][STATEMENT] font.HELVETICA.italic.bold=type1.Helvetica-BoldOblique
    [033108_044055140][][STATEMENT] font.HELVETICA.italic.normal=type1.Helvetica-Oblique
    [033108_044055140][][STATEMENT] font.HELVETICA.normal.bold=type1.Helvetica-Bold
    [033108_044055140][][STATEMENT] font.HELVETICA.normal.normal=type1.Helvetica
    [033108_044055140][][STATEMENT] font.MONOSPACE.italic.bold=type1.Courier-BoldOblique
    [033108_044055140][][STATEMENT] font.MONOSPACE.italic.normal=type1.Courier-Oblique
    [033108_044055140][][STATEMENT] font.MONOSPACE.normal.bold=type1.Courier-Bold
    [033108_044055140][][STATEMENT] font.MONOSPACE.normal.normal=type1.Courier
    [033108_044055140][][STATEMENT] font.SANS-SERIF.italic.bold=type1.Helvetica-BoldOblique
    [033108_044055140][][STATEMENT] font.SANS-SERIF.italic.normal=type1.Helvetica-Oblique
    [033108_044055141][][STATEMENT] font.SANS-SERIF.normal.bold=type1.Helvetica-Bold
    [033108_044055141][][STATEMENT] font.SANS-SERIF.normal.normal=type1.Helvetica
    [033108_044055141][][STATEMENT] font.SERIF.italic.bold=type1.Times-BoldItalic
    [033108_044055141][][STATEMENT] font.SERIF.italic.normal=type1.Times-Italic
    [033108_044055141][][STATEMENT] font.SERIF.normal.bold=type1.Times-Bold
    [033108_044055141][][STATEMENT] font.SERIF.normal.normal=type1.Times-Roman
    [033108_044055141][][STATEMENT] font.SYMBOL.normal.normal=type1.Symbol
    [033108_044055141][][STATEMENT] font.TIMES NEW ROMAN.italic.bold=type1.Times-BoldItalic
    [033108_044055141][][STATEMENT] font.TIMES NEW ROMAN.italic.normal=type1.Times-Italic
    [033108_044055142][][STATEMENT] font.TIMES NEW ROMAN.normal.bold=type1.Times-Bold
    [033108_044055142][][STATEMENT] font.TIMES NEW ROMAN.normal.normal=type1.Times-Roman
    [033108_044055142][][STATEMENT] font.TIMES.italic.bold=type1.Times-BoldItalic
    [033108_044055142][][STATEMENT] font.TIMES.italic.normal=type1.Times-Italic
    [033108_044055142][][STATEMENT] font.TIMES.normal.bold=type1.Times-Bold
    [033108_044055142][][STATEMENT] font.TIMES.normal.normal=type1.Times-Roman
    [033108_044055142][][STATEMENT] font.ZAPFDINGBATS.normal.normal=type1.ZapfDingbats
    [033108_044055142][][STATEMENT] pdf-changes-allowed=0
    [033108_044055142][][STATEMENT] pdf-compression=true
    [033108_044055143][][STATEMENT] pdf-enable-accessibility=true
    [033108_044055143][][STATEMENT] pdf-enable-copying=false
    [033108_044055143][][STATEMENT] pdf-encryption-level=0
    [033108_044055143][][STATEMENT] pdf-font-embedding=true
    [033108_044055143][][STATEMENT] pdf-hide-menubar=false
    [033108_044055143][][STATEMENT] pdf-hide-toolbar=false
    [033108_044055143][][STATEMENT] pdf-no-accff=false
    [033108_044055143][][STATEMENT] pdf-no-cceda=false
    [033108_044055143][][STATEMENT] pdf-no-changing-the-document=true
    [033108_044055144][][STATEMENT] pdf-no-printing=false
    [033108_044055145][][STATEMENT] pdf-open-password=
    [033108_044055145][][STATEMENT] pdf-permissions=0
    [033108_044055145][][STATEMENT] pdf-permissions-password=
    [033108_044055145][][STATEMENT] pdf-printing-allowed=0
    [033108_044055145][][STATEMENT] pdf-replace-smartquotes=true
    [033108_044055145][][STATEMENT] pdf-security=false
    [033108_044055145][][STATEMENT] ------------------------------------------------------
    [033108_044055220][][STATEMENT] Rendering page [1]
    [033108_044055238][oracle.apps.xdo.common.font.FontFactory$FontDef][STATEMENT] Type1 font created: Helvetica
    [033108_044055238][oracle.apps.xdo.common.font.FontFactory$FontDef][STATEMENT] Type1 font created: Times-Roman
    [033108_044055246][][STATEMENT] Phase2 time used: 83ms
    [033108_044055531][][STATEMENT] Continue rendering page [1]
    [033108_044055585][oracle.apps.xdo.common.font.FontFactory$FontDef][STATEMENT] Type1 font created: Helvetica-Bold
    [033108_044055799][][STATEMENT] Generating page [1]
    [033108_044055843][][STATEMENT] Rendering page [2]
    [033108_044056064][][STATEMENT] Generating page [2]
    [033108_044056096][][STATEMENT] Rendering page [3]
    [033108_044056271][][STATEMENT] Generating page [3]
    [033108_044056303][][STATEMENT] Rendering page [4]
    [033108_044056407][][STATEMENT] Phase2 time used: 876ms
    [033108_044056443][][STATEMENT] Continue rendering page [4]
    [033108_044056483][][STATEMENT] Generating page [4]
    [033108_044056512][][STATEMENT] Rendering page [5]
    [033108_044056613][][STATEMENT] Generating page [5]
    [033108_044056635][][STATEMENT] Rendering page [6]
    [033108_044056653][][STATEMENT] Phase2 time used: 210ms
    [033108_044056654][][STATEMENT] Continue rendering page [6]
    [033108_044056654][][STATEMENT] Phase2 time used: 1ms
    [033108_044056654][][STATEMENT] Continue rendering page [6]
    [033108_044056656][][STATEMENT] Phase2 time used: 2ms
    [033108_044056666][][STATEMENT] Continue rendering page [6]
    [033108_044056676][][STATEMENT] Generating page [6]
    [033108_044056681][][STATEMENT] Rendering page [7]
    [033108_044056731][][STATEMENT] Phase2 time used: 65ms
    [033108_044056731][][STATEMENT] Continue rendering page [7]
    [033108_044056731][][STATEMENT] Phase2 time used: 0ms
    [033108_044056732][][STATEMENT] Continue rendering page [7]
    [033108_044056732][][STATEMENT] Phase2 time used: 0ms
    [033108_044056733][][STATEMENT] Continue rendering page [7]
    [033108_044056733][][STATEMENT] Generating page [7]
    [033108_044056735][][STATEMENT] Phase2 time used: 3ms
    [033108_044056736][][STATEMENT] Total time used: 1668ms for processing XSL-FO
    [033108_044057034][][STATEMENT] ProxyGenerator creating new page: 1
    [033108_044057111][][STATEMENT] ProxyGenerator creating new page: 2
    [033108_044057189][][STATEMENT] ProxyGenerator creating new page: 3
    [033108_044057242][][STATEMENT] ProxyGenerator creating new page: 4
    [033108_044057301][][STATEMENT] ProxyGenerator creating new page: 5
    [033108_044057331][][STATEMENT] ProxyGenerator creating new page: 6
    [033108_044057343][][STATEMENT] ProxyGenerator creating new page: 7
    [033108_044057382][][STATEMENT] Starting Generator.close()
    [033108_044057388][oracle.apps.xdo.common.font.FontFactory][STATEMENT] type1.Helvetica closed.
    [033108_044057388][oracle.apps.xdo.common.font.FontFactory][STATEMENT] type1.Helvetica-Bold closed.
    [033108_044057388][oracle.apps.xdo.common.font.FontFactory][STATEMENT] type1.Times-Roman closed.
    [033108_044057389][][STATEMENT] Generator.close() took: 6ms
    [033108_044057389][][STATEMENT] Total time to process commands from ProxyGenerator tmp file: 643ms
    [033108_044057389][oracle.apps.xdo.template.FOProcessor][STATEMENT] clearInputs(Object) is called.
    [033108_044057412][oracle.apps.xdo.template.FOProcessor][STATEMENT] clearInputs(Object) done. All inputs are cleared.
    [033108_044057477][][STATEMENT] initConfig(): config file used :null
    [033108_044057478][][STATEMENT] initCustomFactories(): loading custom delivery channels :{}
    [033108_044057478][oracle.apps.xdo.delivery.DeliveryManager][STATEMENT] initConfig(): loading default properties :{}
    [033108_044057479][oracle.apps.xdo.delivery.DeliveryManager][STATEMENT] createRequest(): called with request type :smtp_email
    [033108_044057522][oracle.apps.xdo.delivery.DeliveryManager][STATEMENT] createRequest(): exiting
    [033108_044057577][oracle.apps.xdo.delivery.smtp.Attachment][STATEMENT] addAttachment(): Adding an attachment ...[filename]=[PurchaseOrder 6023571.pdf], [content-type]=[application/pdf], [index]=[-1], [disposition]=[inline]
    [033108_044057585][oracle.apps.xdo.delivery.smtp.Attachment][STATEMENT] addAttachment(): Character set for MIME headers : UTF-8
    [033108_044057586][oracle.apps.xdo.delivery.smtp.Attachment][STATEMENT] addAttachment(): Character encoding for MIME headers : B
    [033108_044057588][oracle.apps.xdo.delivery.smtp.Attachment][STATEMENT] addAttachment(): Exiting addAttachment()
    [033108_044057589][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] submit(): Called
    [033108_044057589][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] setDefaultServerProperties(): No default server found for this request type: smtp_email
    [033108_044057589][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] setDefaultServerProperties(): properties defined in this request.
    [TEMP_DIR:String] [u0350/app/apps/UAT/xx/1.0/log/033108_044049420]
    [ASYNC_CHECK_INTERVAL:Integer] [60000]
    [HOST:String] [colfarmt.hpa.org.uk]
    [SMTP_TO_RECIPIENTS:String] [[email protected]]
    [SMTP_ENCODING:String]
    [SMTP_CONTENT_FILENAME:String] [messageBody.txt]
    [SMTP_CONTENT_TYPE:String] [text/html;charset=UTF-8]
    [SMTP_SUBJECT:String] [Purchase Order No: 6023571]
    [BUFFERING_MODE:Boolean] [true]
    [SMTP_CC_RECIPIENTS:String] [[email protected]]
    [SMTP_FROM:String] [[email protected]]
    [TEMP_FILE_PREFIX:String] [dlvr]
    [PORT:Integer] [(java.lang.Integer]
    [RETRY:Integer] [0]
    [SMTP_ATTACHMENT:Attachment] [(oracle.apps.xdo.delivery.smtp.Attachment]
    [RETRY_INTERVAL:Integer] [60000]
    [TEMP_FILE_SUFFIX:String] [.tmp]
    [SMTP_ATTACHMENT_FIRST:Boolean] [(java.lang.Boolean]
    [SMTP_CHARSET:String] [UTF-8]
    [ASYNC_TIMEOUT:Integer] [86400000]
    [033108_044057590][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] submit(): BUFFERING_MODE is ON.
    [033108_044057590][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] submit(): TEMP_DIR found, start document buffering : /u0350/app/apps/UAT/xx/1.0/log/033108_044049420
    [033108_044057590][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] backupDocument(): Starting document buffering.
    [033108_044057602][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] backupDocument(): Creating temporary file for buffering : /u0350/app/apps/UAT/xx/1.0/log/033108_044049420/dlvrbrfaxe1m4B55646.tmp
    [033108_044057603][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] backupDocument(): 63 bytes have been written to the temporary file.
    [033108_044057603][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] filterDocument(): Starting document preprocessing.
    [033108_044057603][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] filterDocument(): No native command found for preprocessing, exiting.
    [033108_044057603][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] backupDocument(): Finished document buffering.
    [033108_044057603][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] submit(): Start reading the buffered document file. : /u0350/app/apps/UAT/xx/1.0/log/033108_044049420/dlvrbrfaxe1m4B55646.tmp
    [033108_044057603][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] submit(): Calling DeliveryRequestHandler.submitRequest()
    [033108_044057604][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequestHandler][STATEMENT] submitRequest(): called
    [033108_044057604][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequestHandler][STATEMENT] submitRequest(): This request has never been submitted before.
    [033108_044057607][oracle.apps.xdo.delivery.smtp.Attachment][STATEMENT] Start parsing HTML file...(filename:messageBody.txt)(current dir:null)
    [033108_044057607][oracle.apps.xdo.delivery.smtp.Attachment][STATEMENT] Reached the end of InputStream.
    [033108_044057608][oracle.apps.xdo.delivery.smtp.Attachment][STATEMENT] addAttachment(): Adding an attachment ...[filename]=[messageBody.txt], [content-type]=[text/html;charset=UTF-8], [index]=[-1], [disposition]=[null]
    [033108_044057608][oracle.apps.xdo.delivery.smtp.Attachment][STATEMENT] addAttachment(): Character set for MIME headers : UTF-8
    [033108_044057608][oracle.apps.xdo.delivery.smtp.Attachment][STATEMENT] addAttachment(): Character encoding for MIME headers : B
    [033108_044057608][oracle.apps.xdo.delivery.smtp.Attachment][STATEMENT] addAttachment(): Exiting addAttachment()
    [033108_044057609][oracle.apps.xdo.delivery.smtp.Attachment][STATEMENT]
         Dear Sir/Madam,
         Please review the attached PO 6023571
    [033108_044057666][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequestHandler][STATEMENT] submitRequest(): Character set for MIME headers : UTF-8
    [033108_044057666][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequestHandler][STATEMENT] submitRequest(): Character encoding for MIME headers : B
    [033108_044058067][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequestHandler][STATEMENT] submitRequest(): exiting
    [033108_044058067][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] submit(): Finished calling DeliveryRequestHandler.submitRequest()
    [033108_044058067][oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequest][STATEMENT] submit(): Process done successfully. Exiting submit()
    [033108_044058085][oracle.apps.xdo.batch.BurstingProcessorEngine][STATEMENT] ========================> startElement() ::: endDocument is entered <========================
    [033108_044058086][oracle.apps.xdo.batch.BurstingProcessorEngine][STATEMENT] ========================> startElement() ::: endDocument is entered <========================
    Bursting process complete..
    Generating Bursting Status Report..
    [033108_044058202][oracle.apps.xdo.batch.bursting.FileHandler][STATEMENT] /u0350/app/apps/UAT/xx/1.0/log/033108_044049420/xdo0.tmp is deleted
    [033108_044058203][oracle.apps.xdo.batch.bursting.FileHandler][STATEMENT] /u0350/app/apps/UAT/xx/1.0/log/033108_044049420/xdo1.tmp is not deleted
    [033108_044058226][oracle.apps.xdo.batch.bursting.FileHandler][STATEMENT] /u0350/app/apps/UAT/xx/1.0/log/033108_044049420/xdo2.tmp is deleted
    [033108_044058226][oracle.apps.xdo.batch.bursting.FileHandler][STATEMENT] /u0350/app/apps/UAT/xx/1.0/log/033108_044049420/xdo3.tmp is not deleted
    [033108_044058238][oracle.apps.xdo.batch.bursting.FileHandler][STATEMENT] /u0350/app/apps/UAT/xx/1.0/log/033108_044049420/xdo4.tmp is deleted
    [033108_044058262][oracle.apps.xdo.batch.bursting.FileHandler][STATEMENT] /u0350/app/apps/UAT/xx/1.0/log/033108_044049420/PurchaseOrder 6023571.pdf is deleted

  • Email body text formating

    Hi ALL,
    I need to display the following data in the email body with Material records and DIR records
    Line 1 (Header Line):
    "Material Master Records "
    Line 2:
    [ space ]
    Line 3 (New Record):
    Material Number              Material Desc.          MatGrp                 Basic Material                UOM                  
    Line 1 (Header Line):
    "Document Info. Records "
    Line 2:
    [ space ]
    Line 3 (New Record):
    DocType                   Document                      Part                               Version                                     Doc.Desc.                   
    I am using the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the mail and populating the contents_txt internal table with Material and DIR records using OFFSETS.
    I am getting alignment problems and space is getting trucated between the fields.
    Can somebody tell me how to do a proper formating to the email body
    Thanks
    Bhasker

    I hope every thing in the mail is in Charater format , every field and length .
    the only thing for these sort of option is to have a fixed distance based on max and min length the text can occupy .
    Line 1 (Header Line):
    "Material Master Records "
    Line 2:
    [ space ]
    Line 3 (New Record):
    Material Number Material Desc. MatGrp Basic Material UOM
    declare the text as
    begin of itab occurs 0 ,
    s1(200) type c,
    endof itab
    1. first text for the header .
    itab-S1+10(100)  = " Header text'.
    append itab .
    clear itab.
    2.
    append itab ====> fill force an empty line
    3.
    use concatenate f1X(Y ) f2X(Y ) itab-f3+X(Y ) into itab-s1 separated by space
    append itab.
    will keep the format in justified format .
    similarly repeat the same for the second header .
    regards,
    vijay

  • Table as Email Body

    Hi.
    I want to send some data in a Table format as an email body.
    Is it possible? If yes then how it can be done?

    Hi ,
    Yes, it is possible we have to use "HTML" tags to send .
       DOC_TYPE = 'HTM'.
        MAILREC-RECEIVER = WA_PA0105-USRID_LONG.
        MAILREC-REC_TYPE  = 'U'.
        APPEND MAILREC.
        CLEAR: MAILREC.
        DOC_DATA-OBJ_NAME = 'Absence Details .'(029) .
        CONCATENATE 'Absence details for'(021) TEXT_DATE INTO DOC_DATA-OBJ_DESCR SEPARATED BY SPACE.
        DOC_DATA-OBJ_LANGU = SY-LANGU .
        APPEND TEXT-200 TO OBJTEXT .  " <html> <STYLE type="text/css">
        APPEND TEXT-201 TO OBJTEXT .  "</STYLE></head ><body><p>
        APPEND TEXT-202 TO OBJTEXT .  "</STYLE></head ><body><p>
        APPEND TEXT-100 TO OBJTEXT .  "Dear Sir/ Madam,
        APPEND TEXT-203 TO OBJTEXT .  "<BR>
        APPEND TEXT-203 TO OBJTEXT .  "<BR>
        CONCATENATE 'The below Employee ware absent on'(050) TEXT_DATE INTO OBJTEXT.
        APPEND OBJTEXT .
        APPEND TEXT-204 TO OBJTEXT.   "<table border="1">
        APPEND TEXT-205 TO OBJTEXT.   "<tr bgcolor="#d0d0d0" valigh="top"><td >Description</td>
        LOOP AT IT_ZHR_TIME INTO WA_ZHR_TIME.
          CONCATENATE  '<td>' WA_ZHR_TIME-L_PERNR  '</td>' INTO OBJTEXT.
          APPEND OBJTEXT.
          CONCATENATE  '<td>' WA_ZHR_TIME-L_DATE+6(2) '.'
                             WA_ZHR_TIME-L_DATE4(2) '.' WA_ZHR_TIME-L_DATE0(4)  '</td></tr>' INTO OBJTEXT.
          APPEND OBJTEXT.
          CLEAR WA_ZHR_TIME.
        ENDLOOP.
        APPEND TEXT-203 TO OBJTEXT.   "<BR>
        APPEND TEXT-203 TO OBJTEXT.   "<BR>
        APPEND TEXT-214 TO OBJTEXT.   "</table>
        APPEND TEXT-203 TO OBJTEXT.   "<BR>
        APPEND TEXT-203 TO OBJTEXT.   "<BR>
        APPEND TEXT-203 TO OBJTEXT.   "<BR>
        APPEND TEXT-203 TO OBJTEXT.   "<BR>
        APPEND TEXT-215 TO OBJTEXT.   "</body></html>
        APPEND TEXT-203 TO OBJTEXT .  "<BR>
        APPEND TEXT-203 TO OBJTEXT .  "<BR>
        OBJTEXT = 'This is for your information .'(026)  .
        APPEND TEXT-203 TO OBJTEXT .  "<BR>
        APPEND OBJTEXT .
        OBJTEXT = 'This auto Generated Mail.'(027) .
        APPEND OBJTEXT .
    for more tags got to SE80  check under Tag browser

  • Output in Email Body Formatting Warped

    Hi All
    I am completly new to powershell & am googling about for code.
    I have been able to so far to send the results of a powershell query by email and am mightly impressed it worked.
    When the query is done on the command line it works great, by email the output is spread wide and the fields dont align with each other.
    I have pasted my commands below. I am querying the Exchange Mailbox sizes and wish to sort by the biggest down.  This works great and I out put it to a text file.
    I then read the text file and substitute it for the body of the email.
    On the outlook email recepient end It looks to me like the window size of outlook causes the text to wrap around and it is no longer displayed lengthways.
    Is there anything I can do?
    Thanks
    Below gets data
    Get-WMIObject -Class Exchange_Mailbox -Namespace ROOT\MicrosoftExchangev2 -ComputerName
    MyExchangeServer | Where-Object {$_.LastWriteTime -le (Get-Date).AddYears(1)} | Select-Object MailboxDisplayName,Size
    | sort-object size -descending
    Below tells which exchnage server to use
    $psEmailServer = "MyExchangeServer"
    Below is the text file containing the data I need assigned to $body
    $body= (Get-Content mailboxsize.txt)
    Below sends the email using the contents of the email as the email body, BUT it dosent come out right and its out of alignment in outlook.
    send-mailmessage -from "[email protected]" -to "[email protected]" -subject "test powershell email" -body "$body"
    confuseis

    The PowerShell console uses a fixed-width font, by default, but most email clients don't.  The best solution is to use the ConvertTo-Html command on the results of your pipeline, instead of saving the text to a file.  This renders the objects in
    an HTML table instead of relying on a fixed-width font, and then you use the -BodyAsHtml switch when calling Send-MailMessage:
    $data = Get-WMIObject -Class Exchange_Mailbox -Namespace ROOT\MicrosoftExchangev2 -ComputerName MyExchangeServer |
    Where-Object {$_.LastWriteTime -le (Get-Date).AddYears(1)} |
    Select-Object MailboxDisplayName,Size |
    sort-object size -descending
    $psEmailServer = "MyExchangeServer"
    $body = $data | ConvertTo-Html | Out-String
    Send-MailMessage -From "[email protected]" -To "[email protected]" -Subject "test powershell email" -Body $body -BodyAsHtml
    Edit:  If you absolutely must send the contents of the file as-is, you can still try sending the body as HTML, wrapping the body text in a <pre> tag, which should be displayed in a fixed-width font:
    $body = Get-Content mailboxsize.txt -Raw
    $body = '<pre>{0}</pre>' -f [System.Net.WebUtility]::HtmlEncode($body)
    $psEmailServer = "MyExchangeServer"
    Send-MailMessage -From "[email protected]" -To "[email protected]" -Subject "test powershell email" -Body $body -BodyAsHtml

  • Email body format is not correctly in SOST using SO_DOCUMENT_SEND_API1

    Hi Experts,
    I am sending email from my program, Email body is not coming correct format in the SOST as it is in the internal table.
    Below code i was written if any one knows please suggest.
        CONCATENATE DBHOST ':' SY-REPID INTO SUBJECT.
        DESCRIBE TABLE EMAIL_BODY LINES LINCOUNT.
        MOVE SUBJECT TO V_DATA-OBJ_DESCR.
        V_DATA-OBJ_NAME = 'TEXT'.
      IT_PACK-HEAD_START = '000000000000001'.
      IT_PACK-BODY_START = '000000000000001'.
      IT_PACK-DOC_TYPE = 'HTM' .
      IT_PACK-BODY_NUM = LINCOUNT.
      APPEND IT_PACK.
      IT_RECEIVER-RECEIVER = ADDRESSEE.
      IT_RECEIVER-REC_TYPE = 'U'.
      IT_RECEIVER-COM_TYPE = 'INT'.
      APPEND IT_RECEIVER.
      LOOP AT EMAIL_BODY.
        MOVE EMAIL_BODY-TDLINE TO IT_TEXT-LINE.
        APPEND IT_TEXT.
        CLEAR IT_TEXT.
      ENDLOOP.
        lv_RECEIVER = program input field email address.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
         DOCUMENT_DATA                    = V_DATA
         PUT_IN_OUTBOX                    = 'X'
         SENDER_ADDRESS                   = lv_RECEIVER
         SENDER_ADDRESS_TYPE              = 'INT '
        TABLES
          PACKING_LIST                    = IT_PACK
         CONTENTS_TXT                     =  IT_TEXT
          RECEIVERS                       = IT_RECEIVER
       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.
    Eagerly waiting for your response.
    Thanks,
    Kumar

    what do you mean by "not correctly"?  Is the text wrapping at 80 characters, or ??  Where's your example of the "not correctly" text?

  • Formating Email Body In SO_NEW_DOCUMENT_SEND_API1

    Hai,
    I am Trying to send an email, from my program , where body of the email is simply hardcoded.
    I need the email body in the below format with just 2 lines.
    Hi,
    line 1 :-Report Generated successfully
    line 2:- This mail is SAP generated pls dont reply.
    But My problem is all these lines are coming in a single line  . I have done all possible experiments but of no use...
    now depending on SDN..Help pls...Here is the code..
    objtxt-line = 'Hi,'.
    *    CONCATENATE cl_abap_char_utilities=>newline 'Hi' into objtxt-line respecting blanks.
         APPEND OBJTXT.
         CLEAR OBJTXT.
        APPEND OBJTXT.
         CLEAR OBJTXT.
        OBJTXT-LINE = P_MSG.
    *    CONCATENATE cl_abap_char_utilities=>newline p_msg cl_abap_char_utilities=>newline INTO OBJTXT-LINE respecting blanks.
         APPEND OBJTXT.
         CLEAR OBJTXT.
        CONCATENATE 'DO NOT REPLY TO THIS EMAIL. '
                      'THIS IS A SAP-SYSTEM GENERATED EMAIL!!' INTO OBJTXT-LINE .
         APPEND OBJTXT.
         CLEAR OBJTXT.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA                    = EMAIL_data
         PUT_IN_OUTBOX                    = 'X'
    *     SENDER_ADDRESS                   = SY-UNAME
    *     SENDER_ADDRESS_TYPE              = 'B'
         COMMIT_WORK                      = 'X'
    *   IMPORTING
    *     SENT_TO_ALL                      =
    *     NEW_OBJECT_ID                    =
    *     SENDER_ID                        =
        TABLES
          PACKING_LIST                     = PACKING_DETAIL
    *     OBJECT_HEADER                    =
    *     CONTENTS_BIN                     =
         CONTENTS_TXT                     =  objtxt
    *     CONTENTS_HEX                     =
    *     OBJECT_PARA                      =
    *     OBJECT_PARB                      =
          RECEIVERS                        = EMAIL_SEND
       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.                                      "Commented by jm1227 - 07/18/2011
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  ENDIF.
    CASE SY-SUBRC.
          WHEN 0.
            LOOP AT S_EMAIL.
                WRITE: / S_EMAIL-low, ': succesfully sent'.
                skip.
            ENDLOOP.
          WHEN 1.
            WRITE: / 'Too many receivers specified !'.
          WHEN 2.
            WRITE: / 'No receiver got the document !'.
          WHEN 4.
            WRITE: / 'Missing send authority !'.
          WHEN OTHERS.
            WRITE: / 'Unexpected error occurred !'.
        ENDCASE.
    ENDFORM.                    " SEND_MAIL
    Thanks Jeevan.

    Hi Kumar,
    Is your GS_PACKING_LIST-DOC_TYPE   = raw or different?
    Best regards.

  • Email Body formatting Issue

    Hi,
    We have a requirement to send an email with body in the below mentioned format. I have populated the final internal table with necessary data. I have concatenated all the columns of each record of the final internal table into a text variable with necessary spaces and appended to another internal table of type 'SOLI_TAB'. I am using CL_BCS class to send email. But I am facing an issue with the formatting. Also the column headings should be in bold.
    Column1        Column2         Column3     Column4      Column5
    XXXXX          XXXXXX         XXXXXX    XXXXXX      XXXXX
    XXXXX          XXXXXX         XXXXXX    XXXXXX      XXXXX
    XXXXX          XXXXXX         XXXXXX    XXXXXX      XXXXX
    Current Behaviour:
    Column1        Column2         Column3     Column4      Column5
    XXXXX          XXXX        XXXXXX    XXXXXX      XXXXX
    XXXXX          XXXXXX         XXXXXX    XXXXXX      XXXXX
    XXXXX          XXXXXX         XXXX    XXXXXX      XXXXX
    Can any one help me on this?
    Regard

    hi ,
    Why cant you try putting tablle format for this. and you can make header in bold also
    refer this page
    Table as Email Body
    Thanks Sam.

  • Formatting EMAIL Body

    Hi All,
    We have a requirement of sending email notification. The issue is that I am able to send an attachment successfully in email, but the format of data in email body is distorted. It si being shown as :
    Dear User\nThis is to inform that a price protection process(mentioned in Subject) was erred with details below:\nError Detail : \nProcess Name : ERRORSERVICEASYNC\nExecution Detail Id : 578\nTransaction Number : PPTXN1\nThanks\n** This is a computer generated mail, please do not reply to this
    Whereas I want it to appear as:
    Dear User
    This is to inform that a price protection process(mentioned in Subject) was erred with details below:
    Error Detail :
    Process Name : ERRORSERVICEASYNC
    Execution Detail Id : 578
    Transaction Number : PPTXN1
    Thanks
    ** This is a computer generated mail, please do not reply to this
    Also I am writing the code that I have used in Email Body in BPEL Process:--
    <%"Dear User"%><%"\n"%><%"This is to inform that a price protection process(mentioned in Subject) was erred with details below:"%><%"\n"%><%"Error Code : "%><%bpws:getVariableData('inputVariable','payload','/client:DPPUserNotifAsyncProcessRequest/client:ErrorCode')%><%"\n"%><%"Error Summary : "%><%bpws:getVariableData('inputVariable','payload','/client:DPPUserNotifAsyncProcessRequest/client:ErrorSummary')%><%"\n"%><%"Error Detail : "%><%bpws:getVariableData('inputVariable','payload','/client:DPPUserNotifAsyncProcessRequest/client:ErrorDetail')%><%"\n"%><%"Process Name : "%><%bpws:getVariableData('inputVariable','payload','/client:DPPUserNotifAsyncProcessRequest/client:ProcessName')%><%"\n"%><%"Execution Detail Id : "%><%bpws:getVariableData('inputVariable','payload','/client:DPPUserNotifAsyncProcessRequest/client:ExecutionDetailId')%><%"\n"%><%"Transaction Number : "%><%bpws:getVariableData('inputVariable','payload','/client:DPPUserNotifAsyncProcessRequest/client:TransactionNumber')%><%"\n"%><%"Thanks"%><%"\n"%><%"** This is a computer generated mail%><%please do not reply to this"%>
    Any Idea how to format the email body so as to beautify & make the data appear to end user more beautified?????? Calling all experts

    hi Lalit ,
    I hope ur <IncomingServerSettings> port should not be same as <OutgoingServerSettings> port number .Generally for incomeing SMTP will be used and for outgoing mail POP will be used.So kindly look into the BPEL Developer's guied for more information in configurein the ns_email.xml. And one more thing, that as per my understanding OracleBPEL will not support for secure transcation over SMTP.
    i hope ur config will be like the one below:
    <EmailAccount>
    <Name>Default</Name>
    <GeneralSettings>
    <FromName>Oracle BPM</FromName>
    <FromAddress>[email protected]</FromAddress>
    </GeneralSettings>
    <OutgoingServerSettings>
    <SMTPHost>Server' IPADRESS</SMTPHost>
    <SMTPPort>25</SMTPPort>
    </OutgoingServerSettings>
    <IncomingServerSettings>
    <Server>Server' IPADRESS</Server>
    <Port>110</Port>
    <Protocol>pop3</Protocol>
    <UserName>XXXXXXX</UserName>
    <Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService">XXXXXXX</Password>
    <UseSSL>false</UseSSL>
    <Folder>Inbox</Folder>
    <PollingFrequency>1</PollingFrequency>
    <PostReadOperation>
    <MarkAsRead/>
    </PostReadOperation>
    </IncomingServerSettings>
    Regards,
    Dinesh kumar.S

  • Email body automatically changes inside a shared mailbox.

    Hi There,
    We have exchange 2010 environment sp3 Ru6. We have some users accessing a Shared mailbox via outlook and sometimes a few of them face the issue of the email body of an email getting replaced with another email in the same mailbox (both emails then have same
    images in their body). for example. if there is a mail from one sender with a certain subject and an image pasted in the body then sometimes another email from a different sender with a different subject is also observed to have the same image pasted in its
    body (thereby replacing its own). this has happened with a lot of users using the mailbox and with random emails.
    Kindly note: users have arranged the emails by their color categories. it happens if email is in any of the folder in shared mailbox and happens only in a few cases.
    Looking for an urgent solution

    Hi Ramandeep,
    According to your description, I understand that some e-mail send to shared mailbox are be inserted an image in the body.
    If I have misunderstand your concern, please do not hesitate to let me know.
    This may be related to transport rule, it can add some picture as disclaimer in message. Please open EMC to double check whether problematic message trigger the rule. More details about
    Understanding Disclaimers, please refer to:
    http://technet.microsoft.com/en-us/library/bb124352(v=exchg.141).aspx#Images
    Additional, we can use Message Tracking or Deliver Report tools with problematic message to get more helpful message for further troubleshooting. For your reference:
    http://technet.microsoft.com/en-us/library/bb124375(v=exchg.150).aspx
    Best Regards,
    Allen Wang

  • Send SmartForm as Email Body

    Hi All!
    I need to send a SmarForm by email as an email body.
    The SmartForm is a simple plain text form.
    Does someone know how to do it?
    Regards,
    Alejandro.

    hi,
    try this link u will have two codes.
    Email Body
    even if u dont understand check this code.
    Here is the code to send the Smartform to mail as PDF attachment.
    REPORT ZTEST_PDF_MAIL.
    Internal Table declarations
    DATA: I_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
    I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
    I_RECEIVERS TYPE TABLE OF SOMLRECI1 WITH HEADER LINE,
    I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    Objects to send mail.
    I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
    I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    I_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    I_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
    Work Area declarations
    WA_OBJHEAD TYPE SOLI_TAB,
    W_CTRLOP TYPE SSFCTRLOP,
    W_COMPOP TYPE SSFCOMPOP,
    W_RETURN TYPE SSFCRESCL,
    WA_DOC_CHNG TYPE SODOCCHGI1,
    W_DATA TYPE SODOCCHGI1,
    WA_BUFFER TYPE STRING, "To convert from 132 to 255
    Variables declarations
    V_FORM_NAME TYPE RS38L_FNAM,
    V_LEN_IN LIKE SOOD-OBJLEN,
    V_LEN_OUT LIKE SOOD-OBJLEN,
    V_LEN_OUTN TYPE I,
    V_LINES_TXT TYPE I,
    V_LINES_BIN TYPE I.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = 'ZTEST'
    IMPORTING
    FM_NAME = V_FORM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    W_CTRLOP-GETOTF = 'X'.
    W_CTRLOP-NO_DIALOG = 'X'.
    W_COMPOP-TDNOPREV = 'X'.
    CALL FUNCTION V_FORM_NAME
    EXPORTING
    CONTROL_PARAMETERS = W_CTRLOP
    OUTPUT_OPTIONS = W_COMPOP
    USER_SETTINGS = 'X'
    IMPORTING
    JOB_OUTPUT_INFO = W_RETURN
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    I_OTF] = W_RETURN-OTFDATA[.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    IMPORTING
    BIN_FILESIZE = V_LEN_IN
    TABLES
    OTF = I_OTF
    LINES = I_TLINE
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    OTHERS = 4.
    IF SY-SUBRC 0.
    ENDIF.
    LOOP AT I_TLINE.
    TRANSLATE I_TLINE USING '~'.
    CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
    ENDLOOP.
    TRANSLATE WA_BUFFER USING '~'.
    DO.
    I_RECORD = WA_BUFFER.
    APPEND I_RECORD.
    SHIFT WA_BUFFER LEFT BY 255 PLACES.
    IF WA_BUFFER IS INITIAL.
    EXIT.
    ENDIF.
    ENDDO.
    Attachment
    REFRESH: I_RECLIST,
    I_OBJTXT,
    I_OBJBIN,
    I_OBJPACK.
    CLEAR WA_OBJHEAD.
    I_OBJBIN] = I_RECORD[.
    Create Message Body Title and Description
    I_OBJTXT = 'test with pdf-Attachment!'.
    APPEND I_OBJTXT.
    DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
    READ TABLE I_OBJTXT INDEX V_LINES_TXT.
    WA_DOC_CHNG-OBJ_NAME = 'smartform'.
    WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
    WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
    WA_DOC_CHNG-SENSITIVTY = 'F'.
    WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
    Main Text
    CLEAR I_OBJPACK-TRANSF_BIN.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    I_OBJPACK-BODY_NUM = V_LINES_TXT.
    I_OBJPACK-DOC_TYPE = 'RAW'.
    APPEND I_OBJPACK.
    Attachment (pdf-Attachment)
    I_OBJPACK-TRANSF_BIN = 'X'.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
    READ TABLE I_OBJBIN INDEX V_LINES_BIN.
    I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    I_OBJPACK-BODY_NUM = V_LINES_BIN.
    I_OBJPACK-DOC_TYPE = 'PDF'.
    I_OBJPACK-OBJ_NAME = 'smart'.
    I_OBJPACK-OBJ_DESCR = 'test'.
    APPEND I_OBJPACK.
    CLEAR I_RECLIST.
    I_RECLIST-RECEIVER = 'mail id'.
    I_RECLIST-REC_TYPE = 'U'.
    APPEND I_RECLIST.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = WA_DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    COMMIT_WORK = 'X'
    TABLES
    PACKING_LIST = I_OBJPACK
    OBJECT_HEADER = WA_OBJHEAD
    CONTENTS_BIN = I_OBJBIN
    CONTENTS_TXT = I_OBJTXT
    RECEIVERS = I_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.
    WRITE:/ 'Error When Sending the File', SY-SUBRC.
    ELSE.
    WRITE:/ 'Mail sent'.
    ENDIF.
    If you want to send some text as Body of the Mail then follow this once
    when u r callin the FM'SO_NEW_DOCUMENT_ATT_SEND_API1'.. points to remember
    1.u have to pass the body of content in table CONTENTS_TXT(ia m using I_OBJBIN) (each line a record) then. suppose i have appended 11 records to the table CONTENTS_TXT .
    2.PACKING_LIST(iam usign I_OBJPACK) table u ahve to append a redord as follows
    I_OBJPACK-TRANSF_BIN = ' '.
    I_OBJPACK-HEAD_START = 000000000000001.
    I_OBJPACK-HEAD_NUM = 000000000000001.
    I_OBJPACK-BODY_START = 000000000000002
    I_OBJPACK-BODY_NUM = 000000000000010.
    I_OBJPACK-DOC_TYPE = 'RAW'.
    append I_OBJPACK-.
    by the above code system treat the first line in table I_OBJBIN as header and the 2nd line to 10 lines tread as body.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = WA_DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    TABLES
    PACKING_LIST = I_OBJPACK
    OBJECT_HEADER = WA_OBJHEAD
    CONTENTS_BIN = I_OBJBIN
    CONTENTS_TXT = I_OBJTXT
    RECEIVERS = I_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.
    reward me ig helpful.

  • Link break in email body using User Notification Activity in 11g

    Hi All,
    I am using User Notification activity in a bpel process to send emails.Howver I am having trouble formatting the contents of the email body.
    Desired output is:
    Hi
    How are You
    Cheers,
    Ritu
    I used following approches but none of them seem to help.I cannt use email activity for the same.*(Please remove * while reading)*
    1.<html><body>Hi<*br*>How are you<*br*>Cheers,<*br*>Ritu</body></html>
    2.Hi,<*br*>How are you<*br*>Cheers,<*br*>Ritu
    3.Hi*&*#13;*How are you*&*#13;*Cheers,*&*#13;*Ritu
    4.I even coded the above within the string()
    But none of them seems to be working.
    Please help.
    Edited by: 896674 on 2012-mar-28 04:45
    Edited by: 896674 on 2012-mar-28 04:47

    It looks like what i found is a temporary solution.Everytime i edit the activity it resets the mime type to text/plain.
    could any body tell me how to provide line breaks in text/plain mime type for user notification activity in bpel.
    Regards...

  • Bold letters in email body.

    Hi all.
       I need to have first line in the email body with bold letters. I am usnig the FM  SO_NEW_DOCUMENT_ATT_SEND_API1. Pls let me know how to do it.
    Thanks.
    sami.

    Hi,
    to send mails use 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

  • How can I attach an image without the image is in the email body? (using the new mail the Lion)

    How can I attach an image without the image is in the email body? (using the new mail the Lion)
    I want in attachment, not in the body mail.

    I think your only solution is to zip the image files first and then attach them.
    Read this from a site I found:
    Sending Graphical Attachments -- When you attach a graphical image to your message, the recipient of your message sees the image inline (that is, in the body of the message) if her email client supports inline display. ("Take Control of Email with Apple Mail" contains a table listing the capabilities of popular Mac and PC email clients.) If a client does not support inline display (or the recipient has turned off the inline display option), the file appears as an attachment that must be opened in a separate program.
    On the one hand, an inline image is easier for the recipient to see - all she has to do is look at it. On the other hand, inline images can be frustrating to scroll through. If you do not wish to send a graphical image inline, you must compress the file before attaching it - Mail, sadly, lacks a built-in compression option, though fortunately for Panther users, the Finder offers Zip compression without requiring a separate application.
    Note that when you compose a new message, Mail always shows attachments in the body of your message. You can manually drag them somewhere else, but many email clients display all attachments in a separate list, regardless of where you place them in the message body.
    If you paste an image into a message or drag & drop an image from another window (say, a Web browser), Mail converts the raw image data to an attachment in TIFF format. On the other hand, if you drag & drop the icon of an image file (or use the Attach button to locate the file using the file browser), Mail leaves the attached image in its original format. This difference is significant, because although most email clients can display JPEG images just fine, support for TIFF - especially in non-Mac email clients - is less common. If possible, I suggest attaching image files as opposed to pasting or dragging in raw image data.

Maybe you are looking for

  • Display settings

    Hi Experts, Is there any other classes available for display settings in ALV other than the below mentioned.The following classes doesn't works in SAP 5.0. Is this belongs to NetWeaver family? cl_salv_table cl_salv_functions cl_salv_display_settings

  • Tracking a deleted variant.

    how to track a deleted variant.its not found in var*..pls help me

  • Album Info won't change in Get Info?

    For whatever reason when i updated Itunes i had albums split up. The names changed on some of the albums. Going into Get Info i can type in the right album title but it doesn't change the album listed so it stays seperated. I have gone into all the s

  • Info Update flag on item- Details- Quanity and price

    Hi, I was creating stock transfer orders from purchase requisitions. There is a field "Infoupdate" in the items->detail screen in ME22 (In ME22N this is a check box and in the "Material data" tab). Can any one tell me how this is defaulted when i con

  • Web Request in Social Services(Public Sector)

    Hi , Has any one worked on Web request in social services. If any one has any tutorials related to how to create a web page using this technology please let me know. In SPRO it comes under Public sector->Social Service->Web Request I have developed w