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: 

Folder list presentation server

0 Kudos

Hi,

I want to display help for directory list in presentation server.

User can select the directory where they want to store data.

If they entered a directory then how to check existence of that directory in presentation server.

1) FM to diaplay and select list of directories in presentation server

2) How to check given directory exist in presentation server or not.

Thanks,

Balamurugan.R

12 REPLIES 12

bpawanchand
Active Contributor
0 Kudos

Hi

Use Function module F4_FILENAME.

or

F4_DXFILENAME_TOPRECURSION

Regards

pavan

Former Member
0 Kudos

Hi Bala,

Use the function module F4_FILENAME.

CALL FUNCTION 'F4_FILENAME'
* EXPORTING
*   PROGRAM_NAME        = SYST-CPROG
*   DYNPRO_NUMBER       = SYST-DYNNR
*   FIELD_NAME          = ' '
 IMPORTING
   file_name           = file_path.

Declare file_path of TYPE ibipparms-path.

Check this link for sample code.

http://www.sap-img.com/abap/using-function-modules-f4-filename.htm

Hope this helps you.

regards,

Chandra Sekhar

former_member705122
Active Contributor
0 Kudos

Hi,

Class,

CL_GUI_FRONTEND_SERVICES.

Check this links:

regards

Adil

Former Member
0 Kudos

Hi,

CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG

CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE

Goto SE24 & type CL_GUI_FRONTEND_SERVICES

Click Display

Goto METHODS tab

call method cl_gui_frontend_services=>directory_exist for Directory exists or not.

Regards,

Omkaram.

former_member188685
Active Contributor
0 Kudos

using the class

CL_GUI_FRONTEND_SERVICES

1) FM to diaplay and select list of directories in presentation server

2) How to check given directory exist in presentation server or not.

methods : DIRECTORY_EXIST "for checking the Directory existance

DIRECTORY_LIST_FILES " for getting the list of files in the Directory.

Former Member
0 Kudos

hi,

Use the FM F4_FILENAME

PARAMETER: p_file TYPE rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

field_name = ''

IMPORTING

file_name = p_file.

Regards,

Srilatha

Former Member
0 Kudos

hi,

Use the FM F4_FILENAME

PARAMETER: p_file TYPE rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

field_name = ''

IMPORTING

file_name = p_file.

Regards,

Srilatha

Former Member
0 Kudos

Hello,

Check these FM

PLF_CHECK_DIRECTORY

this FM checks whether the directory exists or not.

TMP_GUI_DIRECTORY_LIST_FILES

this FM gives the list of files in the directory

Check out these other FM if interested..

TRINT_FI_GET_DIRECTORY_NAMES

TMP_GUI_CREATE_DIRECTORY

TMP_GUI_READ_DIRECTORY

TMP_GUI_REMOVE_DIRECTORY

Regards

Indu.

0 Kudos

Hi Indu,

My task is , I want to give a help to select directory from the presentation server. (ie F4 help)

Secondely , if they entered the directory name , I have to check it is existing or not.

F4_filename will take care for files, but my part is directory

Thanks,

Balamurugan

0 Kudos

Hello Balamurugan,

in the AT SELECTION-SCREEN FOR VALUE REQUEST <p_file>

call the FM, F4_FILENAME.

If you enter the name directly, to check whether it is valid or not, use the FM, PLF_CHECK_DIRECTORY in the validation of the field.

i.e.,

first call F4_FILENAME, then call PLF_CHECK_DIRECTORY in the same event.

AT SELECTION-SCREEN FOR VALUE REQUEST ON <p_file>

CALL F4_FILENAME

...........

...........

CALL PLF_CHECK_DIRECTORY

.........

........

IF sy-subrc ne 0.

message 'file doesnt exist' type 'E'.

endif.

Hope this helps you.

Regards

Indu.

former_member188685
Active Contributor

Former Member
0 Kudos

hi check this...

/SAPDMC/LSM_F4_FRONTEND_FILE

f4_filename