XML alignment problem when opening with notepad - XML generated from SAP

Hi all,
I am sending a mail with attachment as XML format by using the function module SO_NEW_DOCUMENT_ATT_SEND_API1.
I am getting the xml file in mail and it was properly aligned when i open it. But when i open it with notepad the alignments are changing. 
Below is the code for sending a mail. The content of the XML file populaed in int. table  lt_attachment.
lt_attachment[] = pt_attachment[].
  LOOP AT lt_attachment INTO ls_attachment.
    ls_objtxt-line = ls_attachment-container.
    APPEND ls_objtxt TO lt_objtxt.
    CLEAR : ls_attachment, ls_objtxt.
  ENDLOOP.
Creating the document to be sent
  ls_mailsubject-obj_name     = 'MAILATTCH'.
  ls_mailsubject-obj_langu    = sy-langu.
  ls_mailsubject-obj_descr    = 'You have got mail'.
  ls_mailsubject-sensitivty   = 'F'.
  lv_cnt = LINES( lt_objtxt ).
  ls_mailsubject-doc_size     = ( lv_cnt - 1 ) * 255 + STRLEN( ls_objtxt ).
  DESCRIBE TABLE lt_objtxt LINES lv_tab_lines.
Header of the email
  ls_objpack-transf_bin = space.
  ls_objpack-head_start = 1.
  ls_objpack-head_num   = 0.
  ls_objpack-body_start = 1.
  ls_objpack-body_num   = lv_tab_lines.
  ls_objpack-doc_type   = lc_raw.
  APPEND ls_objpack TO lt_objpack.
  CLEAR ls_objpack.
  ls_objpack-transf_bin = lc_x.
  ls_objpack-head_start = 1.
  ls_objpack-head_num   = 1.
  ls_objpack-body_start = 1.
  ls_objpack-body_num   = lv_tab_lines.
  ls_objpack-doc_type   = 'XML'.
  ls_objpack-obj_name   = 'data'.
  ls_objpack-obj_descr  = 'data'.
  ls_objpack-doc_size   = ls_objpack-body_num * 255.
  APPEND ls_objpack TO lt_objpack.
  CLEAR ls_objpack.
Add Recipients
  ls_reclist-rec_type = 'U'.
  ls_reclist-com_type  = 'INT'.
  ls_reclist-receiver =  pv_mail.
  APPEND  ls_reclist TO lt_reclist.
Mail Contents
  ls_mailtxt-line = 'Please find attached your XML doc.'.
  APPEND ls_mailtxt TO lt_mailtxt.
  CLEAR ls_mailtxt.
  ls_mailtxt-line = lc_regards.
  APPEND ls_mailtxt TO lt_mailtxt.
  CLEAR ls_mailtxt.
  ls_mailtxt-line = lc_dewa.
  APPEND ls_mailtxt TO lt_mailtxt.
  CLEAR ls_mailtxt.
Sending the document
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data              = ls_mailsubject
     put_in_outbox              = lc_x
     commit_work                = lc_x
    TABLES
      packing_list               = lt_objpack
      contents_bin               = lt_objtxt
      contents_txt               = lt_mailtxt
      receivers                  = lt_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 EQ 0.
    COMMIT WORK.
    SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.
    pv_return = 'Success'.
  ELSE.
    pv_return = 'Failed'.
  ENDIF.
  CLEAR: ls_objtxt,ls_reclist, ls_objpack ,ls_doc_chng.
  REFRESH: lt_objtxt,lt_reclist,lt_objpack.
Could any one help me on this.
Thanks & Regards,
Vineel.

Can't you PREVIEW your question before posting? Here you have more than 2500 characters, so we can't read your code.
Your "problem" seems normal to me (you shouldn't open an XML file with Notepad). Could you give an example how it looks like and how you'd like to make it appear?

Similar Messages

  • I currently having problems when dialling with my 4S either from the contacts list, or when using the phone through bluetooth to my in-car system. The phone becomes confused regarding what method / route of connection handsfree, normal use or speaker.

    Hi each time i use my 4S phone a dial from the contact list, the phone will not select a communication mode, either normal speaker or handsfree (car), I have to force the phone into speaker mode and the back to normal mode before I can speak to or listen to anyone. The annoying aspect is the recipient of my call can answer but cannot hear me nor I them.
    What am I doing wrong, or is there an issue with the phone. The same situation occurs when the phone is used with bluetooth in my car, the previous iphone worked perfectly can you please advise.

    Just to recap, this is a collection of ports I have collected over time for people who needed this information when setting up the HP ePrint app so that they could view their email from within the app.  I am certain other applications also need this information.  Although lengthy, I could not find a more comprehensive place to retrieve this information.  Feel free to post additional information, faulty information, or other related topics below as this is simply a collection of data and it would be practically impossible to test all of them. Thank you!
    Don't forgot to say thanks by giving "Kudos" if I helped solve your problem.
    When a solution is found please mark the post that solves your issue.
    Every problem has a solution!

  • When I try to open a menu on a web site, it wants to be open with notepad which gives me garbage. How do I get it to open in adobe?

    When I try to open a menu from a restaruant on a web site, it wants to be open with notepad which gives me garbage. It does not allow me any options to open with adobe or other option.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"

  • Safari problem:  when I switch back into safari from another application, the menu bar comes up but no tabs or windows.  What's going on?  Just started yesterday.  I have found a workaround: when I Command Tab back to safari, I hit command T to open a new

    Safari problem:  when I switch back into safari from another application, the menu bar comes up but no tabs or windows.  What's going on?  Just started yesterday.  I have found a workaround: when I Command Tab back to safari, I hit command T to open a new tab and Command W to close it, and my other tabs are visible.
    I have tried shutting down, closing tabs, with no success.  What's going on and how can I fix it?
    Thanks,
    Cindi B
    PS:  I'm not sure of the actual OS level, but I have not allowed it to upgrade to Maverick yet; concerned about it because of a few things I've read...

    A Safari extension or third party plugin may be causing the menu bar issue.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test. If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.
    If it's not an extensions issue, try troubleshooting third party plug-ins.
    Back to Safari > Preferences. This time select the Security tab. Deselect:  Allow plug-ins. Quit and relaunch Safari to test.
    If that made a difference, instructions for troubleshooting plugins here.
    As for which OS X is installed.
    Click the Apple () menu top left in your screen. From the drop down menu click About This Mac.
    The version is noted there.
    v10.6 Snow Leopard v10.7 Lion  v10.8 Mountain Lion
    It's your choice whether or not to upgrade to Mavericks. If you decide to do this, make sure your Mac meets the requirements noted here.

  • How to solve the problem when opening program illustrator cs6 ERROR: 16 It is WINDOWS 8.1 / 64 BIT help please

    how to solve the problem when opening program illustrator cs6
    ERROR: 16
    It is WINDOWS 8.1 / 64 BIT
    help please

    Thanks, Jeff! The file Adobe Setup Error.log contains the following information:
    02/14/14 07:20:26:474 | [INFO] |  | OOBE | DE |  |  |  | 8860 | DEVersion: 5.0.0.0
    02/14/14 07:20:26:475 | [INFO] |  | OOBE | DE |  |  |  | 8860 | Loading library from C:\Program Files (x86)\Common Files\Adobe\OOBE\PDApp\DECore\DE5\Setup.dll
    [    8860] Fri Feb 14 07:20:26 2014  INFO
    ::START TIMER:: [Total Timer]
    CHECK: Single instance running
    CHECK : Credentials
    Load Deployment File
    CHECK : Another Native OS installer already running
    Create Required Folders
    Assuming uninstall mode
    Lookup for master payload
    [    8860] Fri Feb 14 07:20:26 2014 ERROR
    DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
    [    8860] Fri Feb 14 07:20:26 2014  INFO
    :: END TIMER :: [Total Timer] took 6.90443 milliseconds (0.00690443 seconds) DTR = 579.338 KBPS (0.56576 MBPS)
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 1 error(s), 0 warning(s)
    ERROR: DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
    Please search the above error/warning string(s) to find when the error occurred.
    These errors resulted in installer Exit Code mentioned below.
    Exit Code: 33 - The product is not installed, cannot uninstall.
    Please see specific errors and warnings for troubleshooting. For example, ERROR: DW040 ...

  • Strange problem when opening word doc situated in WLS virtual dir

    Hi all,
    we have a strange problem when opening word doc
    situated in C:\Oracle\Middleware\as_1\forms\webutil
    we put some word docs there and tried to open from forms using for example web.show_document('http://wp0606:9001/forms/webutil/mug00103.doc', '_blank');
    no problem using FF, however in IE8 the word doc is shown in its binary format, this also happens when we try to open the doc in IE8
    however when we google and search for instance for a test.doc and then click on this url a file save dialog is shown
    that's why we believe that this might be due to a configuration issue of WLS
    any help would be greatly appreciated
    Kr
    Martin

    I think you have 2 ways to go here. Figure out what html is from wherever weblogic gets it, meaning you have to delve into the docs, snoop
    around in directories and find what it must be sending (This is going to be unavoidable if you are going to change what weblogic is doing.
    Sooner or later you have to try to figure out where it gets this stuff from)
    or
    you can experimentally snoop on your url with a tool like wget or curl. These are fundamental web tools.
    The latter is always a useful thing to be able to do. (you need to formulate a query to get the content-type).
    Whoever managed to get weblogic to serve any files in the first place probably can figure this out.

  • I have a problem when opening a profile on Facebook. when I open the main page and facebook all ok but when I try to open your Firefox profile my block! what the problem ????? before me it was happening but now when I installed Firefox 4

    I have a problem when opening a profile on Facebook. when I open the main page and facebook all ok but when I try to open your Firefox profile my block! what the problem ????? before me it was happening but now when I installed Firefox 4

    WiFi signals get stronger the closer the machine is to the router and the less interference/blocking of the signal like via walls with metal in them or of thick concrete.
    Since the signal emanates outwards in a sphere, your supposed to place the wireless router in a central location in the building so it covers all areas.
    The power of the router also has a affect, if your router is old or something not that powerful like a Airport Express, it doesn't have the ability to filter out other signals or enough punch to get through walls etc. or cover a large area as effectively.
    If you buy/have a powerful router of newer make and have issues where there is metal in the walls or thick concrete, then you can buy something like OpenMesh and by using Ethernet cables from the back of the router, extend the WiFi signal into other rooms and areas past the blockage.
    https://www.open-mesh.com/

  • Really is not icloud that opens.  It`s a message that says that icloud has problems to open with one specific account.  This happens since I did the last actualization of the operator system open

    Really is not icloud that opens.  It`s a message that says that icloud has problems to open with one specific account.  This happens since I did the last actualization of the operator system open

    You don't need to start a new thread - you just use the 'Reply' button at bottom right of the answering post. Anyway as you're here...
    You should start by going to System Preferences (or is it called Settings in ML?)>iCloud and clicking the Sign Out button. Then sign back in again. Your iCloud data will disappear from your Mac when you do this (but not from the server) - it will reappear when you sign back in. Alternatively if the message identifies an account which is signed in at System Preferences>Mail, Contacts and Calendars you should log out and in there.

  • Facing problem while removing XML tags which has been generated from SAP

    Hi All,
    I am facing problem in MII, while i trying to remove 1st 2 XML tags of XML as generated from SAP.
    Here is XML which has been generated from SAP
    u201C<?xml version="1.0"; encoding="UTF-8"?>
    <ZCIFSCHEDULE>
    <SCHEDULE>
    <MESSAGE_TYPE/>
    <SITE>A300</SITE>
    <SHOP_ORDER>2012020856</SHOP_ORDER>
    <QTY_TO_BUILD>6.000<;/QTY_TO_BUILD>
    <DATE_TIME>08-FEB-2012 20:57:21 +05:30</DATE_TIME>
    <OPERATION>PRS</OPERATION>
    <ITEM>IN-CT00228</ITEM>
    <DPICS_CODE>1229</DPICS_CODE>
    <REVISION/>
    <CYC_TIME_CURING/>
    <FLAG_AGING/>
    <AGING_MIN/>
    <PRODUCTION_VERSION/>
    <CYC_TIME_OC/>
    <CYC_TIME/>
    </SCHEDULE>
    </ZCIFSCHEDULE>u201D
    From above i want to remove 1st 2 tags and last one tag i.e.  u201C<?xml version="1.0"; encoding="UTF-8"?> , <ZCIFSCHEDULE> and last tag ZCIFSCHEDULE>u201D
    Its urgent!
    Did anyone done regarding this issues. Thanks in advance.
    Kind Regards,
    Praveen Reddy

    Hi Praveen,
    Are you trying to make the xml into a string?  I think if you remove the first tag, it will either automagically reappear or it will throw and error as being poorly formed xml. 
    In general, you can remove the nodes by the use of indexes.  Since you are operating at the root level, I am not sure how well it will work, but if your xml is in a property, you can reference the specific nodes by something like this:  myXML.Output{/*[1]} which if you put it in a tracer will display the contents of the first node (or blank if there are child nodes).  The node index can be dynamically set, but start with the simple hard coded one.  I would also start at the lowest child level to verify that it is working properly (a tracer will display the contents specified by the index).  You can also google xml indices (or indexes) and it will point to some other useful xml operators.
    I suggest that you play around with it and also work with the Link Types (hint: removeXML).
    Regards,
    Mike

  • My iPhone 5 got problem when connect with lighting cable, this will keep pop up message "this accessory may not be supported"

    My iPhone 5 got problem when connect with lighting cable, this will keep pop up message "this accessory may not be supported", I can't charge or sync at all. I tried plug and unplug many time, still can't detect/charge my iPhone5, but sometime will 'lucky' that can connect to my iTunes and charge battery…
    This message will auto pop up also when I don't have plug anything in my iPhone 5, It is very annoying…
    The lighting cable is original and now i'm using OS 7.0.4 / iTunes is 11.1.3
    What I can do to fix this problem? Thank you.

    I would try using another cable you can likely borrow one to test from somebody
    if it's the same then likely the connector in your iphone have been damaged

  • Problem when working with package???Please, help me!!!

    I got 3 .java files from one Java tutorial as follow:
    Server.java (in package mygame.server)
    Utilities.java (in package mygame.shared)
    Client.java (in package mygame.client)
    All the above files are placed in "E:\Java Programmes\source"
    After compiling, i got correspponding .class files:
    Server.class (placed in "E:\Java Programmes\class\mygame\server")
    Utilities.class (placed in "E:\Java Programmes\class\mygam\shared")
    Clients.class (placed in "E:\Java Programmes\class\mygame\client")
    But when i run Server.class which contains main method, i got error as follow:
    E:\Java Programmes>java class\mygame\server\Server
    Exception in thread "main" java.lang.NoClassDefFoundError: class\mygame\server\S
    erver (wrong name: mygame/server/Server)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    That was very puzzled for me. I cannot find out what wrong with my files. Please., any boby, help me!!! I always got this problem when working with package and managing files. Thanls a lot.

    java -cp "E:\Java Programmes\class" mygame.server.Server

  • Why will Bridge CC not recognize a PHP file and ONLY open with notepad instead of Dreamweaver?

    why will Bridge CC not recognize a PHP file and ONLY open with notepad instead of Dreamweaver?

    Did you set the file association in Bridge to open with Dreamweaver?

  • Problem when streaming with the CLI flash media encoder 2.5

    I have a problem when streaming with Flash Media Encoder 2.5. When I run the GUI, everything works, but when I use the commandline with the same profile I have created using the GUI, it says it can't connect to the server.
    I have to use this version of the encoder, because the other is not working with the server, and I have to create a program to remotely control the flash media encoder, so I have to use the CLI. What can i do to go over this problem?
    Any help would be really appreciated. Thankyou.

    First of all, thankyou.
    There is no authentication needed. I can't use Flash Live Media Encoder 3 because it is not supported by the people which manages the server i have to connect to.
    In fact, I don't know why they dont support it, but that is the way it is.
    Through the GUI, i connect directly and without problems, without user/pass.
    Thankyou again.

  • Nexus 1000V. problem when working with the console VMWare

    I have a problem when working with the console VMWare.
    Sometimes it is impossible to connect any of the hypervisor to the guest OS managed by them.
    I get the message: "Unable connect to the MKS: Host address lookup for server <name of the hypervisor> failed: No such host is known."
    This message always appears in conjunction with the reconfiguration of virtual switch: "Reconfigure vNetwork Distributed Switch .... Initiated by Cisco_Nexus_1000V_ ....."
    Upon completion of the reconfiguration, Communication console, with guest OS is restored, or on its own or after a reboot srv-vc.
    In this time, I do not see any message in Nexus 1000v log.
    What is this?
    Thanks in advance.

    Smells of a DNS issue.  Are you sure your ESX hosts are reachable from your client via DNS hostname?  Try pinging them from a command prompt/terminal.  You may have DNS server issues.
    As a temp fix, edit your [windowspath]/system32/etc/drivers/hosts file and manually add the ESX host name and IP, then re-test.
    Regards,
    Robert

  • Problem when opening "Mail"

    Dear members of the Apple Community,
    After transferring my files and my profile on my new Macbook pro, I keep encountering a problem when opening "Mail". Each time I try, the app asks me to choose a mail account to add, but I already added the ones I normally use. I can either create/add this new account or click the "cancel" button. I cannot use the program (the main functions are not available). But if I try to add a new account, Mail does not upload the new messages for my existing accounts and if I click "cancel", the application simply close itself. What could I do?
    Thanks a lot to your help.

    It might be worth running Disk Utilities and then Repair Disk Permissions to see if that resolves the problem.
    Chris

Maybe you are looking for

  • PC running Windows 7 with Photoshop Elements 7 printing to an EPSON Stylus PHOTO R1800

    Please help!  I am an amateur photographer. This printer produced excellent photos until my old PC died. I just bought a new Dell XPS 9000 with Adobe Photoshop Elements 7 and connected my printer. The photos look terrible.  Clearly, the PC and Printe

  • Looking for a way to move entire pages from one photo book into another photo book.

    I haven't found out how to move pages from one photo book into another. Surely this is possible? Also on the subject of photo books: it seems that it is not possible to enlarge the size of a text box. Or has anyone found a way to accomodate more than

  • Oracledbconsoleorcl service is not running ?

    i installed oracle database and developer suite 10g and the service mentioned was working properly at the first time , but when i restarted the computer it did not work , and when i try to start it , this message appears windows couldn't start the or

  • Problem in populating the delivery text in Idoc

    Hi Experts,        We are using a custom EDI output type for VT02n transaction. Currently we are encountering a problem when we set the dispatch time as 'Send immediately'.        The problem is some of the characters in delivery texts are missing in

  • Pre-Ordering iPhone 4 UK

    hi there i need some help about pre-ordering things... i have iPhone 2G ( original ) im not in one of the supported countries by apple i have a friend in UK , i will tell him to pre-order the new iPhone 4 for me but here is the problem i want without