Move xml to application server

Hi gurus
iam converting sap data into xml and now iam able to download the file onto presentation server properly.
now i want to write the file onto application server.
DATA:   l_ixml            TYPE REF TO if_ixml,
        l_streamfactory   TYPE REF TO if_ixml_stream_factory,
        l_ostream         TYPE REF TO if_ixml_ostream,
        l_renderer        TYPE REF TO if_ixml_renderer,
        l_document        TYPE REF TO if_ixml_document.
l_streamfactory = l_ixml->create_stream_factory( ).
    l_ostream = l_streamfactory->create_ostream_itable(
              table = l_xml_table ).
    l_renderer = l_ixml->create_renderer( ostream  = l_ostream
                                          document = l_document ).
    l_rc = l_renderer->render( ).
  Saving the XML document
    l_xml_size = l_ostream->get_num_written_raw( ).
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        bin_filesize = l_xml_size
        filename     = 'c:\satish\sample_trans.xml'
        filetype     = 'BIN'
      CHANGING
        data_tab     = l_xml_table
      EXCEPTIONS
        OTHERS       = 24.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

HI KUMAR
I TRIED THAT IT DIDNT WORK.
DATA: XML_TABLE       TYPE TABLE OF XML_LINE.
L_OSTREAM = L_STREAMFACTORY->CREATE_OSTREAM_ITABLE(
              TABLE = XML_TABLE ).
CLEAR P_FILE.
CONCATENATE SY-DATUM4(2) SY-DATUM6(2) SY-DATUM(4) INTO V_DATLO.
CONCATENATE P_OUT V_DATLO P_OFILE '.XML' INTO P_FILE.
OPEN DATASET P_FILE FOR OUTPUT IN BINARY MODE." ENCODING DEFAULT.
IF SY-SUBRC = 0.
  LOOP AT XML_TABLE INTO XML_TABLE_WA.
  TRANSFER XML_TABLE_WA TO P_FILE.
  ENDLOOP.
  ELSE.
  MESSAGE E001(02) WITH 'UNABLE TO OPEN THE FILE FOR OUTPUT'.
WRITE :/ 'UNABLE TO OPEN THE FILE FOR OUTPUT'.
  ENDIF.
CLOSE DATASET P_FILE.

Similar Messages

  • Move file to application server  or delete a file from application server

    Hi all
    I have one application in which if succeful uploading  of BMP file  from application server is not  done , File has to move to another folder like 'ERROR' Folder
    but i am unable to do that.
    here is the code:
    CONDENSE g_t_ws_move.
    CALL 'SYSTEM' ID 'COMMAND' FIELD g_t_ws_move
      ID 'TAB'     FIELD g_t_ws_command_line[].
    where
    <b>G_T_WS_MOVE= 'MOVE /Y /sapin/XVZ/journeyplan/0000000.BMP /tmp/0000000.BMP'
    means  i have to move 000000.bmp file from XVZ to tmp directory ,</b>

    Hello Neetu
    Alternatively you could use a combination of the following function modules:
    - EPS_FTP_PUT
    - EPS_DELETE_FILE
    Regards
      Uwe

  • Copy/move file on application server

    Hey guys,
    is there an easy way to copy/move a file from one directory on application server to an other directory? I know i could use the commands OPEN DATASET and so on. Is there an other way to do this via a function module?
       thx,
         M.
    Moderator Message: Please search before posting, this has been discussed many times in the forum. All points unassigned
    Edited by: Suhas Saha on Aug 13, 2011 10:28 PM

    Hi ,
    As you know about the open dataset way of doing this ...You need another way and that will be as mentioned in the link below .....
    [Copy one file to another on application server |Re: Move  file from one folder to another floder in application server;
    Hope it helps ....
    Thanks,
    Anjaneya
    Edited by: Anjaneya Bhardwaj on Aug 13, 2011 1:02 PM

  • Output XML to Application Server

    Hi,
    I have successfully output the contents of an xml document object (if_ixml_document) using the following code (where p_xml_document is my xml document object):
      TYPES:
        BEGIN OF xml_line,
          data(256) TYPE x,
        END OF xml_line.
      DATA:
        streamfactory     TYPE REF TO if_ixml_stream_factory,
        ostream           TYPE REF TO if_ixml_ostream,
        renderer          TYPE REF TO if_ixml_renderer,
        ls_xml            TYPE xml_line,
        lt_xml_table      TYPE TABLE OF xml_line,
        v_xml_size        TYPE i.
    Transfer contents of xml document object into an internal table.
      streamfactory = g_ixml->create_stream_factory( ).
      ostream = streamfactory->create_ostream_itable( table = lt_xml_table ).
      renderer = g_ixml->create_renderer( ostream = ostream document = p_xml_document ).
      renderer->render( ).
      v_xml_size = ostream->get_num_written_raw( ).
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          bin_filesize = v_xml_size
          filename     = 'c:\hr_sl\aaa_sunlife.xml'
          filetype     = 'BIN'
        CHANGING
          data_tab     = lt_xml_table.
    My problem is I really need to output the XML to the application server, so I need to replace the call to cl_gui_frontend_services=>gui_download with something that will download the xml to the app server.
    I've tried using OPEN DATASET/TRANSFER/CLOSE DATASET, and while I am getting a file created on the app server, it only contains one line of XML.
    My code looks lile this:
      OPEN DATASET l_ofile FOR OUTPUT IN BINARY MODE.
    Transfer xml to dataset
      LOOP AT lt_xml_table INTO ls_xml.
        TRANSFER ls_xml TO l_ofile.
      ENDLOOP.
    Close the dataset.
      CLOSE DATASET l_ofile.
    I've searched and searched on SDN and have not found an answer.  Any help would be greatly appreciated.
    Thanks!
    Edited by: Russell Hergott on Jan 16, 2008 10:52 PM

    hi boss,
    some of the code may be useful for u .
    try like this sending into the internal table  and then try ....
    *& Report  ZTESTPROGRAMFORUPLOAD
    REPORT  ZTESTPROGRAMFORUPLOAD message-id zmsg.
    tables:pa0002.
    types:begin of ty_pa0000,
          pernr like pa0000-pernr,
          endda like pa0000-begda,
          end of ty_pa0000.
    types:begin of ty_pa0002,
          pernr like pa0002-pernr,
          begda like pa0002-begda,
          endda like pa0002-endda,
          vorna like pa0002-vorna,
          nachn like pa0002-nachn,
          end of ty_pa0002.
    data:it_pa0000 type standard table of ty_pa0000 with header line,
          it_pa0002 type standard table of ty_pa0002 with header line.
    data: v_pernr like pa0002-pernr,
          v_lines type i.
    DATA: W_MSG(150)  TYPE C.
    SELECTION-SCREEN BEGIN OF BLOCK FILE WITH FRAME TITLE TEXT-FIL.
    *SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: P_PC  RADIOBUTTON GROUP RAD USER-COMMAND USR.         "PC
    *SELECTION-SCREEN COMMENT 3(5) TEXT-SC1.
    PARAMETERS: P_UNIX  RADIOBUTTON GROUP RAD DEFAULT 'X'.         "UNIX
    *SELECTION-SCREEN COMMENT 11(5) TEXT-SC2.
    parameters:p_file like rlgrap-filename.
    *SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK FILE.
    at selection-screen on value-request for p_file.
    perform f4_help.
    START-OF-SELECTION.
    *---Get the  active employyes
      select     pernr
                 endda
                 from pa0000
                 into table it_pa0000 up to 100 rows
                 where endda >= sy-datum
                 and   begda <= sy-datum
                 and   stat2 = '3'.
      if sy-subrc = 0.
        sort it_pa0000 by pernr endda descending.
        delete adjacent duplicates from it_pa0000 comparing pernr.
      endif.
    select pernr
           begda
           endda
           vorna
           nachn
           from pa0002
           into table it_pa0002
           for all entries in it_pa0000
           where pernr = it_pa0000-pernr.
    sort it_pa0002 by pernr.
    delete adjacent duplicates from it_pa0002 comparing pernr.
    append it_pa0002.
    endloop.
    END-OF-SELECTION.
      describe table it_pa0002 lines  v_lines .
    *---get data into Application Server.
    PERFORM OUTPUT_CORPEDIA_VENDOR_FILE .
      SKIP 2.
      WRITE:/ 'FILE NAME :' , P_FILE .
      WRITE:/ 'NO OF RECORDS DOWNLOADED : ', V_LINES .
    *&      Form  f4_help
          text
    -->  p1        text
    <--  p2        text
    form f4_help .
      IF P_UNIX = 'X'.
    F4 help for UNIX
        CALL FUNCTION 'F4_DXFILENAME_4_DYNP'
          EXPORTING
            DYNPFIELD_FILENAME = 'P_FILE'
            DYNAME             = SY-CPROG
            DYNUMB             = SY-DYNNR
            FILETYPE           = 'P'
            LOCATION           = 'A'
            SERVER             = ''.
        IF SY-SUBRC <> 0.
          MESSAGE E000 WITH TEXT-E01 P_FILE.
        ENDIF.
      ELSEIF P_PC = 'X'.
    F4 help for PC
      clear p_file.
        CALL FUNCTION 'WS_FILENAME_GET'
          EXPORTING
            DEF_PATH         = P_FILE
            MASK             = ',..'
            MODE             = '0 '
            TITLE            = 'Choose File'
          IMPORTING
            FILENAME         = P_FILE
          EXCEPTIONS
            INV_WINSYS       = 1
            NO_BATCH         = 2
            SELECTION_CANCEL = 3
            SELECTION_ERROR  = 4
            OTHERS           = 5.
      ENDIF.
    endform.                    " f4_help
    *&      Form  OUTPUT_CORPEDIA_VENDOR_FILE
          text
    -->  p1        text
    <--  p2        text
    form OUTPUT_CORPEDIA_VENDOR_FILE .
      IF P_PC = 'X'.
      data: v_pcfile type string.
      v_pcfile = p_file.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                      = v_pcfile
          FILETYPE                      = 'ASC'
          WRITE_FIELD_SEPARATOR           = 'X'
        TABLES
          DATA_TAB                      = it_pa0002.
    sort it_pa0002 by pernr.
    delete adjacent duplicates from  it_pa0002.
    else.
      data: outrec(200) type c .
      OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE encoding DEFAULT.
      loop at it_pa0002.
        outrec+0(8) = it_pa0002-pernr.
        outrec+18(8) = it_pa0002-begda.
        outrec+36(8) = it_pa0002-endda.
        outrec+54(40) = it_pa0002-vorna.
        outrec+104(40) = it_pa0002-nachn.
        transfer outrec to p_file.
        clear outrec.
      endloop.
      CLOSE DATASET OUTREC.
        IF SY-SUBRC = 0.
          CLEAR W_MSG.
         CONCATENATE 'Corpedia Vendor Demographic File successfully written to:'
                     P_FILE
                     INTO W_MSG SEPARATED BY SPACE.
          ULINE.  SKIP.
          WRITE : W_MSG.
        ENDIF.
      ENDIF.
    endform.                    " OUTPUT_CORPEDIA_VENDOR_FILE
    regards,
    venkat.

  • Xml to application server

    Hello
    I create with a transfomation a xstring
    and with the fm SCMS_XSTRING_TO_BINARY I create a table.
    This table I can download by fm gui_download and I can open the file
    with a xml-editor - it works.
    But if I do the same, but download to the application server, there is an error,
    I cant open the xml-file.
    I'm looping throught the table what fm SCMS_XSTRING_TO_BINARY give me back
    For each loop I call TRANSFER TO dataset
    I can see, the last record is filled out with 0 (Hex 00)
    I think this is the problem - by dowload with fm GUI_DOWNLOAD, I can set the file lenght,
    but by download to the application server I can't
    Thanks for any help
    Daniel

    Hi Daniel and thank you in advance for availability.
    The code is good for me ... to do something like this:
          lv_null_string = cl_abap_conv_in_ce => UCCP ('0000 ').
         LOOP AT lt_stream ASSIGNING <fs>.
           IF sy-tabix = lines (lt_stream). "only the last row must not be absolutely length
              FIND FIRST OCCURRENCE OF lv_null_string IN <fs>
                    IN BYTE MODE MATCH OFFSET lv_null_length.
              TRANSFER <fs> TO e_filename LENGTH lv_null_length.
           ELSE.
              TRANSFER <fs> TO e_filename.
           ENDIF.
         ENDLOOP.
         CLOSE DATASET e_filename.
    What do you think?
    Then I need your opinion, yesterday I turned the file, which was initially in BINARY MODE, in TEXT MODE, using:
    * Before the function
          CALL FUNCTION 'SCMS_BINARY_TO_STRING'
            EXPORTING
              input_length = lv_length
            IMPORTING
              text_buffer = lv_xml_string
            TABLES
              binary_tab = lt_stream
    * And then writing
         OPEN DATASET FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
         TRANSFER lv_xml_string TO e_filename.
         CLOSE DATASET e_filename.
    Do you think this workaround will produce an equally correct file of XML or is it more correct (formally) write a binary file?
    I ask this because I don't understand why we are the only ones to have this kind of problem around ... there is no other case in SCN.

  • Content-type: application/xml and Application server 9

    I have a web service running on Application server 9, implemented using netbeans and JAX-WS.
    When a client sends a request to it with:
    Content-type: application/xml
    the request is rejected because the server does not recognise the mime type.
    Specifically, the response is:
    HTTP/1.1 415 Unsupported Media Type
    X-Powered-By: Servlet/2.5
    Content-Type: text/plain; charset=iso-8859-1
    Date: Fri, 01 Sep 2006 14:49:04 GMT
    Server: Sun Java System Application Server Platform Edition 9.0
    Connection: close
    Everything works fine when the request has:
    Content-type: text/xml
    Is there a way to make my web service accept content type of 'application/xml'?
    -Tony Beaumont
    Aston University
    beaumoaj

    I have fixed this for myself, i.e. decompile, replace in jar.
    My problem was that most tools define the encoding but code was simply testing
    if( contentType.equalsIgnoreCase( "text/xml" ) )
    so sending xml from other tools that send contentType
    "text/xml;encoding=UTF-8" or some such, like soap tools, would mean no XML was seen.
    Is the proper source available for XSQL?

  • Read xml from application server

    Hello guys,
    I have craeted program read xml file from presentation server. its working fine...
    below is program
    now i want to program read xml file from Application server.
    so please give me some idea for that.........
    <MODIFIED BY MODERATOR - RESPECT THE 2,500 CHARS LIMIT>
    thanks
    jigar
    Edited by: Alvaro Tejada Galindo on Jan 12, 2010 11:50 AM

    Hi
    U need to just replace the fm to upload the file with command OPEN DATASET / READ DATASET / CLOSE DATASET: if you upload the data from application server in the same internal table loaded by fm for presentation your report should be the same
    Max

  • How Standalone OC4J and the Oracle Application Server linked to each other

    Hi ,
    Please let me know what is the relation between a Standalone OC4J and the Oracle Application Server ?
    In my application The Oracle Application Server is installed in C drive and there is a Stand alone oC4j .
    Please tell me how they are linked to each other .
    Thank you .

    It depends on your need and what features and functionality of Oracle Application Server you are interested in. Note that OC4J is a component of Oracle Application Server that can run as a standalone component or within Oracle Application Server. Question #6 in earlier mentioned FAQ document states:
    OC4J standalone is J2EE 1.3 compatible (1.4 and 1.5 too in later releases of OC4J) and is able to be used in both development and small scale production environments. OC4J standalone provides its own inbuilt HTTP/S listener to allow clients to execute Web applications that it has deployed. Application deployment and server configuration of OC4J standalone is performed by the manual editing of a simple set of XML files.
    For large scale enterprise deployments, the Oracle Application Server product is likely to be more suitable with its comprehensive feature set including Oracle HTTP Server, process monitoring and management capabilities, and its configuration and management console.
    So if you are happy with what you see in standalone OC4J and scalability isn't an issue for you, you can stay with standalone OC4J and don't need to move to Oracle Application Server.
    PS: If you do decide to use OC4J that's embedded with Oracle Application Server, you can't move your standalone OC4J inside Oracle Application Server. You will have to reconfigure embedded OC4J again (as you might have done with standalone OC4J) and redeploy your applications.
    Hope this helps.
    Thanks
    Shail

  • How to transfer file from application server to presentation server in background?

    Hi Experts,
    How to transfer file from application server to presentation server in background?
    Thanks in advance
    Namita

    Thanks Raman and Challa,
    We want to move file from application server to Shared folder, not on local machine. We checked FM which you guys have provided but those are not able to read file from application server.
    We need this program to run in background so that we can use this in daily process chain.
    Appreciate your inputs on this.
    Thanks,
    Namita

  • How to pull all the txt files from an application server to oracle server

    hi
    i got some 30 txt files on java application server. i have two questions
    1) can java guys will be able to move those files to some oracle directory that will be used by create external table command.
    2) can oracle do that using a stored procedure ..but then for it i think i have to create ftppkg and ftpbdy and call and connect each time...
    which one is better and why?
    regards
    raj

    Hi,
    You can create procedure to move file from application server to oracle server.
    Code for list all files in directory
    ops$tkyte@8i> GRANT JAVAUSERPRIV to ops$tkyte
      2  /
    Grant succeeded.
    That grant must be given to the owner of the procedure..  Allows them to read
    directories.
    ops$tkyte@8i> create global temporary table DIR_LIST
      2  ( filename varchar2(255) )
      3  on commit delete rows
      4  /
    Table created.
    ops$tkyte@8i> create or replace
      2     and compile java source named "DirList"
      3  as
      4  import java.io.*;
      5  import java.sql.*;
      6 
      7  public class DirList
      8  {
      9  public static void getList(String directory)
    10                     throws SQLException
    11  {
    12      File path = new File( directory );
    13      String[] list = path.list();
    14      String element;
    15 
    16      for(int i = 0; i < list.length; i++)
    17      {
    18          element = list;
    19 #sql { INSERT INTO DIR_LIST (FILENAME)
    20 VALUES (:element) };
    21 }
    22 }
    23
    24 }
    25 /
    Java created.
    ops$tkyte@8i>
    ops$tkyte@8i> create or replace
    2 procedure get_dir_list( p_directory in varchar2 )
    3 as language java
    4 name 'DirList.getList( java.lang.String )';
    5 /
    Procedure created.
    ops$tkyte@8i>
    ops$tkyte@8i> exec get_dir_list( '/tmp' );
    PL/SQL procedure successfully completed.
    ops$tkyte@8i> select * from dir_list where rownum < 5;
    FILENAME
    data.dat
    .rpc_door
    .pcmcia
    ps_data
    http://asktom.oracle.com/pls/asktom/f?p=100:11:3597961203953876::::P11_QUESTION_ID:439619916584

  • XML file in the Application server

    Hi all
    I am transferring the XML data in to application server but it is not transferring complete data .
    why it is not transferring complete data please tell me.
    Points will  be rewarded .
    Thanks.
    Prasad.

    tables: t005s,
            a911 ,
            konp .
    data: begin of it_t005u occurs 0,
            bland like t005u-bland,
            bezei like t005u-bezei,
          end  of  it_t005u .
    data: begin of it_a911 occurs 0,
           regio like a911-regio,
           knumh like a911-knumh,
          end  of  it_a911 .
    data: begin of it_konp occurs 0,
           knumh like konp-knumh,
           kbetr like konp-kbetr,
          end  of  it_konp .
    data: begin of it_download occurs 0,
            string(54),
          end   of it_download.
    data: it_textno like zdms_textno occurs 0,
          wa_textno like line of it_textno   .
    data : gv_filenum like zdms_textno-filenumber  ,
           gv_filenumc(10) type c .
    data: gv_file1 type string.
    data: f1(2),
          f2(2),
          f3(2),
          gv_vat_app(1),
          gv_kbetr(12) .
    *********Start of Inserted by Durai.V 26-May-2008 *****
    data : w_app_ser_nme type msxxlist-name value 'r3prod_EEP_05'.
    data : lv_flag_con type c.
    data : it_download_app_ser like dxrawdata occurs 0.
    *********End of Insert by Durai.V 26-May-2008 *********
    start-of-selection.
      select bland
             bezei
        into table it_t005u
        from t005u
       where spras eq 'EN'
         and land1 eq 'IN'.
      if not it_t005u[] is initial.
        select regio
               knumh
          into table it_a911
          from a911
           for all entries in it_t005u
         where kschl eq 'JIVP'
           and regio eq it_t005u-bland
           and taxk1 eq '1'
           and taxm1 eq 'A'
           and datbi ge sy-datum
           and datab le sy-datum .
      endif.
      if not it_a911[] is initial.
        select knumh
               kbetr
          into table it_konp
          from konp
           for all entries in it_a911
         where knumh eq it_a911-knumh.
      endif.
      it_download-string = 'STATE' .
      append it_download .
      clear it_download .
      it_download-string = '{' .
      append it_download .
      clear it_download .
      loop at it_t005u.
        clear: it_a911,
               it_konp,
               gv_vat_app,
               gv_kbetr.
        read table it_a911 with key regio = it_t005u-bland.
        if sy-subrc = 0.
          read table it_konp with key knumh = it_a911-knumh.
          if sy-subrc = 0.
            gv_vat_app = 'Y' .
          else.
            gv_vat_app = 'N' .
          endif.
        endif.
        if ( it_t005u-bland ne '' ).
          gv_kbetr = it_konp-kbetr / 10 .
          if it_t005u-bezei eq ''.
            f1 = ' ~'.
          else.
            f1 = '~'.
          endif.
          if gv_vat_app eq ''.
            f2 = ' ~'.
          else.
            f2 = '~'.
          endif.
          if gv_kbetr eq ''.
            f3 = ' ~'.
          else.
            f3 = '~'.
          endif.
          concatenate 'STATE'
                      '~'
                      '001'
                      '~'
                      it_t005u-bland
                      '~'
                      it_t005u-bezei
                      f1
                      gv_vat_app
                      f2
                      gv_kbetr
                      f3
                 into it_download-string.
          append it_download .
          clear  it_download .
        endif.
      endloop.
      if sy-subrc = 0.
        lv_flag_con = 'X'.
      endif.
      it_download-string = '}' .
      append it_download .
      clear  it_download .
      clear:  gv_filenum ,
               gv_filenumc,
               gv_file1   ,
               wa_textno  .
      select single filenumber
             from   zdms_textno
             into   gv_filenum
             where  filename eq 'DMS_' .
      move  gv_filenum to gv_filenumc  .
      shift gv_filenumc left deleting leading '0'.
       if gv_filenum < 10 .
         concatenate '0' gv_filenumc into gv_filenumc .
       endif.
      concatenate 'DMS_'
                  gv_filenumc
                  '.txt'
             into gv_file1 .
    *Downloading the file to Application Server**
    Start of Commented by Durai.V 26-May-2008 **********
    *open dataset gv_file1 for output in text mode ENCODING DEFAULT  .
       loop at it_download.
         transfer it_download-string to gv_file1.
       endloop.
    *close dataset gv_file1.
    End of Commented by Durai.V 26-May-2008 ************
    *********Start of Inserted by Durai.V 26-May-2008 *********
      data : lv_serv_file_pth type dxfile-filename.
      lv_serv_file_pth = gv_file1.
      it_download_app_ser[] = it_download[].
      if it_download_app_ser[] is not initial and lv_flag_con = 'X'.
        call function 'DX_FILE_WRITE'
          exporting
            filename            = lv_serv_file_pth
            server              = w_app_ser_nme
            pc                  = ''
          tables
            data_tab            = it_download_app_ser[]
          exceptions
            no_file_on_server   = 1
            no_data_on_server   = 2
            gui_download_failed = 3
            no_authority        = 4
            others              = 5.
    *********End of Inserted by Durai.V 26-May-2008 ***********
        if sy-subrc = 0.
          wa_textno-filename   = 'DMS_'         .
          wa_textno-filenumber = gv_filenum + 1 .
          modify zdms_textno from wa_textno .
        endif.
      else.
        write / 'No Data Selected, So file not created in Appllcation Server'.
      endif.
    check this report ........it is doing the same
    reward IF...................
    Regards
    Anbu

  • Creation of xml file in r3 application server (AL11)

    Hi All
    I need to create xml file in r3 application server (AL11) using PI.Can we achieve this using file adapter or we need to proceed with proxy. As I tried with file adapter with FTP transport protocol. Its giving the error as "Unable to create new pooled resource:FTPEx:Login incorrect".
    Thanks in advance
    Regards,
    Kartikeya

    Hi
    need to create xml file in r3 application server (AL11) using PI.Can we achieve this using file adapter or we need to proceed with proxy.
    To generate file at AL11 file directory use File adapter. Proxy is not required for this
    Its giving the error as "Unable to create new pooled resource:FTPEx:Login incorrect".
    1. Check with the Login credentials for the FTP service.
    2. FTP User you use in communication channel must have 777 access to FTP location.
    Thanks
    Gaurav

  • Parsing XML files from application server

    I need to read  an XML file from the application server. This can be done using OPEN DATASET in BINARY MODE and reading into internal table of type binary data.
    But inorder to parse the document using the iXML library, i need to pass the filesize of the XML file that is read into internal table.
    Please let me know how to calculate this filesize ?

    Hi ,
    Check the FM : /SAPDMC/LSM_F4_SERVER_FILE.
    Inside this FM , subroutine below exists.The main program for routine is /SAPDMC/LLSMW_AUX_020F02.
    Call this routine from your program. You will get the length in bytes from the field len of table pt_file.
    data:
      begin of gs_file,
        directory(75) type c,              " name of directory.
                                           " (possibly truncated.)
        name(75)    type c,                " name of entry.
                                           " (possibly truncated.)
        type(10)    type c,                " type of entry: directory, file
        *len(8)      type p,                " length in bytes*
        owner(8)    type c,                " owner of the entry
        mtime(6)    type p,                " last modification date,
                                           " seconds since 1970
        mode(9)     type c,                " like "rwx-r-x--x":
                                           " protection mode
        errno(3)    type c,
        errmsg(40)  type c,
        mod_date    type d,
        mod_time(8) type c,                " hh:mm:ss
        subrc like sy-subrc,
    end of gs_file.
    DATA : pt_file LIKE TABLE OF gs_file.
    DATa : p_ok.
      PERFORM /sapdmc/llsmw_aux_020f02(directory_contents_get)
      TABLES   pt_file
                                USING    '/TMP' ""!!! Here is your filepath
                                CHANGING p_ok

  • Infopackage-Load Many Files from Application Server and later Archive/Move

    Hi All..
      I have a doubt,   I have a requirement of take many files to load into BI 7.0..  I used the infopackage before with option:
    Load Binary File From Application server
      I load information successfully... only with one file ...but If I can load many files (with different names) like the next list.. I think it's not a good idea modify the file name (path) on infopackage each time).. :
    *All of this files will be on one server that itu2019s map into AL11.. Like
    Infopfw
    BW_LOAD_20090120.txt
    BW_LOAD_20090125.txt
    BW_LOAD_OTHER_1.txt
    u2026.
    Etc..
    This directory it's not in BW server.. It's other server..but I can load form this location (one file by one)
    Could you help me with this questions:
    -     How can I Use an infopackage with routine that take all the files..one by oneu2026 in order of creation dateu2026and load into Target? Is it possible?.. I have some knowledge of ABAP.. but I don´t know exactly how I can say to system this logicu2026
    -     In addition is it possible move this files to other locationu2026 like into Infopfwarchive u2026 just to have an history of files loaded.
    I saw that in infopackage you have an option to create a routine.. in ABAP codeu2026 Iu2019m a little bit confused because I donu2019t  know how I can specify all the path..
    I try with:
    Infopfw
    InfopfwFile.csv
    Infopfw
    This is the abap code that automatically you see and you need to modifyu2026
    Create a routine for file name
    This routine will be called by the adapter,
    when the infopackage is executed.
              p_filename =
              p_subrc = 0.
    Thank you for your ideas or recommendations.
    Al

    Hi Reddy, thank you for your answer
    I have some doubuts.. when you explain me the option:
    All the above files are appending dates at the end of the file....
    You can load the files through infopackage by using Routines and pick the files based on date at the end of the file..***
    I need to ask you if you think that when you know the date of the file and the infopackage pick each file... thi can work for many files??... or how it's possible control this process?
    About this option, I want to ask you If when you menction Unix code... where it's programed this code?.. in the routine of BW Infopackage??
    ****Or
    Create two folders in your BW in Application server level, in AL11 (ask Basis team)
    I call it is F1 and F2 folders.
    First dump the files into F1 I assume that the file name in F1 is "BW_LOAD_20090120.txt", using Unix code you rename the file and then keep in the same foleder F1 or move to F2.
    Then create InfoPackage and fix the file name (i.e. you renamed), so you don't need to change everyday your file name at infopackage level.Because in AL11 everyday the file are overwrite.
    To I get BW_LOAD_20090120.txt file in F1, then I renamed to BW_LOAD.txt and loaded into BW, then tomorrow I get BW_LOAD_20090125.txt in F1, then I renamed to BW_LOAD.txt....
    so in this way it will work.You need to schedule the Ubix script in AL11.
    This is the way how to handle the application server...I'm using the same logic.
    Thank you soo much.
    Al

  • FM to read XML files from Application server in ECC5.0

    Hi All,
    We need to pick up an XML file from Application server/FTP server. The requirement is to parse the XML file and process it to create material master. SAP provides standard function modules to read XML files.
    Now we need to read the XML file contents of MM01 and upload into SAP Data Base through BAPI
    I need to know about the Function modules to read XML files from Application Server and also about the FM's that will update the Date base tables with the data obtained form XML files.
    Regards
    Prathima

    Parsing XML data:
    http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/frameset.htm
    or alternatively check out ABAP online help for "CALL TRANSFORMATION".
    For creating the material master look at BAPI_STANDARDMATERIAL_CREATE.
    Thomas

Maybe you are looking for

  • 3ivx.dll was not found

    When I try to open itunes I get this msg: this application has failed to start because 3ivx.dll was not found. If I completely uninstall itunes and reinstall it, it will work for that session. If I close it down and try to reopen I get the error msg

  • Vendor Payment Method

    Hi All, Can anybody tell me what are all the ways for an out going payments. My requirement gos like were i can see all the open items for all vendors and by sellecting the few items to pay through cheque. Thanks In advance Murali

  • Putting pictures on System 7.1 with floppy disk created on Windows PC

    Hi all, I have a Quadra 605 on system 7.1 that I've been experimenting with, would like to get some pictures transferred onto it. I tryed using apple file exchange which is on the Quadra to read a Windows DOS formatted disk with some pictures on it.

  • Exception Handling with OC4J Web Services

    Hi, I want to throw some custom exceptions from my web services, based upon my business logic. From the documents I came to know that I can use "javax.xml.rpc.soap.SOAPFaultException" for the same. Following is the sample web service code which I'm t

  • A program to test JVM

    Hi, I am looking for a small Java program that has all the [Java bytecodes|http://java.sun.com/docs/books/jvms/second_edition/html/Mnemonics.doc.html] used. In case any bytecode is not correctly implemented by a JVM then the program should returns fa