<?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: Help on AVAILABILITY_CHECK function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-availability-check-function-module/m-p/8092123#M1615548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code for the FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lt_atpcs LIKE atpcs OCCURS 0 WITH HEADER LINE,
      ls_atpca LIKE atpca.
      

  lt_atpcs-matnr  = matnr.
  lt_atpcs-werks  = werks.
  lt_atpcs-kdauf  = kdauf.
  lt_atpcs-kdpos  = posnr.
  lt_atpcs-bdter  = datlo.
  lt_atpcs-xline  = 1.
  lt_atpcs-idxall = 1.
  lt_atpcs-chkflg = 'X'.  

  CALL FUNCTION 'AVAILABILITY_CHECK'
       TABLES
            p_atpcsx  = lt_atpcs
       CHANGING
            p_atpca   = ls_atpca
       EXCEPTIONS
            error     = 1
            OTHERS    = 2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you check for the Sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write your code for the replacement material fetch and re run the FM keeping it in a sub-routine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;repeat the process,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert for further clarification&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Aug 2011 13:52:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-08-03T13:52:52Z</dc:date>
    <item>
      <title>Help on AVAILABILITY_CHECK function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-availability-check-function-module/m-p/8092122#M1615547</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 need to use the AVAILABILITY_CHECK function module to check the availability of the material in APO system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone please let me know what would be the parameters that should be passed to this FM for the case below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If there is no stock on the particular material, then it should bring the replacement material.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 13:19:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-availability-check-function-module/m-p/8092122#M1615547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-03T13:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help on AVAILABILITY_CHECK function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-availability-check-function-module/m-p/8092123#M1615548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code for the FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lt_atpcs LIKE atpcs OCCURS 0 WITH HEADER LINE,
      ls_atpca LIKE atpca.
      

  lt_atpcs-matnr  = matnr.
  lt_atpcs-werks  = werks.
  lt_atpcs-kdauf  = kdauf.
  lt_atpcs-kdpos  = posnr.
  lt_atpcs-bdter  = datlo.
  lt_atpcs-xline  = 1.
  lt_atpcs-idxall = 1.
  lt_atpcs-chkflg = 'X'.  

  CALL FUNCTION 'AVAILABILITY_CHECK'
       TABLES
            p_atpcsx  = lt_atpcs
       CHANGING
            p_atpca   = ls_atpca
       EXCEPTIONS
            error     = 1
            OTHERS    = 2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you check for the Sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write your code for the replacement material fetch and re run the FM keeping it in a sub-routine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;repeat the process,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert for further clarification&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 13:52:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-availability-check-function-module/m-p/8092123#M1615548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-03T13:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help on AVAILABILITY_CHECK function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-availability-check-function-module/m-p/8092124#M1615549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the standard VA01 is executed, for a material with less stock it will automatically propose the repalcement material. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module also provides the replacement material and i could check it in debug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I couldnt get the exact parameters as there are lot of parameters being paseed and I dont think that all the parameters would be required to get the replacement material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you know what could be the required parameters for the function module to propose the replacement material, it would be helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 14:14:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-availability-check-function-module/m-p/8092124#M1615549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-03T14:14:38Z</dc:date>
    </item>
  </channel>
</rss>

