Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

function ECATT_EXECUTE - upload from local directory

Former Member
0 Likes
433

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.

1 REPLY 1
Read only

Former Member
0 Likes
316

Workaround has been found... Other solutions are still welcome as well..

I found the method behind the 'change path' button in the SECATT Test configuation execution variant.

cl_gui_test_operation_center=>uc_wb_options(
                  EXPORTING im_subscreen = 'EXTTOOL' ).

This way, i let the user change the user default path in the global program.

selection-screen: comment 2(70) text-004.

SELECTION-SCREEN BEGIN OF BLOCK 10 WITH FRAME TITLE text-003.
SELECTION-SCREEN:  PUSHBUTTON 2(12) but1 USER-COMMAND usc.
SELECTION-SCREEN END OF BLOCK 10.
PARAMETERS: p_file TYPE etvar_ext_file.

AT SELECTION-SCREEN.
  CASE sy-ucomm.
    WHEN 'USC'.
      cl_gui_test_operation_center=>uc_wb_options(
                  EXPORTING im_subscreen = 'EXTTOOL' ).

  ENDCASE.

INITIALIZATION.

  but1 = 'Specify Path'.

  CONCATENATE cl_gui_frontend_services=>filetype_text
  cl_gui_frontend_services=>filetype_all
  INTO l_filefilter.
  l_window_title = text-f02.