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: 

Retrieving the path where file is saved

Former Member
0 Kudos

Hi Experts!

My problem is this: I am currently using the fm 'DOWNLOAD' to save the my smartform output into PDF. However, I need to issue a message that the file was saved in the folder path that the user selected. This can be different from what I defaulted. Is there a way to retrieve this information?

Thanks in advance.

4 REPLIES 4

amit_khare
Active Contributor
0 Kudos

Whatever file path you are passing to this FM FILENAME parameter just extract the path from it by passing it to FM SO_SPLIT_FILE_AND_PATH and give that path to message.

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

Hi,

Try This:

Declare a variable of type LOCALFILE. and Get the the value of ACT_FILENAME parameter from the 'DOWNLOAD' func module.

Use the following code in after the 'DOWNLOAD' function module.


DATA: path type LOCALFILE.

Path = v_ACT_FILENAME.

If sy-subrc = 0.

   Message path type 'I'.

endif.

Reward points if helpful answer.

Ashvender

Former Member
0 Kudos

Hi,

FM 'DOWNLOAD' has an exporting parameter called ACT_FILENAME.

Catch the parameter value as this might contain the file path along with the file name.

former_member223537
Active Contributor
0 Kudos

FM "DOWNLOAD" had FILENAME has import parameter.

Check the variable which you have passed to the Field "FILENAME".

Assuming that the variable is L_filename.

After DOWNLOAD FM, use following command:

MESSAGE l_filename type 'I'.