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

Physical file path on the selection screen from AL11 Tcode

Former Member
0 Likes
2,716

Hi All,

Please let me know some body how do we give only physical file path(only directory not the file names) on the selection screen?I need to see when I press F4 only the physical file directories of the application server.

Thanks in advance.

Mahesh

Hi All,

Please let me know some body how do we give only physical file path(only directory not the file names) on the selection screen?I need to see when I press F4 only the physical file directories of the application server.

Thanks in advance.

Mahesh

4 REPLIES 4
Read only

Former Member
0 Likes
1,535

Hi,

Check my wiki code snippet [here|https://wiki.sdn.sap.com/wiki/display/Snippets/F4helponDialogScreenforfilesonPresentationserverorApplicationserver].

This examples shows how to get F4 help for dynpro's , but you can use the functions I've used in the at selection-screen on value request.

regards,

Advait

Edited by: Advait Gode on Feb 5, 2009 8:38 AM

Read only

Former Member
0 Likes
1,535

hi bro....

you can go with following code for that

parameter:

p_char(128) type c.

at selection-screen on value-request for p_char.

CALL FUNCTION 'KD_GET_FILENAME_ON_F4'

EXPORTING

PROGRAM_NAME = SYST-REPID

DYNPRO_NUMBER = SYST-DYNNR

  • FIELD_NAME = ' '

  • STATIC = ' '

  • MASK = ' '

CHANGING

file_name = p_char

EXCEPTIONS

MASK_TOO_LONG = 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.

Read only

agnihotro_sinha2
Active Contributor
0 Likes
1,535

hi,

try this code

:

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_apath.

BREAK-POINT.

  • Displays the complete path name

SUBMIT rs_get_f4_dir_from_applserv AND RETURN.

IMPORT path_name FROM MEMORY ID 'PATH_NAME_SDL'.

p_apath = path_name.

Read only

Former Member
0 Likes
1,535

Hi,

This FM will be helpful.....

F4_dxfilename_toprecursion



CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
* EXPORTING
*   I_LOCATION_FLAG       = ' '
*   I_SERVER              = '?'
*   I_PATH                =
*   FILEMASK              = '*.*'
*   FILEOPERATION         = 'R'
* IMPORTING
*   O_LOCATION_FLAG       =
*   O_SERVER              =
*   O_PATH                =
*   ABEND_FLAG            =
* EXCEPTIONS
*   RFC_ERROR             = 1
*   ERROR_WITH_GUI        = 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.

Regards,

Mdi.Deeba Najam.