<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://schweda.net/blog_rss.php?bid=519" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[Ermitteln der reservierten Menge einer Auftragsposition für bestimmte Dimensionen]]></title>
<description><![CDATA[
<p>Mit Hilfe des folgenden Jobs kann man die reservierte Menge einer Auftragsposition ermitteln. Dabei kann man &uuml;ber einen <em>InventDim</em>-Datensatz jene Dimensionen angeben, f&uuml;r die man die Information ben&ouml;tigt.
</p>

<div class="div_blog_axcode">static void getPhysicalReservedQtyForSalesLine(Args _args)<br />
{<br />
&nbsp;&nbsp;&nbsp; InventTransIdSumSingleStatus inventTransIdSumSingleStatus;<br />
&nbsp;&nbsp;&nbsp; SalesLine salesLine;<br />
&nbsp;&nbsp;&nbsp; InventMovement inventMovement;<br />
&nbsp;&nbsp;&nbsp; InventDim inventDim;<br />
&nbsp;&nbsp;&nbsp; InventDimParm inventDimParmCriteria;<br />
<br />
&nbsp;&nbsp;&nbsp; // Sales order line<br />
&nbsp;&nbsp;&nbsp; salesLine = SalesLine::findInventTransId('012431');<br />
&nbsp;&nbsp;&nbsp; inventMovement = InventTrans::findTransId(salesLine.InventTransId).inventMovement(true);<br />
<br />
&nbsp;&nbsp;&nbsp; // Prepare inventDim-Record: Set Dimensions, which should be used<br />
&nbsp;&nbsp;&nbsp; inventDim.clear();<br />
&nbsp;&nbsp;&nbsp; inventDim.InventSiteId&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;1&quot;;<br />
&nbsp;&nbsp;&nbsp; inventDim.InventLocationId&nbsp; = &quot;12&quot;;<br />
&nbsp;&nbsp;&nbsp; inventDim.wmsLocationId&nbsp;&nbsp;&nbsp;&nbsp; = &quot;12&quot;;<br />
&nbsp;&nbsp;&nbsp; inventDim = InventDim::findOrCreate(inventDim);&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; inventDimParmCriteria.initFromInventDim(inventDim);<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; inventTransIdSumSingleStatus = InventTransIdSumSingleStatus::newTransOriginIdStatus(InventTransOriginSalesLine::findInventTransOriginId(salesLine.DataAreaId, salesLine.InventTransId),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StatusReceipt::None,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StatusIssue::ReservPhysical);<br />
&nbsp;&nbsp;&nbsp; inventTransIdSumSingleStatus.parmInventDimCriteria(inventDim);<br />
&nbsp;&nbsp;&nbsp; inventTransIdSumSingleStatus.parmInventDimParmCriteria(inventDimParmCriteria);<br />
<br />
&nbsp;&nbsp;&nbsp; info(strFmt(&quot;%1&quot;, inventTransIdSumSingleStatus.reservPhysical()));<br />
}
</div>

<p>Mit Hilfe der Klasse <strong>InventTransIdSumSingleStatus </strong>kann man sich auch alle anderen Werte, wie beispielsweise die &quot;In Auftrag&quot; befindliche Menge. Dazu muss der Code nur&nbsp;minimal angepasst werden:
</p>
<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=519" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Thu, 03 Jul 2014 18:02:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=519</link>
<comments>https://www.schweda.net/blog_ax.php?bid=519</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=519</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=519</wfw:commentRss>
</item>
</channel>
</rss>	
