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

tracking a logon id

Former Member
0 Likes
875

The requirement is to track an id BATCHBW in BW system. Whenever a user logins with that id , an email has to be sent to two particular persons. I know that there is an user exit 'SUSR001' . It has been implemented in R/3. I have to do the same thing in BW . I appreciate if anyone can help me how to proceed with this.

The requirement is to track an id BATCHBW in BW system. Whenever a user logins with that id , an email has to be sent to two particular persons. I know that there is an user exit 'SUSR001' . It has been implemented in R/3. I have to do the same thing in BW . I appreciate if anyone can help me how to proceed with this.

5 REPLIES 5
Read only

suresh_datti
Active Contributor
0 Likes
794

TCode:SMOD enter SUSR001,click on Components & press display.

Double click on the function module EXIT_SAPLSUSF_001.

Double click on the INCLUDE ZXUSRU01.

Ignore the warning & put your code to send emails inside this include.

There are no IMP/EXP parameters , all you have is the System Variables

~Suresh

Read only

0 Likes
794

i have to develop in BW system . I dont find that user exit in BW. Can you please check that once.

Read only

0 Likes
794

i am sorry its SUSR0001 . i found it

Read only

0 Likes
794

CALL 'ThUsrInfo' ID 'OPCODE'

FIELD OPCODE

ID 'TAB'

FIELD USR_TABL-SYS.

SORT USR_TABL BY BNAME.

i am trying to implement the include in the same way as it is in R/3 . I am not able to follow what is 'ThUsrInfo' in the above statement

Read only

0 Likes
794

i have written the code in the include program . I am not understanding how the user exit will be triggered . The code is something like this.

Tables: zhmssecurity.

data: begin of email_data.

include structure sodocchgi1.

data: end of email_data.

data: begin of email_send occurs 10.

include structure somlreci1.

data: end of email_send.

data: begin of data_tab occurs 2,

line(255),

end of data_tab.

data: begin of object_para occurs 2.

include structure soparai1.

data: end of object_para.

data: begin of object_parb occurs 2.

include structure soparbi1.

data: end of object_parb.

DATA: OPCODE TYPE X VALUE 2.

DATA: BEGIN OF USR_TABL OCCURS 10.

INCLUDE STRUCTURE UINFO.

DATA: END OF USR_TABL.

select single * from zhmssecurity

where data_key = 'W'

and data_id = 'WATCHFOR'

and data = sy-uname.

if sy-subrc <> 0.

exit.

endif.

select * from zhmssecurity

where data_key = 'W'

and data_id = 'EMAIL'.

email_send-receiver = zhmssecurity-data.

email_send-rec_type = 'U'.

email_send-express = 'X'.

append email_send.

endselect.

email_data-obj_name = 'MESSAGE'.

concatenate sy-uname 'Logged on to' sy-sysid

'on' sy-datum 'at' sy-uzeit

into email_data-obj_descr separated by space.

email_data-obj_langu = 'E'.

email_data-sensitivty = 'P'.

email_data-obj_prio = '1'.

email_data-no_change = 'X'.

email_data-priority = '1'.

clear data_tab. refresh data_tab.

clear object_para. refresh object_para.

concatenate

sy-uname 'Logged on to' sy-sysid

'client' sy-mandt

into data_tab-line

separated by space. append data_tab.

concatenate

'on' sy-datum 'at' sy-uzeit

'from terminal' usr_tabl-term

into data_tab-line

separated by space. append data_tab.

Move space to data_tab-line. append data_tab.

move ' Use transaction SM20 to monitor this users activity'

to data_tab-line. append data_tab.

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

document_data = email_data

DOCUMENT_TYPE = 'RAW'

PUT_IN_OUTBOX = ' '

tables

OBJECT_CONTENT = data_tab

receivers = email_send.

IF sy-subrc EQ 0.

SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.

I have given the values in the zhmssecurity table . I have given my id for watch for and email as my email . I tested the same thing by copying in some other program. Its working fine but how this user exit gets triggered