SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Просмотр SAP экрана другого пользователя



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Security and Monitoring
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1636

PostPosted: Sat Apr 12, 2008 2:09 pm    Post subject: Просмотр SAP экрана другого пользователя Reply with quote

Code:
REPORT zgan_show MESSAGE-ID zz.

TABLES: v_username,
        sscrfields.

DATA: BEGIN OF usr_tabl OCCURS 10.
        INCLUDE STRUCTURE uinfo.
DATA: END OF usr_tabl.

DATA: opcode TYPE x,
      slave_mode TYPE x,
      loc_utid LIKE usr_tabl-tid.

CONSTANTS: c_fcode_slon LIKE sy-ucomm VALUE 'SLON',
           c_fcode_slof LIKE sy-ucomm VALUE 'SLOF'.

SELECTION-SCREEN BEGIN OF BLOCK userid WITH FRAME.
PARAMETERS: p_userid LIKE uinfo-bname.
SELECTION-SCREEN END OF BLOCK userid.
SELECTION-SCREEN BEGIN OF BLOCK show WITH FRAME.
SELECTION-SCREEN PUSHBUTTON /10(25) slon USER-COMMAND slon.
SELECTION-SCREEN PUSHBUTTON  45(25) slof USER-COMMAND slof.
SELECTION-SCREEN END OF BLOCK show.

INITIALIZATION.
  MOVE 'On Screen Flow Show' TO slon.
  MOVE 'Off Screen Flow Show' TO slof.

AT SELECTION-SCREEN ON p_userid.
  IF NOT p_userid IS INITIAL.
    SELECT SINGLE bname
           INTO v_username-bname
           FROM v_username
           WHERE bname = p_userid.
    IF sy-subrc <> 0.
      MESSAGE e999 WITH 'Invalid User Id'.
    ENDIF.
  ELSE.
    MESSAGE e999 WITH 'Specify the User Id'.
  ENDIF.

AT SELECTION-SCREEN.
  FREE usr_tabl.
  opcode = 2.
  CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode ID 'TAB' FIELD usr_tabl-*sys*.

  READ TABLE usr_tabl WITH KEY bname = p_userid TRANSPORTING tid.
  IF sy-subrc <> 0.
    MESSAGE e999 WITH 'Requested User Id is not available'.
  ENDIF.

  loc_utid = usr_tabl-tid.
  slave_mode = 5.

  IF sscrfields-ucomm = c_fcode_slon.
    opcode = 14.
    CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode ID 'S_TID' FIELD loc_utid
       ID 'S_MODE' FIELD slave_mode.
  ELSEIF sscrfields-ucomm = c_fcode_slof.
    opcode = 15.
    CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode ID 'S_TID' FIELD loc_utid.
  ENDIF.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Security and Monitoring All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.