How can i upload XML from server

Hi
i want to upload XML file from application server
so i don't want to use gui_upload (all the threads i saw in forum use the gui_upload or fronted)
i used
could you say me how i can do it ?
thanks a lot
serge

Hi,
You can use OPEN DATASET for this purpose.
Try this code:
<b>****************************************</b>
Data:
A_FILE TYPE RLGRAP-FILENAME,   "Application server
P_FILE TYPE RLGRAP-FILENAME.   "Presentation server
DATA: BEGIN OF ITAB OCCURS 0,
LINE TYPE STRING,
END OF ITAB.
DATA: FILENAME TYPE STRING.
FILENAME = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                = FILENAME
  TABLES
    DATA_TAB                = ITAB[]
  EXCEPTIONS
    FILE_OPEN_ERROR         = 1
    FILE_READ_ERROR         = 2
    NO_BATCH                = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE            = 5
    NO_AUTHORITY            = 6
    UNKNOWN_ERROR           = 7
    BAD_DATA_FORMAT         = 8
    HEADER_NOT_ALLOWED      = 9
    SEPARATOR_NOT_ALLOWED   = 10
    HEADER_TOO_LONG         = 11
    UNKNOWN_DP_ERROR        = 12
    ACCESS_DENIED           = 13
    DP_OUT_OF_MEMORY        = 14
    DISK_FULL               = 15
    DP_TIMEOUT              = 16
    OTHERS                  = 17.
IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
OPEN DATASET A_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT ITAB.
  TRANSFER ITAB-LINE TO A_FILE.
ENDLOOP.
<b>*****************************************</b>
Hope this helps,
Regards,
Pragya

Similar Messages

  • How can i upload files from one ip address to another  ip address machine ?

    how can i upload files from one ip address to another ip address machine ?

    i need to copy files from one client m/c to server m/c like sftp
    please suggest solution on this

  • How can I show message from server?

    Has anyone idea, how can I show message from server? I want to show message after some files are uploaded via FTP.

    Hi,
    You can use OPEN DATASET for this purpose.
    Try this code:
    <b>****************************************</b>
    Data:
    A_FILE TYPE RLGRAP-FILENAME,   "Application server
    P_FILE TYPE RLGRAP-FILENAME.   "Presentation server
    DATA: BEGIN OF ITAB OCCURS 0,
    LINE TYPE STRING,
    END OF ITAB.
    DATA: FILENAME TYPE STRING.
    FILENAME = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                = FILENAME
      TABLES
        DATA_TAB                = ITAB[]
      EXCEPTIONS
        FILE_OPEN_ERROR         = 1
        FILE_READ_ERROR         = 2
        NO_BATCH                = 3
        GUI_REFUSE_FILETRANSFER = 4
        INVALID_TYPE            = 5
        NO_AUTHORITY            = 6
        UNKNOWN_ERROR           = 7
        BAD_DATA_FORMAT         = 8
        HEADER_NOT_ALLOWED      = 9
        SEPARATOR_NOT_ALLOWED   = 10
        HEADER_TOO_LONG         = 11
        UNKNOWN_DP_ERROR        = 12
        ACCESS_DENIED           = 13
        DP_OUT_OF_MEMORY        = 14
        DISK_FULL               = 15
        DP_TIMEOUT              = 16
        OTHERS                  = 17.
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    OPEN DATASET A_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT ITAB.
      TRANSFER ITAB-LINE TO A_FILE.
    ENDLOOP.
    <b>*****************************************</b>
    Hope this helps,
    Regards,
    Pragya

  • How can I upload photos from ipad onto facebook whithout using adobe flash player which I could not download onto my ipad?

    How can I upload photos from ipad onto facebook whithout using adobe flash player which I could not download onto my ipad?

    http://www.google.com/search?q=upload+photos+to+facebook+from+ipad

  • How can I upload directly from photos to facebook?

    How can I upload directly from photos to facebook?  There use to be a button to send to facebook, now its gone.

    There was NEVER a button to send directly from photos to facebook. The iPhone has NEVER had facebook integration. Download the facebook app and use that.

  • How can I Upload Pictures, from my Mac Book Pro Retina Display with Mountain Lion OS? Tried but it gets as far asi  pictures but does not open?

    How can I Upload Pictures, from my Mac Book Pro Retina Display with Mountain Lion OS? Tried but it gets as far as i pictures but does not open?

    This is not necessarily 100% correct at the current time.
    As Dropbox is encouraging people to set it up for automatic uploading of photos they gradually increment your space as you load more pictures for free at the current time.
    You do start with a fixed 2 GB but if you upload photos you will be awarded more free space.
    You can also open a free account with Flickr - you may have some upload limits per day but you can upload pictures there.

  • How can I Upload Pictures from my Mac Book Pro Retina Display with Mountain Lion OS

    How can I Upload Pictures, from my Mac Book Pro Retina Display with Mountain Lion OS? Tried but it gets as far asi  pictures but does not open?

    Upload? what does that mean?
    You want ML forum? iLife? even notebook forum and directions to those?
    iCloud?

  • TS3720 how can i upload movies from Sony pj580v camcorder to use with imovie11?

    How can I upload movies from Sony pj580v camcorder to use with imovie 11?

    Transfer it to your computer and import into iTunes, make sure it's in a compatible format. Then simply sync with the iPad. If you have a camera connection kit and you know the footage is compatible you can connect it directly.
    Follow the link to see formats
    http://www.apple.com/ipad/specs/

  • How can i upload music from my ipod to my macbook air?

    hi, how can i upload music from my ipod to my macbook air? thanks.

    Try this.
    Open iTunes and select edit/preferences/advanced/general. Put a check mark in the box marked "copy files to iTunes music folder when adding to library" and also "keep iTunes music folder organized", then click 'ok'.
    Connect the iPod whilst holding down the shift/ctrl keys to prevent any auto sync, and if you see the dialogue window asking if you want to sync to this itunes library, click 'no'.
    Then go to file/add folder, open 'my computer', select your iPod and click 'ok'.
    The music files should transfer to your iTunes.
    However it appears that no playlists or any other info such as ratings/last played etc will transfer.
    If this is important to you, you may want to use other options.
    There's Yamipod. This is a free program that transfers music and playlists etc from iPod to iTunes.

  • How can I upload photos from my USB to my ipad

    How can I transfer photos from my computer to my ipad?

    There are several ways.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    Another way. You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive (works the same with an SD card) into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov; DSCN0164.jpg).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import. (You can not export using the camera connection kit.)
    Using The iPad Camera Connection Kit
    http://support.apple.com/kb/HT4101
     Cheers, Tom

  • How can I upload photos from IPhoto to Facebook?

    How do I upload photos from IPhoto into my Facebook account?

    I am unable to upload photos to Facebook on my iPad Air and my iPhone 5s since I updated my devices to iO/S8. I hope Apple comes up with a fix pretty soon. I love iPhoto and would not like to resort to using something like Amizon Cloud Drive. Not unless I had to because iPhoto is not working with Facebook..

  • HT201269 how can I upload songs from my iPod shuffle to a new laptop with iTunes?

    Previous desktop crashed & replaced with a new laptop, so unable to backup my iPod shuffle to iTunes.  When I try to sync the iPod to the new iTunes library, it wants to erase the iPod completely and load the songs from the iTunes library on the new laptop.  How can I transfer songs from iPod shuffl into the new iTunes library without losing everything?

    The sync is one way - computer to ipod.  The exception is itunes purchases - File>Devices>Transfer Purchases
    It has always been very basic to always maintain a backup copy of your computer for this very occasion.  Use your backup copy to put everything back

  • How can i Upload Files from my Flex 2.0 Application?

    How can i do a Upload File funtionality with Flex 2.0? Do i
    have to make the component? How is the code in Flex/ Action Script
    to make this possible?. I'm new in this Flex world and it seems to
    me very interesting to make RIA's Applications; in fact i'm making
    a little Employees Application for my company and i'm trying this
    technology and of course i need the functionality that i asking
    for.
    Regards.
    Andres.

    I haven't tried this, but I believe what you could do is
    append
    requestHeaders to the urlrequest object that you pass into
    the file.upload()
    method. The requestHeaders is an array of name/value pairs
    that would be
    included with your post. At least in theory, I believe that
    shoudl work.
    Good luck.
    Phil
    "tantalo" <[email protected]> wrote in
    message
    news:e3q3mt$138$[email protected]..
    > Hi. Phil, how i commented in the forum the examples
    works ok, with a
    > little
    > changes to make a file Upload. Now i have another doubt,
    i need to make a
    > submit of a form with another fields and the file
    selected.
    >
    > I made a HHTP Service for that purpose with the tags
    Requests like:
    >
    > <mx:HTTPService id="empleadoRequest"
    > url="
    http://andresbarrios:8080/directorio/empleados/insertarEmpleado.jsp"
    > useProxy="false" method="POST">
    > <mx:request xmlns="">
    >
    <empresa>{empresa.selectedItem.data}</empresa>
    >
    <ubicacion>{ubicacion.selectedItem.data}</ubicacion>
    >
    <departamento>{departamento.selectedItem.data}</departamento>
    > <cedula>{cedula.text}</cedula>
    > <nombre>{nombre.text}</nombre>
    > <apellido>{apellido.text}</apellido>
    > <!--Falta Fecha de Nacimiento -->
    > <sexo>{sexo.selectedItem.data}</sexo>
    >
    <estado_civil>{estado_civil.selectedItem.data}</estado_civil>
    >
    <telefono_celular>{telefono_celular.text}</telefono_celular>
    > <extension>{extension.text}</extension>
    >
    <correo_electronico>{correo_electronico.text}</correo_electronico>
    > </mx:request>
    > </mx:HTTPService>
    > I have the global variable called "file" that contains
    the file selected.
    > I
    > want to send this file variable in the HHTPservice call
    EmpleadoRequest,
    > can i
    > do that with a Request tag like another field? or the
    only way is trougth:
    > file.upload(upload.cfm) ?;
    >
    > I want only make a one call to the server to submit the
    fields of the form
    > and
    > to upload the file at th e same time can you help me How
    can i do that?
    >
    > Thanks.
    >
    > Regards.
    >
    > Andres.
    >
    >
    >

  • How can I extract XML from a text document?

    I have tons of text documents containing useless text and a section of XML. I would like to use either Mac Automator or Apple Script to pull the XML section out and place it in a new document with a .xml extension. How can I do that?
    Here is a sample of the XML section that I need to pull:
    - ---Start ACNS XML
    <?xml version="1.0" encoding="UTF-8"?>
    <Infringement xsi:schemaLocation="http://www.movielabs.com/ACNS/ACNS2v1.xsd" xmlns="http://www.movielabs.com/ACNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">           <Case>
    <ID>22242387629</ID>
    <Status>OPEN</Status>
    <Severity>Normal</Severity>
    </Case>
    <Complainant>
    <Entity>MPAA Search and Notify</Entity>
    <Contact></Contact>
    <Address></Address>
    <Phone>5555555555</Phone>
    <Email>[email protected]</Email>
    </Complainant>
    <Service_Provider>
    <Entity>Some Place, Somewhere</Entity>
    <Contact></Contact>
    <Address>Some Place, Somewhere  </Address>
    <Phone></Phone>
    <Email>[email protected]</Email>
    </Service_Provider>
    <Source>
    <TimeStamp>2011-12-02T23:41:59.94Z</TimeStamp>
    <IP_Address>127.0.0.1</IP_Address>
    <Port>64153</Port>
    <Type>P2P</Type>
    <SubType BaseType="P2P" Protocol="BitTorrent" />
    <UserName></UserName>
    <Number_Files>1</Number_Files>
    </Source>
    <Content>
    <Item>
    <TimeStamp>2011-12-02T23:41:59.94Z</TimeStamp>
    <AlsoSeen Start="2011-12-02T23:40:00.11Z" End="2011-12-02T23:41:59.94Z"></AlsoSeen>
    <Title>asdfasdf (2011)</Title>
    <Artist></Artist>
    <FileName>asdfasdf (2011) DVDRip XviD-MAXSPEED</FileName>
    <FileSize>1580908467</FileSize>
    <Type>Video</Type>
    <Hash Type="SHA1">8FB7B1F4984AB6E0746B43D2B82D4ED8102984D5</Hash>
    </Item>
    </Content>
    <History></History>
    <Notes></Notes><Type Retraction="false">DMCA</Type>
    <Detection>
    <Asset>
    <OriginalAssetName>asdfasdf (2011)</OriginalAssetName>
    </Asset>
    <ContentMatched Audio="false" Video="true" Text="false" />
    <HashMatched>true</HashMatched>
    <VerificationID>Manual and automated watermark verification</VerificationID>
    </Detection>
    <Verification>
    <VerificationLevel Type="DT">2</VerificationLevel>
    </Verification>
    <TextNotice><![CDATA[12-03-2011

    XML portion always starts with <Infringement and ends with </Infringement>.
    Actually, it doesn't... the XML starts with the <?xml> tag, but that's just me being pedantic
    Given what you've said, though, it's easy to extract the XML data from a given block of text.
    First, read the source data:
    set theText to read file "path:to:the:file"
    Then you can extract the XML via something like:
    set start_tag to "<?xml"
    set end_tag to "</Infringement>"
    set start_of_data to offset of start_tag in theText
    set end_of_data to (offset of end_tag in theText) + (-1 + (length of end_tag))
    set theXML to text start_of_data through end_of_data of theText
    Now you can write that data to a file:
    set theFile to open for access file ((path to desktop as text) & "output.xml" as text) with write permission
    set eof theFile to 0
    write theXML to theFile starting at 0
    close access theFile
    If you have multiple files you can either run this in a loop that iterates over the files, or save the script as a droplet, then drop the files onto the script icon. Let me know if you need help with that, too.

  • How can I upload video from my Canon ZR900 DV onto my my MacBook Pro?

    I have system 7.5.5 and plugged my camera into my MacBook Pro using the proper firewire cable (since both ends seemed to fit into their proper places) but now I have no idea how to retrieve the video from my video camera.  Does someone have any idea how I can get this to show up so I can watch this on my computer screen, rather than the small screen on the camera?
    Thanks!
    Erik

    Hi Erik,
    In order to import video from your DV camera into your MacBook Pro you will need an application designed to do this. Fortunately you should have iMovie on you computer and that is one of the many things it can do. See this video that shows the process -
    iMovie ’11: Import Video
    http://support.apple.com/kb/VI104
    as well as this article -
    iMovie '11: Import video from a tape-based (FireWire-equipped) camcorder
    http://support.apple.com/kb/PH2144
    Thanks for using Apple Support Communities.
    Best,
    Brett L

Maybe you are looking for