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 name

Former Member
0 Likes
674

I hav to declare filename in parameters.This should be the complete path along with the file name on the application server.

How to do this one?

I hav to declare filename in parameters.This should be the complete path along with the file name on the application server.

How to do this one?

4 REPLIES 4
Read only

Former Member
0 Likes
640

The filename type you are declaring using parameters; take it as string type or rlgrap-filename (here u prefer 1st one) type. Since you are dealing with Application server, you create a dataset and assign the filename which contains filenpath to the dataset. For reading or writing the file's content you can you Open dataset and Close dataset concept.

Read only

Former Member
0 Likes
640

Hi NEED HELP ,

you can'nt select a file from application server.

use T-Code AL11

it stores all files.select your suitable file and its path.

in your Parameter give this filename as default.

use OPEN DATASET

READ DATASET

to access files on application server.

hope this will solve your problem.

Please reward points if found helpful.

Thanks and regards,

Rajeshwar.

Read only

manubhutani
Active Contributor
0 Likes
640

use function module 'F4_DXFILENAME_TOPRECURSION'

it will give a pop up to select a file.

if u wana hardcode

then put the string value in the parameter file name in the initialization event

but remember ti lower case the string if u r dealing with unix servers as app servers.

Please reward points

Read only

Former Member
0 Likes
640

Hi,

You can get the file path from the application server. use the function module :

DATA: C_FNH_MASK TYPE DXFIELDS-FILEMASK VALUE '.',

SEARCH_DIR TYPE DXFIELDS-LONGPATH VALUE '/SAPGLOBAL/USERS'.

data : path(255) type c.

CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'

EXPORTING

I_LOCATION_FLAG = 'A'

I_SERVER = ' '

I_PATH = SEARCH_DIR

FILEMASK = C_FNH_MASK

FILEOPERATION = 'R'

IMPORTING

O_PATH = PATH

EXCEPTIONS

RFC_ERROR = 1

OTHERS = 2.

First parameter location flag may contain P-presentation server and A for application server.

Note: The path may not be displayed but you can get the path into the variable PATH. check during debugging. then assign the value to another variable.

Reward Points if Helpful.

Thanks and Regards,

Narayana.