-
Notifications
You must be signed in to change notification settings - Fork 1
/
zcl_file_sapgui.clas.abap
75 lines (55 loc) · 2.13 KB
/
zcl_file_sapgui.clas.abap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
CLASS zcl_file_sapgui DEFINITION
PUBLIC
CREATE private
INHERITING FROM zcl_file__base
GLOBAL FRIENDS zcl_file .
PUBLIC SECTION.
METHODS: zif_file~copy_file REDEFINITION,
zif_file~delete_file REDEFINITION,
zif_file~get_directory_content REDEFINITION,
zif_file~get_directory_seperator REDEFINITION,
zif_file~move_file REDEFINITION,
zif_file~read_file REDEFINITION,
zif_file~write_file REDEFINITION.
PROTECTED SECTION.
PRIVATE SECTION.
Class-methods value_help_for_sapgui RETURNING VALUE(r_return) TYPE string.
ENDCLASS.
CLASS zcl_file_sapgui IMPLEMENTATION.
METHOD value_help_for_sapgui.
DATA selected_files TYPE filetable.
data rc TYPE i.
cl_gui_frontend_services=>file_open_dialog( EXPORTING
* window_title =
* default_extension =
* default_filename =
* file_filter =
* with_encoding =
* initial_directory =
multiselection = abap_false
CHANGING
file_table = selected_files
rc = rc
* user_action =
).
* No input? No value!
if rc < 1.
EXIT.
endif.
r_return = selected_files[ 1 ].
ENDMETHOD.
METHOD zif_file~copy_file.
ENDMETHOD.
METHOD zif_file~delete_file.
ENDMETHOD.
METHOD zif_file~get_directory_content.
ENDMETHOD.
METHOD zif_file~get_directory_seperator.
ENDMETHOD.
METHOD zif_file~move_file.
ENDMETHOD.
METHOD zif_file~read_file.
ENDMETHOD.
METHOD zif_file~write_file.
ENDMETHOD.
ENDCLASS.