Read the file on application server and Z  table as Link in ALV report.

Hi ,
I need some suggession on following requirement.
I need to develop an ALV report where, I have to display 6 column. Four rows are kind of data which i am getting from some tables. But other two column are link to Excel files. So following are the two cases
Case 1: One of these column has a link, and when you select this link , an Excel file gets open and this Excel file is stored in Application server.
Case 2: The other column, will have a link and after selecting the link, an Excel file gets open but this time the Excel file is coming from a Z table( Stored as File name..file type and File content).
Please give some light on these two cases.
Regards
PG

Hi PG,
If I understood you have to handle some different links.
Well,
you can try to do this:
1- when you fill the fieldcat structure you have to add --> fieldcat-hotspot = 'X', for each column you want to handle like hotspot.
2- manage the method hotspot_click of class cl_event_receiver where you can handle your different excel files.
Let me know,
bye
Alessandro

Similar Messages

  • What are the commands available to read a file from application server and

    What are the commands available to read a file from application server and store the file into an internal table?

    Hi,
    To read a file from an Application Server to an Object there is a command in ABAP called <b>READ DATASET</b>. After that file is transported to that object you have to do a loop and put that data in an Internal Table.
    This statement exports data from the file specified in dset into the data object dobj. For dobj, variables with elementary data types and flat structures can be specified. In Unicode programs, dobj must be character-type if the file was opened as a text file.
    For dset, a character-type data object is expected - that is, an object that contains the platform-specific name of the file. The content is read from the file starting from the current file pointer. After the data transfer, the file pointer is positioned after the section that was read. Using the MAXIMUM LENGTH addition, the number of characters or bytes to be read from the file can be limited. Using ACTUAL LENGTH, the number of characters or bytes actually used can be determined.
    In a Unicode program, the file must be opened with an arbitrary access type; otherwise, an exception that cannot be handled will be triggered.
    If the file has not yet been opened in anon-Unicode program, it will be implicitly opened as a binary file for read access using the statement
    OPEN DATASET dset FOR INPUT IN BINARY MODE.
    . If a non-existing file is accessed, an exception that can be handled can be triggered.
    Influence of Access Type
    Files can be read independently of the access type. Whether data can be read or not depends solely on the position of the file pointer. If the latter is at the end of the file or after the file, no data can be read and sy-subrc will be set to 4.
    Influence of the Storage Type
    The import function will take place irrespective of the storage type in which the file was opened with the statement OPEN DATASET.
    If the file was opened as a text file or as a legacy text file, the data is normally read from the current position of the file pointer to the next end-of-line marking, and the file pointer is positioned after the end-of-line marking. If the data object dobj is too short for the number of read characters, the superfluous characters and bytes are cut off. If it is longer, it will be filled with blanks to the right.
    If the file was opened as a binary file or as a legacy-binary file, as much data is read that fits into the data object dobj. If the data object dobj is longer than the number of exported characters, it is filled with hexadecimal 0 on the right.
    If the specified storage type makes conversion necessary, this is executed before the assignment to the data object dobj. Afterwards, the read data is placed, byte by byte, into the data object.
    System Fields
    sy-subrc Meaning
    0 Data was read without reaching end of file.
    4 Data was read and the end of the file was reached or there was an attempt to read after the end of the file.
    Thanks,
    Samantak.
    <b>Rewards points for useful answers.</b>

  • Regarding Reading the file from Application Server

    Hi,
    I am trying to read data from Application Server but due to special characters it is getting dumped out.
    US24,Q,Acero (Carbon),AA,0010,0001,01,Ver Mir para dimension#
    US24,Q,Acero (Carbon),AA,0010,0002,01,Area rectificada sin da#os ra
    US24,Q,Acero (Carbon),AA,0010,0003,01,Ver Mir para dimension#
    US24,Q,Acero (Carbon),CD,0010,0001,01,ITPE Soken para verificacion
    US24,Q,Acero (Carbon),CD,0010,0010,01,No se permite desprendimiento
    US24,Q,Acero (Carbon),CD,0010,0002,01,"Vernier, cinta metrica"#
    In the last line it is going into dump due to special character ".
    Please suggest.
    Thanks
    Priyanka.

    Hi,
    You can check the mode in which you are reading the file
    from application server that is
    Open Dataset in Binary or Text Mode.
    Hope it helps
    Regards
    Mansi

  • Error in Reading the file from Application Server

    Hi,
    This Error is regarding one of my interface, the issue is that , the interface reads data from file in bunch suppose 100 records at a time , then processes those records and once finished go for next 100 records .
    Noe the error is that , the process takes place till 500 records correctly but when it went to fetch for next 100 i.e fom 501 to 600 it selects only 501 to 583 .
    this records has been processed successfully but the job finished there only
    but the file contains 788 records
    When the same file has been run in other server it ran successfully without such error .
    Can you please suggest how to resolve the issue

    Hi,
    Try to manually download the file from application server using standard transactions, and than check how many records are you able to download from app. server.
    I guess there might be something wrong with the format of 583rd record, which makes sap assume that the file has come to an end.
    Hope this will help you.
    Regards,
    Vinit...

  • Reading XML file from application server and  put into internal table-4.6C

    Dear All,
    Is there any way of reading XML file from application server to SAP? I am using 4.6C. Function module SCMS_STRING_TO_XSTRING function module is not available. Please suggest.
    Thanks and regards,
    Atanu

    Hi Atanu!
    Simply use the XSLT transformation 'ID'.
    FIELD-SYMBOLS <ls_result> TYPE ANY.
    CREATE DATA lref_data TYPE (your_structure).
    ASSIGN lref_data->* TO <ls_result>.
    CALL TRANSFORMATION id
                        SOURCE XML xmlstr
                        RESULT result = <ls_result>.
    "xmlstr" contains your XML file. Just read it into it via standard I/O operations. "<ls_result>" will contain your DDIC formatted content.
    Best regards
    Torsten

  • Not recognizing # while reading the file from application server

    Hi
    I am reading a file from application server. While reading into internal table with read statement the last field in each record is filling with hash symbol in the last digit. If I write any if condition with HASH symbol its not going inside the if condition, means its not recognizing as hash may be its internally treating as some other. I need to remove the hash from that field. How I can do that.
    Thanks,
    kishore

    I faced exact situation. Yes, internally its treated as some other special character. What i did was, becuase hash symbol was always coming at the end...i created a dummy field in my internal table so that it will not interfere with my actual data. When i see the data in my internal table, the hash always falls in the last field (dummy) which i will ignore. I could not get solution to remove this hash so i adopted this approach and it worked!!
    Hope it helps,
    SKJ

  • Error while reading excel file from application server into internal table.

    Hi experts,
    My requirement is to read an excel file from application server into internal table.
    Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type).
    Now in my program I have used :
    OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    DO.
    READ DATASET v_filename INTO wa_tab.
    The statement OPEN DATASET works fine but I get a dump (conversion code page error) at READ DATASET statement.
    Error details:
    A character set conversion is not possible.
    At the conversion of a text from codepage '4110' to codepage '4103':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported
    The running ABAP program 'Y_READ_FILE' had to be terminated as the conversion
    would have produced incorrect data.
    The number of characters that could not be displayed (and therefore not
    be converted), is 445. If this number is 0, the second error case, as
    mentioned above, has occurred.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
    caught and
    therefore caused a runtime error.
    The reason for the exception is:
    Characters are always displayed in only a certain codepage. Many
    codepages only define a limited set of characters. If a text from a
    codepage should be converted into another codepage, and if this text
    contains characters that are not defined in one of the two codepages, a
    conversion error occurs.
    Moreover, a conversion error can occur if one of the needed codepages
    '4110' or '4103' is not known to the system.
    If the conversion error occurred at read or write of  screen, the file
    name was '/usr/sap/read_files/fm_test_excel.xls'. (further information about
    the file: "X 549 16896rw-rw----201105170908082011051707480320110517074803")
    Also let me know whether this is the proper way of reading excel file from app server, if not please suggest an alternative .
    Regards,
    Karthik

    Hi,
    Try to use OPEN DATASET v_filename FOR INPUT IN BINARY mode encoding default. instead of OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    As I think you are uploading the file in BIN format to Application server and trying to open text file.
    Regards,
    Umang Mehta

  • Read Excel File on Application Server to Internal Table

    Hi Everybody!
    Can anyone tell me how I can Read in an Excel File from the Application Server?
    I'm familiar with the OPEN DATASET Statement and I already use it to read in text files.
    Important is, that it works in the Batch / can be used as a background job
    I already tried using
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    which did not work.
    Can anybody please help me`?
    I created the file I try to read out from the Application Server Folder with the Standard upload
    in ABAP Web Dynpro and Wrote it to the Server with the following code. Does anyone know
    if maybe already the writing is to the application server is wrong?
    try.
          convt = cl_abap_conv_in_ce=>create(
            input = lv_filedata
            encoding = 'UTF-8'
            replacement = '?'
            ignore_cerr = abap_true ).
          convt->read( importing data = s_cont ).
        catch cx_sy_conversion_codepage.
          wd_comp_controller->show_error( exporting
            text = 'There occurred an error during conversioning the code page.' type = 'E' ).
      endtry.
        open dataset XLSFILEPATH for output in binary mode.
        transfer s_cont TO XLSFILEPATH.
        close dataset XLSFILEPATH.
    Best Regards and Thanks,
    Steffen

    Hi Suhan,
    I tried the following, but the output in the table doesn't look good at all
    Can you please help?
    OUTPUT:
    ??#u0871#?################>###??##############################=#######????########???????????????????????????????????????????????????????????????????????????????????????????????????????
    ####################################################################################### ###!###"#######$###%###&###'###(###)###*###+###,###-###.###/###0###1###2###3###4###5###6###7#
    #?######Z##A#r#i#a#l###3########,#####0#\# #"#? "#;#\#-###,#####0#\# #"#? "###=########,#####0#\# #"#? "#;#[#R#e#d#]#\#-###,#####0#\# #"#? "###?########,#####0#.#0#0#\# #"#? "#;#\#-
    ###?? ##?########? ?#######?? ##?########? ?#######?? ##?#P######? ?#######?? ##?#P######? ?#######?? ##?# ######? ?#######?? #################A#?#?j}#(#}############################
    ##########?########}#?#}#############*##################_#? _#-########????#,#####0########????#? _#-#;########????#"#?#?#\########????#_#-#@#_
    #######????########}#(#}#############+##################_#? _#-}#(#}#############,##################_#? _#-}#(#}#############-##################_#? _#-}#(#}#############.###########
    ##########?########}#<#}#############6#############?}#?#_#? _#-########??#?#,#####0}#<#}#############7#############?e#?#_#? _#-########????#,#####0}#?#}#############8###############
    #######????########}#?#}#############9#############????#_#? _#-########????#,#####0########????#? _#-#;########????#"#?#?#\########????#_#-#@#_
    #######????########}#(#}#############:##################_#? _#-}#-#}#############;##################_#? _#-#####}#P#}#############<##################_#? _#-#############,#####0#####
    ##Check Cell?#z#?##############?
    #C#h#e#c#k# #C#e#l#l##########?##????########????#####?##????#######?##????#######?##????#######?##????##?###+?#??# #?##############?##C#o#m#m#a#####?###,?#??#(#?##############?##C#
    #5####Input?#p#?##############?##I#n#p#u#t##########?##?u0319?#####?##??v?#####?#####?#######?#####?#######?#####?#######?#####?##?###6####Linked Cell?#F#?##############?##L#i#n#k#e#d#
    ?##N#o#t#e##########?##????#####?##????#######?##????#######?##????#######?##????##?###9####Output?#r#?##############?##O#u#t#p#u#t##########?##????#####?##????#####?##????#######?#
    #;####Title?#1#?##############?##T#i#t#l#e##############I}?%####?#
    #<####Total?#H#?##############?##T#o#t#a#l################?########O???##########O???##?###=####Warning Text?#:#?##############?##W#a#r#n#i#n#g# #T#e#x#t##########?##?##??#X#?######
    ##Commission###Health Incentive ###Housing Norm###Hypo Tax###Hypo Tax- Special Wages###Paid Time Off(##Vision Insurance- Withheld from Employee###Working Spouse/DP surcharge)##TX St
    ###########?#?#?######### #########c###?3###N##?h##?t##nu############d#################????MbP?_#####*#####+#####?#####?###########%#####?#?###?#########?#####?#####&###ffffff??'###
    #I#######}########+######}#######$
    ######}#######m###############c###################?###################?###################?###################?###################?###################?###################?##########
    CODING:
    types: begin of st_excel_parse,
              clientno type string,
              fileid type string,
              paymtreportingid type string,
              name type string,
              employee_id  type string,
              home_country type string,
              host_country  type string,
              actstartdt  type string,
              actenddt type string,
              assignment_status type string,
              paymttypenm  type string,
              paymtcategorynm  type string,
              paymtdt  type string,
              transeffdt  type string,
              amount  type string,
              currency_code type string,
      end of st_excel_parse.
      data: ls_excel_parse type st_excel_parse,
            lt_excel_parse type table of st_excel_parse.
      data l_wa_raw_data type string.
      open dataset gv_str_filename for input in text mode encoding default.
      if sy-subrc = 0.
        do.
          read dataset gv_str_filename into l_wa_raw_data.
          if sy-subrc = 0.
            "Split the file record using <TAB> and store inside the work area
            split l_wa_raw_data at cl_abap_char_utilities=>horizontal_tab into :
              ls_excel_parse-clientno
              ls_excel_parse-fileid
              ls_excel_parse-paymtreportingid
              ls_excel_parse-name
              ls_excel_parse-employee_id
              ls_excel_parse-home_country
              ls_excel_parse-host_country
              ls_excel_parse-actstartdt
              ls_excel_parse-actenddt
              ls_excel_parse-assignment_status
              ls_excel_parse-paymttypenm
              ls_excel_parse-paymtcategorynm
              ls_excel_parse-paymtdt
              ls_excel_parse-transeffdt
              ls_excel_parse-amount
              ls_excel_parse-currency_code .
            append ls_excel_parse to lt_excel_parse.
          endif.
        enddo.
      endif.

  • Read excel file in application server to internal table

    Hi,
    I have an excel file located in some folder in my application server. I don't have excel installed in the server. Now I want to read the excel file data into an internal table. I tried to use READ DATASET, but it returned junk characters.
    I have searched SDN extensively for this, but without any succesful answer.
    Regards,
    Arun.

    Hi Arun,
    Please check the code below for your reference.
    TABLES:eket.
    TYPE-POOLS truxs.
    DATA it_truxs(4056) TYPE c OCCURS 0.
    DATA:v_dt(2),filename TYPE string,
    i_temp TYPE truxs_t_text_data.
    DATA:BEGIN OF it_eket OCCURS 0,
    ebeln LIKE eket-ebeln,
    ebelp LIKE eket-ebelp,
    etenr LIKE eket-etenr,
    eindt LIKE eket-eindt,
    END OF it_eket.
    PARAMETERS: p_path TYPE rlgrap-filename.
    SELECTION-SCREEN : PUSHBUTTON /2(10) pb_but1 USER-COMMAND get.
    PARAMETERS:p_no TYPE i.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = sy-cprog
          dynpro_number = sy-dynnr
        IMPORTING
          file_name     = p_path.
    START-OF-SELECTION.
      REFRESH :it_eket,i_temp,it_truxs.
      filename = p_path.
      CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
      filename = filename
      filetype = 'ASC'
    * has_field_separator = 'X'
      TABLES
      data_tab = i_temp.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_field_seperator    = 'X'
          i_tab_raw_data       = i_temp
          i_filename           = p_path
        TABLES
          i_tab_converted_data = it_eket
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      SORT it_eket BY ebeln.
      DELETE ADJACENT DUPLICATES FROM it_eket COMPARING ebeln.

  • 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

  • How can I download the data to Application Server and Network Drive

    Hi Experts
    I am having problem with download the data to Application Server and Network Drive in back ground. its working in foregorund but not in back ground.please suggest me . Thanks for advance.
    Thanks & Regards
    Raghava

    Hi Experts
    I am using like this
    P_Back is a check box on the selection-screen.
    it_fihrst_out-its internal table
    sy-batch -Program is running in the background
    IF sy-batch IS INITIAL.
        IF p_back = 'X'.
          OPEN DATASET file_01 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
          IF sy-subrc = 0.
            LOOP AT it_fihrst_out.
              TRANSFER it_fihrst_out TO file_01.
            ENDLOOP.
          ENDIF.
          CLOSE DATASET file_01.
          CASE sy-subrc.
            WHEN 0.
              WRITE: / file_01, / 'successfully generated.'.
            WHEN OTHERS.
              WRITE: / file_01, 'Unexpected error occurred.'.
          ENDCASE.
        ELSE.
          CALL FUNCTION 'WS_DOWNLOAD'
            EXPORTING
              filename                = file_01
              filetype                = 'ASC'
            TABLES
              data_tab                = it_fihrst_out
            EXCEPTIONS
              file_open_error         = 1
              file_write_error        = 2
              invalid_filesize        = 3
              invalid_type            = 4
              no_batch                = 5
              unknown_error           = 6
              invalid_table_width     = 7
              gui_refuse_filetransfer = 8
              customer_error          = 9
              OTHERS                  = 10.
          CASE sy-subrc.
            WHEN 0.
              WRITE: / file_01, / 'successfully generated.'.
            WHEN 2.
              WRITE: / file_01, 'Output Error: File still open'.
            WHEN OTHERS.
              WRITE: / file_01, 'Unexpected error occurred.'.
          ENDCASE.
        ENDIF.
      ELSE.
        LOOP AT it_fihrst_out.
          WRITE:/ it_fihrst_out.
        ENDLOOP.
      ENDIF.
    This is the code .

  • To create a new file in application server and transfer data to ti

    i am doing the following where i have to create a new file in application server and transfer data to tht file from an internal table.but its saying file cant be opened.the path i am giving to parameter p_prefil is /tmp/prachi.txt.
    wats the prob..can anyone help.
    DATA:L_WA_FINAL TYPE TY_FINAL,
         l_wa_string type string.
    OPEN DATASET P_PREFIL FOR OUTPUT IN text mode encoding default.
    if sy-subrc <> 0.
    write: ' file cannot be opened'.
    stop.
    endif.
    LOOP AT P_I_FINAL INTO L_WA_FINAL.
    move l_wa_final to l_wa_string.
    TRANSFER l_wa_string TO P_PREFIL.
    if sy-subrc <> 0.
    write: 'file can not be written'.
    stop.
    endif.
    clear l_wa_final.
    ENDLOOP.
    CLOSE DATASET P_PREFIL.
    if sy-subrc <> 0.
    write: ' file cannot be closed'.
    stop.
    endif.

    DATA:L_WA_FINAL TYPE TY_FINAL,
    l_wa_string type string.
    OPEN DATASET P_PREFIL FOR OUTPUT IN text mode encoding default.
    if sy-subrc ne 0.
    write: ' file cannot be opened'.
    stop.
    endif.
    LOOP AT P_I_FINAL INTO L_WA_FINAL.
    move l_wa_final to l_wa_string.
    TRANSFER l_wa_string TO P_PREFIL.
    write: 'file can not be written'.
    clear l_wa_final.
    ENDLOOP.
    CLOSE DATASET P_PREFIL.
    if sy-subrc ne  0.
    write: ' file cannot be closed'.
    stop.
    endif.

  • Reading XML File from application server

    Hi experts,
    My aim is to read a XML file from application server and extract the relevant data from it and process further.
    When I am trying to read a XML file from application server it is reading success fully but the problem is that its not reading the last root structure of XML file why is so happening can any body help me?
    I am using the following code:
    TYPES: BEGIN OF xml_line,
    text(256) type x,
    END OF xml_line.
    DATA: e_file LIKE rlgrap-filename VALUE  'applcatin server path'
    OPEN DATASET e_file FOR INPUT IN BINARY MODE.
    IF sy-subrc EQ 0.
      DO.
        READ DATASET e_file INTO wa_item1-text.
        IF sy-subrc EQ 0.
          APPEND wa_item1 TO gt_item1 .
          CLEAR wa_item1.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
    ENDIF.
    CLOSE DATASET e_file.
    after this i am passing this internal table to "cl_ixml" class to extract the data
    but it returning the itab with required value except the last record.
    The stream reading the file it self is i thought in complete thats why it is not converting the all values.
    Please  help me...
    Thanks a ton in advance.

    Hi,
    1 Copy Report BCCIIXMLT1
    2 (you can change the way of filling internal table xml_table if necessary)
    3 you don't need the part between
    *-- render the DOM back into an output stream/internal table
    and
    *-- print the whole DOM tree as a list...
    Comment it out or simply delete it
    4 Rename form print_node to your liking e.g. process_node
    5 In your new form you need three extra variables:
    data: attribs type ref to IF_IXML_NAMED_NODE_MAP,
          attrib_node type ref to IF_IXML_NODE,
          attrib_value type string.
    6 After the lines:
    when if_ixml_node=>co_node_element.
      string = pNode->get_name( ).
    Insert:
    attribs = pNode->get_attributes( ).
    clear attrib_value.
    case string.
      when ''. "put your XML tag name here
        attrib_node = attribs->get_named_item(name = '' ). "put your XML attribute name here
        attrib_value = attrib_node->get_value( ).
    You can also refer link,
    /people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach
    thanks & regards
    shreemohan

  • Function module to read xml files from application server

    Hi experts,
            I need to read  xml files from application server to sap. Is the any siutable function moldule for that?

    Hi Cenosure,
    Donno about FM which will upload data directly to SAP, I think you have to do some mapping for it so that it will suit the SAP format. Again it depends on your requirement..
    Please elaborate more about your requirement.
    Please have a look on below FM
    TEXT_CONVERT_XML_TO_SAP
    Also search on SCN there are many threads on the same topic available.
    http://abapreports.blogspot.com/2008/09/upload-xml-file-from-application-server.html
    This is the link which will give you the Code
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/Z_RMTIWARI_XML_TO_ABAP_46C.html
    Use this XML file to Upload the same, this Program will work for your XML file also,
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/input_xml.xml
    See the below thread also
    Upload XML to internal table and vice versa in SAP 4.6C
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • How to provide the F4 functionality to the files on application server

    Hi,
    How to provide the F4 functionality to the files on application server at selection screen.as it is F4_FILENAME for files on desktop , is there any Function module for this purpose also. I did a search in R/3 but didnt get any FM .Please advise.
    Regards,
    sam.

    You can get to it  using frontend class CL_GUI_FRONTEND_SERVICES if you know the host name and have the correct permissions, for example, this program works great for me in my system.
    report zrich_0001 .
    data: ifiletable type filetable.
    data: xfiletable like line of ifiletable.
    data: rc type i.
    parameters: p_file1 type localfile default'\sapprdusr'.
    at selection-screen on value-request for p_file1.
    call method cl_gui_frontend_services=>file_open_dialog
       EXPORTING
    *    WINDOW_TITLE            =
    *    DEFAULT_EXTENSION       =
    *    DEFAULT_FILENAME        =
    *    FILE_FILTER             =
         INITIAL_DIRECTORY       = '\sapprdusr'
    *    MULTISELECTION          =
      changing
        file_table              = ifiletable
        rc                      = rc
    *    USER_ACTION             =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        others                  = 4.
    read table ifiletable into xfiletable index 1.
    if sy-subrc = 0.
      p_file1 = xfiletable-FILENAME.
    endif.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Can't figure out how to import photos

    I've been watching YouTube videos as well as reading tutorials and I can't figure out how to import a single photo. This is what my screen looks like - http://i.imgur.com/kODcL9t.jpg Everything I watch or read, it appears I need to click Import > sel

  • Want to convert warning message in error message.

    Hi..   In transaction code F-47, one warning msg has come 'Purchasing Document belongs to another supplier'. So, now i want this should be an error msg. I checked at configuration level, but it not possible. I got the include where this msg has come.

  • How to print data from database

    Hi, Assume that the HR web application contains a JSP page that displays the employees in paged table. The employees table has a link "Print" witch suppose to print al the records from database NOT only the data that is shown in the current page. For

  • XI Mapping : complex Case to me

    Hi, here i will explain my mapping case : Source : Items : item1 item2 item3 TextItems 1 texta for item1 1 textb for item1 3 text for item3 Target Structure(take care about cardinality) Items(0...unbounded) Itemdetail(1..1)    ItemText(0..1)      Lin

  • Java dispatcher & SDM not starting

    I am getting foll errors when starting java instance in Eportal development server 6.0 Developer trace file contents of Java instance during startup :- trc file: "F:\usr\sap\J2D\JC00\work\dev_jcontrol", trc level: 1, release: "640" node name   : jcon