Skip to Content

    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_frontendfrontend_type
    PFX_HOST                     = lv2_frontendhostname
    PFX_WINSYS                 = lv2_frontendwinsys
* EXCEPTIONS
*   ERROR                   = 1
*   NO_VALID_FRONTEND       = 2
*   OTHERS                  = 3
           .
IF sysubrc <> 0.
* Implement suitable error handling here
ENDIF.
IF LV2_frontendwinsys = ‘MF’.    
PSX_tdweFILEP  = ‘/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

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply