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

F4 help to select the file

Former Member
0 Likes
1,528

Could any one tell the FM for F4 help to select the file from application server.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,485

Hi sri,

1. F4_DXFILENAME_TOPRECURSION

This is the FM.

regards,

amit m.

12 REPLIES 12
Read only

Former Member
0 Likes
1,486

Hi sri,

1. F4_DXFILENAME_TOPRECURSION

This is the FM.

regards,

amit m.

Read only

0 Likes
1,485

use fm F4_DXFILENAME_TOPRECURSION

Read only

0 Likes
1,485

Could you please help me in passing the parameters?

Read only

Former Member
0 Likes
1,485

RZL_READ_DIR_LOCAL this is to read a directory from

application server.

F4_DXFILENAME_TOPRECURSION - popup to select one file from the given application server directory (pattern allowed)

Read only

Former Member
0 Likes
1,485

Hi,

I think this FM WORKS..

F4_DXFILENAME_TOPRECURSION

but this returns only a single file path from the Application Server

regards

satesh

Read only

Former Member
0 Likes
1,485

Hi Sri Kanth,

in ur selection screen, define it this way..

PARAMETERS:

p_logfil TYPE filename-fileintern.

You will get the F4 automatically.

This is for a logical file.

p_file TYPE filename-fileextern.

Rgds,

Prabhu.

Read only

0 Likes
1,485

Hi Prabhu,

This is not selecting anything , I am just getting the F4 option, but it is not displaying any thing?

Read only

0 Likes
1,485

Hi,

Try this one..

REPORT ZTESTAPPL.

data: t_filetab type table of SALFLDIR with header line,

t_spopli type table of spopli with header line.

parameters p_dir like SALFILE-LONGNAME default 'D:\SAPWORKING'.

call function 'RZL_READ_DIR_LOCAL'

exporting

name = p_dir

tables

file_tbl = t_filetab

EXCEPTIONS

ARGUMENT_ERROR = 1

NOT_FOUND = 2

OTHERS = 3

.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

loop at t_filetab.

if t_filetab-size ne space.

t_spopli-varoption = t_filetab-name.

append t_spopli.

clear t_spopli.

endif.

endloop.

call function 'POPUP_TO_DECIDE_LIST'

exporting

  • CURSORLINE = 1

MARK_FLAG = 'X'

MARK_MAX = 25

  • START_COL = 0

  • START_ROW = 0

textline1 = 'Choose Files'

  • TEXTLINE2 = ' '

  • TEXTLINE3 = ' '

titel = 'File Selection'

  • DISPLAY_ONLY = ' '

  • IMPORTING

  • ANSWER =

tables

t_spopli = t_spopli

  • EXCEPTIONS

  • NOT_ENOUGH_ANSWERS = 1

  • TOO_MUCH_ANSWERS = 2

  • TOO_MUCH_MARKS = 3

  • OTHERS = 4

.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

loop at t_spopli.

if t_spopli-selflag ne ' '.

write 😕 'Selected File: ' , t_spopli-varoption.

endif.

reward points if helpful

Read only

0 Likes
1,485

Fileintern will work ONLY if there are any logical filenames defined already.

To configure a logical filename, goto transaction 'FILE'.

Search the forum for posts on how to configure in FILE transaction.

Read only

0 Likes
1,485

Hi,

Use the following function module

F4_FILENAME

Description for this is:F4 for filename / Filemanager support to locate file in a directory .Uses current dynpro value, calls WS_FILENAME_GET

May b this will help u.

Regards,

Sira

Read only

0 Likes
1,485

Hi

You can also try this FM

F4_DXFILENAME_4_DYNP

Read only

Former Member
0 Likes
1,485

Here is one that I used and works charmingly.

/SAPDMC/LSM_F4_SERVER_FILE.

This is used by LSMW for browsing application server files.