<?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: Authorization checking in BAPI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448109#M1649254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishnu, thanks for your guidance. I tried your method but it did not work as well. I placed a break-point at the beginning of 'USEREXIT_FIELD_MODIFICATION' in MV45AFZZ. It seems like during the BAPI call, it did not enter this user exit at all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Dec 2011 06:35:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-12-21T06:35:09Z</dc:date>
    <item>
      <title>Authorization checking in BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448102#M1649247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I put in authorization checking for the 'Material group 1' field of a SD document. With this, only authorized users are allowed to change this field while other users without the authorization will not be allowed to change it. When i tested the authorization in VA02, it works fine. I was able to change it as i has been assigned with the required role/profile. On ther other hand, the other user without the role/profile was not able to change the field using VA02. I did another test using a Z program that calls 'BAPI_SALESORDER_CHANGE'. The Z program will change the 'Material group 1' field using 'BAPI_SALESORDER_CHANGE'. My initial thought was me with the required role/profile when running the Z program, will be able to change the field while the other user without the required role/profile will not be able to change it when running the Z program. However, the result shows that both users (with/without the role/profile) was also able to change the field using the Z program. Is there anyway to control the BAPI so that it works the same as in VA02? Thanks much for your advice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 04:04:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448102#M1649247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T04:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization checking in BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448103#M1649248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your program before calling BAPI, use    function module  AUTHORITY_CHECK_PROG   , or  use  AUTHORITY_CHECK  based on requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 04:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448103#M1649248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T04:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization checking in BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448104#M1649249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GK.&lt;/P&gt;&lt;P&gt;the authorization what you have set is on the screen, that wont work with BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you want restriction for the BAPI as well, then do the check by FM AUTHORITY_CHECK before the BAPI call.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 05:18:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448104#M1649249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T05:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization checking in BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448105#M1649250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It depends on where exactly you have placed the authority check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have placed in any of the user exits , then yes the same code would be implemented even through BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other option would be to place the authority check in the Z Program before making a call to the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sriranjani Chimakurthy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 05:19:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448105#M1649250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T05:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization checking in BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448106#M1649251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sriranjani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, i added the authorization checking in 'USEREXIT_FIELD_MODIFICATION' in MV45AFZZ but it won't work in BAPI call. Is there anything that i have done wrong in the below codes :- (Thanks)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'VBAP-MVGR1'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Proceed further if user is changing the SO&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      IF sy-tcode = 'VA02'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Verify if the user has authorization to change 'MVGR1 - Material group 1' field&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          AUTHORITY-CHECK OBJECT 'Z_MVGR1'&lt;/P&gt;&lt;P&gt;          ID 'ACTVT' FIELD '02'       "Change access&lt;/P&gt;&lt;P&gt;          ID 'ZMVGR1' DUMMY.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If the user has authorization, open the field for editing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            screen-input = '1'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If the user does not have authorization, grey off the field and disallow for editing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          ELSE.&lt;/P&gt;&lt;P&gt;            screen-input = '0'.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;          MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 05:59:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448106#M1649251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T05:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization checking in BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448107#M1649252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your coding change&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF sy-tcode = 'VA02'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF T180-TRTYP = 'V'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then your coding will also work with BAPI. Try putting a break point before the If clause and execute the BAPI, you can see it yourself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP will set T180-TRTYP = 'H' for create, = 'V' for change and = 'A' for display. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T180-TRTYP is a SAP recommended field to be used in user exits to know if the document is being created, changed or displayed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-tcode = 'VA02' will not work with BAPI as you are actually not executing transaction VA02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also just disabling screen fields for input will not have affect on the BAPI call. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You would need to ensure it through separate coding&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 06:07:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448107#M1649252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T06:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization checking in BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448108#M1649253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GK,&lt;/P&gt;&lt;P&gt;just write the code before the BAPI call, that should do the trick for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 06:08:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448108#M1649253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T06:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization checking in BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448109#M1649254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishnu, thanks for your guidance. I tried your method but it did not work as well. I placed a break-point at the beginning of 'USEREXIT_FIELD_MODIFICATION' in MV45AFZZ. It seems like during the BAPI call, it did not enter this user exit at all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 06:35:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448109#M1649254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T06:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization checking in BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448110#M1649255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Soumyaprakash ... I think this would be the only solution ....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 06:36:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-checking-in-bapi/m-p/8448110#M1649255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T06:36:09Z</dc:date>
    </item>
  </channel>
</rss>

