Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasrao21
Explorer
0 Kudos
906

    It was impossible to open documents in JAVA SAP GUI.

    To solve the problem  I have created  two enhancement in the Program LCV120F05 and FM CV200_DB_TDWE_SELECT using

    the implicit enhancement spot at the  beginning of the FORM appl_start_exec, and this is my simple code:

Step 1

Program LCV120F05

ENHANCEMENT 1  Z_LVC120F05."active version
if gs_frontend-winsys = 'MF'.

  pf_application = 'open'.   or you can also add command 'xdg-open'    <- The OS will open the document with the default program for the specified file.

  clear pf_use_reg.

endif.

ENDENHANCEMENT.

Step 2

FM CV200_DB_TDWE_SELECT

ENHANCEMENT Z_CV120_PATH
DATA : lv2_frontend      TYPE dms_frontend_data" Frontend information
CLEAR: lv2_frontend.                          
CALL FUNCTION 'CV120_GET_FRONTEND_TYPE'
* EXPORTING
*   PF_CALL_DIALOG          = ' '
*   PF_BATCH                = ' '
*   PF_HOST                 = ' '
  IMPORTING
    PFX_FRONTEND_TYPE  = lv2_frontend-frontend_type
    PFX_HOST                     = lv2_frontend-hostname
    PFX_WINSYS                 = lv2_frontend-winsys
* EXCEPTIONS
*   ERROR                   = 1
*   NO_VALID_FRONTEND       = 2
*   OTHERS                  = 3
           .
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
IF LV2_frontend-winsys = 'MF'.    
PSX_tdwe-FILEP  = '/home'.    
"Default path for all user download specified file.
ENDIF.
ENDENHANCEMENT.

Step 3

go to root

# cd /

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

1 Comment
Labels in this area