Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

File movement

Former Member
0 Likes
696

hi friends,

could u plz tell me how to Move a File from one application server directory to another using date and time stamp.

plz reply me as soon as possible....its very urgent yar.

thanks in advance.

regards,

priya.s

hi friends,

could u plz tell me how to Move a File from one application server directory to another using date and time stamp.

plz reply me as soon as possible....its very urgent yar.

thanks in advance.

regards,

priya.s

5 REPLIES 5
Read only

Former Member
0 Likes
657

Priya,

For single files you can use EPS_FTP_PUT or EPS_FTP_GET (depending on whether you push or pull your files).

Guess which are the function modules for multiple files?

EPS_FTP_MPUT and EPS_FTP_MGET.

Use

CALL FUNCTION ' EPS_FTP_PUT '

EXPORTING

RFC_DESTINATION = NONE

LOCAL_FILE = filename

LOCAL_DIRECTORY = /dir1/dir2

REMOTE_FILE = filename

REMOTE_DIRECTORY = /dir1

OVERWRITE_MODE = F " force -> overwrite existing file

TEXT_MODE = B " binary

TRANSMISSION_MONITOR X " display transmission monitor

*RECORDS_PER_TRANSFER 10

*REQUESTED_FILE_SIZE 0

*MONITOR_TITLE

*MONITOR_TEXT1

*MONITOR_TEXT2

*PROGRESS_TEXT

*OBJECT_NAME

Read only

Former Member
0 Likes
657

Hi Priya,

You may use BC(Business Connector) for this purpose or else design a program with necessary coding n later use this unix code for file movement..

CALL 'SYSTEM' ID 'COMMAND' FIELD COMMAND

ID 'TAB' FIELD TABL-SYS.

Regards,

Kaveri

Read only

Former Member
0 Likes
657

Hi,

u could use Open dataset.

use read dataset for reading uf file from one application server

use transfer to write it to other file..

while saving the new file to second appl server u can add date + time to its name...

reward if helpful

regards,

Read only

Former Member
0 Likes
657

Hi,

Use open dataset, transfer the contents and close dataset to move file from ur directory to the server.

The date and time stamps can be added to the filename. (date will be added automatically)

Reward if helpful.

Regards,

Ramya

Read only

Former Member
0 Likes
657

Hi,

The best option is write the shell script and transfer the file.

If you want to use the XI then develop the file to file scenario and pick up the file as it is and without any content conversion transfer the file to the destination.

For file to file scenario, refer to this weblog.

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1 - File to File Part 1

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 - File to File Part 2

For the same file name as source refer to following weblog.

Till SP14,

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

After SP14, you can use following.

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

you wanna use XI, then you will have to create the File to FIle scenario.

In your file adapter, just give your filename as name_.

If your file is oot going to be of XML format, then Content Conversion will have to be perfromed on both the sender and the receiver file adapter.

regards,

pankaj