<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: t-code access in DevOps and System Administration Forum</title>
    <link>https://community.sap.com/t5/devops-and-system-administration-forum/t-code-access/m-p/12670453#M2272</link>
    <description>&lt;P&gt;You could also just use SM19 to setup a security audit profile for the transaction codes of interest to you, then SM20 to check the log. No custom ABAP required.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jan 2023 16:27:19 GMT</pubDate>
    <dc:creator>Matt_Fraser</dc:creator>
    <dc:date>2023-01-30T16:27:19Z</dc:date>
    <item>
      <title>t-code access</title>
      <link>https://community.sap.com/t5/devops-and-system-administration-forum/t-code-access/m-p/12670451#M2270</link>
      <description>&lt;P&gt;Dears,&lt;/P&gt;
  &lt;P&gt; I'm new sap basis and I want system send to me mail when any user on system access specific transaction like finance and payroll transactions is it possible ?&lt;/P&gt;
  &lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 22:41:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/devops-and-system-administration-forum/t-code-access/m-p/12670451#M2270</guid>
      <dc:creator>abdo_940</dc:creator>
      <dc:date>2023-01-27T22:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: t-code access</title>
      <link>https://community.sap.com/t5/devops-and-system-administration-forum/t-code-access/m-p/12670452#M2271</link>
      <description>&lt;P&gt;Hi Abelrahman,&lt;/P&gt;&lt;P&gt;It is possible to send notifications when a user accesses specific transactions in SAP using ABAP. One way to do this is to create a custom ABAP program that listens for specific transactions and sends a notification when triggered. This can be done by using the ABAP Object-Oriented Programming (OOP) concepts like creating a custom class and implementing an event handling mechanism.&lt;/P&gt;&lt;P&gt;You can also use the ABAP Workflow Engine to create custom workflows and trigger notifications based on certain events.&lt;/P&gt;&lt;P&gt;Function module '&lt;STRONG&gt;SO_NEW_DOCUMENT_SEND_API1&lt;/STRONG&gt;'can be used to send an email notification too when a user accesses a specific transaction.&lt;/P&gt;&lt;P&gt;Here is just&lt;STRONG&gt; an example &lt;/STRONG&gt;and please make sure follow &lt;STRONG&gt;SAP documents &lt;/STRONG&gt;related to this function&lt;/P&gt;&lt;P&gt;First, you will need to import the function module into your program by using the statement "IMPORTING" in your program's header.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION zsend_email.
  IMPORTING
    p_recipient   TYPE adr6-smtp_addr
    p_subject     TYPE so_obj_des
    p_body        TYPE so_obj_des.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Next, you will need to call the function module and pass in the necessary parameters. The parameters include the recipient's email address, the subject of the email, and the body of the email.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
  EXPORTING
    document_data              = l_document_data
    put_in_outbox              = 'X'
    sender_address             = 'sender@email.com'
    sender_address_type        = 'SMTP'
  IMPORTING
    sent_to_all                = l_sent_to_all
  TABLES
    contents_bin               = lt_contents_bin
    contents_txt               = lt_contents_txt
    recipients                 = lt_recipients.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you can use the function module in your program logic. For example, you can create a trigger to send an email notification when a user accesses a specific transaction by checking the transaction code and calling the function module when the condition is met.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF sy-tcode = 'FB01'.
  l_recipient = 'recipient@email.com'.
  l_subject = 'Transaction FB01 Accessed'.
  l_body = 'Transaction FB01 has been accessed by the user'.
  CALL FUNCTION zsend_email
    EXPORTING
      p_recipient = l_recipient
      p_subject = l_subject
      p_body = l_body.
ENDIF.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please check below SAP Blog for further info about "SO_NEW_DOCUMENT_SEND_API1'"&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/questions/1489680/function-module-sonewdocumentattsendapi1.html" target="test_blank"&gt;https://answers.sap.com/questions/1489680/function-module-sonewdocumentattsendapi1.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It is important to note that in order to send emails from your SAP system, you need to have an SMTP server configured and accessible from your SAP system. You also need to have proper authorization to send emails from your SAP system.&lt;/P&gt;&lt;P&gt;Tahnks,&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 23:54:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/devops-and-system-administration-forum/t-code-access/m-p/12670452#M2271</guid>
      <dc:creator>Amin_Omidy</dc:creator>
      <dc:date>2023-01-27T23:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: t-code access</title>
      <link>https://community.sap.com/t5/devops-and-system-administration-forum/t-code-access/m-p/12670453#M2272</link>
      <description>&lt;P&gt;You could also just use SM19 to setup a security audit profile for the transaction codes of interest to you, then SM20 to check the log. No custom ABAP required.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 16:27:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/devops-and-system-administration-forum/t-code-access/m-p/12670453#M2272</guid>
      <dc:creator>Matt_Fraser</dc:creator>
      <dc:date>2023-01-30T16:27:19Z</dc:date>
    </item>
  </channel>
</rss>

