AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
DAX
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 09.12.2013, 00:14   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
Pawan's Ax blog: How to get all the planned orders for a particular demand. in Ax2012
Источник: http://pawansaxblog.blogspot.com/201...rders-for.html
==============

When we create a sales order in Ax. Basically we are creating demand in system and when we run scheduling in system it generates the planned production or purchase orders.



Following is the step by step process.


·Create sales order. And check the explosion from salesline->Product and supply. Initially there are no planned orders. So there is no record in explosion.






·Check the explosion from salesline


·Now run the planning from Master planning ->Periodic->Master scheduling


·Check the explosion from sales line


·If we want to get all the planned production orders detail we can get it through following x++ code. We can get top level planned order from REqPo table where on the basis of pegging reference of sales order we can find top level planned production order. We can use that planned order as a parameter in a method and retrieve all the lower level orders.


private voiddoUpdateReferences(reqPo _reqPo)
{
ReqTransExplode reqTransExplode;
Map mapReqTransLocal;
MapEnumerator enumerator;
container conMapReqTrans;
Map mapReqTrans;
reqTrans reqTrans;
ReqPO reqPo = _reqPo;
Map plannedOrderMap = new Map(Types::Int64, Types::Record);

;


while (reqPo)
{
if (!plannedOrderMap.exists(reqPo.RecId) )
{


reqTransExplode = reqTransExplode::newReqTrans(reqPo.reqTrans(),ReqExplodeType::Down,true);
reqTransExplode.run();


conMapReqTrans = reqTransExplode.packMapReqTrans();


mapReqTransLocal = (conMapReqTrans) ? Map::create(conMapReqTrans) : new Map(typeName2Type(extendedtypestr(recId)), Types::Record);


mapReqTrans = newMap(typeName2Type(extendedtypestr(recId)), Types::Record);
enumerator = mapReqTransLocal.getEnumerator();
while(enumerator.moveNext())
{
reqTrans = reqTrans::findRecIdCrossCompany(enumerator.currentKey());
if (reqTrans.RefType == ReqRefType::BOMPlannedOrder)
{
Info(reqtrans.reqpo().refid);
}
}
}


next reqPo;
}


}


























Источник: http://pawansaxblog.blogspot.com/201...rders-for.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Pawan's Ax blog: Code to connect to an External Database from X++ Code (AX 2012) Blog bot DAX Blogs 0 09.12.2013 00:14
ax-erp: How to get Location of folder of dynamics axapta and windows folder Blog bot DAX Blogs 0 19.10.2012 21:12
ukax: Get on the “Inside” with our Inside Microsoft Dynamics AX 2012 Blog and Video Series! Blog bot DAX Blogs 0 16.09.2011 22:11
Pawan's Ax blog: How to identify unused labels in application Blog bot DAX Blogs 3 15.03.2011 10:14
Everything AX: How to quickly get table row counts in Axapta Blog bot DAX Blogs 0 02.09.2009 16:05
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 13:06.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.