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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.12.2012, 22:31   #1  
pawan is offline
pawan
Участник
 
11 / 10 (1) +
Регистрация: 20.11.2012
Need to get previous but one record from PO in ax 2009
Hi Everyone,

Firstly,There are two types of PO in PurchOrder.

1. P and 2.D

When you create a PO of type "D" you should create "P" PO after "D" PO(Alternatively)

Ex: 1. D1(First D) PO 2. D2(Second D) PO 3. P1(First P) PO

But My req. is i should filter all the "P" into my cutomized Table(say X_Test) and in the below fields i have to get below values as per example...

Fields:

1.P_PurchId(PO of type P from Purchtable)[ P1]

2.D_purchid(the value of this should be [D1] for P1 record )

Note: P & D PO have to be same InventsiteId...

Plz Help me out ...
Старый 04.12.2012, 01:09   #2  
macklakov is offline
macklakov
NavAx
Аватар для macklakov
 
2,129 / 916 (35) +++++++
Регистрация: 03.04.2002
Dear pawan,

It would be very nice of you to bother giving description of business needs you want to solve or at least asking a question. It would show some respect to you colleagues.

Sincerely yours,
macklakov
__________________
Isn't it nice when things just work?
Старый 04.12.2012, 14:26   #3  
pawan is offline
pawan
Участник
 
11 / 10 (1) +
Регистрация: 20.11.2012
Цитата:
Сообщение от macklakov Посмотреть сообщение
Dear pawan,

It would be very nice of you to bother giving description of business needs you want to solve or at least asking a question. It would show some respect to you colleagues.

Sincerely yours,
macklakov
Hi macklakov ,
Thanks for your advise macklakov...I will follow it from next time...I didnt get where i not show respect to ppl here...Anywaz noted your point...


_________________________________
We came here to solve technical issues,Not Arguing ...
Старый 04.12.2012, 14:34   #4  
Ivanhoe is offline
Ivanhoe
Участник
Аватар для Ivanhoe
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
 
4,143 / 2155 (80) +++++++++
Регистрация: 29.09.2005
Адрес: Санкт-Петербург
The point is that your intial message is not very "friendly". For thoses who are not in the middle of your solution of the issue, it's absolutely unclear what and for what you are doing.
__________________
Ivanhoe as is..
Старый 04.12.2012, 16:05   #5  
kashperuk is offline
kashperuk
Участник
Аватар для kashperuk
MCBMSS
Соотечественники
Сотрудники Microsoft Dynamics
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии 2011
Лучший по профессии 2009
 
4,361 / 2084 (78) +++++++++
Регистрация: 30.05.2004
Адрес: Atlanta, GA, USA
I would suggest that you add a larger sample data set, so that we can better understand your problem statement.

Or at least confirm that my understanding of what you wrote is correct:

1. For any PO of type "P", there's exactly one corresponding PO of type "D", that is linked to it through the InventSiteId field on the PO table
2. There can be multiple POs of type "P" for the same "D" PO, so for example P1 linked to D1 and P2 linked to D1.
3. You want to create a query that would select all POs of type "P" and their respective "D" POs.
4. You want to do it with just 1 query.

My suggestion would be:

X++:
PO poP;
PO poD;
while select PurchId from poP
where poP.PurchaseType == "P"
join PurchID from poD
where poD.PurchaseType == "D"
&& poD.InventSiteId == poP.InventSiteId
{
info(strfmt("'P' PO: %1, 'D' PO: %2", poP.PurchId, poD.PurchId));
}
Старый 04.12.2012, 23:21   #6  
pawan is offline
pawan
Участник
 
11 / 10 (1) +
Регистрация: 20.11.2012
Dear kashperuk,
thanks for responding for my issue.
I will explain you the requirenment clearly below...
If we create "D1" PO with a +ve amount with a inventsiteid"123"
we should create "P1" with a -ve amount with same inventsiteid"123"




purchtable
Purchid enum(Drop/pick) timing for example inventsiteid
drop1 D day before yesterday 123
drop2 D yesterday 123
Pick1 P todays date n time 123

In my Cutomized Table:

N_Pick N_Drop inventsiteid
P1 D1 123

my req is to get D1 PO in the field of N_drop against P1 PO in the field N_pick

Please ask me if u need more info regarding this req...Hope you understand the issue..
Thanku
Старый 05.12.2012, 01:33   #7  
kashperuk is offline
kashperuk
Участник
Аватар для kashperuk
MCBMSS
Соотечественники
Сотрудники Microsoft Dynamics
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии 2011
Лучший по профессии 2009
 
4,361 / 2084 (78) +++++++++
Регистрация: 30.05.2004
Адрес: Atlanta, GA, USA
lol, what an explanation.
in any case, try my query from above - it should work for you.
Старый 05.12.2012, 13:36   #8  
pawan is offline
pawan
Участник
 
11 / 10 (1) +
Регистрация: 20.11.2012
Sorry kashperuk,I just copied from excel to here to show you the exact req.

Please find Attachement of my task...
As per the Excel i need to get the PO0001 value against the PI0001 purchid...(last but one record value)...Plz help me out...
Thankyou...
Вложения
Тип файла: xlsx TASK.xlsx (8.8 Кб, 61 просмотров)

Последний раз редактировалось pawan; 05.12.2012 в 14:07.
Старый 06.12.2012, 03:13   #9  
macklakov is offline
macklakov
NavAx
Аватар для macklakov
 
2,129 / 916 (35) +++++++
Регистрация: 03.04.2002
Цитата:
Сообщение от pawan Посмотреть сообщение
Hi macklakov ,
Thanks for your advise macklakov...I will follow it from next time...I didnt get where i not show respect to ppl here...Anywaz noted your point...
I just humbly expressed my wish. If I was giving you advises it would be to read "Microsoft Dynamics AX 2009 Programming: Getting Started". And I would highly recommend the person who wrote the spec to attend "Trade and Logistics" training.
Цитата:
Сообщение от pawan Посмотреть сообщение
We came here to solve technical issues,Not Arguing ...
I can hardly believe there are any technical issues in your Accounts Payable module.
__________________
Isn't it nice when things just work?
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axforum blogs: Квест: Подружим Dynamics Ax 2009 Sp1 RU7 c SharePoint Foundation 2010 Blog bot DAX Blogs 4 16.10.2017 17:50
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
Sample Design Patterns: Upgrade to Microsoft Dynamics AX 2009 and issues with the global address book Blog bot DAX Blogs 0 21.12.2010 11:11
Arijit Basu: AX 2009 - Quick Overview Blog bot DAX Blogs 4 19.05.2008 14:47

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

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

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