Skip to Content
0
Former Member
Jan 17, 2011 at 11:32 AM

function ECATT_EXECUTE - upload from local directory

117 Views

Hi Gurus,

We are trying to create 1 global program to execute any SECATT using function 'ECATT_EXECUTE'.

We are having a problem specifying the path.

As you execute the function, with start pop up you see the path is gray... We want to execute the function without the start pop up, giving path and filename in the global program.

Apparently, it's not possible to manipulate the path via the function... Or am I missing something?

Below you see an extract of my code. As you see i tried to manipulate the path via a perform in a remote program (that specifies the user default path - but this doesn't seem to work always).

I also tried giving the path with variable gs_var_ext-var_ext_path, but it doesn't work as well... The structure only seems to work for a filename.

Is there a nice solution to this?

START-OF-SELECTION.

  gs_var_ext-var_ext_file = p_file.
*  gs_var_ext-var_ext_path = 'C:\test'.
  gs_var_ext-var_ext_mode = 'X'.
  gs_var_ext-obj_type = 'ECTC'.
  gs_var_ext-obj_name = 'ZC002'.
  APPEND gs_var_ext TO gt_var_ext.

  gs_to_execute-obj_type = 'ECTC'.
  gs_to_execute-obj_name = 'ZC002'.
  APPEND gs_to_execute TO gt_to_execute.

  SELECT SINGLE * FROM rseumod WHERE uname = sy-uname.
  rseumod_new = rseumod.
  rseumod_new-etpath_variants = p_path.

  PERFORM save_settings IN PROGRAM saplwb_customizing
            USING   'X'
            CHANGING rseumod_new
                     rseumod.

  CALL FUNCTION 'ECATT_EXECUTE'
    EXPORTING
     to_execute                       = gt_to_execute
     display_log                      = 'X'
     log_txt                          = ' '
*   display_start_popup              = 'X'
*   START_PROFIL                     = gt_start_profile
*   START_PROFIL_X                   = gt_start_profile
*   WBMANAGER_ACTIVE                 = ' '
*   EXIT_STATUS_UPDATE               = ''
*   HTTP_TRANSID                     = ' '
*   I_SUPRESS_OUTPUT                 = ' '
*   it_var_to_exec                   = gt_var_to_exec
*   i_par_var_displayed              = '(SAPLECATT_EXECUTE)ETVARUSE-VAR_EXT_PATH'
     it_var_ext                       = gt_var_ext
*   IT_CALLER                        =
*   IS_TZEXECDATA                    =
* IMPORTING
*   EXECUTED                         =
*   LOGID                            =
*   LOG_DISPLAYED                    =
*   TRACE_PROT                       =
*   E_RESULT_XML                     =
*   ET_RESULT_XML_ERR_MESSAGES       =
   EXCEPTIONS
     nothing_to_do                    = 1
     too_many_scripts_called          = 2
     OTHERS                           = 3
            .
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.