<?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: User Exit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit/m-p/1469882#M220972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go to function EXIT_SAPMM06E_012 in SE37, double-click on the include named ZXM06U43.  According to your requirement, it appears the include already exists and is likely active.  Simply add your code in the include.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Aug 2006 13:48:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-25T13:48:41Z</dc:date>
    <item>
      <title>User Exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit/m-p/1469879#M220969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frendz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is first time i got one issue on User Exits, i Dint do before, can u give some clear steps to solve this issue, here is my issue.&lt;/P&gt;&lt;P&gt;_________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At present there is nothing to prevent users inadvertently selecting a vendor that does not belong to their company code. This causes a lot of problems. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A user exit should be used to check company code of PO against vendor assigned in PO and error if combination is invalid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This check could be added to the existing user exit EXIT_SAPMM06E_012 'Check Customer-Specific Data Before Saving'. Check if the vendor has been defined for the company code specified in the PO and the deletion indicator is not set. If this  check is successful then proceed, if it fails then throw an error message and do not save the PO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following new message should be defined: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message: 'Vendor &amp;amp; not defined for company code &amp;amp;.'&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u help me in this regard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points for sure,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srini Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2006 07:38:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit/m-p/1469879#M220969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-25T07:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: User Exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit/m-p/1469880#M220970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in that FM u will get one Include program , double click that program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in that include program u have to put like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;************************************************************************
*  Program.......  SAPMM06E                                            *
*  Title.........  Validation For PO                                   *
*  Type..........  Enhancement                                         *
*  Description...  To avoid creation of PO for vendors not             *
*                  maintained in specified company code                *
data: w_bukrs like i_ekko-bukrs.
data: w_lifnr like lfa1-lifnr.
data: i_trtyp like sy-ucomm.
import i_trtyp from memory id 'TYP'.

w_bukrs = i_ekko-bukrs.
w_lifnr = i_lfa1-lifnr.

if i_trtyp = 'V' or  i_trtyp = 'H'.
  if     i_ekko-bsart = 'NB' .
*Commented as per Pavan's request. Creates problem in STO
*OR   i_ekko-bsart = 'UB' ).

    select single lifnr from lfb1
    into   w_lifnr
    where bukrs = w_bukrs
    and   lifnr = w_lifnr.

    if sy-subrc &amp;lt;&amp;gt; 0.
      message e050(ymesg1) with w_lifnr w_bukrs.
    endif.
  endif.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Prabhu Peram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2006 09:35:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit/m-p/1469880#M220970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-25T09:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: User Exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit/m-p/1469881#M220971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prabhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u Pls give clear cut steps, as i dint work on User Exit before, I know the logic to change in Function module, but pls give me clear cut steps. Thanks in advance, points for sure if i solve this problem prabhu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2006 09:50:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit/m-p/1469881#M220971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-25T09:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: User Exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit/m-p/1469882#M220972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go to function EXIT_SAPMM06E_012 in SE37, double-click on the include named ZXM06U43.  According to your requirement, it appears the include already exists and is likely active.  Simply add your code in the include.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2006 13:48:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit/m-p/1469882#M220972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-25T13:48:41Z</dc:date>
    </item>
  </channel>
</rss>

