<?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: availability_check in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/availability-check/m-p/3733785#M898647</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And in a nutshell, for the fun of it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Minumum of variables to be filled for checking the availability of a material on a certain date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P_ATPCSX-MATNR = material code (no need to fill it out).&lt;/P&gt;&lt;P&gt;P_ATPCSX-WERKS = plant code.&lt;/P&gt;&lt;P&gt;P_ATPCSX-PRREG = check rule A = Sales Order, B = Delivery, BO = backorder.&lt;/P&gt;&lt;P&gt;P_ATPCSX-BDTER = date for requirement, for example sy-datum.&lt;/P&gt;&lt;P&gt;P_ATPCSX-IDXATP = sequence for ATP-check if you want to combine it with a check against Planning or against Contingencies. If you only need an ATP-check then an 1 here will suffice.&lt;/P&gt;&lt;P&gt;P_ATPCSX-CHKFLG = X. The BDMNG, required quantity must be checked in simulation (as opposed to: be taken in account while checking what's left...oslt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will find the total ATP-quantity in P_ATPCSX-ATPM1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P_MDVEX can be filled by the FM with a list of availability dates, just as you may know from the ATP-dialog in the sales order, if you add these variables:&lt;/P&gt;&lt;P&gt;P_ATPCSX-BDMNG = required quantity.&lt;/P&gt;&lt;P&gt;P_ATPCSX-XLINE = should be filled as this is the reference to P_MDVEX-DBCNT, fill it with 10 for example.&lt;/P&gt;&lt;P&gt;P_ATPCSX-RESMD = This one determines the way P_MDVEX is filled!:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regard to P_ATPCSX-RESMD:&lt;/P&gt;&lt;P&gt;Empty = One-time delivery on requested delivery date&lt;/P&gt;&lt;P&gt;A = Quantity at requested date, lock entire confirmation (Apparently useful for assembly orders, not so much in sales orders.)&lt;/P&gt;&lt;P&gt;B = Complete dlv. (System confirms on the first date that the total quantity can be deliverd, otherwise no confirmation.)&lt;/P&gt;&lt;P&gt;X = Proposal list. (Overview of the earliest dates on which (the complete or) parts of the required quantity can be delivered.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just for information:&lt;/P&gt;&lt;P&gt;(P_ATPCSX-IDXPLN =  sequence for check against Planning 1, 2 or 3. 0 means this check will not be performed.)&lt;/P&gt;&lt;P&gt;(P_ATPCSX-IDXALL = sequence for check against Contingencies 1, 2 or 3. 0 means this check will not be performed.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jul 2011 20:50:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-07-13T20:50:31Z</dc:date>
    <item>
      <title>availability_check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/availability-check/m-p/3733781#M898643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How is it possible to know the free stock available for a given material in this function module.&lt;/P&gt;&lt;P&gt;I have no idea how to use this module.&lt;/P&gt;&lt;P&gt;Sombody Plz help....&lt;/P&gt;&lt;P&gt;Thanks All..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 04:47:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/availability-check/m-p/3733781#M898643</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T04:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: availability_check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/availability-check/m-p/3733782#M898644</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;Follow an example bellow, obtained from &lt;A href="http://sapfans.com/forums/viewtopic.php?t=187787:" target="test_blank"&gt;http://sapfans.com/forums/viewtopic.php?t=187787:&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  determine_mat_avail&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Call the FM AVAILIBILITY_CHECK to find the ATP Qty and Qty&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Received&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_MATNR  Material&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_WERKS  Plant&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     &amp;lt;--P_QTY    ATP Qty&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     &amp;lt;--P_QTY_O  Qty Received&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     &amp;lt;--P_MEINS  Base UoM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form determine_mat_avail using    p_matnr&lt;/P&gt;&lt;P&gt;                                  p_werks&lt;/P&gt;&lt;P&gt;                         changing p_qty&lt;/P&gt;&lt;P&gt;                                  p_qty_o&lt;/P&gt;&lt;P&gt;                                  p_meins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure to hold ATP Controller: Control Parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  data: begin of st_atpca.&lt;/P&gt;&lt;P&gt;          include structure atpca.&lt;/P&gt;&lt;P&gt;  data: end of st_atpca.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Table to hold ATP: Requirements to be Checked/Considered&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  data: begin of tbl_atpcs occurs 0.&lt;/P&gt;&lt;P&gt;          include structure atpcs.&lt;/P&gt;&lt;P&gt;  data: end of tbl_atpcs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Table to hold ATP Server: ATP data for display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  data: begin of tbl_atpds occurs 0.&lt;/P&gt;&lt;P&gt;          include structure atpds.&lt;/P&gt;&lt;P&gt;  data: end of tbl_atpds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Table to hold ATP Server: Material Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  data: begin of tbl_atpmat occurs 0.&lt;/P&gt;&lt;P&gt;          include structure atpmat.&lt;/P&gt;&lt;P&gt;  data: end of tbl_atpmat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate ST_ATPCA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear st_atpca.&lt;/P&gt;&lt;P&gt;  st_atpca-anwdg  = '8'.    "Calling App - Explaination&lt;/P&gt;&lt;P&gt;  st_atpca-azerg  = 'T'.    "ATP Display Result&lt;/P&gt;&lt;P&gt;  st_atpca-rdmod  = 'A'.    "Read Mode - Totals&lt;/P&gt;&lt;P&gt;  st_atpca-xenqmd = 'N'.    "Do not read Blocks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate TBL_ATPCS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear tbl_atpcs.&lt;/P&gt;&lt;P&gt;  refresh tbl_atpcs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  tbl_atpcs-matnr  = p_matnr.  "Material&lt;/P&gt;&lt;P&gt;  tbl_atpcs-werks  = p_werks.  "Plant&lt;/P&gt;&lt;P&gt;  tbl_atpcs-prreg  = 'A'.      "Checking Rule for Avail Check&lt;/P&gt;&lt;P&gt;  tbl_atpcs-chmod  = 'EXP'.    "ATP: Check mode&lt;/P&gt;&lt;P&gt;  tbl_atpcs-delkz  = 'VC'.     "MRP element indicator&lt;/P&gt;&lt;P&gt;  tbl_atpcs-bdter  = sy-datum. "Requirements date for the component&lt;/P&gt;&lt;P&gt;  tbl_atpcs-xline  = '1'.&lt;/P&gt;&lt;P&gt;  tbl_atpcs-trtyp  = 'A'.      "Transaction type - Display&lt;/P&gt;&lt;P&gt;  tbl_atpcs-idxatp = '1'.&lt;/P&gt;&lt;P&gt;  tbl_atpcs-resmd  = 'X'.      "Mode for Results of Check - Proposal&lt;/P&gt;&lt;P&gt;  tbl_atpcs-chkflg = 'X'.&lt;/P&gt;&lt;P&gt;  append tbl_atpcs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'AVAILABILITY_CHECK'&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            p_atpcsx  = tbl_atpcs&lt;/P&gt;&lt;P&gt;            p_atpdsx  = tbl_atpds&lt;/P&gt;&lt;P&gt;            p_atpmatx = tbl_atpmat&lt;/P&gt;&lt;P&gt;       changing&lt;/P&gt;&lt;P&gt;            p_atpca   = st_atpca&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            error     = 1&lt;/P&gt;&lt;P&gt;            others    = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  check sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  read table tbl_atpds with key delkz = 'WB'.  "Plant Stock&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;    tbl_mat_avail-matnr = p_matnr.&lt;/P&gt;&lt;P&gt;    tbl_mat_avail-werks = p_werks.&lt;/P&gt;&lt;P&gt;    tbl_mat_avail-qty   = tbl_atpds-qty.&lt;/P&gt;&lt;P&gt;    tbl_mat_avail-qty_o = tbl_atpds-qty_o.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Base UoM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    read table tbl_atpmat with key matnr = p_matnr.&lt;/P&gt;&lt;P&gt;    if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;      tbl_mat_avail-meins = tbl_atpmat-meins.&lt;/P&gt;&lt;P&gt;      p_meins = tbl_atpmat-meins.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    insert table tbl_mat_avail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    p_qty   = tbl_atpds-qty.&lt;/P&gt;&lt;P&gt;    p_qty_o = tbl_atpds-qty_o.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " determine_mat_avail&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good lucky!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 18:52:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/availability-check/m-p/3733782#M898644</guid>
      <dc:creator>jkmaeda</dc:creator>
      <dc:date>2008-04-30T18:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: availability_check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/availability-check/m-p/3733783#M898645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shashank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes you can......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above code posted by another person works.i have also checked it. go a head with it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;sagar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sagar reddy on Apr 30, 2008 9:16 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 30, 2008 3:18 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 19:15:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/availability-check/m-p/3733783#M898645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T19:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: availability_check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/availability-check/m-p/3733784#M898646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SHASHANK JAISWAL ,&lt;/P&gt;&lt;P&gt;    Use the BAPI "BAPI_MATERIAL_AVAILABILITY".&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greetson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 19:45:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/availability-check/m-p/3733784#M898646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T19:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: availability_check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/availability-check/m-p/3733785#M898647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And in a nutshell, for the fun of it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Minumum of variables to be filled for checking the availability of a material on a certain date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P_ATPCSX-MATNR = material code (no need to fill it out).&lt;/P&gt;&lt;P&gt;P_ATPCSX-WERKS = plant code.&lt;/P&gt;&lt;P&gt;P_ATPCSX-PRREG = check rule A = Sales Order, B = Delivery, BO = backorder.&lt;/P&gt;&lt;P&gt;P_ATPCSX-BDTER = date for requirement, for example sy-datum.&lt;/P&gt;&lt;P&gt;P_ATPCSX-IDXATP = sequence for ATP-check if you want to combine it with a check against Planning or against Contingencies. If you only need an ATP-check then an 1 here will suffice.&lt;/P&gt;&lt;P&gt;P_ATPCSX-CHKFLG = X. The BDMNG, required quantity must be checked in simulation (as opposed to: be taken in account while checking what's left...oslt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will find the total ATP-quantity in P_ATPCSX-ATPM1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P_MDVEX can be filled by the FM with a list of availability dates, just as you may know from the ATP-dialog in the sales order, if you add these variables:&lt;/P&gt;&lt;P&gt;P_ATPCSX-BDMNG = required quantity.&lt;/P&gt;&lt;P&gt;P_ATPCSX-XLINE = should be filled as this is the reference to P_MDVEX-DBCNT, fill it with 10 for example.&lt;/P&gt;&lt;P&gt;P_ATPCSX-RESMD = This one determines the way P_MDVEX is filled!:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regard to P_ATPCSX-RESMD:&lt;/P&gt;&lt;P&gt;Empty = One-time delivery on requested delivery date&lt;/P&gt;&lt;P&gt;A = Quantity at requested date, lock entire confirmation (Apparently useful for assembly orders, not so much in sales orders.)&lt;/P&gt;&lt;P&gt;B = Complete dlv. (System confirms on the first date that the total quantity can be deliverd, otherwise no confirmation.)&lt;/P&gt;&lt;P&gt;X = Proposal list. (Overview of the earliest dates on which (the complete or) parts of the required quantity can be delivered.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just for information:&lt;/P&gt;&lt;P&gt;(P_ATPCSX-IDXPLN =  sequence for check against Planning 1, 2 or 3. 0 means this check will not be performed.)&lt;/P&gt;&lt;P&gt;(P_ATPCSX-IDXALL = sequence for check against Contingencies 1, 2 or 3. 0 means this check will not be performed.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 20:50:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/availability-check/m-p/3733785#M898647</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-13T20:50:31Z</dc:date>
    </item>
  </channel>
</rss>

