03-28-2008 1:49 PM
Hi,
i am using this FM F4_DXFILENAME_TOPRECURSION to pick files from applicaton server, But i want to select only the folder name (not the file name). Is there any function module/Class to do this functionality. I have also tried function module /SAPDMC/LSM_F4_SERVER_FILE, But it is not statisfied the requirement.
Regards
Krishna
03-29-2008 4:58 PM
hai
krishnanjaneyulu,
Th following function module is used to retrieve a filr from
application server.
F4_FILENAME_SERVER.
if it is useful, reward points.
thank you
G.V.K.Prasad
03-31-2008 1:57 PM
Hi,
Thanks for your help, but it does not work.
I want select the folder of application server by using F4 help.
If you know other than these FM's please give reply to this thread.
Regards
Krishna
08-25-2010 3:00 PM
Hi Krishnanjaneyulu,
Did you find any solution to the F4 help for Application Server Path? I have similar requirement.
FM /SAPDMC/LSM_F4_SERVER_FILE works, but only if the supplied file path is correct.
When i enter a wrong path, one information message comes and then the program gives a short dump.
Please reply to me if you have got some solution.
My code is something like this..
*----
Block 050 - File Destination (Application Server)
*----
SELECTION-SCREEN BEGIN OF BLOCK b050 WITH FRAME TITLE txt_b050.
PARAMETERS:
p_appl TYPE abap_bool AS CHECKBOX USER-COMMAND appl,
p_path TYPE /utpfm/de_path_long." OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b050.
************************************************************************
AT SELECTION-SCREEN ON VALUE-REQUEST (POV)
************************************************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
F4 help search folders
IF NOT p_appl IS INITIAL.
PERFORM value_request_for_appl_file
CHANGING p_path.
ELSE.
PERFORM value_request_for_path
CHANGING p_path.
ENDIF.
FORM value_request_for_appl_file
CHANGING pv_path TYPE /utpfm/de_path_long.
*----
CONSTANTS:
lc_appl TYPE dxlocation VALUE 'A'.
DATA:
lv_appath TYPE dxlpath.
DATA:
lv_path TYPE dynfieldvalue,
lv_init_appath TYPE dxlpath.
*----
Find existing value of path for intial folder
PERFORM f_read_screen_value
USING
'P_PATH'
CHANGING
lv_path.
lv_init_appath = lv_path.
*----
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = lv_init_appath
filemask = ' '
IMPORTING
serverfile = lv_appath
EXCEPTIONS
canceled_by_user = 1
error_messages = 2
OTHERS = 3.
IF sy-subrc = 0.
pv_path = lv_appath.
else.
IF sy-subrc <> 1.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
FORM value_request_for_appl_file
CHANGING pv_path TYPE /utpfm/de_path_long.
*----
CONSTANTS:
lc_appl TYPE dxlocation VALUE 'A'.
DATA:
lv_appath TYPE dxlpath.
DATA:
lv_path TYPE dynfieldvalue,
lv_init_appath TYPE dxlpath.
*----
Find existing value of path for intial folder
PERFORM f_read_screen_value
USING
'P_PATH'
CHANGING
lv_path.
lv_init_appath = lv_path.
*----
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = lv_init_appath
filemask = ' '
IMPORTING
serverfile = lv_appath
EXCEPTIONS
canceled_by_user = 1
error_messages = 2
OTHERS = 3.
IF sy-subrc = 0.
pv_path = lv_appath.
else.
IF sy-subrc <> 1.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
I am not using the following fm because it is returning file name and not file path
Select file from application server
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = lc_appl
filemask = '.'
IMPORTING
o_path = lv_appath
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.
ELSE.
pv_path = lv_appath. "Asign the file name
ENDIF.
02-23-2012 4:10 PM
Hi Krishna,
I got a similar requirement to select only the application server folder and not the file.
Did you find the suitable function module or class for this. If so please do let me know.
Wishes
Shashi
02-23-2012 7:54 PM
Hi,
Look at class CL_GUI_FRONTEND_SERVICES there are some methods for list and get directories maybe it can help you.
Regards,
Felipe
02-23-2012 7:58 PM
CL_GUI_FRONTEND_SERVICES work on the presentation server not the application server.
Rob
02-23-2012 9:06 PM
08-26-2010 6:43 AM
Hi,
Please go through the below link it may help you..
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/f4-help-for-application-server-410828
hope this will help you..
Regards,
Kiran
Edited by: kiran kumar on Aug 26, 2010 7:51 AM
08-26-2010 6:50 AM
Hi,
Please go through the link which may help you
http://wiki.sdn.sap.com/wiki/display/Snippets/RetrievefilenamesofapplicationserverinF4help
regards,
Kiran
02-24-2012 7:26 AM
Hi Krishna,
I also searched for any FM or class but i couldn't got.
So you can do one thing that debug program RS_GET_F4_DIR_FROM_APPLSERV.
what i found is "MAIN" subroutine is responsible for writing all the Directory name.
using following syntax :
get name of directory
call 'C_SAPGPARAM' id 'NAME' field 'DIR_ATRA'
id 'VALUE' field searchpoints-dirname.
get name of directory
call 'C_SAPGPARAM' id 'NAME' field 'DIR_BINARY'
id 'VALUE' field searchpoints-dirname.
and so on...
Here "searchpoints-dirname" is containing the dirctory path, so like this you can collect all the directory path.
Store all the path in internl table and use FM "F4IF_INT_TABLE_VALUE_REQUEST" to get the F4 help.
I hope it will solve ur issue.
If anybody has any easy solution than this please let us know....
Regards,
Rajeev Goswami
02-24-2012 7:34 AM
I had a similar requirement long back and we did use :'EPS_GET_DIRECTORY_LISTING' by paasing the path and then looked for the pattern to get the exact fle My requirement did not invloved providing F4 help ...This FM returnd all the file existing in that directory ..You can use it display file name and choose it by wrapping this FM under the F4 FM .
02-24-2012 11:34 AM
HI
To Display F4 help for files in Application/Presentation Server
Use this class-CL_RSAN_UT_FILES
method -F4.
use this class and call the f4 method ..u will get the f4 help for al11.
05-23-2013 11:30 AM
Hello ,
Did you get the solution ? If yes please share . It will be really helpful, I have also same requirement.
Regards,
Sreejith S.
06-11-2013 8:14 AM
Hi,
I too faced similar problem for F4 help to Application server.Finally ,found the soultion by myself.
SUBMIT rs_get_f4_dir_from_applserv AND RETURN.
IMPORT path_name = l_path_name FROM MEMORY ID 'PATH_NAME_SDL'.
We will get the filepath in the l_path_name variable.
Regards,
Aditya.