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

Similar Messages

  • 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

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

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

  • Issue: XML File Downloading to Application Server

    Hi All,
    I am experiencing an issue downloading an XML File to the Application Server.
    I'm using FM SAP_CONVERT_TO_XML_FORMAT to convert SAP data to XML Format.
    After getting the XML data into XMLTAB, I'm using:
    OPEN DATASET pfile_fs FOR OUTPUT IN BINARY MODE .
         LOOP AT xmltab INTO xmltab_w.
         TRANSFER xmltab_w TO pfile_fs.
          CLEAR xmltab_w.
         ENDLOOP.
       CLOSE DATASET pfile_fs.
    The xml file is downloaded show an Error in 'XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:/shared/TEST/2009'
    But when i download xml file using the FM  WS_Download , the XML page has no errors .
    I am unable to figure out what could be the issue, If this issue is due to some characters like Chinese or Japanese then .. is there any solution for this .
    Please, give me your valuable suggestions.
    Thank you,
    Prasead

    Dear Prasead,
            Hope things are good at your end, i have got the same issue as well, could you please care to share the solution...Wud be of a gr8 help if you could do that, hope to have your response back.
    Regards,
    Abdul.

  • Various ways to place a File in the Application Server.

    Hi all,
       What are the various ways to place a file in the application Server.
          Please classify them as shown below.
          1. Use of ABAP Code.
           2. Without the use of ABAP code.
    Regards

    Hi
    <b>1. Use of ABAP Code.</b>
    by writing code like this
    REPORT  ZSD_EXCEL_INT_APP.
    parameter: file_nm type localfile.
    types : begin of it_tab1,
            f1(20),
            f2(40),
            f3(20),
           end of it_tab1.
    data : it_tab type table of ALSMEX_TABLINE with header line,
           file type rlgrap-filename.
    data : it_tab2 type it_tab1 occurs 1,
           wa_tab2 type it_tab1,
           w_message(100)  TYPE c.
    at selection-screen on value-request for file_nm.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    *   PROGRAM_NAME        = SYST-REPID
    *   DYNPRO_NUMBER       = SYST-DYNNR
    *   FIELD_NAME          = ' '
       STATIC              = 'X'
    *   MASK                = ' '
      CHANGING
       file_name           = file_nm
    EXCEPTIONS
       MASK_TOO_LONG       = 1
       OTHERS              = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    start-of-selection.
    refresh it_tab2[].clear wa_tab2.
    file = file_nm.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        filename                      = file
        i_begin_col                   = '1'
        i_begin_row                   =  '1'
        i_end_col                     = '10'
        i_end_row                     = '35'
      tables
        intern                        = it_tab
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop at it_tab.
      case it_tab-col.
       when '002'.
        wa_tab2-f1 = it_tab-value.
       when '004'.
        wa_tab2-f2 = it_tab-value.
      when '008'.
        wa_tab2-f3 = it_tab-value.
    endcase.
    at end of row.
      append wa_tab2 to it_tab2.
    clear wa_tab2.
      endat.
    endloop.
    data : p_file TYPE  rlgrap-filename value 'TEST3.txt'.
    OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    *--- Display error messages if any.
      IF sy-subrc NE 0.
        MESSAGE e001(zsd_mes).
        EXIT.
      ELSE.
    *---Data is downloaded to the application server file path
        LOOP AT it_tab2 INTO wa_tab2.
          TRANSFER wa_tab2 TO p_file.
        ENDLOOP.
      ENDIF.
    *--Close the Application server file (Mandatory).
      CLOSE DATASET p_file.
    loop at it_tab2 into wa_tab2.
      write : / wa_tab2-f1,wa_tab2-f2,wa_tab2-f3.
    endloop.
    Here is a pseudo code for what you are looking for-
    OPEN DATASET P_FLPTH FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC eq 0.
    LOOP AT LT_TAB INTO LS_TAB.
    TRANSFER LS_TAB TO P_FLPTH.
    ENDLOOP.
    CLOSE DATASET P_FLPTH.
    if sy-batch = 'X'.
    write:/ 'File uploaded successfully'.
    else.
    message sXXX with 'File uploaded successfully'.
    endif.
    Else.
    if sy-batch = 'X'.
    write:/ 'Error in File upload'.
    else.
    message sxxx with 'Error in File upload'.
    endif.
    LEAVE PROGRAM.
    ENDIF.
    <b>2. Without the use of ABAP code.</b>
    CG3Y -
    Appl to Presentation server
    <b>Reward if useful</b>

  • Function Module that gives the names of the file in the Application Server.

    Hi Experts,
       Please give me a Function Module that gives the names of the file in the Application Server.
    Thanks,
    Debi.

    Hi,
    see these links
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa02b7493111d182b70000e829fbfe/content.htm
    http://abaplovers.blogspot.com/2008/05/function-module-sap-logged-in-users-to.html
    http://www.saptechies.com/abap-function-modules/
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/function-module-to-get-data-and-time-of-file-576751
    thanks
    karthik

  • Upload and download of  excel file in the application server in background

    Hi all,
    i want to download the excel file from application server into internal table and after processing i have to upload to excel file in the application server in the background mode..
    i mean i'll schedule the program in background.
    im using FM ALSM_EXCEL_TO_INTERNAL_TABLE its working fine in fore ground but not in back ground.
    what method i have to follow ?

    Hi Ankit,
    I think this is not possible to open a Excel-File from the application server because the Excel format before Office 2007 where a binary format (Suffix: .xls). The newer Office file format (Suffix: xlsx) is a zipped XML Format. To read the binary Excel-Format you need an OLE Connection between SAP GUI and Office. But at the application server in background you doesn't have this OLE Connection.
    In my opinion you have two possibilities:
    1. Convert all files in the CSV format. This file format can be read with open dataset.
    2. Upload the files from the presentation server in forground. There are some funktion modules in the standard which can read the xls format. But they have some limits regarding the length of cells content.
    My recommendation is solution no. 1. If you know an VBA expert, he can write an Excel-macro which converts all Excel Files in the CSV-Fomat.
    Regards
    Dirk

  • Create a Document with an original file stored on application server

    Hello,
    I start with document managment system : i am able to create new document (CV01N) manually, add a local file and check-in this file.
    Now we need to store file which are stored on the SAP Application Server.
    Firstly, in the GUI of transaction CV01N, i don't know how to browse file on application server. All files i can't attach as original, are files i can access from my computer.
    Is it possible to access also on application server files ?
    Moreover, i have to define function module which have to
    - Create a document (DMS)
    - Attach an orginial file which is stored on application server
    - Check-in the file
    This function module will be called from a web application
    I define this kind of function and run it correctly with a local file (stored on my computer) : i call BAPI "BAPI_DOCUMENT_CREATE2" and "BAPI_DOCUMENT_CHECKIN2"
    But i don't how to do with a file stored on application server. I see also note 504692 and try a program like ZZUZTEST_TEST_CHECKIN which use FM CVAPI_DOC_CHECKIN but it return an error Error uploading  E:\usr\sap\TD1\DVEBMGS00\data\FACTURE.txt" (this path and file exist on application server and is really the file i want to checkin)
    Please could you confirm what i search, is possible or not.
    If possible, could help me with some explanations and guidelines and perhaps a sample ?
    Thank you very much.
    Regards,
    Eric
    The function used
    FUNCTION Z_TEST_CHECKIN.
    Checkin the first original of a document info record *
    from the application server and/or in the background *
      data   : w_host like BAPI_DOC_AUX-HOSTNAME.
      data: lf_line(255).
      data: ls_draw like DRAW,
            ls_message_cvapi like messages,
            lt_files_cvapi type standard table of CVAPI_DOC_FILE,
            lt_files_cvapi_header like CVAPI_DOC_FILE.
      data: lt_originals LIKE cvapi_doc_file OCCURS 0 WITH HEADER LINE,
            vo_originals LIKE cvapi_doc_file OCCURS 0 WITH HEADER LINE.
      ls_draw-dokar = 'ZFT'.
      ls_Draw-doknr = '0000000000000004500000032'.
      ls_Draw-dokvr = '00'.
      ls_Draw-doktl = '000'.
    Read Originals contained in the document info record
      CALL FUNCTION 'CVAPI_DOC_GETDETAIL'
        EXPORTING
          pf_batchmode    = 'X'
          pf_hostname     = ' '
          pf_dokar        = ls_draw-dokar
          pf_doknr        = ls_draw-doknr
          pf_dokvr        = ls_draw-dokvr
          pf_doktl        = ls_draw-doktl
          pf_active_files = 'X'
        IMPORTING
          psx_draw        = ls_draw
        TABLES
          pt_files        = vo_originals
        EXCEPTIONS
          not_found       = 1
          no_auth         = 2
          error           = 3
          OTHERS          = 4.
      IF sy-subrc <> 0.
        WRITE 'Error returned by CVAPI_DOC_GETDETAIL'.          "#EC NOTEXT
        EXIT.
      ENDIF.
    Check if we can really access the file from the application server
      read table vo_originals index 1.
      open dataset vo_originals-filename for input in text mode ENCODING DEFAULT.
      if not sy-subrc is initial.
        message e500(26) with vo_originals-filename 'not found'.
      endif.
      read dataset vo_originals-filename into lf_line.
      if not sy-subrc is initial.
        message e500(26) with vo_originals-filename 'read error'.
      endif.
      lt_originals             = vo_originals.
      lt_originals-STORAGE_CAT = 'SAP-SYSTEM'.
      append lt_originals.
      w_host = sy-host.
      CALL FUNCTION 'CVAPI_DOC_CHECKIN'
      EXPORTING
      PF_DOKAR = ls_draw-dokar
      PF_DOKNR = ls_draw-doknr
      PF_DOKVR = ls_draw-dokvr
      PF_DOKTL = ls_draw-doktl
    PS_DOC_STATUS =
      PF_FTP_DEST = 'SAPFTPA'
      PF_HTTP_DEST = 'SAPHTTPA'
    *PF_HOSTNAME =  w_host
    PS_API_CONTROL =
    PF_REPLACE = ' '
    PF_CONTENT_PROVIDE = 'SRV'
      IMPORTING
      PSX_MESSAGE = ls_message_cvapi
      TABLES
      PT_FILES_X = lt_originals
    PT_COMP_X =
    PT_CONTENT =
      IF ls_message_cvapi-msg_type CA 'EA'.
        ROLLBACK WORK.
        MESSAGE ID '26' TYPE 'I' NUMBER '000'
        WITH ls_message_cvapi-msg_txt.
      ELSE.
        COMMIT WORK and wait.
      ENDIF.
    ENDFUNCTION.

    This is a bit tricky. I spent lots of hours about this .
    You have to set PF_HOSTNAME with your name of your AS and gives the path to the file on the server.
    You wrote
    *PF_HOSTNAME = w_host
    But beware: if you have more thän one AS you have to fix one AS for upload or you have to find the servers name of the file. A better way can be to share one folder by each AS.
    You also have to decide between HTTP or FTP.
    You wrote:
      PF_FTP_DEST = 'SAPFTPA'
      PF_HTTP_DEST = 'SAPHTTPA'
    You must define only one ! Then you have to check your settings in SM59 about working right.
    Pls rate, if this was helpful.
    Regards,
    Markus

  • How to get creation date of a file created in application server?

    Dear experts ,
    I have some txt files in a particular path in application server .Suppose path is - \\PMICHSAPLA30\INTERFACE\\BCD\CO\OTC\SALES_RPT\test.txt.
    I want to fetch  the creation date of this txt file - test.txt . I tried with fm -  ADS2KIPUPL_GET_FILE_ATTRIBUTES , but this will give proper out put.
    I need to get file creation date. If today I am creating file - abc.txt, so according to this file I should get today's date as creation date.
    Please suggest me.  

                        BEGIN OF ty_file,
                        line(400)   TYPE c,                                      "File names
                      END   OF ty_file,
    This is the structure declaration.
    l_v_unixcom would be ls -l \\PMICHSAPLA30\INTERFACE\\BCD\CO\OTC\SALES_RPT\test.txt
    now call
    CALL 'SYSTEM' ID 'COMMAND' FIELD l_v_unixcom
                    ID 'TAB'     FIELD i_file[].
    and see contents of i_file[] it should have the details, post results so we can help further

  • Renaming a file on the application server

    Hi all,
    I create a file on the Application server which I want to rename means a program.
    I would like to add the system stamptime at the time the program is running.
    sample:
    original name:
    file.csv
    final name:
    file_20060626123000.csv
    does somebody have an ABAP program to do that ? other ideas?
    Thanks in advance,
    FedeX

    Thanks for the answers,
    I do not what I doing wrong in my sample....
    I am using this logical path and logical file in an InfoSpoke..
    and I get the error:
    "could not open file on application server"
    My definitions are:
    Logical PATH : Z_PATH_TEST
    Syntax Group ->UNIX
    <P=DIR_HOME>/<FILENAME>
    ( I am sure DIR_HOME is set correcty on SAP Directories)
    Logical FILE NAME : Z_NAME_TEST
    Physical Name :File1_<DATE>.csv
    Data Format : ASC
    Logical Path: Z_PATH_TEST
    What could be wrong here?... Thanks again
    FedeX

  • Archiving file log in application server

    Hi all,
    where to set archiving log folder  path in application server .
    Rgs,
    siva

    Hi Siva
    have a look at these links.
    I found it very helpfull.
    [https://forums.sdn.sap.com/click.jspa?searchID=20703185&messageID=6294517]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/607e9392-8167-2b10-b9a8-e0aa297e88c6]
    PLS DONT FORGET TO CLOSE THE THREADS
    Regards
    Hareesh

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

  • 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

  • Save PDF-file on the application server

    Hello experts,
    I convert my Smartform to a PDF-File. I copied the code from  Suresh Kumar Parvathaneni (REPORT zsuresh_test). At first, thank you Suresh Kumar for that!
    Now, I would like to save the PDF-File on the application server and not local.
    Could you tell me how to do this. Especially, where do I have to put the abap-code in the given code from Suresh Kumar.
    I thank you very much for your help in advance.
    With kind regards.
    gokselin

    Hi,
    You can use the OPEN DATASET statment.
    Probably you must be having an output table which you are downloading to the local machine.You can use the same and loop at it. and if the OPEN dataset returned sy-subrc 0, use the TRANSFER statment.
    Remember the data will be binary for pdf. So you have to open the dataset in binary mode.
    regards,
    Advait

Maybe you are looking for

  • I give up! - waiting for items to copy

    I know a lot has been said on the subject and I've said a few things myself.  However, I've about reached my breaking point and would love it if someone could point me the way to someone at Apple to talk to. I'm referring to syncing and the dreaded m

  • Call FND_REQUEST_SET.FNDRSSUB using a pl/sql procedure

    Hi, I am new to Oracle Apps. I want to submit a report set.The procedure to do it is FND_REQUEST_SET.FNDRSSUB.Can you pl tell me how can i call this package using pl/sql? Regards

  • Should I upgrade from snow leopard to mountain lion?

    I've got a 2008 2.8 8-core Mac Pro, and wonder if upgrading is going to be worthwhile.  I've read horror stories about slow response time, etc, but I've also ready the these problems are solved by flushing PRAM and other maintainance utilities.  I ru

  • Is it possible to use a cRIO controller without the FPGA backplane?

    Obviously, I'm talking about the modular units (cRIO9014 or 9025) and not the all-in-one models. If we have no IO/FPGA requirements for an application, can we just use the controller by itself? I realize this isn't the most optimum use of this hardwa

  • Auto analyze is insane

    I imported two AVCHD clips in 8 and am trying to trim them. However the application goes into auto analyze mode and it takes forever for the application to do so. These clips have been already rendered. I tried turning it off as listed here http://he