Transfer files from SAP R/3(unix server) to windows

Hi TechGurus,
We have a requirement where in , we are extracting data from SAP table into a text file using OPEN DATASET in TEXT MODE.
Then using a third party tool (Connect-direct), we are transferring text files to windows server using unix script, in binary mode.
The problem is that that the data is being transferred in blocks,each time beginning transfer from a new line.That is, after say transferring 25KB data it transfers next 25KB data from a new line. What happens as a result is that records
after particular amount of data is broken and remaining data transfer begins from new line.
The file size is around 25 MB.There is no such problem while transferring file of size 10 KB.
We are uploading the data from text file on windows server into MSAccess.
And error occurs during this process.
Assured points for helpful answers
Thanks in advance!!

Hi,
If you want to transfer file between different SAP servers then you can use the function module EPS_FTP_PUT. You need to have a RFC destination (with sufficient authorizations for the RFC user). The meaning of the importing parameters of the function module are quite obvious. Of course, SAP offers us more than this function module:
- EPS_FTP_GET
- EPS_FTP_MPUT
- EPS_FTP_MGET
Kishi.

Similar Messages

  • How to transfer file from sap server to PDM server using open FT??

    Hello Sap Guru's
    I want to Trasfer a file with all supplier information from SAP server to PDM server(Thirdparty) system Using Open FT ..How can I transfer ???
    Please let me know the answer??
    Thanks In Advance
    Preethi

    Hi Preethi,
    I think it is not possible to transfer a file from SAP to PDM using open FT.
    Using RFCs, we can do the transfer.
    Other option is the file can be downloaded into UNIX. And from there using a shellscript we can transfer the file from UNIX to PDM or if your PDM has the option to grab the file from UNIX that will also work.
    Hope this helps.
    Please reward if helpful.
    Thanks,
    Srinivas

  • How to store multiple files from SAp in to Application server?

    Hi Guys,
                 Can anybody tell me how to store multiple files from SAP into Application server.in my application i have to get the data from SAP tables BSEG , BKPF , BSAK and BSIK that to daily i have to do.
                Any Logic  or Code for how to do is welcomed.
                        plz help me urgently.
    Thanks,
    Gopi

    Hi,
      directories creates basis. If you have task to store data in application server you already should have information into which folder you have to do it. If you don't have this information because it is just for example training for next task then you can use your personal folder into which you have access. To get list of all available folders please look at attached code and form get_directories (you get the list of folders you see in transaction AL11). But don't forget: If you are using open dataset you have to have rights to access application folder!
    Here you are code which I use to upload text files from local disc into application folder
    Regards,
      Karol
    *& Report  FILE_PC_TO_SAP
    REPORT  FILE_PC_TO_SAP.
    DATA: BEGIN OF searchpoints OCCURS 100,
            DIRNAME(200)     TYPE c, " name of directory.
            sp_name(100)     TYPE c," name of entry. (may end with *)
          END OF searchpoints.
    DATA: BEGIN OF isearchpoints OCCURS 10,
            dirname(75) TYPE c,            " name of directory.
            aliass(75)  TYPE c,            " alias for directory.
            svrname(75) TYPE c,            " svr where directory is availabl
            sp_name(75) TYPE c,            " name of entry. (may end with *)
            sp_cs(10)   TYPE c,            " ContainsString pattern for name
          END OF isearchpoints.
    data: l_file type filetable.
    data: l_rc   type i.
    data: itab   type TABLE OF string.
    data: g_tmp_file_path type rlgrap-filename.
    data: wa_itab type string.
    data: h_destin(100) type c.
    data: dat      type string.
    INITIALIZATION.
    perform get_directories.
    START-OF-SELECTION.
    parameters: in_file type string OBLIGATORY LOWER CASE.
    parameters: destin(100) type c OBLIGATORY LOWER CASE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
       FILENAME                      = in_file
       "FILETYPE                      = 'BIN'
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = ' '
       HEADER_LENGTH                 = 0
       READ_BY_LINE                  = 'X'
       DAT_MODE                      = ' '
      TABLES
        DATA_TAB                     = itab
    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.
      write: / 'Error during loading input file!'.
    ENDIF.
    if h_destin is INITIAL.
      h_destin = in_file.
    endif.
    CONCATENATE destin h_destin into dat SEPARATED BY '/'.
    *TRANSLATE dat TO UPPER CASE.
    OPEN DATASET dat FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-SUBRC = 0.
      loop at itab into wa_itab.
         TRANSFER: wa_itab TO dat.
      endloop.
      CLOSE DATASET dat.
      write: / 'File uploaded!'.
    ELSE.
      write: / 'Not possible to open dataset'.
    ENDIF.
    at selection-screen on value-request for in_file.
      perform select_input_file_name.
      loop at l_file into g_tmp_file_path.
        move g_tmp_file_path to in_file.
        h_destin = ''.
        SPLIT g_tmp_file_path at '\' into table itab.
        loop at itab into g_tmp_file_path.
          h_destin = g_tmp_file_path.
        endloop.
      endloop.
    at selection-screen on value-request for destin.
      DATA: lt_dfies    TYPE TABLE OF dfies.
      DATA: lwa_dfies   TYPE dfies.
      CALL FUNCTION 'DDIF_FIELDINFO_GET'
        EXPORTING
          tabname    = '/BI0/PCO_AREA'
          lfieldname = 'CO_AREA'
        IMPORTING
          dfies_wa   = lwa_dfies.
      lwa_dfies-tabname = 'searchpoints'.
      lwa_dfies-REPTEXT   = 'Destination directory'.
      lwa_dfies-LENG      = 100.
      lwa_dfies-INTLEN    = 100.
      lwa_dfies-OUTPUTLEN = 100.
      lwa_dfies-fieldname = 'SP_NAME'.
      APPEND lwa_dfies TO lt_dfies.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD = 'SP_NAME'
          DYNPPROG = SY-REPID
          DYNPNR = SY-DYNNR
          DYNPROFIELD = 'destin'
          VALUE_ORG = 'S'
        TABLES
          VALUE_TAB = searchpoints
          FIELD_TAB = lt_dfies
        EXCEPTIONS
          PARAMETER_ERROR = 1
          NO_VALUES_FOUND = 2
          OTHERS = 3.
    *&      Form  select_input_file_name
    *       text
    form select_input_file_name.
    *  call function 'F4_FILENAME'
    *       exporting
    *            program_name  = sy-repid
    *            dynpro_number = sy-dynnr
    *            field_name    = 'PATH'
    *       importing
    *            file_name     = g_tmp_file_path.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
      EXPORTING
      WINDOW_TITLE = 'Please choose a file'
      "default_extension = '*.TXT'
      "default_filename = 'C:\*.txt'
      initial_directory = 'C:\'
      file_filter = '*.*'
      CHANGING
      FILE_TABLE = l_file
      RC = l_RC
      EXCEPTIONS
      FILE_OPEN_DIALOG_FAILED = 1
      CNTL_ERROR = 2
      ERROR_NO_GUI = 3
      NOT_SUPPORTED_BY_GUI = 4
      OTHERS = 5.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.                    "select_input_file_name
    *&      Form  WRITE_DB_HOME
    *       Write DB home directory
    *       no parameters
    FORM write_db_home.
      CASE sy-dbsys(3).
        WHEN 'ORA'.
          CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_ORAHOME'
                             ID 'VALUE' FIELD searchpoints-dirname.
    *--- C5056155 Start of ALV -------------------------------*
    *      PERFORM flip_flop(rsora000) USING cflag.
    *      WRITE: / 'DIR_ORAHOME',       30 searchpoints-dirname.
          MOVE: 'DIR_ORAHOME'        TO searchpoints-sp_name.
          APPEND searchpoints.
    *--- C5056155 End   of ALV -------------------------------*
        WHEN 'ADA'.
          CALL 'C_GETENV' ID 'NAME'  FIELD 'DBROOT'
                          ID 'VALUE' FIELD searchpoints-dirname.
    *--- C5056155 Start of ALV -------------------------------*
    *      PERFORM flip_flop(rsora000) USING cflag.
    *      WRITE: / 'DIR_ADA_DBROOT',    30 searchpoints-dirname.
          MOVE: 'DIR_ADA_DBROOT'     TO searchpoints-sp_name.
          APPEND searchpoints.
    *--- C5056155 End   of ALV -------------------------------*
        WHEN 'INF'.
          CALL 'C_GETENV' ID 'NAME'  FIELD 'INFORMIXDIR'
                          ID 'VALUE' FIELD searchpoints-dirname.
    *--- C5056155 Start of ALV -------------------------------*
    *      PERFORM flip_flop(rsora000) USING cflag.
    *      WRITE: / 'DIR_INF_INFORMIXDIR', 30 searchpoints-dirname.
          MOVE: 'DIR_INF_INFORMIXDIR' TO searchpoints-sp_name.
          APPEND searchpoints..
    *--- C5056155 End   of ALV -------------------------------*
        WHEN 'DB6'.
          CALL 'C_GETENV' ID 'NAME'  FIELD 'INSTHOME'
                          ID 'VALUE' FIELD searchpoints-dirname.
          IF sy-subrc = 0.
    *--- C5056155 Start of ALV -------------------------------*
    *        PERFORM flip_flop(rsora000) USING cflag.
    *        WRITE: / 'DIR_DB2_HOME',    30 searchpoints-dirname.
            MOVE: 'DIR_DB2_HOME'       TO searchpoints-sp_name.
            APPEND searchpoints.
    *--- C5056155 End   of ALV -------------------------------*
          ELSE.
            EXIT.
          ENDIF.
        WHEN OTHERS.
          EXIT.
      ENDCASE.
    ENDFORM.                    " WRITE_DB_HOME
    FORM get_directories.
    * get the name and aliases of ALL userdefined directories
      SELECT * FROM user_dir INTO isearchpoints
        WHERE svrname = sy-uname.
        MOVE isearchpoints-dirname to searchpoints-dirname.
        MOVE isearchpoints-aliass  to searchpoints-sp_name.
        APPEND searchpoints.
      ENDSELECT.
      SELECT * FROM user_dir INTO isearchpoints
        WHERE svrname = 'all'.
        MOVE isearchpoints-dirname to searchpoints-dirname.
        MOVE isearchpoints-aliass  to searchpoints-sp_name.
        APPEND searchpoints.
      ENDSELECT.
    * Get DB home
      IF sy-dbsys(3) = 'ADA'.
        PERFORM write_db_home.
      ENDIF.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_ATRA'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_ATRA'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_BINARY'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_BINARY'         TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory $DIR_CCMS
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_CCMS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_CCMS'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_CT_LOGGING'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_CT_LOGGING'     TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_CT_RUN'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_CT_RUN'         TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_DATA'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_DATA'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * Get DB home
      IF sy-dbsys(3) = 'DB6'.
        PERFORM write_db_home.
      ENDIF.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_DBMS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_DBMS'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_EXECUTABLE'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_EXECUTABLE'     TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_EXE_ROOT'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_EXE_ROOT'       TO searchpoints-sp_name.
      APPEND searchpoints.
    *get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_GEN'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_GEN'            TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_GEN_ROOT'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_GEN_ROOT'       TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_GLOBAL'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_GLOBAL'         TO searchpoints-sp_name.
      APPEND searchpoints.
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_GRAPH_EXE'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_GRAPH_EXE'      TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_GRAPH_LIB'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_GRAPH_LIB'      TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_HOME'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_HOME'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * Get DB home
      IF sy-dbsys(3) = 'INF'.
        PERFORM write_db_home.
      ENDIF.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_INSTALL'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_INSTALL'        TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_INSTANCE'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_INSTANCE'       TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_LIBRARY'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_LIBRARY'        TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_LOGGING'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_LOGGING'        TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the files written by the memory inspector
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_MEMORY_INSPECTOR'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_MEMORY_INSPECTOR' TO searchpoints-sp_name.
      APPEND searchpoints.
    * Get DB home
      IF sy-dbsys(3) = 'ORA'.
        PERFORM write_db_home.
      ENDIF.
    *get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_PAGING'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_PAGING'         TO searchpoints-sp_name.
      APPEND searchpoints.
    *get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_PUT'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_PUT'            TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_PERF'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_PERF'           TO searchpoints-sp_name.
      APPEND searchpoints.
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_PROFILE'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_PROFILE'        TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_PROTOKOLLS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_PROTOKOLLS'     TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_REORG'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_REORG'          TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_ROLL'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_ROLL'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_RSYN'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_RSYN'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * calculate directory for saphostagent (no sapparam available...)
      IF ( sy-opsys(3) = 'WIN' ) OR ( sy-opsys(3) = 'Win' ).
        DATA: windir_path(64),  programfiles_path(64).
    *   hoping that ProgramFiles is set in service user environment
        CALL 'C_GETENV' ID 'NAME'  FIELD 'ProgramFiles'
                        ID 'VALUE' FIELD programfiles_path.
        IF programfiles_path IS INITIAL.
    *     %ProgramFiles% not available. guess from windir
          CALL 'C_GETENV' ID 'NAME'  FIELD 'windir'
                          ID 'VALUE' FIELD windir_path.
    *     e.g. S:\WINDOWS ==> S:\Program Files
          CONCATENATE windir_path(3) 'Program Files' INTO programfiles_path.
        ENDIF.
        CONCATENATE programfiles_path '\SAP\hostctrl'
                                                 INTO searchpoints-dirname.
      ELSE.
    *   on UNIX, the path is hard coded
        searchpoints-dirname = '/usr/sap/hostctrl'.
      ENDIF.
      MOVE: 'DIR_SAPHOSTAGENT' TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_SAPUSERS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      IF searchpoints-dirname = '.'.
        IF sy-opsys = 'Windows NT'.
          searchpoints-dirname = '.\'.
        ELSE.
          searchpoints-dirname = './'.
        ENDIF.
      ENDIF.
      MOVE: 'DIR_SAPUSERS'       TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_SETUPS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_SETUPS'         TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_SORTTMP'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_SORTTMP'        TO searchpoints-sp_name.
      APPEND searchpoints.
    *get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_SOURCE'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_SOURCE'         TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_TEMP'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_TEMP'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_TRANS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_TRANS'          TO searchpoints-sp_name.
      APPEND searchpoints.
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_TRFILES'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_TRFILES'        TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_TRSUB'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_TRSUB'          TO searchpoints-sp_name.
      APPEND searchpoints.
    *  get the name of the current server.
      CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'rdisp/myname'
                         ID 'VALUE' FIELD searchpoints-dirname.
      data: h_ind type i.
      LOOP AT searchpoints.
        h_ind = sy-tabix.
        IF searchpoints-sp_name IS INITIAL.
          DELETE searchpoints INDEX h_ind.
        ENDIF.
      ENDLOOP.
    ENDFORM.

  • From Sap to Remote Unix Server

    Hi,
    I have to send a file from an internal table to a remote unix server. i have tried a lot appling FTP with a put command but its still not getting transported.
    please help me out.and also tell me wheather i can use some other way to do this.
    also tell me wheather there are some issues of authorisation in this....
    please help me as early as possible.. i am in a real need.. i promise to revert back with points...

    I HAVE TO SEND A FILE FROM OUR SAP TO REMOTE UNIX SERVER.
    FOR THIS PURPOSE I AM USING FTP, BUT STILL I AM NOT ABLE TO DO THAT..
    PLEASE HELP ME OUT ON THIS..
    BELOW I AM GIVING MY CODE PLEASE HAVE A LOOK AT IT AND TELL ME WHATS WRONG.
    REPORT ZIZSFPB001 .
    TABLES : ZISFP03.
    CONSTANTS: C_DELIMETER(1)  TYPE C
                              VALUE '#'.
    TYPES: BEGIN OF TY_FREIGHT,
                    VENDOR      TYPE ZISFP03-VENDOR,
                    LR_NO       TYPE ZISFP03-LR_NO,
                    EBELN       TYPE ZISFP03-EBELN,
                    LR_DATE     TYPE ZISFP03-LR_DATE,
                    PO_DATE     TYPE ZISFP03-PO_DATE,
                    PO_BRANCH   TYPE ZISFP03-PO_BRANCH,
                    TRK_NO      TYPE ZISFP03-TRK_NO,
                    DISP_TIME   TYPE ZISFP03-DISP_TIME,
                    SCAN_NO     TYPE ZISFP03-SCAN_NO,
                    ACTU_QTY    TYPE ZISFP04-ACTU_QTY,
                    MATERIAL    TYPE ZISFP04-MATERIAL,
                    GR_BRANCH   TYPE ZISFP04-GR_BRANCH,
                    STDTIME     TYPE ZISFP14-STDTIME,
                    EST_ARRV_DT TYPE ZISFP04-ARRV_DT,
           END   OF TY_FREIGHT.
    TYPES: BEGIN OF TY_FTP,
                    FIELD(90) TYPE C,
           END   OF TY_FTP.
    DATA: IT_FREIGHT TYPE STANDARD TABLE OF TY_FREIGHT,
          IT_OUTPUT  TYPE STANDARD TABLE OF TY_FREIGHT,
          IT_FTP     TYPE STANDARD TABLE OF TY_FTP.
    DATA : BEGIN OF TABL OCCURS 0,
           LINE(560),
           END OF TABL.
    DATA: WA_FREIGHT TYPE TY_FREIGHT,
          WA_OUTPUT  TYPE TY_FREIGHT,
          WA_FTP     TYPE TY_FTP.
    DATA: W_DSN             TYPE SXPGCOLIST-PARAMETERS,
          W_FTP_DSN         TYPE SXPGCOLIST-PARAMETERS,
          W_PARCOM_LOC(150) TYPE C,
          W_FNAME(16)       TYPE C,
          W_ERROR_FLAG(1)   TYPE C.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_LR_DT FOR ZISFP03-LR_DATE.
    SELECTION-SCREEN END OF BLOCK B1.
    START-OF-SELECTION.
      PERFORM GET_DATA.
      PERFORM TRANSFER_DATA_TO_FILE.
      PERFORM FTP_TRANSFER.
    *&      Form  GET_DATA
          text
    FORM GET_DATA.
      SELECT A~VENDOR
             A~LR_NO
             A~EBELN
             A~LR_DATE
             A~PO_DATE
             A~PO_BRANCH
             A~TRK_NO
             A~DISP_TIME
             A~SCAN_NO
             B~ACTU_QTY
             B~MATERIAL
             B~GR_BRANCH
             C~STDTIME
        INTO TABLE IT_FREIGHT
        FROM ( ( ZISFP03 AS A
       INNER JOIN ZISFP04 AS B
          ON AVENDOR = BVENDOR
         AND ALR_NO = BLR_NO
         AND AEBELN = BEBELN )
       INNER JOIN ZISFP14 AS C
          ON AVENDOR = CVENDOR
         AND APO_BRANCH = CFROM_LOC
         AND BGR_BRANCH = CTO_LOC
         AND AZMODE = CEXPRES_TY )
       WHERE A~LR_DATE IN S_LR_DT.
      IF SY-SUBRC EQ 0.
        SORT IT_FREIGHT BY VENDOR LR_NO EBELN.
        DELETE ADJACENT DUPLICATES FROM IT_FREIGHT.
      ENDIF.
    IT_OUTPUT[] = IT_FREIGHT[].
    ENDFORM.                    " GET_DATA
    *&      Form  TRANSFER_DATA_TO_FILE
          text
    FORM TRANSFER_DATA_TO_FILE.
      MOVE 'createnew.txt' TO W_FNAME.
      CONCATENATE '/usr/sap/trans/mmpp/' W_FNAME INTO W_DSN.
      OPEN DATASET W_DSN FOR OUTPUT IN TEXT MODE.
      IF SY-SUBRC NE 0.
        WRITE : 'File open error occured.'.
        STOP.
      ENDIF.
      LOOP AT IT_OUTPUT INTO WA_OUTPUT.
        TRANSFER WA_OUTPUT TO W_DSN.
        CLEAR WA_OUTPUT.
      ENDLOOP.
      IF SY-SUBRC NE 0.
        WRITE : 'File write error occured.'.
        EXIT.
      ENDIF.
      CLOSE DATASET W_DSN.
    ENDFORM.                    " TRANSFER_DATA_TO_FILE
    *&      Form  FTP_TRANSFER
          text
    FORM FTP_TRANSFER.
      PERFORM BUILD_FTP_FILE.
      PERFORM TRANSFER_FTP_FILE.
    ENDFORM.                    " FTP_TRANSFER
    *&      Form  BUILD_FTP_FILE
          text
    FORM BUILD_FTP_FILE.
      W_FTP_DSN  =  '/usr/sap/trans/mmpp/createcheck.txt'.
      CONCATENATE 'open'
                  'www.info.com'
             INTO WA_FTP-FIELD
        SEPARATED BY SPACE.
      APPEND WA_FTP TO IT_FTP.
      CLEAR WA_FTP.
      CONCATENATE 'user'
                  'myusername'
                  'mypassword'
             INTO WA_FTP-FIELD
        SEPARATED BY SPACE.
      APPEND WA_FTP TO IT_FTP.
      CLEAR WA_FTP.
      CONCATENATE 'cd'
    '/oracle01/oracle/product/iSuites/Apache/Apache/htdocs/etrans/user/upload/'
    INTO WA_FTP-FIELD separated by space.
      APPEND WA_FTP TO IT_FTP.
      CLEAR WA_FTP.
    MOVE 'put /usr/sap/trans/mmpp/createnew.txt' TO WA_FTP-FIELD.
      APPEND WA_FTP TO IT_FTP.
      CLEAR WA_FTP.
      MOVE 'close' TO WA_FTP-FIELD.
      APPEND WA_FTP TO IT_FTP.
      CLEAR WA_FTP.
      MOVE 'bye' TO WA_FTP-FIELD.
      APPEND WA_FTP TO IT_FTP.
      CLEAR WA_FTP.
      OPEN DATASET W_FTP_DSN FOR OUTPUT IN TEXT MODE.
      LOOP AT IT_FTP INTO WA_FTP.
        TRANSFER WA_FTP-FIELD TO W_FTP_DSN.
        CLEAR WA_FTP.
      ENDLOOP.
      CLOSE DATASET W_FTP_DSN.
    ENDFORM.                    " BUILD_FTP_FILE
    *&      Form  TRANSFER_FTP_FILE
          text
    FORM TRANSFER_FTP_FILE.
      FREE TABL.
      CONCATENATE 'ftp -v -n < 'W_FTP_DSN INTO W_PARCOM_LOC.
      CALL 'SYSTEM' ID 'COMMAND' FIELD W_PARCOM_LOC
                    ID 'TAB'     FIELD TABL-SYS.
      IF  W_ERROR_FLAG = '*'.
        MESSAGE I036(ZIMM).
      ELSEIF  W_ERROR_FLAG =  'F' .
        MESSAGE I139(ZIMM) WITH W_FNAME.
      ELSE.
        MESSAGE I038(ZIMM) WITH W_FNAME.
      ENDIF.
    ENDFORM.                    " TRANSFER_FTP_FILE
    **THE ABOVE GIVEN IS THE CODE I AM WRITING FOR THE FTP TO TRANSFER DATA FROM OUR APLICATION SERVER TO
    THE REMOTE UNIX SERVER.
    BUT WHEN I DO THE
      CALL 'SYSTEM' ID 'COMMAND' FIELD W_PARCOM_LOC
                    ID 'TAB'     FIELD TABL-SYS.
    MY SYSTEM GOT HANGED AND GVES NO RESPONSE...
    PLEASE HELP ME OUT AS EARLY AS POSSIBLE...
    I WILL SURE U THAT U WULL REVERT BACK WITH POINTS...
    PLEASE HELP...
    ARE THERE ANY AUTHORISATIONS ISSUES..OR I AM DOING SOMETHING WRONG...

  • Transfer files from ipod touch to a PC with windows Vista

    How do I transfer files from my ipod touch to my brand laptop with windows vista?

    Hello and Welcome to  Discussions Forum.
    If you have purchased songs from the iTunes Music Store, then those are pretty easy to transfer to your computer. You'll just need to follow [this instructions|http://docs.info.apple.com/article.html?artnum=305465].
    All your other songs (for example, those ripped from your CD's), you'll need to use any 3rd party program to transfer them to your iTunes library!
    Some can also transfer your playlists, videos, ratings, podcast...
    *To use with iPod Touch/iPhone and other iPods:*
    [iGadget|http://www.ipodsoft.com/site/pmwiki.php?n=igadget.Homepage] (Mac and Windows)
    [iRepo|http://www.purpleghost.com/index.php?q=irepo] (Mac and Windows)
    [iPod Access|http://www.findleydesigns.com/ipodaccess/index.html] (Mac and Windows)
    *To use only with other iPods:*
    [Media Widget|http://www.bootstrapdevelopment.com/showproduct.aspx?t=b#features] (Windows only)
    [iDump|http://www.download.com/iDump/3000-2169_4-10407429.html] (Windows only)
    [Senuti|http://www.fadingred.org/senuti> (Mac Only)
    Hope this helps! If you still have doubts, please reply.
    Best Regards,
    !http://signatures.mylivesignature.com/54486/122/A57996D55BE7ABB4A67DE686D381A27 4.png!

  • Can't copy file from SAP-directory to FTP server

    Hello,
    I can't copy files from the SAP server to the FTP server. The file is created with OPEN DATASET and CLOSE DATASET commands and is placed in the SAP-directory S:\usr\sap\DEV\DVEBMBGS00\work.
    I can see and read the file with transaction al11, so I know it's there.
    But the FTP command always gives the same error:
    S:\usr\sap\DEV\DVEBMBGS00\work\[FILENAME] errno 22: invalid argument
    I can connect to the FTP, but the put command keeps failing. Somehow, the file in the SAP directory can't be read, it seems, even when
    Any ideas?
    Thanks in advance.
    Dave

    Ok, I found out that I have to use SAPFTPA as RFC destination type, instead of SAPFTP, otherwise the folders can't be located.
    But with SAPFTPA I can't seem to connect to the FTP server. I've tested the connection with sm59 and it works, but for the FTP it doesn't work. When I use SAPFTP as destination type, it still works.
    What can I do?
    Thanks.

  • Transfer files from SAP R/3 to KM

    Hi all,
    I search for a way to transfer some files e.g. PDF from SAP R/3 4.7 to KM Repository of EP 6. In the R/3 the pdf files will be created from spoolfiles with a function . The files should be stored in a collaboration room , but for the first step i try to find if there is a way to transfer this files with a batch job from R/3 to EP 6.0 Portal.
    I’ve search in the sdn but until now i find some posts to use the km api or webdynpro to transfer the data from local Webfrontend into the km.
    Thanks for got an idea to find a way.
    Best regards
    Thorsten

    Hi Vivek,
    until now I haven't found a solution in detail, but some ways to verify the connection.
    I wrote about a tool that export the pdf to the filesystem, this wont be able at this time, it must developed, because a function will place the data in a sap table and from this point there we can export it on the filesystem after we've develop some abap code.
    I thought that was already available, but that what i found was the Report RSTXPDFT4 in the sap system, with this you can transfer spool to pdf and store the file in dialog on a filesystem, there will webdav be able to use, but it must be batch.
    So I search to a new way, I try to set the repository for rooms from persitence from db to fsdb, this works, but with our patch sp9 there are some errors, so i must patch it to sp 15/16 first.
    I'm able to make the netshare on windows, so the repository is reachable with an unc Path. If the report, that must be written can access such unc path (normaly thats works in the same domain) we can store the Files in the room workspace document folder an the portal synch job can make the rest. >IN the sap system there must be a table to map the rooms to the responsable folder.
    This way should be work, but it isn't fine for productive, I heard from a way to transfer the data with  java. In CRm System there should be a fnction from sap CRM_ISA_ORDER_CONVERT_TO_PDF and the isa use the java-stream to transform it in pdf, but this is nothing for me, that must be checked from a java developer, a colleague of my will check this.
    Best regards
    Thorsten

  • Transfer files from QuickBooks for Mac to TurboTax in Windows 2000

    How can it be done to transfer QuickBooks for Mac data into TurboTax on a Windows 2000 PC? Is there any kind of utility program or file converter?
    I already know there is NO BUILT-IN SUPPORT in QuickBooks or TurboTax for import/export if the two programs are not on the same computer. Also, Intuit does not have any kind of utility or converter to pass files between Mac and Windows.
    Also, I spoke to an Apple technical support person who said that Boot Camp will not support Windows 2000.
    Does anyone have any bright ideas on how to get the data out of QB into TT?

    You should really consider posting your question on the QuickBooks community forums, as if anyone has any experience doing it, you'll find them there.
    http://www.quickbooksgroup.com/
    http://quickbooksusers.com/

  • Download file from SAP PLM or Content Server?

    Hi all,
    I learned that the VEG server download the originals from content server and then started the conversion process.
    In my case, I have an error below, it is strange that the IP 153.95.192.93:443 is the ip of SAP PLM server, can anyone tell me is my configuraton right?
    thanks
    Job 42 (Workflow 'KPRO Retrieve') report
    Startup Parameters
         FilesPerTask = '5 '(Integer)
         InputFilePath = '\ \ NBHXVEG02 \ DSShare \ Workspace \ JM_JOB41 \ KProRetrievalRequest.xml' (String)
         OutputFilePath = '\ \ NBHXVEG02 \ DSShare \ Workspace \ JM_JOB41 \ KProRetrievalResponse.xml' (String)
    Step 'validate input'
       Completed Action 'enter a valid'
    Step 'Download'
       CompletedWithWarnings Action 'can not download all the files'
         Info Message 'document retrieval tasks to be addressed: 1'
         Warning Message 'first task failed to retrieve a file (of 1): Unknown error (warning)'
           jmp_KproRetrieve (Task 39)
           Warning Message 'file' A00021876_20130819.CATProduct 'unable to download: Unable to connect to the remote server: Since the connected party did not properly respond after a period of no response or a host connection, the connection attempt fails. 153.95.192.93:443 '

    HI Fergal.
    I changed the IIS port to XX443(XX means instance number), the https service is also started in the ECC server.
    but I got below errors:
    Startup Parameters
         FilesPerTask = '5 '(Integer)
         InputFilePath = '\ \ NBHXVEG02 \ DSShare \ Workspace \ JM_JOB115 \ KProRetrievalRequest.xml' (String)
         OutputFilePath = '\ \ NBHXVEG02 \ DSShare \ Workspace \ JM_JOB115 \ KProRetrievalResponse.xml' (String)
    Step 'validate input'
       Completed Action 'enter a valid'
    Step 'Download'
       CompletedWithWarnings Action 'can not download all the files'
         Info Message 'document retrieval tasks to be addressed: 1'
         Warning Message 'first task failed to retrieve a file (of 1): Unknown error (warning)'
           jmp_KproRetrieve (Task 122)
           Warning Message 'file' A00021876_20130819.CATProduct 'unable to download: The underlying connection was closed: Could not establish trust relationship for the SSL / TLS secure channel. : According to the verification process, the remote certificate is invalid. '

  • Transfer file from UNIX to windows application server G:\ drive

    Dear Expert,
    Really need some help on this, very urgent !
    The download program schedule in background to allow file store in unix.
    Can we do a unix command in abap program to transfer the file from unix to windows application server G:\ drive.
    The gateway for that application server is ukblmqg02.emea.astrazeneca.net .
    Anyone have the sample source code ?
    Thanks&regards
    Nislina

    Hi,
    1.
    There is  a FM 'ARCHIVFILE_SERVER_TO_CLIENT'.
    If the requirement need not necessarily require a FM to transfer a file, then you can also use transaction 'CG3Y' to transfer a file
    from application server to presentation server.
    2.
    Try to use FM  DOCFILE_SERVER_TO_CLIENT. I am using it to download a file from SAP application server to desktop.
    Source path should be application server file path along with file name i.e. /tmp/sample.xls.
    Target path should be something like c:\file.xls.
    Best regards,
    Prashant

  • File transfer from UNIX server to Windows server path

    Hello Experts, (Gud Even Gud Aft & Gud Mor)
    Is there a way to transfer file from UNIX server(Oracle database), to Windows server? All I know if Windows path. I am able to read the file as it is on server, however it does not recognize Windows directory at all.
    If you can share some documents around this to study, I will be grateful.
    Regards,

    34MCA2K2 wrote:
    Is there a way to transfer file from UNIX server(Oracle database), to Windows server? All I know if Windows path. I am able to read the file as it is on server, however it does not recognize Windows directory at all.Yes it is possible. Samba on Unix sharing the directory containing the file. NFS on the Unix server sharing the directory containing the file. FTP server on Unix allowing the file to be read and copied. OpenSSH on the Unix allowing the file to be read and copied via scp (secure copy).
    But seeing as this is an Oracle database forum (not an operating system forum), and the subject matter is the database server languages SQL and PL/SQL, here is a PL/SQL solution.
    Create a table using the BFILE data type for referencing the files on the Unix o/s. Provide a web enabled procedure for downloading the files via HTTP using a web browser. This procedure will look something as follows:
    --// URL example: http://my-server.my-domain.com/MyDAD/MySchemaName.StreamFile?fileID=1234
    create or replace procedure StreamFile( fileID number ) AUTHID DEFINER is
            mimeType        varchar2(48);
            fileName        varchar2(400);
            lobContent      BLOB;
    begin
            --// read the LOB from a table (this example uses the
            --// Apex file uploads table - change it to your own files table)
            select
                    f.filename,
                    f.mime_type,
                    f.blob_content
                            into
                    fileName,
                    mimeType,
                    lobContent
            from    FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$ f
            where   f.id = fileID;
            --// format a basic HTTP header that describes the file stream send
            OWA_UTIL.mime_header( mimeType, FALSE );        -- e.g. text/csv text/plain text/html image/gif
            HTP.p( 'Content-Disposition: attachment; filename='||fileName );
            HTP.p( 'Content-Length: ' || DBMS_LOB.GetLength(lobContent) );
            OWA_UTIL.http_header_close;
            --// now write the BLOB as a mime stream using the Web Procedural Gateway's
            --// doc load API
            WPG_DOCLOAD.download_file( lobContent );
    exception when OTHERS then
            --// Decide what HTML to generate (if at all) if there is a failure
            --// (usually not a good idea to show database errors to the
            --// web browser client as that can provide technical details
            --// that could be useful for exploiting the database)
            HTP.prn( 'StreamFile() failed with '||SQLERRM(SQLCODE) );
    end;
    / On Windows, IE can be used interactively to copy the file across. For automation (via PowerShell or console jobs), use a command like tool like wget* to download the file.
    If you do not want to use SQL or PL/SQL as the file copy mechanism, then please close this thread (mark as answered) and take your question to an appropriate forum.
    <i>* - see http://gnuwin32.sourceforge.net/packages/wget.htm</i>

  • File Transfer From Unix server to Windows Client System Using WebUtil

    Hi all,
    I want to Transfer a File from Unix Server to Window Client System using Webutil. But below mention code is not working.
    DECLARE
         V_Server_Path VARCHAR2(500) := Null;
         V_Client_Path VARCHAR2(500) := Null;
    BEGIN
         V_Server_Path := '/proj/oraapps/viper/dev/reports/cache/Saveauftr.txt';
         V_Client_Path := 'C:\Migration\EU_Applications\Lima\OAS_WorkArea\Client\Saveauftr.txt';
         IF WebUtil_File_Transfer.Is_AS_Readable(V_Server_Path) THEN
         IF WebUtil_File_Transfer.AS_To_Client(V_Client_Path,V_Server_Path) THEN
              Message('Downloading the File ..... .... ... .. .');
              Message('Downloading Was Successfull ...');
              Message('File Transfer from Server Was Successfull ...');
         END IF;
    END IF;
    END;
    Can anyone suggest me,Why the above code is not working and what to do for solve the Problem.
    Regards
    Gany

    Hello,
    You have more chances to get an answer in the Oracle Forms OTN Forum :
    Forms
    Regards

  • Using File Adapter to transfer files from directories on unix file server.

    I have this scenario. I have a PI server on hpus45 and I want to use it to transfer files from a source directory to a destination directory on a unix file server. The unix file server is on a different box eg hpus30.
    What do I configure in SLD and Integration Directory? All the examples I have seen is transfering files from directories on the PI server but none on a different box.'
    Is it possible? I need help asap. I need to determine what the best approach is by today.

    Hi Agasthuri Doss,
    I'm using PI 7.1. I'm not seeing your instructions in ID.
    The objects in PI 71. are in this order
    Unassigned Objects
    Party
    communication component
    communication channel
    receiver determination
    interface determination
    sender agreement
    receiver agreement
    direct connection
    integrated configurations
    configuration scenario
    value mapping group.

  • Copy file from client machine to unix db server

    Dear all,
    I have oracle form 10g, and data base server using 10 r 2,
    I have an oracle for to browse client XML file and return the name of the file including the path to TEXT item what I want to do after that is to copy the seelcted file from the client to DB server (hint this server over Unix operating system)
    I tried
    V_Cpy_Result := Webutil_File.Copy_File ('C:\File_Name.Xml', '/u01/oradata/odsuat/ssr_xml_dir/Outbound/File_Name.Xml');
    but this does't work, please provide me with the way or the command that I can copy the selected file from client to Unix DB server...

    Hello,
    If you want to transfer files between client machine and A.S. or database machine, use the Webutil file_transfer package's functions.
    Francois

  • Can i transfer file from application server to lotus server.

    hi
    can i transfer file from application server to lotus server.
    i m geting file on application server but i want to transefer that file from application server to lotus server.
    if yes than give me suggestion.
    thanks in advanced.

    Hello Laxman
    If you want to trigger the file transfer from within SAP then you need to execute an <b>external OS command</b> (transaction <b>SM49</b>, <b>SM69</b>).
    At the level of the OS (operating system, e.g. Windows, Linux) you need to be able to transfer files to the Lotus server.
    Your task is, for example, to write a report executing the external OS command which will be executed at the OS level where the file transfer happens.
    Regards
      Uwe

Maybe you are looking for

  • Trouble with "add note to replace text" annotation

    When I use "Add note to replace text" in Reader XI, the note acts as if it is locked even though it is not. The Locked box is not checked, but yet the options are grayed out; and I cannot delete the note, though I can edit the text box. "Strikethroug

  • How to share the i-Photo Library on the same i-Mac with 2 Accounts?

    I am using a iMac running OSX 10.8.4. there are 2 accounts, mine and my wife's. we wish to be able to share the i-Photo Library on the same computer. So I copied the i-Photo library from my Library folder to the Users Shared folder and then deleted t

  • Datagrid Checkbox item renderer Issue.

    Hi There Recently I faced a  requirement to have a checkbox inside a datagrid where I need to develop a music module with playlist management for ADOBE AIR based application. For this I have searched and found a source to use Datagrid and Checkbox co

  • Calling a method in Parent component from Title Window

    Hi all, I have a parent component that opens up a Title window when I click a button. Now I want to call a method in that parent component from the Title window. How do I do this in Flex? Could anyone give me a hint please. Thank you in advance for t

  • Clone stamp tool - one layer to another

    If I have two layer and I want to use "Clone stamp tool" to clone from layer one to layer two ?