Function Module for putting Flat File into Application Server

Hi Pals,
     what is the   Function module for putting my flatfile into application server..
because i dont have  authorizations to  put my flatfile  into application server directly..
I know one function mudule is there for that ...so,  can you suggest me.. what is the function module... for that..
thanks.. and points will be assigned..
chitti

Hi,
well normally you use the method GUI_UPLOAD of class CL_GUI_FRONTEND_SERVICES to upload a file from your client pc. Then you use the abap statements open dataset, transfer and close dataset to put the file to the app-server.
kind regards
Siggi

Similar Messages

  • How to Post a file(Flat File ) into Application server of the XI(AL11)?

    How to Post a file(Flat File ) into Application server of the XI(AL11)?
    Best Regards,
    Jose

    Hi,
    1) goto SXDA_TOOLS Transaction code
    2) Provide the Following details
    Object Type : DXPROJECT
    Program Type: BAPI
    Program/Method: CREATE
    3) Click on Copy Button
    4) Select the Source as Presentation Server
         a) Select  the File where you saved in your Local machine
    5) Select the Target as Application server
         a) Check the check box Remote Server
         b) Select the File type as Physical
         c) In File name give /usr/sap/SSD/DVEBMGS00/work\Your file name (This the Server path                                                                               
    Where the file is going to save)
    6) Click on Continue
    Go to AL11 and check whether the File has been create in the following path  /usr/sap/SSD/DVEBMGS00/work
    Provide this path in the Communication channel path when you select the Transport Protocol as NFS and you place the file in AL11 directory.
    Regards
    Seshagiri

  • Putting Flat file on Application Server

    Hi,
    I am using following report to transfer a flat file to application server.
    REPORT  Z_DOWNLOAD.
    PARAMETERS: P_FILE       LIKE IBIPPARMS-PATH,
               P_FILE1(100) default '/usr/sap/put' lower case.
    DATA: WS_FILE TYPE STRING.
    DATA: BEGIN OF T_DATA OCCURS 0,
           RECORD(200),
         END OF T_DATA.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
      FILE_NAME           = P_FILE
    START-OF-SELECTION.
    WS_FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
       FILENAME                      = WS_FILE
      FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
    TABLES
       DATA_TAB                      = T_DATA
    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.
    Creating the file at Appl ...........
    OPEN DATASET P_FILE1 FOR OUTPUT IN TEXT MODE encoding utf-8.
    if sy-subrc ne 0.
    message e000(--) with 'Error in opening file'.
    endif.
    Trasfer the records to file.............
    loop at t_data.
    transfer t_data to p_file1.
    endloop.
    close dataset p_file1.
    if sy-subrc eq 0.
    write: / 'Written the files at ', p_file1.
    Now when I am uploading Flat file1 with following data it gets updated but when I use Flat file2, it does not work.
    Please help me out..
    I am posting the data of both flat files.
    Flat file1:(File getting transferred successfully to application server)
    1,NPOBL,ABC
    1,NPOBL,CDE
    1,NPOBL,FGH
    Flat file2: (Getting error when trying to transfer this file on application server)
    DS04,1,NPOBL,200,CREATE1,NEW YORK,X
    DS04,1,NPOBL,200,CREATE2,NEW YORK,X
    DS04,1,NPOBL,200,CREATE3,NEW YORK,X
    <b>Please help me out...</b>
    -Tushar

    hi Rajesh,
    I guess your in ternal table is not able to hold the data as is of 200 characters ... try increasing the length ..
    DATA: BEGIN OF T_DATA OCCURS 0,
    RECORD(2000),
    END OF T_DATA.
    Regards,
    Santosh

  • 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

  • Function module for transfering a file contents into another?

    Hi all,
       Is there a Function module for transfering a file contents into another?That is the whole content from a file to other??
    Regards,
    Shashank.

    Hi,
    I think there is no such FM. You need to read the data in internal table and then write it in another file.
    Regards,
    Atish

  • Logical path for getting a Flat file from application server

    Hi All,
    We have loaded some .csv files to application server, what is the logical path we have to mention in the infopackage scheduler screen? please guide me how to give the path for getting a flat file from application server.
    Thanks,
    Sairam.

    Hi Sairam,
    I hope you know which location you have saved in the Application server.
    Now if you go to the Infopackage and click on the "External Data" tab, there you will see Radio Buttons for
    1) Client Workstation
    2) Application Server
    Choose the second radio button, then in the Field "Name of the File" you will be able to use the F4 help and browse AL11 transaction through this option. You can then choose the File.
    Hope this helps
    Regards,
    Praveen.

  • Write PDF file into application server.

    Hi Gurus,
    I have created a smartform and converted into PDF using function module as given below. Now I want to write this generated PDF file into application server. I am not generating any spool request too. How can I proceed from here?  Pls advice..
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize                 = lv_bin_filesize
        TABLES
          otf                              = ls_job_output_info-otfdata
          doctab_archive         = lt_docs
          lines                           = lt_lines
        EXCEPTIONS
          err_conv_not_possible  = 1
          err_otf_mc_noendmarker = 2
          OTHERS                 = 3.
    Thanks..
    Saj

    transfer all the data from ur itabs to one final itab declared as follow
    DATA: BEGIN OF final_itab OCCURS 0,
                     document  TYPE string,
               END OF final_itab.
    then finally,
    OPEN DATASET 'yourfile.pdf' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      len = strlen( final_itab-DOCUMENT ).
      TRANSFER final_itab-DOCUMENT  TO 'yourfile.pdf'  LENGTH len.
    CLOSE DATASET 'yourfile.pdf'.
    This ends the coding mate.
    Enjoy it n have a good day.
    Cheers

  • Creation of Flat file in Application Server

    Hi,
    Can you please clarify what is Logical file path and Physical file pathe.
    Also how to create a flat file in Application Server with Logical and Physical file paths.
    Thanks

    Hi Yasaswini,
    Physical file is what you see from the OS level.
    Logical file is what ABAP code can call certain functions to read/write.
    Transaction FILE would link them together. Typically the logical path ends with "<FILENAME>", and the logical file refers to the logical path. You can check the help for more info.
    http://help.sap.com//saphelp_erp2004/helpdata/EN/8d/3e4edc462a11d189000000e8323d3a/frameset.htm
    Good luck,
    Victor

  • How to create a inbound IDOC from flat file in Application server

    HI All
    Our requirement is to create the Inbound idocs from a flat file from application server with in R/3
    Could any body please let me know the steps required for this.
    Thanks
    Malli

    1. Read the file using OPEN DATASET and read and fill up the segment info and fill the EDIDC header data
    and then call function
    CALL FUNCTION 'INBOUND_IDOC_PROCESS'
        TABLES
          IDOC_CONTROL       =  i_edidc
          IDOC_DATA          =  i_edid4.

  • Open data set for reading excel file on application server in back ground

    open data set for reading excel file on application server in back ground

    hi Vijay,
    I am afraid you won't be able to read from Excel file on Appl. Server.
    ec

  • Function Modules for uploading the file

    Hi experts ,
                      I have a requirement to download a file (csv) from my local sytem (say desktop) into an internal table first and then update the contents of the same internal table into the database table.
    Can anybody provide me with a sample program for doing the same or at least the name of function modules for the same.
    Prompt replies will be rewarded.
    TIA
    Abhishek

    Hi Abhishek,
    How to use INSERT Statement..
    Check this Sample Program..
    TABLES:MARA.
    DATA:ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
    ITAB-MATNR = '123ABCDA'. .
    ITAB-MBRSH = 'C'.
    ITAB-MTART = 'FERT' .
    ITAB-MEINS = 'KG' .
    APPEND ITAB.
    ITAB-MATNR = '123ABCDB'. .
    ITAB-MBRSH = 'C'.
    ITAB-MTART = 'FERT' .
    ITAB-MEINS = 'KG' .
    APPEND ITAB.
    LOOP AT ITAB.
    INSERT MARA FROM ITAB.
    MODIFY MARA .
    ENDLOOP.

  • Special characters downloading file into application server

    Dear Friends,
    i have to download records into excel sheet through back ground job, while downloading records into applications server.
    all records are downloading properly up to here fine but some special characters also downloading. i had downloaded same records in debugging mode from the same internal table here no special characters.
    i found that the structure(standard ( /SCWM/S_LIME_ALL_MON )) which is being used in that some fields are defined as RAW data type this may be the problem.but i tried to convert them using some function modules no result getting dump only.
    i am using data sets to download data into application server here gui_download will not work because it is back ground job.
    can any one please help me in this. its urgent...
    please please help me in this it has been pending since DEC-01-11.
    extra characters like (  #v#M?LQia#####
    #v#M?LQia#####
    #v#)
    my code
      open DATASET LV_FLNAM for OUTPUT in LEGACY BINARY MODE .
      IF sy-subrc EQ C_ZERO.
        LOOP AT LT_TAB INTO WA_TAB.
          transfer WA_TAB to LV_FLNAM.
        ENDLOOP.
        CLOSE DATASET LV_FLNAM.
      ENDIF.
    Edited by: sairam.kusuma on Dec 16, 2011 6:26 AM
    Edited by: sairam.kusuma on Dec 16, 2011 6:38 AM
    Edited by: sairam.kusuma on Dec 16, 2011 6:39 AM

    TYPES:BEGIN OF ty_stru,
          LGTYP  TYPE /SCWM/LGTYP,
          LGPLA  TYPE /SCWM/LGPLA,
          MATNR  TYPE /SCWM/DE_MATNR,
          MAKTX  TYPE /SCWM/DE_UI_MAKTX,
          QUAN(13)  TYPE C,"/SCWM/DE_UI_QUAN,
          UNIT  TYPE /SCWM/DE_BASE_UOM,
          CAT  TYPE /SCWM/DE_CAT,
          CAT_TXT  TYPE /SCWM/DE_CAT_TXT,
          CHARG  TYPE /SCWM/DE_CHARG,
          OWNER  TYPE /LIME/OWNER,
          ENTITLED  TYPE /SCWM/DE_ENTITLED,
          UI_WDATT  TYPE /SCWM/DE_UI_WDATT,
          UI_WDATU  TYPE /SCWM/DE_UI_WDATU,
          SKZSI  TYPE /SCWM/LQUA_SKZSI,
          QUANA(13)  TYPE C,"/SCWM/DE_UI_QUAN_PACKED,
          ALTME  TYPE /SCWM/DE_AUNIT,
          ITMNO  TYPE /SCDL/DL_ITEMNO,
          WEIGHT(15)  TYPE C,"/SCWM/DE_NWEIGHT,
          UNIT_W  TYPE /SCWM/DE_WGT_UOM,
          VOLUM(15)  TYPE C,"/SCWM/DE_NVOLUME,
          UNIT_V  TYPE /SCWM/DE_VOL_UOM,
          CAPA(15)  TYPE C,"/SCWM/DE_CAPAUSE,
          SN_STOCK  TYPE /SCWM/DE_SER_STOCK,
          END OF ty_stru.
    DATA: LV_LGNUM TYPE /SCWM/LGNUM VALUE 'R10',
          LV_FLNAM TYPE rlgrap-filename VALUE '/tmp/RAMA.xls'.
    CONSTANTS: C_ZERO TYPE I VALUE '0'.
    DATA: LT_TAB TYPE STANDARD TABLE OF /SCWM/S_LIME_ALL_MON,
          WA_TAB TYPE /SCWM/S_LIME_ALL_MON,
          i_stru TYPE STANDARD TABLE OF ty_stru,"
          wa_stru TYPE ty_stru.
    REFRESH LT_TAB.
    CLEAR: WA_TAB.
    *this is modified function module from /SCWM/S_LIME_ALL_MON
    CALL FUNCTION 'ZEWM_F_PHYSICAL_INVENTORY_STOC'
      EXPORTING
        IV_LGNUM             = LV_LGNUM
      IV_VARIANT           =
      IV_MODE              = '1'
      IT_DATA_PARENT       =
      IMPORTING
        ET_DATA              = LT_TAB
      EV_RETURNCODE        =
      EV_VARIANT           =
    CHANGING
      CT_TAB_RANGE         =
    i have to download what are the fields defined as structure.
    1)when ever i am using the internal table(LT_TAB) to download getting specials characters(####) with all records for the fields QUAN, QUANA, WEGHT,VOLUM and CAPA.
    open DATASET LV_FLNAM for OUTPUT in LEGACY BINARY MODE .
    IF sy-subrc EQ C_ZERO.
      CLEAR: WA_stru,
             wa_tab.
      LOOP AT LT_TAB INTO WA_TAB.
        transfer WA_TAB to LV_FLNAM.
        CLEAR: WA_TAB.
      ENDLOOP.
      CLOSE DATASET LV_FLNAM.
    ENDIF.
    2)if i take another internal table with converting them as char file is downloading with out special characters but it is downloading single line only but not the hole data.
    if i have the below code getting only single line records not total records without special characters.
    open DATASET LV_FLNAM for OUTPUT in LEGACY BINARY MODE .
    IF sy-subrc EQ C_ZERO.
      CLEAR: WA_stru,
             wa_tab.
      LOOP AT LT_TAB INTO WA_TAB.
         wa_stru-LGTYP = wa_tab-LGTYP.
         wa_stru-LGPLA = wa_tab-LGPLA.
         wa_stru-MATNR = wa_tab-MATNR.
         wa_stru-MAKTX = wa_tab-MAKTX.
         wa_stru-QUAN = wa_tab-QUAN.
         wa_stru-UNIT = wa_tab-UNIT.
         wa_stru-CAT = wa_tab-CAT.
         wa_stru-CAT_TXT = wa_tab-CAT_TXT.
         wa_stru-CHARG = wa_tab-CHARG.
         wa_stru-OWNER = wa_tab-OWNER.
         wa_stru-ENTITLED = wa_tab-ENTITLED.
         wa_stru-UI_WDATT = wa_tab-UI_WDATT.
         wa_stru-UI_WDATU = wa_tab-UI_WDATU.     
         wa_stru-SKZSI = wa_tab-SKZSI.
         wa_stru-QUANA = wa_tab-QUANA.
         wa_stru-ALTME = wa_tab-ALTME.
         wa_stru-ITMNO = wa_tab-ITMNO.
         wa_stru-WEIGHT = wa_tab-WEIGHT.
         wa_stru-UNIT_W = wa_tab-UNIT_W.
         wa_stru-VOLUM = wa_tab-VOLUM.
         wa_stru-UNIT_V = wa_tab-UNIT_V.
         wa_stru-CAPA = wa_tab-CAPA.
         wa_stru-SN_STOCK = wa_tab-SN_STOCK.
        transfer WA_stru to LV_FLNAM.
        CLEAR: WA_stru.
      ENDLOOP.
      CLOSE DATASET LV_FLNAM.
    ENDIF.

  • Move pdf file into application server

    Hi ABAP Gurus,
    i want your valuable help in solving my problem.
       i tried to create PDF file in application server and its creating as
    PDF file in Application server..but i am unable to see the content in text ,
    instead it is displaying in binary content...but when i tried to create
    in presentation server i am able to see it as text in PDF file....
    Can u please let me know whats wrong in my work and how to create a PDF file
    in Application server with text content
    with regards,
    Gowri.

    Hi Gowri,
    Check this example....
    report ztest.
    data: begin of itab occurs 0,
    field(256),
    end of itab.
    data: dsn(100) value '/usr/sap/xfr/FIS/testpdf',
    length like sy-tabix,
    lengthn like sy-tabix.
    call function 'GUI_UPLOAD'
    exporting
    filename = 'c:\temp\test.pdf'
    filetype = 'BIN'
    importing
    filelength = length
    tables
    data_tab = itab.
    open dataset dsn for output in binary mode.
    loop at itab.
    transfer itab-field to dsn.
    endloop.
    close dataset dsn.
    clear itab.
    refresh itab.
    *- To crosscheck if it went well
    open dataset dsn for input in binary mode.
    do.
    read dataset dsn into itab-field.
    if sy-subrc = 0.
    append itab.
    else.
    exit.
    endif.
    enddo.
    call function 'GUI_DOWNLOAD'
    exporting
    filename = 'c:\temp\testn.pdf'
    filetype = 'BIN'
    bin_filesize = length
    importing
    filelength = lengthn
    tables
    data_tab = itab.
    Or
    Use the TCode
    CG3Z or CG3Y
    for downloading to Application Server.
    Thanks,
    Reward If helpful.

  • Error when loading a flat file from Application server.

    Hi,
    I am trying to load a flatfile from the application server, and I am getting the message
    Error while accessing the application server file
    Message no. RSDS_ACCESS002
    I checked for notes and found only one:
    Note 1033978 - Correction: Loading Unicode files from application server
    but we have 19 SP level, and the note says it needs 13 SP level, so I think it would not be of any help.
    does anybodie know what to do??
    thanks for the help.
    Mauricio

    Error in accessing while application server file..
    when i am trying load the data to psa
    when i am taking the file name: text-type file from app server
    plz reslove me for this problem??
    another question
    when i am saving the file with using * in the  filename in .CSV file its not saving,
    whats the reason????
    ASHOK

  • Saving PDF file into application server

    Dear all,
    My requirement is retrieving a PDF file from application server and modifying the document and saving it back to the application server through BSP application.
    I've retrieved the data from the application server and displayed it in the frame of BSP layout and modified the same (adding signature). We got stuck in saving back the signed document into the application server.
    Can anyone guide me in saving back the modified document or how to get the modified file content through BSP.
    Regards
    Srini

    Hi Friend,
    Hope these  links will help you ,
    File Upload in BSP Applications and store in Application server
    Re: How to Upload .TXT, BITMAP, .PDF files into a Data base Table.
    Re: sapscript - pdf
    With Regards,
    SHARMILA BRINDHA.M

Maybe you are looking for