‎2008 Jul 04 9:56 AM
dear all,
my requirement is : i've to open a floder when ever i pressed a button on a screen.
Thanks in advance.,
Ajay Kumar K.
9908979994.
‎2008 Jul 05 1:09 PM
Hi Ajay Kanigiri,
use SY-UCOMM to capture the user command event of the buttone
and call the FM CALL_BROWSER and provide the URL as import parameter...
Just copy it and try to run the program... change the url if needed but specify in CAPS
REPORT zilesh_open_folder.
CALL FUNCTION 'CALL_BROWSER'
EXPORTING
URL = 'C:\DOCUMENTS AND SETTINGS\'
* WINDOW_NAME = ' '
* NEW_WINDOW = ' '
* BROWSER_TYPE =
* CONTEXTSTRING =
EXCEPTIONS
FRONTEND_NOT_SUPPORTED = 1
FRONTEND_ERROR = 2
PROG_NOT_FOUND = 3
NO_BATCH = 4
UNSPECIFIED_ERROR = 5
OTHERS = 6
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
‎2008 Jul 04 10:06 AM
Hi,
Use the method FILE_OPEN_DIALOG of class CL_GUI_FRONTEND_SERVICES
when ever the button is clicked.
‎2008 Jul 04 2:19 PM
Thanks for the answer.
nd can pls send any sample data if u have,
Thanks ,
With regards,
Ajay Kumar K,
9908979994.
‎2008 Jul 05 5:26 AM
DEAR ALL,
PLS SEND ME THE ANS FOR MY QUESTION.IT'S URGANT.
THANK U ALL,
WITH REGARDS,
AJAY KUMAR K,
9908979994.
‎2008 Jul 05 9:16 AM
Hi Ajay,
Please let me know whether my understanding is right:
You have a folder path (say c:/project/sap/ or an NT file server share path) and you would like to open the folder after the user clicks on the button.
Is this your requirement?
Please clarify.
Thanks,
F.Nelson
‎2008 Jul 05 9:22 AM
Hi Ajay,
If my understandng is the same, please use FM CALL_BROWSER.
This should solve the purpose.
Regards,
F.Nelson
‎2008 Jul 06 5:07 AM
hi ,
yah u understand that well, i need the ans for the same.
thanks,
with regards,
ajay kumar k,
9908979994.
‎2008 Jul 05 11:57 AM
Get the file that you wish to use.
at selection-screen on value-request for p_newfil.
call method cl_gui_frontend_services=>file_open_dialog
exporting
window_title = 'Select File'
default_filename = '*.doc'
multiselection = ' '
changing
file_table = g_file
rc = g_subrc.
This is how I have done it.
Regards
J
‎2008 Jul 05 1:09 PM
Hi Ajay Kanigiri,
use SY-UCOMM to capture the user command event of the buttone
and call the FM CALL_BROWSER and provide the URL as import parameter...
Just copy it and try to run the program... change the url if needed but specify in CAPS
REPORT zilesh_open_folder.
CALL FUNCTION 'CALL_BROWSER'
EXPORTING
URL = 'C:\DOCUMENTS AND SETTINGS\'
* WINDOW_NAME = ' '
* NEW_WINDOW = ' '
* BROWSER_TYPE =
* CONTEXTSTRING =
EXCEPTIONS
FRONTEND_NOT_SUPPORTED = 1
FRONTEND_ERROR = 2
PROG_NOT_FOUND = 3
NO_BATCH = 4
UNSPECIFIED_ERROR = 5
OTHERS = 6
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hope it will solve your problem..
Thanks & Regards
ilesh 24x7