03.12.2012, 22:31 | #1 |
Участник
|
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 |
NavAx
|
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 |
Участник
|
Цитата:
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 |
Участник
|
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 |
Участник
|
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 |
Участник
|
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 |
Участник
|
lol, what an explanation.
in any case, try my query from above - it should work for you. |
|
05.12.2012, 13:36 | #8 |
Участник
|
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... Последний раз редактировалось pawan; 05.12.2012 в 14:07. |
|
06.12.2012, 03:13 | #9 |
NavAx
|
Цитата:
I can hardly believe there are any technical issues in your Accounts Payable module.
__________________
Isn't it nice when things just work? |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|