How to see the file at the application server

HI TO ALL SDNERS ,
                             THIS IS MY CODE WHERE TO CHECK THE DOWNLOADED FILE AT THE APPLICATION SERVER.IN TCODE AL11 I HAVE SEEN THERE IS NO FILE GETTING CREATED.WHEN TRANSFERRING THE SY-SUBRC VALUE IS ZERO.
Program Name        : ZME11_BDC.
Title               : PURCHASE INFORMATION RECORD LOAD PROGRAM
Program Objective   : THIS PROGRAM READS IN THE PURCHASE
                      INFORMATION FILE. IT CREATES A BDC SESSION TO
                      USE TO LOAD THE PURCHASE INFORMATION RECORDS
                      INTO SAP using the ME11 Transaction.
REPORT  ZME11_BDC no standard page heading MESSAGE-ID ZHNC line-size 55.
            constants declaration
constants: c_x value 'X',
           c_sess type apqi-groupid value 'zcustomer',
           c_xd01 type tstc-tcode value 'ME11'.
              DECLARING VARIABLES
DATA: V_MSG(255),
      V_ERREC TYPE I,"NO OF FAILED RECORDS
      V_LINES."NO OF RECORDS
       FLAG DECLARATIONS
DATA: FG_DATA_EXIST VALUE 'X',"CHECK FOR DATA
      FG_SESSION_OPEN VALUE ''.
      STRUCTURES AND INTERNAL TABLE DECLARATIONS
TYPES :BEGIN OF TY_PIR,
         LIFNR TYPE EINA-LIFNR,
         MATNR TYPE EINA-MATNR,
         EKORG TYPE EINE-EKORG,
         WERKS TYPE EINE-WERKS,
         VERKF TYPE EINA-VERKF,"sales person
         TELF1 TYPE EINA-TELF1,"telephone
         URZLA TYPE EINA-URZLA,"country
         REGIO TYPE EINA-REGIO,"region
         APLFZ(5),"plan deleivery time
         EKGRP TYPE EINE-EKGRP,"purchase group
         NORBM(13),
         NETPR(13),
     END OF TY_PIR.
DATA : IT_PIR TYPE TABLE OF TY_PIR,
       WA_PIR LIKE LINE OF IT_PIR.
DATA: BEGIN OF IT_BDCDATA.
INCLUDE STRUCTURE BDCDATA.
DATA END OF IT_BDCDATA.
DATA : BEGIN OF IT_BDCMSG.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA END OF IT_BDCMSG.
                  SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : FNAME TYPE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK B1.
                       AT SELECTION ON VALUE REQUEST
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
   PROGRAM_NAME        = SYST-CPROG
   DYNPRO_NUMBER       = SYST-DYNNR
   FIELD_NAME          = ' '
IMPORTING
   FILE_NAME           = FNAME.
                         START OF SELECTION
START-OF-SELECTION.
PERFORM F_GET_DATA USING FNAME
                   CHANGING IT_PIR.
PERFORM F_GENERATE_DATASET USING FNAME
                           CHANGING IT_PIR WA_PIR.
*&      Form  F_GET_DATA
      text
     -->P_V_FNAME  text
     <--P_IT_PIR  text
FORM F_GET_DATA  USING    P_FNAME LIKE FNAME
                 CHANGING P_IT_PIR LIKE IT_PIR.
DATA: LV_FILE TYPE STRING.
LV_FILE  = FNAME.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                      = LV_FILE
   FILETYPE                      = 'DAT'
  HAS_FIELD_SEPARATOR           = 'X'
  HEADER_LENGTH                 = 0
  READ_BY_LINE                  = 'X'
  DAT_MODE                      = ' '
  CODEPAGE                      = ' '
  IGNORE_CERR                   = ABAP_TRUE
  REPLACEMENT                   = '#'
  CHECK_BOM                     = ' '
IMPORTING
  FILELENGTH                    =
  HEADER                        =
  TABLES
    DATA_TAB                      = P_IT_PIR
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.
IF P_IT_PIR IS INITIAL.
FG_DATA_EXIST = ''.
ENDIF.
ENDFORM.                    " F_GET_DATA
*&      Form  F_GENERATE_DATASET
      text
     -->P_V_FNAME  text
     <--P_IT_PIR  text
FORM F_GENERATE_DATASET  USING    P_V_FNAME LIKE FNAME
                         CHANGING P_IT_PIR LIKE IT_PIR
                                  P_WA_PIR LIKE WA_PIR.
MESSAGE I001(ZHNC).
*OPENING FILE AT THE APPLICATION SERVER FOR WRITING
OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC  EQ 0.
MESSAGE I002(ZHNC).
LOOP AT P_IT_PIR INTO P_WA_PIR.
SPLIT P_WA_PIR AT '*' INTO P_WA_PIR-LIFNR
                           P_WA_PIR-MATNR
                           P_WA_PIR-EKORG
                           P_WA_PIR-WERKS
                           P_WA_PIR-VERKF
                           P_WA_PIR-TELF1
                           P_WA_PIR-URZLA
                           P_WA_PIR-REGIO
                           P_WA_PIR-APLFZ
                           P_WA_PIR-EKGRP
                           P_WA_PIR-NORBM.
*TRANSFER THE FILE FROM INTERNAL TABLE TO APPLICATION SERVER
MESSAGE I003(ZHNC).
TRANSFER P_WA_PIR TO FNAME.
ENDLOOP.
*CLOSING THE FILE AT THE APPLICATION SERVER
CLOSE DATASET FNAME.
ENDIF.

Hello,
I made a similar program. You can have a look at it.
*&      Form  write_to_app_server
      text
-->  p1        text
<--  p2        text
FORM write_to_app_server.
To get filename
  PERFORM get_filename.
To write into the application server
  OPEN DATASET g_filename_with_path FOR OUTPUT IN TEXT MODE.
  IF sy-subrc = 0.
    LOOP AT <l_table> INTO <l_line>.
      TRANSFER <l_line> TO g_filename_with_path.
    ENDLOOP.
    CLOSE DATASET g_filename_with_path.
  ELSE.
    CLOSE DATASET g_filename_with_path.
  ENDIF.
To send mail
  PERFORM send_mail.
ENDFORM.                    " write_to_app_server
*&      Form  get_filename
      text
-->  p1        text
<--  p2        text
FORM get_filename.
  DATA : l_log_path TYPE  filepath-pathintern
                      VALUE 'Y28M_DOWNLOADS_BACKGROUND' .
  CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
       EXPORTING
            client                     = sy-mandt
            logical_path               = l_log_path
            operating_system           = sy-opsys
            file_name                  = p_fname
       IMPORTING
            file_name_with_path        = g_filename_with_path
       EXCEPTIONS
            path_not_found             = 1
            missing_parameter          = 2
            operating_system_not_found = 3
            file_system_not_found      = 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.
ENDFORM.                    " get_filename
You may find it useful.
Regards,
Karuna.

Similar Messages

  • How to run ear file in java application server

    i want how to run .ear file in java application server
    1. i m created ear file
    2. i m created jar file (bean,home,remote)
    3.i m created war file(in the form of jsp)
    but till now i couldnt run ear file
    how to run
    please hel me

    You must create :
    1.Jar file
    2.War file
    And then put them into an ear file
    Exemple : myapp.ear contains
    myappEJB.jar
    myappWEB.war
    META-INF/application.xml
    and application.xml looks like this :
    <application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee
                            http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
        <display-name>myapp</display-name>
        <description>Demo application</description>
        <module>
            <ejb>myappEJB.jar</ejb>
        </module>
        <module>
          <web>
             <web-uri>myappWAR.war</web-uri>
             <context-root>/myapp</context-root>
          </web>
        </module>
    </application>Good luck

  • Checking the file content in application server

    Hi,
    I am writing an XML file from the raw XSF data from a smartform auto generated function module through OPEN DATASET command in BINARY MODE. When I go to tcode AL11 to check the content of the XML file, I can see only the first few bytes of it as it looks like one single line in AL11. Is there any way so that I can read the whole content of the file in the application server itself without downloading it into my local machine.
    Thanks in advance
    Nilay Ghosh

    You may try eigther transaction AL11 with allows you to browse files and display their content(as long they are textfiles).
    If you need specific conversion an own report may help:
    first read the file via dataset commands
    if content is non readable convert it to chars
    split the string into a char or string table
    use the command 'editor-call' (check online help) to display this table.
    Kind Regards
    Klaus

  • Junk chars in the file posted on application server

    HI All,
    I am posting a file on the application server using the OPEN DATASET, TRANSFER, CLOSE DATASET commands.
    The file is posted successfully but it contains junk characters like # and some box kind of character. The file that has the data doesnot have these junk characters.
    Help me resolve this problem.
    Thanks in advance.

    this is my code...
    Open the file in the application server
    OPEN DATASET l_filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc = 0.
      Convert workarea to string type
      CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
        EXPORTING
          IM_VALUE               = ls_jhak
        IMPORTING
          EX_CONTAINER           = l_file
        EXCEPTIONS
          ILLEGAL_PARAMETER_TYPE = 1
          OTHERS                 = 2.
    Transfer the data fetched into the file
      TRANSFER l_file TO l_filename.
    ELSE.
      RETURN.
    ENDIF.
    Close the file in the application server
    CLOSE DATASET l_filename.

  • Want to know the file path for application server in upload program

    Iam doing upload program(i,e)uploading from application server,iam getting run time error while executing the following piece of code
    "OPEN DATASET '/usr/sap/SPE/DVEBMGS00/work/ZPSPAR35_PERS_UP.txt' FOR OUTPUT
                 IN TEXT MODE
                 ENCODING DEFAULT."
    if the above code is wrong can u mention the correct one.

    hi,
    <b>Note: 699267</b>
    <b>Symptom</b>
    a) When downloading to the application server a short dump occurs with the error 'UC_OBJECTS_NOT_CHARLIKE'.
    b) When downloading to a presentation server from an SAP system running on Unicode, only half the data is actually transferred to the downloaded file.
    or
    *)When downloading from an SAP system running on an application server with an EBCDIC-type code page, an incorrect code '0A' is written for the LINE FEED character
    <b>
    Pre-requisite</b>
    a) The output file is opened 'in text mode' which does not allow to write non-character-like structures to the file via the TRANSFER command.
    b) The file is downloaded in the internal representation which uses two bytes per character in a Unicode system. The number of bytes to download is determined from the number of characters in the SAP system, however.
    or
    *)The code of the LINE FEED character is incorrectly programmed.
    <b>
    Solution:</b>
    You need to put some support packs attached with this note. For that you definitely need to ask YOUR FRIENDS WHO HAVE AN S-USER id at your WORK PLACE.
    <b>Note: 879598</b>
    <b>Reason and Prerequisites</b>
    The file is downloaded in the internal representation which uses two bytes per character in a Unicode system. The number of bytes to download is determined from the number of characters in the SAP system. Hence when the download happens the data has to be          converted to the required format.
    <b>Solution</b>
    Apply the corresponding support package or manually implement the changes described in the correction instructions.
    Hope this helps.
    Regards
    ak.
    PS: Reward useful answers with points.

  • Logic to fetch the file name from Application Server

    Hi Friends
    I have a requirement that : By giving the Directory name (eg:/tmp),I have to get the all file names stored under that Directory name.
    Can anyone please provide me the logic / function modules related to this requirement.
    Points are assured for useful answers.
    Regards,
    Sree

    Hi,
    use these:
    function module "EPS_GET_DIRECTORY_LISTING"
    FM RZL_DIR_READ instead. its easy and effective to use.
    Or
    FILE_GET_NAME_USING_PATH,
    EPS_GET_DIRECTORY_LISTING
    /SAPDMC/LSM_F4_FRONTEND_FILE
    OPEN DATASET <Path / filename> FOR INPUT IN TEXT MODE...
    if sy-subrc eq 8, then the file does not exist on the application server.
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Code for reading particular  fields from the file placed in application

    hi,
    code for reading particular  fields from the file placed in application server in to the internal table.

    Hi,
    Use the GUI_UPLOAD FM to upload the File into ur Internal Table.
    DATA : FILE_TABLE TYPE FILE_TABLE OCCURS 0,
             fwa TYPE FILE_TABLE,
             FILENAME TYPE STRING,
             RC TYPE I.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
      EXPORTING
        WINDOW_TITLE            = 'Open File'
       DEFAULT_EXTENSION       =
       DEFAULT_FILENAME        =
       FILE_FILTER             =
       INITIAL_DIRECTORY       =
       MULTISELECTION          =
       WITH_ENCODING           =
      CHANGING
        FILE_TABLE              = FILE_TABLE
        RC                      = RC
       USER_ACTION             =
       FILE_ENCODING           =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        NOT_SUPPORTED_BY_GUI    = 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.
    READ TABLE FILE_TABLE INDEX 1 into fwa.
    FILENAME = fwa-FILENAME.
        CALL FUNCTION 'GUI_UPLOAD'
             EXPORTING
                  filename                = filename
                  FILETYPE                = 'DAT'
           IMPORTING
                FILELENGTH              =
             TABLES
                  data_tab                = itab
             EXCEPTIONS
                  file_open_error         = 1
                  file_read_error         = 2
                  no_batch                = 3
                  gui_refuse_filetransfer = 4
                  invalid_type            = 5
                  OTHERS                  = 6 .
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    Regards,
    Balakumar.G
    Reward Points if helpful.

  • Convert file path in application server as link

    How can we convert file path in application server as link to send email.
    Thanks
    Suresh

    Your app server folders have a mappable location on your network, e.g,
    server\path\filename.  Use an HTML anchor tag and build the link with code.  You'd be better off storing files on a file server (write to a mapped location from the app server) and link to there (same process).

  • HT1766 how can I see my iphone backup to my hp computer - I want to actually see some of the files on the backup to be sure it actually worked

    how can I see my iphone backup to my hp computer - I want to actually see some of the files on the backup to be sure it actually worked

    You can't see them as such.  The entire backup is stored as a database, sql file.  You can find the backup file here:
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Note: To quickly access the Application Data folder, click Start, and choose Run. Type %appdata% and clickOK.
    Windows Vista and Windows 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    Note: To quickly access the AppData folder, click Start. In the search bar, type %appdata% and press theReturn key.
    You will need an sql reader to view the contents,

  • How can I display the front panel of the dinamically loaded VI on the cliente computer, the VI dinamically loaded contains files, I want to see the files that the server machine has, in the client machine

    I can successfully view and control a VI remotly. However, the remote VI dinamically loads another VI, this VI loaded dinamically is a VI that allows open others VIs, I want to see the files that contains the server machine, in the client machine, but the front panel of the dinamic VI appears only on the server and not on the client, How can I display the fron panel with the files of the server machine of the dinamically loaded VI on the client computer?
    Attachments:
    micliente.llb ‏183 KB
    miservidor.llb ‏186 KB
    rdsubvis.llb ‏214 KB

    I down loaded your files but could use some instructions on what needs run.
    It seems that you are so close yet so far. You need to get the data on the server machine over to the client. I generally do this by doing a call by reference (on the client machine) of a VI that is served by the server. THe VI that executes on the server should pass the data you want to diplay via one of its output terminals. You can simply wire from this terminal (back on the client again) to an indicator of your choosing.
    Now theorectically, I do not think that there is anything that prevents use from getting the control refnum of the actual indicator (on the server) of the indicator that has the data, and read its "Value" using a property node. I have never tried this idea but it seems t
    hat all of the parts are there. You will need to know the name of the VI that holds the data as well as the indicator's name. You will also have to serve all VI's. This is not a good idea.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Transaction Code for seeing the files in the  Application Server

    Hello All,
      Can anybody please give me the transaction code for seeing the files in the Application Server
    Thanks in Advance,
    Regards,
    LIJO.

    hi
    good
    try with tcode AL11.
    thanks
    mrutyun^

  • How to Rename the file in the application server?

    Hi friends.
    How to Rename the file in the application server? via abap program so pls kindly let me know thr any function module is there.
    Thanks
    With Regards
    I.Muthukumar.

    Dont think there is any quick fix way of doin this, however you can use the following sequence of dataset ops to get what you need:
    READ DATASET - retrieve contents of current AS file
    TRANSFER DATASET - create a new file on AS with the contents read in READ
    DELETE DATASET - delete the original file on AS (if TRANSFER above is successful)
    Hope this approach helps.
    Cheers,
    Aditya

  • 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

  • How do upload a file to the application server into a directory?

    hi to all,
    i want to upload file into the database..i need upload the file into the application server and save it to a directory..is there any way?where i can read about this?any information?
    ashwiny

    Hello,
    First, we need to determine the terms we are using, in order to avoid confusion. We (including the documentation) are using "upload" to describe storing the file on the server, and "download" to pull it from the server into local machine.
    You can use the "File Browse" item to upload any file you need from your local machine and into a database table. The default APEX configuration (in the dads.conf file) stored the uploaded file in a table called wwv_flow_file_objects$. In your application, you can access this table using a view called APEX_APPLICATION_FILES.
    After you uploaded a file, any user can access it, using the download procedure described in the reference I gave you. The download procedure gives you an option to store the download file anywhere you need, using the "Open/Save" dialog box.
    I believe this is covering everything you need. If you still having problems, please consider posting the relevant application pages on apex.oracle.com. It will be easier to understand and help you.
    Regards,
    Arie.

  • I need to convert PDF file to Word Document, so it can be edited. But the recognizing text options do not have the language that I need. How I can convert the file in the desired of me language?

    I need to convert PDF file to Word Document, so it can be edited. But the recognizing text options do not have the language that I need. How I can convert the file in the desired of me language?

    The application Acrobat provides no language translation capability.
    If you localize the language for OS, MS Office applications, Acrobat, etc to the desired language try again.
    Alternative: transfer a copy of content into a web based translation service (Bing or Google provides a free service).
    Transfer the output into a word processing program that is localized to the appropriate language.
    Do cleanup.
    Be well...

Maybe you are looking for

  • Test call of transport control program (tp) ended with return code 0208

    hi Gurus i am new to sap bi and trying to create transport an Infocube from development server to quality server. While releasing the transport request i am getting the above error and only sub request for development / Correction is available for re

  • Reg creation of  value added service with delivery material

    hi I want to create the material which is used for the value added service with delivery .do u know the material type for creating the service material other than material type 'dien '. if i use the material type as ' DIEN ' , then i can't create the

  • Problems because multiple AppleIDs and no help from iTunes Support

    I am a VERY frustrated owner of 9 separate Apple computers/iPads/iPods/iPhones.  Over time, I have been forced to change my AppleID on 3 separate occasions (non-e-mail to one with e-mail, non-me.com to an @me.com to move my mobile me to iCloud), and

  • Security setting problem!! need help

    i m a designer ,once i done i need to email  the pdf file to cilent .But i wanted to make the file with security !! i just want my cilent just have a view but cant print and save on that file beacuse i scare the cilent use my design as a copyright .

  • Changes Made in IT 0002

    Dear All, If i do some changes in the IT 0002, like change the name, or date of birth etc. will it trigger retro? regards, JIM