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 open

Former Member
0 Likes
2,246

Hi all,,

Is there a provision to open a file using function modules.

for example.

I must run a program, which will help me to locate the file in the presenation server or pc.

the file may be a text or xls file.

i have to open the file and make changes to it.

is it possible.

please help..

thanks in advance

5 REPLIES 5
Read only

Former Member
0 Likes
1,232

Hi,

check with the FM FILE_OPEN

Regards,

Srira,

Read only

former_member583200
Participant
0 Likes
1,232

Hi,

Files can be located using function module for example "WS_FILENAME_GET" in presentation server an there are function modules which can be used to locate files in application server too.

But SAP-environment is not like microsoft-window so it has limitations.

You can read a file(example: *.txt & *.xls) but not in gui environment. for doing the same you have to adhere to a program which will display that data in desire sap output format.

I think this bit of explanation is sufficient for you to understand the sap functionalities.

Regards,

Satya

Read only

Former Member
0 Likes
1,232

Hi Naveena David,

try coding like this.

CALL METHOD cl_gui_frontend_services=>execute

EXPORTING

document = lw_file.

where lw_file contains ur full file name with path.

Read only

Former Member
0 Likes
1,232

Hi,

CALL METHOD cl_gui_frontend_services=>execute

EXPORTING

document = lw_file.

where lw_file contains ur full file name with path. (For Example ings.txt)

Regards

SEK

Read only

Former Member
0 Likes
1,232

i got my issue solved