2006 Dec 04 10:55 PM
Hi,
I am trying to show the documents saved for the projects.
For this I created a FM to pull all the names of the documents saved for a project.
But how do I get them to open the document by double clicking on the output of the FM.Is there some other method to do all this.
The point is I must be able to open a document by double clicking on its name.
Thank you,
2006 Dec 04 11:17 PM
2006 Dec 04 11:17 PM
2006 Dec 04 11:19 PM
2006 Dec 04 11:20 PM
2006 Dec 04 11:21 PM
2006 Dec 04 11:31 PM
Hi
This is an easy sample to open a file pdf
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
COMMANDLINE = 'C:my_file.pdf' <------ Document
PROGRAM = 'AcroRd32.exe' <------- program
* IMPORTING
* RBUFF =
* EXCEPTIONS
* FRONTEND_ERROR = 1
* NO_BATCH = 2
* PROG_NOT_FOUND = 3
* ILLEGAL_OPTION = 4
* GUI_REFUSE_EXECUTE = 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.Max
2006 Dec 04 11:39 PM
Hi
U can try to this little program:
PARAMETERS: P_EXT LIKE SOOD-FILE_EXT,
FILE(100).
DATA: PROGRAM LIKE SOXPC-PATH.
CALL FUNCTION 'SO_PROGNAME_GET_WITH_PATH'
EXPORTING
DOCTYPE = P_EXT
IMPORTING
PATHNAME = PROGRAM
* TABLES
* RE =
EXCEPTIONS
PATH_NOT_FOUND = 1
PROGRAM_NOT_FOUND = 2
NO_BATCH = 3
X_ERROR = 4
OTHERS = 5
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
COMMANDLINE = FILE
PROGRAM = PROGRAM
* IMPORTING
* RBUFF =
EXCEPTIONS
FRONTEND_ERROR = 1
NO_BATCH = 2
PROG_NOT_FOUND = 3
ILLEGAL_OPTION = 4
GUI_REFUSE_EXECUTE = 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.Max