<?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: FM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm/m-p/4024985#M961915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use following code that will solve your problem.It will give you error message also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'BAPI_MATERIAL_EXISTENCECHECK'
      EXPORTING
        material            = w_matnr
*   MATERIAL_EVG        = MATERIAL_EVG
     IMPORTING
*   DELETION_FLAG       = DELETION_FLAG
       return              = w_return.

  IF w_return-type CA 'EA'.
    ROLLBACK WORK.
    MESSAGE ID '26' TYPE 'E' NUMBER '000'
            WITH w_return-message.
    WRITE:
           / 'Invalid Material' COLOR 5.

  ELSE.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*     EXPORTING
*       WAIT          = w_WAIT
*     IMPORTING
*       RETURN        = RETURN.
   .
    SKIP.
    WRITE:
           / 'Valid Material' COLOR 4,
           / 'Material Number:', w_matnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;removed_by_moderator&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Jun 24, 2008 7:00 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2008 09:28:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-20T09:28:10Z</dc:date>
    <item>
      <title>FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm/m-p/4024984#M961914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any FM to check for material no's validation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 09:26:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm/m-p/4024984#M961914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T09:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm/m-p/4024985#M961915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use following code that will solve your problem.It will give you error message also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'BAPI_MATERIAL_EXISTENCECHECK'
      EXPORTING
        material            = w_matnr
*   MATERIAL_EVG        = MATERIAL_EVG
     IMPORTING
*   DELETION_FLAG       = DELETION_FLAG
       return              = w_return.

  IF w_return-type CA 'EA'.
    ROLLBACK WORK.
    MESSAGE ID '26' TYPE 'E' NUMBER '000'
            WITH w_return-message.
    WRITE:
           / 'Invalid Material' COLOR 5.

  ELSE.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*     EXPORTING
*       WAIT          = w_WAIT
*     IMPORTING
*       RETURN        = RETURN.
   .
    SKIP.
    WRITE:
           / 'Valid Material' COLOR 4,
           / 'Material Number:', w_matnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;removed_by_moderator&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Jun 24, 2008 7:00 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 09:28:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm/m-p/4024985#M961915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T09:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm/m-p/4024986#M961916</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;What kind of validation do you need?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to find out if material exists in database, then you can use MARA_SINGLE_READ function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 09:29:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm/m-p/4024986#M961916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T09:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm/m-p/4024987#M961917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Check out  the Function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PRICAT_MATERIAL_NUMBER_CHECK
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;************&lt;STRONG&gt;&amp;lt;removed_by_moderator&amp;gt;&lt;/STRONG&gt;*****************&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Jun 24, 2008 6:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 09:29:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm/m-p/4024987#M961917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T09:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm/m-p/4024988#M961918</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;Please use a proper subject for your postings. According to our rules of engagement I will lock this thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jan Stallkamp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2008 19:08:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm/m-p/4024988#M961918</guid>
      <dc:creator>JanStallkamp</dc:creator>
      <dc:date>2008-06-24T19:08:07Z</dc:date>
    </item>
  </channel>
</rss>

