<?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://www.schweda.net/blog_rss.php?bid=529" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[Kommissionierliste für bestimmte Positionen eines Verkaufsauftrages erstellen]]></title>
<description><![CDATA[
<div class="div_table_100_wo_border">

<div class="div_tablerow">

<div class="div_tablecolumn" style="padding-right:10px">

<p>Ich kenne keine M&ouml;glichkeit, wie man eine Kommissionierliste nur f&uuml;r bestimmte Auftragspositionen per Code erstellt.
</p>


<p>Deshalb nutze ich in dem folgenden Code-Beispiel folgenden Ansatz:
</p>


<p>Ich erstelle&nbsp;die Kommissionierliste mit Hilfe des SalesFormLetter-Frameworks und l&ouml;sche vor dem entscheidenden Schritt (dem Ausf&uuml;hren der run()-Methode) jene Eintr&auml;ge in der Tabelle SalesParmLine, die ich nicht ben&ouml;tigte.
</p>

</div>


<div class="div_tablecolumn" style="width:40%">

<p><a href="http://www.schweda.net/pictures/blogpics/ax2012_salespickinglist_create.png" rel="lightbox" target="_self"><img alt="Screenshot" height="166" src="http://www.schweda.net/pictures/blogpics/ax2012_salespickinglist_create.png" title="Screenshot" width="396" /></a>
</p>

</div>

</div>

</div>


<pre class="pre_blog_axcode">
static void createSalesPickingListSingleLine(Args _args)
{
    SalesTable salesTable = salesTable::find(&quot;001862&quot;); // Sales order
    container inventTransIdCon = [&quot;014015&quot;, &quot;014016&quot;];  // LOT-IDs to pick
    SalesFormLetter salesFormLetter;
    SalesParmLine salesParmLine;
    
    salesFormLetter = SalesFormLetter::construct(DocumentStatus::PickingList);

    // Do the steps manually, which normally are done in method
    // salesFormLetter.update()
    salesFormLetter.salesTable(salesTable);
    salesFormLetter.initParmSalesTable(salesFormLetter.salesTable());
    salesFormLetter.transDate(systemDateGet());
    salesFormLetter.specQty(SalesUpdate::All);
    salesFormLetter.proforma(salesFormLetter.salesParmUpdate().Proforma);
    salesFormLetter.printFormLetter(salesFormLetter.printFormLetter());
    salesFormLetter.printCODLabel(NoYes::No);
    salesFormLetter.printShippingLabel(NoYes::No);
    salesFormLetter.usePrintManagement(false);
    salesFormLetter.creditRemaining(salesFormLetter.creditRemaining());

    salesFormLetter.createParmUpdateFromParmUpdateRecord(
        SalesFormletterParmData::initSalesParmUpdateFormletter(
            salesFormLetter.documentStatus(),
            salesFormLetter.pack(),
            true,
            false,
            false));

    salesFormLetter.initParameters(
        salesFormLetter.salesParmUpdate(),
        Printout::Current);

    salesFormLetter.initLinesQuery();

    // Delete unwanted records in SalesParmLine
    while select forupdate salesParmLine
        where salesParmLine.ParmId == salesFormLetter.parmId()
    {
        if (conFind(inventTransIdCon, salesParmLine.InventTransId) == 0)
        {
            salesParmLine.delete();
        }
    }

    // Let&#39;s go
    salesFormLetter.run();
}
</pre>


<p>&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Mon, 27 Apr 2020 10:30:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=529</link>
<comments>https://www.schweda.net/blog_ax.php?bid=529</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=529</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=529</wfw:commentRss>
</item>
</channel>
</rss>	
