cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP GUI Scripting - Check if program is been accessed by script

0 Likes
3,284

Hello all!

I need to check if a program is been accessed by user using some script.

Is it possible to check if a program is been executed using SAP GUI scripting?

Best regards,

Allan Cristian Barros Silva

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

Hi all,

Found it.

There is a method in CL_GUI_FRONTEND_SERVICES:

  DATA: li_result TYPE i.
  CALL METHOD cl_gui_frontend_services=>is_scripting_active
    RECEIVING
      result               = li_result
    EXCEPTIONS
      cntl_error           = 1
      not_supported_by_gui = 2
      error_no_gui         = 3
      OTHERS               = 4.

Result:

Thanks all

Regard,

Allan Cristian Barros Silva

Answers (2)

Answers (2)

S_Sriram
Active Contributor

Hi Allen,

Is this program within SAP or out side? If it is within SAP you can enable the audit log.

Regards

Sriram

0 Likes

Hi Sriram,

The script is going to be an Excel VBA and I need to check it throught ABAP (server side).

I did not try the audit log and I agree that it can be a way out.

Thanks for advice.

Regards,

Allan Cristian Barros Silva

shwetanargachhe
Active Participant

Hi Allen,

You need to follow below steps for client side scripting enablement.

1. Complete basis setup for Scripting enablement.Enable sap GUI scripting into sap on desktop where you want to run your script.

2. This is GUI based scripting so whatever actions possible on your GUI screen can be achieved using Sap GUI based scripting.You can try out actions you want to carry out with record and play options to ensure possibility for scripting from sap options.

You need to machine setup where Access to sap system and it requires active sap GUI session to connect.And script will be running client side.

Regards,

Shweta