File path for application server file

Hi All,
             I have a file 'abc.doc' stored on the application sever.
            I want to crate a document using the BAPI_DOCUMENT_CREATE and store this file
            What is the file path that I need to pass into the bapi.
Please help
Warm Regards
Sunil Kumar.

Hello Sunil
You are right. That's the file path you should specify. It looks like your application server is running on UNIX platform. You can use transaction AL11 to locate your file and specify the file path in normal unix format. If this doesnt work, you can try prefixing your file path with "file:// ".
Cheers
Anand

Similar Messages

  • 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.

  • Need utilities class for application server file system (i.e. unix etc)

    I need to do things to directories and files on the application server.
    Is there an SAP class with methods for the application server file system (i.e. unix or whatever) with functionality similiar to what is provided by the methods of CL_GUI_FRONTEND_SERVICES for the presentation server?
    Is there a group of SAP functions for this task?

    You may have a look at Thomas Jung article: [sdn contribution : ABAP Server Side File Access, by Thomas Jung|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/7a13f367-0401-0010-47ba-eab0b15cf31c]
    Moreover, in release 7.10, it could be possible that SAP introduced input and output stream classes (to mimic java classes), so I guess there could be the ones for application server file system.

  • 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).

  • Changing File path for different TIFF files in a For loop

    Hi dear users:
    I am using "IMAQ write TIFF File.vi" that basically writes a TIFF file to a specified file path. However, I would like to CHANGE the file path for each TIFF file i save in a for loop. The reason for this is that the File path has to include the file name and I do not want to write over the same file name all the time in a for loop. What I would like to have are sequential TIFF images. So if the file name would be "Image", I would like the result to be Image0, Image1, Image2 and so forth when I run my For loop. Can anyone help me with this?
    Thanks

    Use the "Format Into String" and the "Build Path" functions:
    Message Edited by smercurio_fc on 06-26-2007 05:16 PM
    Attachments:
    Example_BD.png ‏3 KB

  • Equalent of F4_filename function module for application server file path

    hi experts,
            i am using  cl_gui_frontend_services=>file_open_dialog
           for bring file path dynamically for user, in front end.
          same feature i want to give when i am trying upload file from application server.
      kindly provide me function module or class method, which will do it.
    thanks in advance
    regards,
    pavan

    Hi,
    Use FM F4_DXFILENAME_TOPRECURSION
    Sample code here
    report ztest.
    data : filename like DXFIELDS-LONGPATH.
    data : begin of itab occurs 0,
    a(200) type c,
    end of itab.
    CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
    EXPORTING
    I_LOCATION_FLAG = 'A'
    *I_SERVER = '?'
    *I_PATH =
    FILEMASK = '.*'
    *FILEOPERATION = 'R'
    IMPORTING
    *O_LOCATION_FLAG =
    *O_SERVER =
    O_PATH = filename
    *ABEND_FLAG =
    EXCEPTIONS
    RFC_ERROR = 1
    ERROR_WITH_GUI = 2
    OTHERS = 3
    break-point.
    open dataset filename for input in binary mode.
    while sy-subrc = 0.
    clear itab .
    read dataset filename into itab.
    append itab.
    endwhile.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    FILENAME = 'd:\abc.txt'
    FILETYPE = 'BIN'
    TABLES
    DATA_TAB = itab
    Regards,
    Satish

  • Default file path on application server ?

    Can you tell me what is the file path of the file 'dataset' in the below code? I think it is stored in application server but not sure of the path. Is there any default path for such things?
    Thank you very much!
    report Z_test_BDC1
           no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case.
       DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
      If it is nessesary to change the data section use the rules:
      1.) Each definition of a field exists of two lines
      2.) The first line shows exactly the comment
          '* data element: ' followed with the data element
          which describes the field.
          If you don't have a data element use the
          comment without a data element name
      3.) The second line shows the fieldname of the
          structure, the fieldname must consist of
          a fieldname and optional the character '_' and
          three numbers and the field length in brackets
      4.) Each field must be type C.
    Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record,
    data element: KUN16
            KUNNR_001(016),
    data element: KTOKD
            KTOKD_002(004),
    data element: NAME1_GP
            NAME1_003(035),
    data element: SORTL
            SORTL_004(010),
    data element: ORT01_GP
            ORT01_005(035),
    data element: LAND1_GP
            LAND1_006(003),
    data element: SPRAS
            SPRAS_007(002),
    data element: PSTLZ
            PSTLZ_008(010),
    data element: LZONE
            LZONE_009(010),
          end of record.
    End generated data section ***
    start-of-selection.
    perform open_dataset using dataset.
    perform open_group.
    do.
    read dataset dataset into record.
    if sy-subrc <> 0. exit. endif.
    perform bdc_dynpro      using 'SAPMF02D' '0107'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02D-KTOKD'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02D-KUNNR'
                                  record-KUNNR_001.
    perform bdc_field       using 'RF02D-KTOKD'
                                  record-KTOKD_002.
    perform bdc_dynpro      using 'SAPMF02D' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KNA1-SORTL'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'KNA1-NAME1'
                                  record-NAME1_003.
    perform bdc_field       using 'KNA1-SORTL'
                                  record-SORTL_004.
    perform bdc_field       using 'KNA1-ORT01'
                                  record-ORT01_005.
    perform bdc_field       using 'KNA1-LAND1'
                                  record-LAND1_006.
    perform bdc_field       using 'KNA1-SPRAS'
                                  record-SPRAS_007.
    perform bdc_field       using 'KNA1-PSTLZ'
                                  record-PSTLZ_008.
    perform bdc_dynpro      using 'SAPMF02D' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KNA1-LZONE'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'KNA1-LZONE'
                                  record-LZONE_009.
    perform bdc_transaction using 'VD01'.
    enddo.
    perform close_group.
    perform close_dataset using dataset.

    FORM OPEN_DATASET USING P_DATASET.
      OPEN DATASET P_DATASET
                   FOR INPUT IN TEXT MODE
                   ENCODING DEFAULT.
      IF SY-SUBRC <> 0.
        WRITE: / TEXT-E00, SY-SUBRC.
        STOP.
      ENDIF.
    ENDFORM.
    Thanks Ashish.

  • FM  to get F4 for application server file or logical file or dataset .

    Hi all.
       Can any body pls let me know the FMs to get the F4 for applicattionserver file or logical file or unix file or dataset. Thanks in advance.
    Kind Regards,
    sami.

    hi,
    use the FM: 'F4_DXFILENAME_4_DYNP'  in the below mentioned format:
    p_file: is the field name in selection screen in which you have to enter the filepath:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL FUNCTION 'F4_DXFILENAME_4_DYNP'
        EXPORTING
          dynpfield_filename = 'P_FILE'
          dyname             = sy-cprog
          dynumb             = sy-dynnr
          filetype           = 'P'      "P-->Physical
          location           = 'P'     "P Presentation Srever
          server             = space.
    hope it will help you
    regards
    rahul

  • Application server file path vaidation

    I have written the code for application server file path validation.
      DATA : l_fname TYPE filename-fileintern." type c.
      DATA : l_filpath TYPE filename-fileintern,
             l_filname(40) TYPE c.
    PARAMETER : p_sucfil LIKE rfpdo-rfbifile OBLIGATORY. " rlgrap-filename
    AT SELECTION-SCREEN ON p_sucfil.
    l_fname = p_sucfil.
    CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
      CLIENT                        = SY-MANDT
        logical_filename              = l_fname
       OPERATING_SYSTEM              = SY-OPSYS
      PARAMETER_1                   = ' '
      PARAMETER_2                   = ' '
      PARAMETER_3                   = ' '
      USE_PRESENTATION_SERVER       = ' '
       WITH_FILE_EXTENSION           = 'X'
      USE_BUFFER                    = ' '
      ELEMINATE_BLANKS              = 'X'
    IMPORTING
      EMERGENCY_FLAG                =
      FILE_FORMAT                   =
       FILE_NAME                     = l_filpath
    EXCEPTIONS
       FILE_NOT_FOUND                = 1
       OTHERS                        = 2
    IF sy-subrc <> 0.
      message 'Invalid file name' type 'E'.
    ENDIF.
    But always i will get Invalid file name.
    Y is it so.
    pls help me.

    Praveen,
    I have checked ur code and I found that if i give a logical file name from
    tran. FILE under folder 'Logical file name definition, cross client' then ur code works. Pl. check.
    Regards,
    Joy.
    DATA : l_fname TYPE filename-fileintern." type c.
    DATA : l_filpath TYPE filename-fileintern,
    l_filname(40) TYPE c.
    PARAMETER : p_sucfil LIKE rfpdo-rfbifile OBLIGATORY. " rlgrap-filename
    AT SELECTION-SCREEN ON p_sucfil.
      l_fname = p_sucfil.
      CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
      logical_filename = l_fname
    operating_system = sy-opsys
      with_file_extension = 'X'
      IMPORTING
      file_name = l_filpath
      EXCEPTIONS
      file_not_found = 1
      OTHERS = 2
      IF sy-subrc <> 0.
        MESSAGE 'Invalid file name' TYPE 'E'.
      ENDIF.

  • Looking for file in the application server.

    Hello expert,
              I want to download a file from SAP application server, but when I get into file system for application server by AL11 , I can't find out the folder for my file, why?  is that authority issue or I did the wrong way to get into the system?  appreciate very much for your help.
    Many Thanks,

    Hi,
    At AL11, if you have the proper authorizations, you should see a Configure button.  After that, enter:
    - Directory Name:
    server-name\directory
    - Param. Name: Z_<directory>
    - ServerName: all
    Then, click on Save.
    Take into account that SAPServiceSID user should have read access to the share.
    Regards,
    Maximiliano

  • Function module to find the path of application server

    Hi can any one say me what is the function module to find the path of the application server

    Hi ,
    What i understand from ur question is that u need path for application server from the presentation layer i.e user screen.
    u can achive the path this way
    parameter: file type filename-fileintern.
    when user presses F4 here, it will show the directories and path in the AL11.
    I didnt find any FM which will get the path of Al11.
    revrt back if any issues,
    Regards,
    Naveen

  • FM to select the file path for download into application server

    Hello,
    I need a FM to select the file path for download into application server. It is a F4 help .
    Its functionality should be simmilar to the one used for presentation server i.e. as fol
    CALL METHOD cl_gui_frontend_services=>file_save_dialog

    Hello,
    What about F4_DXFILENAME_TOPRECURSION? You can check other FMs of the group DX_FILE.
    BR,
    Suhas
    PS: I think these FMs are not released by SAP, so need to be cautious while using these

  • Function Module to find the Path of the file in the Application Server

    Hi All,
            Any function module available to find the path of the file stored in the application server. Please let me know.
    Thanks.

    Check this code:
      DATA: dl_file TYPE ibipparms-path.    " File name
      CONSTANTS: c_dir       TYPE  rlgrap-filename.
    * F4 filename for Application server
        CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
          EXPORTING
            directory        = c_dir
            filemask         = ' '
          IMPORTING
            serverfile       = dl_file
          EXCEPTIONS
            canceled_by_user = 1
            OTHERS           = 2.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Error while getting the file name'(006).
          EXIT.
        ELSE.
          p_file =  dl_file.
        ENDIF.
    Thanks & Regards,
    Siri.
    Message was edited by:
            Srilatha T

  • Validation and F4 help on an application server file path parameter

    Hi
    I have a field on a selection screen called File Path and it is for a download program where the user needs to specify the path for the download (NOT THE ACTUAL FILENAME).
    I am trying to find a function or method that allows a user to use F4 help to browse for a directory rather than a specific file. There are lots of posts out there asking this question but all of the answers point to functions that allow you to browse for a particular file rather than just the file path/directory.
    Does anyone know of a function that provides F4 help to browse for a file path on the Server (NOT PC). I would want the user to just be able to select the directory or path and have the path returned. They should not need to pick a specific file.
    F4_DXFILENAME_TOPRECURSION is a very good function but unfortunately it makes the user pick a file rather than just a directory.
    In addition to this, does anyone know of a function or method that allows you to then validate the path\directory that is entered?
    Thanks for your help
    Nicole

    Hi,
      You can try with the FM 'EPS_GET_DIRECTORY_LISTING'. With this Fm module you will get you the list of files of a particular path in an internal table. Then you can populate this internal table in F4 help.
    Hope this solves your problem. If any difficulty, come back to me about that.
    Below are some other FM related to application server directory. Hope these Helps.
    EPS_GET_DIRECTORY_LISTING
    EPS_GET_DIRECTORY_PATH
    EPS_GET_FILE_ATTRIBUTES
    EPS_GET_FTP_SYSTEM_INFO
    Regards,
    Shailesh Jadhav

  • How to give the application server file path in the module pool programming

    Hi,
         Could somebody help me how to provide the application server file path in module pool programming once the logo is uploaded to sap system.
      For eg I have imported a logo name ‘owens’ into sap system by using transaction ‘se78’; now I need to call the path in the below url,
    if container2 is initial.
    CREATE OBJECT CONTAINER2
      EXPORTING
        CONTAINER_NAME              = 'PICTURE_CONTAINER2'.
    CREATE OBJECT PICTURE2
      EXPORTING
        PARENT = CONTAINER2.
    CALL METHOD PICTURE2->SET_DISPLAY_MODE
      EXPORTING
        DISPLAY_MODE = CL_GUI_PICTURE=>display_mode_fit_center
      EXCEPTIONS
        ERROR        = 1.
    CALL METHOD PICTURE2->LOAD_PICTURE_FROM_URL
      EXPORTING
        URL    = " ? "
      EXCEPTIONS
        ERROR  = 1
        Others = 2.
    endif.
    Thanks in advance
    Deepu

    hi Deepu,
    Use FM '/SAPDMC/LSM_F4_FRONTEND_FILE' for fetching the data from the application server path/presentation server path
    Regards,
    Santosh

Maybe you are looking for