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 for application server files

Former Member
0 Likes
3,735

Hi,

I want functnality to dispaly F4 help to fetch application server file. How to do it or any standard program which has functnality to display F4 help for application server files.

Also please explain me meaning of statement

CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TRANS'

ID 'VALUE' FIELD g_dir_trans.

Its call system function.

How to define DIR_TRANS. ?

Points will be awarded!!

Regards,

Ashish Gupta

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,755

Use FM

F4_DXFILENAME_TOPRECURSION

It works both for Application Server files and Presentation Server Files.

For Application server file Pass 'A' To I_LOCATION_FLAG.

For Presentation server file Pass 'P' To I_LOCATION_FLAG.

4 REPLIES 4
Read only

Former Member
0 Likes
1,755

Hello Gupta,

Try this...

pv_filename is the parameter on the selection screen

CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'

EXPORTING

directory = './'

IMPORTING

serverfile = pv_filename

EXCEPTIONS

canceled_by_user = 1

OTHERS = 2.

IF sy-subrc 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

And I don't know about

CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TRANS'

ID 'VALUE' FIELD g_dir_trans.

Reward If Helpful.

Regards

--

Sasidhar Reddy Matli.

Edited by: Sasidhar Reddy Matli on Jan 24, 2008 4:02 PM

Read only

Former Member
0 Likes
1,756

Use FM

F4_DXFILENAME_TOPRECURSION

It works both for Application Server files and Presentation Server Files.

For Application server file Pass 'A' To I_LOCATION_FLAG.

For Presentation server file Pass 'P' To I_LOCATION_FLAG.

Read only

Former Member
0 Likes
1,755

hi

in one of my object i used below function module and it is working fine. try this.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname1.

CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'

EXPORTING

i_location_flag = 'A'

i_server = ' '

i_path = k_search_dir

filemask = k_fnh_mask

fileoperation = 'R'

IMPORTING

o_path = file_path

EXCEPTIONS

rfc_error = 1

OTHERS = 2.

IF sy-subrc EQ 0.

p_fname1 = file_path.

ENDIF.

regards,

pavan

REWARD POINTS IF USEFUL.

Read only

Former Member
0 Likes
1,755

Hello,

Here it is:

REPORT Z_TEST.

PARAMETERS : P_FILE LIKE RLGRAP-FILENAME.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

DATA: C_FNH_MASK TYPE DXFIELDS-FILEMASK VALUE '.',

SEARCH_DIR TYPE DXFIELDS-LONGPATH VALUE '/sapglobal/users',

FILE_PATH LIKE DXFIELDS-LONGPATH.

CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'

EXPORTING

I_LOCATION_FLAG = 'A'

I_SERVER = ' '

I_PATH = SEARCH_DIR

FILEMASK = C_FNH_MASK

FILEOPERATION = 'R'

IMPORTING

O_PATH = FILE_PATH

EXCEPTIONS

RFC_ERROR = 1

OTHERS = 2.

IF SY-SUBRC EQ 0.

P_FILE = FILE_PATH.

ENDIF.

Cheers,

Vasanth