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: 

how to create search path for the file on the desktop..

Former Member
0 Kudos

hello experts..

I have used gui_upload module to upload the data from flatfile to the internal table, in that how can i create search path for the file selection in the selection screen, also please help me the code to update the ztable.

thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Gopal,

Check out this thread...

Check out this function module it will help you to find the path for both Application and also Presentation servers..

F4_DXFILENAME_TOPRECURSION.

Check the below program which include even this function module and also some other F4 function modules..

http://www.sapnet.ru/viewtopic.php?p=482&sid=144935daf959d9ca80a5b3b2b0802fa4

Hope the information provided would be helpful and would solve your issue.

Regards

Narin Nandivada

4 REPLIES 4

bpawanchand
Active Contributor
0 Kudos

HI

If iam not wrong you want to select a file from a location that you don't know so if this is ur problem then use the function module

F4_FILENAME

this FM helps to locate and select the desired file from the system.

Sample code that you can check is

How to get windows filename

PARAMETERS: lv_file LIKE rlgrap-filename.

Method 1

CALL FUNCTION u2019KD_GET_FILENAME_ON_F4u2019

EXPORTING

MASK = u2019,.txt,.*u2019

STATIC = u2019Xu2019

CHANGING

FILE_NAME = LV_FILE.

Method 2

CALL FUNCTION u2019F4_FILENAMEu2019

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

field_name = u2019 u2019

IMPORTING

file_name = LV_FILE.

Regards

Pavan

Former Member
0 Kudos

Hi Gopal,

Check out this thread...

Check out this function module it will help you to find the path for both Application and also Presentation servers..

F4_DXFILENAME_TOPRECURSION.

Check the below program which include even this function module and also some other F4 function modules..

http://www.sapnet.ru/viewtopic.php?p=482&sid=144935daf959d9ca80a5b3b2b0802fa4

Hope the information provided would be helpful and would solve your issue.

Regards

Narin Nandivada

uwe_schieferstein
Active Contributor
0 Kudos

Hello Gopal

Define the selection-screen event

AT SELECTION-SCREEN ON VALUE-REQUEST for <parameter_for_file>

When the event is triggered call the static method CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG.

Regards

Uwe

Former Member
0 Kudos

hi,....

for search path for file on your local pc you can use the following...

*AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file .

  • CALL FUNCTION 'F4_FILENAME'

  • EXPORTING

  • program_name = syst-cprog

  • dynpro_number = syst-dynnr

  • field_name = 'C:\'

  • IMPORTING

  • file_name = p_file.

on clicking f4 it will display the search path as you want.