Application Development 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: 

files on application server.

Former Member
0 Kudos

hi,

I want to know how to transfer files to the application server.In what format it will be stored.eplain in detail plz.

3 REPLIES 3

Former Member
0 Kudos

Hi,

Please check the documentation on OPEN DATASET in the help. This will give you a good idea of the entire process and also different ways to store file on the application server.

Cheers

Former Member
0 Kudos

u have to use open dataset <name>.....Transfer data to <file>.....close dataset....the data is stored as the one which looks like in notepad...

Basic Form of the OPEN DATASET Statement

To open a file on the application server, use the OPEN statement as follows:

Syntax

OPEN DATASET <dsn> [Additions].

This statement opens the file <dsn>. If you do not specify any additions for the mode, the file is opened in binary mode for reading. SY-SUBRC returns 0 if the system opens the file. Otherwise, SY-SUBRC is set to 8.

You enter the filename <dsn> either as a literal or as a field containing the actual name of the file. If you do not specify a path, the system opens the file in the directory in which the R/3 System is running on the application server. To open a file, the user under which the R/3 System is running must have the requisite authorizations at operating system level.

Filenames are platform-specific. You must therefore use file- and pathnames that conform to the rules of the operating system under which your R/3 System is running. However, you can also use logical filenames to ensure that your programs are not operating system-specific. For further information, refer to Using Platform-Independent Filenames.

DATA FNAME(60).

FNAME = '/tmp/myfile'.

OPEN DATASET 'myfile'.

OPEN DATASET FNAME.

This example works as long as your R/3 System is running under UNIX. The program opens the file "myfile" in the directory in which the R/3 System is running, and also opens the file "myfile" in directory "/tmp". However, you would have to change the filename for other operating systems. For example, for OpenVMS, you could write the following:

FNAME = '[TMP]myfile.BIN'

OPEN DATASET 'myfile.BIN'.

Writing files to the file system of the host is simple

data:

begin of STRUC,

F1 type c,

F2 type p,

end of STRUC,

DSN(30) type c value 'TEMPFILE'.

STRUC-F1 = 'X'.

STRUC-F2 = 42.

  • Write data to file

open dataset DSN in text mode.

transfer STRUC to DSN.

close dataset DSN.

See also http://help.sap.com/saphelp_nw04/helpdata/en/79/c554dcb3dc11d5993800508b6b8b11/content.htm

Former Member
0 Kudos

HI,

The application server is used to run the business application programs in the R/3 client/server concept. The application modules are loaded from the data base server to the application server as required. Thus the application server requires only storage capacity to accommodate UNIX, Swapping and the SAP runtime environment.

Regards

Sudheer