Quantcast
Channel: ABAP Development
Viewing all articles
Browse latest Browse all 948

Solution Manager attachment open problem in Ubuntu/Linux/MacOS

$
0
0
It was impossible to open attachment in JAVA SAP GUI in Solution Manager.

 

To solve the problem  you should required access key for the program and FM.

 

FM SKWV_KWUI_DOC_DISPLAY


Step 1

Go to line no. 112 after  ls_filename = l_aliasname.


Add below lines


data: lv_plat3     type char2.  

CALL METHOD cl_gui_frontend_services=>get_platform
   receiving
     platform             = lv_plat3
   EXCEPTIONS
     error_no_gui         = 1
     cntl_error           = 2
     not_supported_by_gui = 3
     others               = 4.

if lv_plat3 = '8'.
ls_temp_dir = '/home'.
   CONCATENATE ls_temp_dir '/' ls_filename INTO ls_download_filename.
   ls_fullpath = ls_download_filename.
   CONCATENATE 'file://' ls_download_filename INTO ls_url_dest.
   ls_url_source = ls_phio_url.
else.


Go to line no.138  after ls_url_source = ls_phio_url.


Add below single line


endif.



PROGRAM : LSKWV_KWUI_DOCUMENTF02


Step 2

Go to line no 356 after

concatenate ls_temp_dir p_phio-objid into ls_work_dir
separated by c_separate_path.


Add below lines


data: lv_plat     type char2.

CALL METHOD cl_gui_frontend_services=>get_platform
   receiving
     platform             = lv_plat
   EXCEPTIONS
     error_no_gui         = 1
     cntl_error           = 2
     not_supported_by_gui = 3
     others               = 4.

clear ls_temp_dir.
if lv_plat = '8'.
ls_temp_dir = '/home'.


concatenate ls_temp_dir p_phio-objid into ls_work_dir
              separated by '/'.
endif.


Step 3

Go to line no 520 afterclear p_asynchronous.


Add below lines.


if lv_plat = '8'.
CALL METHOD cl_gui_frontend_services=>execute
          EXPORTING: document               = ''
                     application            = 'open'   or you can also add command 'xdg-open'    <- The OS will open the document with the default program for the specified file.
                     parameter              = LS_FILENAME
                     maximized              = ''
                     minimized              = ''
                     synchronous            = ''       
          EXCEPTIONS: cntl_error             = 1
                      error_no_gui           = 2
                      bad_parameter          = 3
                      file_not_found         = 4
                      path_not_found         = 5
                      file_extension_unknown = 6
                      error_execute_failed   = 7
                      synchronous_failed     = 8
                      not_supported_by_gui   = 9
                      OTHERS                 = 10.
else.


Go to line 560 after

exceptions
       cntl_error             = 1
       error_no_gui           = 2
       bad_parameter          = 3
       file_not_found         = 4
       path_not_found         = 5
       file_extension_unknown = 6
       error_execute_failed   = 7
       synchronous_failed     = 8
       not_supported_by_gui   = 9
       others                 = 10.

Add single line

endif.



Step 4


Go to form execute_phio after  ls_filename = p_fullpath.


Add below lines


data: lv_plat3     type char2

CALL METHOD cl_gui_frontend_services=>get_platform
   receiving
     platform             = lv_plat3
   EXCEPTIONS
     error_no_gui         = 1
     cntl_error           = 2
     not_supported_by_gui = 3
     others               = 4.

if lv_plat3 = '8'.
CALL METHOD cl_gui_frontend_services=>execute
          EXPORTING: document               = ''
                     application            = 'open'   or you can also add command 'xdg-open'    <- The OS will open the document with the default program for the specified file.
                     parameter              = LS_FILENAME
                     maximized              = ''
                     minimized              = ''
                     synchronous            = ''        "note_919764
          EXCEPTIONS: cntl_error             = 1
                      error_no_gui           = 2
                      bad_parameter          = 3
                      file_not_found         = 4
                      path_not_found         = 5
                      file_extension_unknown = 6
                      error_execute_failed   = 7
                      synchronous_failed     = 8
                      not_supported_by_gui   = 9
                      OTHERS                 = 10.
else.

Go to

call method cl_gui_frontend_services=>execute
     exporting
       document               = ls_filename
     exceptions
       cntl_error             = 1
       error_no_gui           = 2
       bad_parameter          = 3
       file_not_found         = 4
       path_not_found         = 5
       file_extension_unknown = 6
       error_execute_failed   = 7
       others                 = 8.


Add single line.


endif.



Step 5.

Go to form get_content after

concatenate p_path p_filename into ls_file  separated by c_separate_path.


Add below lines

data: lv_plat2     type char2.  

CALL METHOD cl_gui_frontend_services=>get_platform
   receiving
     platform             = lv_plat2
   EXCEPTIONS
     error_no_gui         = 1
     cntl_error           = 2
     not_supported_by_gui = 3
     others               = 4.
 
if lv_plat2 = '8'.
clear ls_file.
concatenate p_path p_filename into ls_file
       separated by '/'.
endif
.


Step 6


go to root

# cd /

# chmod 777 /home        <- all file will be download /home path

 



Viewing all articles
Browse latest Browse all 948

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>