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?

Similar Messages

  • 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.

  • 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

  • Startup error: this version is not correctly localized.  Use the English version.

    I have Itunes running on Win7 ;  its my home laptop (lenovo G770).  A PC-tech cleaned up my registry and shrank my bloated list of startup programs.  After that was done, my laptop booted better.  However, iTunes won't start: the message is "This version of iTunes has not be correctly localized for this language.  Please use the English version."
    How can I fix that?  Sure I can reinstall new client (iTunes) over top of my old iTunes, but is there anything simpler?

    Hey there theozt,
    It sounds like you are getting an error message saying that iTunes is not correctly localized for this language. I would use the troubleshooting in the following article, named:
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/ts1717
    Start with this step, and work your way down the article as needed:
    Start iTunes in Safe Mode
    Open iTunes in Safe Mode to isolate any interference from plug-ins or scripts not manufactured by Apple.
    Hold down Shift–Control while opening iTunes. You should see a dialog that says "iTunes is running in safe mode" before iTunes finishes starting up.
    Click Continue.
    See if the issue you're experiencing persists in Safe Mode.
    If you have the same issue while iTunes is in Safe Mode, proceed to the "Create a new user account" section. If you don't experience the same issue, follow these steps to remove third-party plug-ins.
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • Formatting of emails on iphone 5 not correct yet the emails look normal when viewed via my laptop.  The sentences on my iphone email continue on the next line when there is still space on the current line.

    The formatting of emails on my iphone 5 don't display properly yet they are correct when viewed via my laptop.  Using a gmail account on my iphone/laptop.  On my iphone the sentences break in unusual spots and continue on the next line.  Why is this and how can I fix this issue?

    Have you tried restarting or resetting your iPhone?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after It shuts down, press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds).
    Also consider deleting and reinstalling the Mail Account in question.

  • Email body formatting

    Grretings Forum,
    I need some help in sending a mail with proper format. My text message is a report. Therefore
    I want them to be lined up. When see in the debug message it is all lined up. But when the mail is actually sent the message is not lined up properly. It looks like a very shabby report. Can any one help please.
    Thanks
    Sudeep

    Hi,
    I am .developing similar functinality of mail server by implementing email queue management....presently working email software ....Right now i am using the file storage for queue mangement.Please tell me if any better managemnt API is there in Java for EMail Queue... please let me ASAP...
    thanks and regards...
    reply me immediately at [email protected]
    Any further discussion or clarification at yahoo messenger at
    reply at yahoo messenger [email protected]
    hope to see ur quite response ASAp.
    Avanish

  • Can NOT email photos from Iphoto, message displayed that my email and password is not correct???? Can anyone help?

    Can't email photos directly from iPhoto (MBPro 2012) running OS 10.9.4 I deleted the email & passwords in the iPhoto Preferences since I was given an error message that my email and password didn't match???? reinstalled them and tried again with no luck I have done it before without any problem, does anyone know what's going on?

    Sullivan Swede wrote:
    Thanks "Old Toad" .... I tried what you suggested: I erased the email accounts, re-booted, re-entered the email settings and changed the the email client to Mail (instead of iPhoto). I still have the message " email server didn't recognize your username/password combination"...... so frustrating and probably something so simple..... but I can't figure it out! I did clean-up everything, cookies/cashes, I did a "Safe Boot", just in case.... still not able to send email via iPhoto, instead I have to drag the photo from iPhoto onto the desktop then attach it to an email.... way too many steps!!!!
    And what email client are you using in the successful (if too many step) process?
    LN

  • Email body content is not displaying on iphone 4 with ios5

    when I open email from either exchange or yahoo there is nothing displayed in the message body. 
    if I hit reply or forward I can see the body content.  Is there a fix for this bug please?

    It seems hard to believe that this problem still persists with iOS 7, but I just had to restart Mail in order to be able to see the body text again. No restart of the phone was necessary though.

  • Syntax is not correctly checked while using keep dense_rank

    Hi,
    Looks like Oracle doesn't check the syntax correctly, "order" is not required to write before "by" in keep (dense_rank...).
    DB version 11.1.0.6
    SQL> with t as (select 5 val, 2 val2 from dual union all
      2  select 1 val, 9 val2 from dual union all
      3  select 2 val, 9 val2 from dual)
      4  select sum(val) keep (dense_rank last blabla by val2) total_9 from t;
       TOTAL_9
             3Looks like a bug or what?

    Did you get any error in 10g?
    It is running in my 10g, too.
    I've to modify your query as i'm running this in Oracle 8 client. ;)
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    real: 30
    satyaki>
    satyaki>
    satyaki>
    satyaki>select sum(val) keep (dense_rank last blabla by val2) total_9
      2  from (
      3         select 5 val, 2 val2 from dual union all
      4         select 1 val, 9 val2 from dual union all
      5         select 2 val, 9 val2 from dual
      6     );
      TOTAL_9
            3
    real: 11
    satyaki>
    satyaki>
    satyaki>with tt
    unknown command "with tt" - rest of line ignored.
    satyaki>as (
    unknown command "as (" - rest of line ignored.
    satyaki>       select 5 val, 2 val2 from dual union all
      2         select 1 val, 9 val2 from dual union all
      3         select 2 val, 9 val2 from dual
      4     )
      5  select sum(val) keep (dense_rank last blabla by val2) total_9
      6  from tt;
    ERROR at line 4:
    ORA-00933: SQL command not properly ended
    real: 70
    satyaki>Regards.
    Satyaki De.

  • OS_USER not correct when connecting using JDBC Thin Client on 10G

    Hi Folks,
    We are migrating an application from a 9i database to 10g and have a problem that someone might have come across before.
    The application is a Java applet based application that connects to the database using JDBC Thin client. on 9i the OS_USER comes up as the user running the applet but in 10G it is coming up as the user account that installed 10G on the DB server.
    We tried using a 9i client to identify if it was a client or DB issue but its the same problem with the 9i client connecting to the 10G DB.
    If anyone can help it would be much appreciated.
    Thanks,
    John.

    What is the return of this command?
    SELECT sys_context ('USERENV', 'OS_USER') FROM dual;
    Is it the DB user or the OS user?

  • Having trouble  with blue ant s 4 hands free system.it will not correctly voice dial. using a g3 s iphone.read that g4 and g3'shave problems with blue tooth.any suggestions?

    having trouble with blue ant s4 and iphone 3g or 3gs. voice commands to call a contact bring up wrong contact or playes an a song. read there are problems with iphones and this device. any suggestions or fixs?

    You welcome

  • Mac won't open some files MasterPlan.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).

    I had this problem of not being able to open some files a couple of years ago and eventually was able to fix it but i can't remember how. Any help would be grateful.

    The following document should help: Error: Adobe Reader could not open '*.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and was not correctly decoded.)
    Please update this thread if your issue is resolved.
    Thanks,
    Shashi

  • Adobe Reader could not open 'Firefox 4.0-2.dmg' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).

    Tried to download Firefox 4 for Macintosh three time and could not prevent Adobe Reader from interfering.

    The following document should help: Error: Adobe Reader could not open '*.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and was not correctly decoded.)
    Please update this thread if your issue is resolved.
    Thanks,
    Shashi

  • Is it possible to burst PDF file on the email body itself?

    Hi,
    Is it possible to show the contents of a PDF file (or any file) on the email body itself and not as an attachment thru bursting control file? We want the message to look exactly as how it looks like in the PDF file, with all the formatting and stuff and not just plain text. So basically instead of the recipient having to open the attached document, we already want the contents of the document shown exactly on the email.
    Thanks,
    Ronaldo

    Actually, I am using onunload() but the result is in-consistent. Sometimes file write to the folder, sometimes don't. I don't know why it behave like this.
    Before onunload(), I tried this cep.util.registerExtensionUnloadCallback, and found out it's not working as expected.
    Now thanks to you and David, I came to know aboutcom.adobe.csxs.events.ExtensionUnloaded but unfortunately this is also not working.
    And then there is an event applicationBeforeQuit which only works when extension (html panel) get closed with host application (Photoshop etc.). If it is closed before the host then we don't get any call. Please let me know if I missed anything here.
    So It looks like we don't have any option here rather than using onunload() which is giving in-consistent result. Can you please take a look into this, may be I am missing something?
    Or may be another work around to store the preferences on closing of extension.
    Thanks for all your help..

  • Email attachment won't open correctly

    I get a weekly updated excell attachment in an email and the new attachment doesnt open only a previous file does.  how do i force it to refresh and open the new file?

    The following document should help: Error: Adobe Reader could not open '*.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and was not correctly decoded.)
    Please update this thread if your issue is resolved.
    Thanks,
    Shashi

Maybe you are looking for

  • Drilldown and interactive reports

    hi, is there any difference between drilldown and interactive reports. if there exits , what is the difference? kindly help me. i will reward good points. regards thiru

  • How do I determine memory requirements?

    A development team asked me to determine memory requirements for Oracle Portal 10.1.4 implementation. I don't know how to do that, since I am not a software engineer or a systems analyst. The assumptions are: 1.) 6,000 users at peak, with incremental

  • Photoshop extended cs6 3D option are not clickable! Help!

    Hi, I have Creative cloud, Photoshop cs6 extended. I am trying to use 3D but no option is clickable and I have no idea how to go around with this problem...? Isnt it suppose to be working??

  • Cache Mode 5 - BLOB/ Cluster Enhanced - Variables

    Hello, I have a very large query that I need to cache for performance. I'm using cache mode 5 - BLOB/Cluster Enhanced. I see that for variables in Char Restrictions area, it creates a new entry in RSRCACHE under my query under new Variables/Hierarchi

  • Table Relationship (REFERENCES/CONSTRAINTS)

    Hello, I am a novice user of SQL Plus and have the following question to be able to easier join Oracle tables: Which statement should I use to be able to view from table A all possible links to other tables (FK, PK)? I have been looking at following