<?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: Field exits in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-exits/m-p/1669312#M295996</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;Try to use the system function DY_GET_CURRENT_TRANSACTION to get the trx code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: TCODE LIKE SY-TCODE.

CALL 'DY_GET_CURRENT_TRANSACTION' ID 'TRANSACTION_NAME'
                               FIELD TCODE.
IF TCODE = ......
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Nov 2006 23:46:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-20T23:46:40Z</dc:date>
    <item>
      <title>Field exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-exits/m-p/1669310#M295994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have created a field exit for data element(MATKL) and inside the field exit function module i have done a validation and raised an error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i m exectuing the transactions such as OMSF (SPRO-&amp;gt;Logistsis-&amp;gt;MasterData-&amp;gt;Define Material group) or any other transaction,&lt;/P&gt;&lt;P&gt;the error message is triggering and the field exit is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i have a requirement that this validation should neglect/not consider one particular transaction(eg: OMSF) and allow me to enter any value for MATKL field in that particular tranascation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to add my validation inside the field exit function module by checking sy-tcode...&lt;/P&gt;&lt;P&gt;i.e&lt;/P&gt;&lt;P&gt;***********************************************************&lt;/P&gt;&lt;P&gt;check not sy-tcode='OSMF'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if input = 'DC14'&lt;/P&gt;&lt;P&gt;message e004 with 'Obselete material group'&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end function.&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;but in this case the sy-tcode value is being SM30 as i m validating inside the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case if i validate for sy-tcode for SM30 my requirement fails....&lt;/P&gt;&lt;P&gt;So in such cases i need a differentiator for recognising the transaction OSMF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to exclude this particular transaction while validating the field exit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 16:53:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-exits/m-p/1669310#M295994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T16:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Field exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-exits/m-p/1669311#M295995</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;When you active a field exit (using report RSMODPRF), it is necessary to indicate the program and dynpro number where the field exit will work. Therefore if you define the correct dynpro number in combination with sy-tcode, you should not have problems validating this field.&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;Alejandro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 22:34:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-exits/m-p/1669311#M295995</guid>
      <dc:creator>alejandro_lpez</dc:creator>
      <dc:date>2006-11-20T22:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Field exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-exits/m-p/1669312#M295996</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;Try to use the system function DY_GET_CURRENT_TRANSACTION to get the trx code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: TCODE LIKE SY-TCODE.

CALL 'DY_GET_CURRENT_TRANSACTION' ID 'TRANSACTION_NAME'
                               FIELD TCODE.
IF TCODE = ......
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 23:46:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-exits/m-p/1669312#M295996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T23:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Field exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-exits/m-p/1669313#M295997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiva&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, please check if you can make use of system field: &amp;lt;b&amp;gt;SY-CPROG&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 01:13:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-exits/m-p/1669313#M295997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T01:13:31Z</dc:date>
    </item>
  </channel>
</rss>

