[Axapta-Knowledge-Village] Re: Not able to do RAF

2005-09-27 Thread Pritam

= Checkbox automatic addition on inventory parmaeters is checked.
= Item or warehouse is not marked for quarantine.
= There is no customization done.

I think this is the bug as Herry and Gokhan have mentioned.

When users make on Production Order with qty 70 it creates one 
Inventory Transaction line.

When users post one RAF journal with qty 5 it splits 70 into 65 and 
5. The status of 70 is Ordered and status of 5 is received.

When users create one more RAF journal with qty 9 it splits 65 into 
56 and 9. The status of 56 is Ordered and has no Inventory 
reference, status of line with qty 9 is also Ordered but Inventory 
Reference is filled as Report as finished Journal.

In my case I think when user has deleted un-posted RAF journal child 
reference has not got removed.

I have checked the code of RAF update. While picking up transaction 
lines Axapta picks up lines having no reference. Hence quantity do 
not balance and throws error.

Please suggest any solution to stop this ? Or suggest if above 
conclusion is wrong. 

I am using Axapta 3.0 with service pack 3.0

Thanks in advance

Pritam Karkhanis


--- In Axapta-Knowledge-Village@yahoogroups.com, Harry 
\(Harshawardhan Deshpande [EMAIL PROTECTED] wrote:
 hi
  
 1. The problem with the deletion of RAF journal..
 Did you delete the RAF that has been posted ? If yes, then 
Axapta will keep the child references. If you are deleting RAF that 
has not been posted then Axapta should remove the child references 
(in reality it sometimes does not, this is a bug in standard axapta).
 
 2. Splitting of the inventtrans. Do you have any transactions that 
are registered etc? is the checkbox automatic addition on 
inventory parameters checked?
  
 3. second line of 65 where you do not have any reference number is 
serious. Have you done any modifications?
  
 4. I am stumped as to why you should get an error while posting a 
quantity of zero? Can you reproduce this in standard system? May be 
the problem will go away when you fix the above problem (number 3)
  
 regards
  
 harry
 
 Gokhan Can [EMAIL PROTECTED] wrote:
 v\:* {behavior:url(#default#VML);}o\:* {behavior:url
(#default#VML);}w\:* {behavior:url(#default#VML);}.shape 
{behavior:url(#default#VML);}
 We faced the same kind of error a lot of times.
 
 When you create a RAF journal and delete it or we could not find 
actually after which action ; Axapta split inventtrans in to 2 lines 
and 
 
 Keep RAF referance on Inventtrans ( TransChildRefID and 
TransChildRefType ) and this is dangling referance.When you delete 
that 
 
 Referance from inventtrans probably the problem will be fixed but 
I am asking the same question does anybody know what is the real 
action
 
 Cause this error bucause we opened and indicent but could not tell 
the real reason so we could not fix the bug.
 
  
 
  
 
 Gokhan
 
  
 
 -
 
 
 From: Axapta-Knowledge-Village@yahoogroups.com [mailto:Axapta-
[EMAIL PROTECTED] On Behalf Of Pritam
 Sent: Monday, September 26, 2005 2:11 PM
 To: Axapta-Knowledge-Village@yahoogroups.com
 Subject: [Axapta-Knowledge-Village] Not able to do RAF
 
 
  
 
 Dear gurus
 
 I am facing below problem in Axapta.
 I have a Production Order of quantity 70.
 It has one RAF journal with good quantity 5.
 
 So when I check Inventory-Transaction I think it should show 2 
 lines as follows..
 
 (1) Ordered = 65
 (2) Raf = 5
 
 But in my case it shows 3 lines
 
 (1) Ordered = 9
 (2) Ordered = 56
 (2) Raf = 5
 
 For the first Line which is having quantity 9, Inventory reference 
 columns (Inventory reference  Number) are filled. Second line has 
 no reference attached.
 
 When I try to do RAF without any quantity to update Production 
 Order's status from Route Consumption to RAF I get below error
 
 Quantity ordered cannot be reduced, as there are not enough open 
 inventory transactions with the Ordered status. The items are 
 Purchased, Received or Registered
 
 This happens because while updating status to RAF, records got 
 picked up with status Ordered and having blank reference fields. 
 Axapta try to reduce remaining qty (65) on order  from second line 
 only.
 
 If anybody knows about this behaviour of Axapta, please let me 
know 
 where to check.
 
 Thank You
 
 
 
 
 
 Sharing the knowledge on Axapta. 
 
 
 
 
 SPONSORED LINKS 
 Business finance course Business to business finance Small 
business finance Business finance consultant Business finance 
magazine Business finance uk 
 
 -
 YAHOO! GROUPS LINKS 
 
 
 Visit your group Axapta-Knowledge-Village on the web.
   
 To unsubscribe from this group, send an email to:
  [EMAIL PROTECTED]
   
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 
 
 
 -
 
 
 
 
   
 -
 Yahoo! for Good
  Click here to donate to the Hurricane Katrina relief effort.




 

Re: [Axapta-Knowledge-Village] Telling the Difference

2005-09-27 Thread Harry \(Harshawardhan Deshpande



hi

try args.caller() may work

regards

harryBrandon George [EMAIL PROTECTED] wrote:


Hello All!

I was wondering, how can you tell from the SalesFormLetter Class if the Class is being called by a Form, or is being called by code from another class?

thanks,
Brandon__Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com 





Sharing the knowledge on Axapta.








  
  
SPONSORED LINKS
  
  
  

Business finance course
  
  
Business to business finance
  
  
Small business finance
  
  


Business finance consultant
  
  
Business finance magazine
  
  
Business finance uk
  
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [Axapta-Knowledge-Village] Error Message, can someone help?

2005-09-27 Thread Harry \(Harshawardhan Deshpande



hi

It will hurt performance badly. I think you will be better off logging the call with MBS support. Make sure to tell them that the problem goes away if cache property is set to None. I guess you will have to press hard to escalate the call and hopefullyit will reach someone who understands what is happening.

regards

harry
Brandon George [EMAIL PROTECTED] wrote:


Thanks,

I believe this might have fixed the issue. I wondering though how this will affect performance?

-Brandon


From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Harry (Harshawardhan DeshpandeSent: Sunday, September 25, 2005 11:56 AMTo: Axapta-Knowledge-Village@yahoogroups.comSubject: Re: [Axapta-Knowledge-Village] Error Message, can someone help?

hi

does this happen also in the demo system? Try change the cache property to none (for sales line as well as misc charge line) and see if you can get the error?

regards

harry
Brandon George [EMAIL PROTECTED] wrote:


Hello All,

Hope everyone is having a great Friday! Well I have a strange error that only occurs Sometimes... that's right sometimes. This sometimes occurs when a Misc. Charge is added to a SalesLine, and posting is done for confirmation. And sometimes it occurs when the Misc. Charge is added to the line.

Anyway the error is: 
Line 1 "The value entered in field 'Estimated Amount' of Table 'Order Lines' (310,80) cannot be updated to new value '0.00'"
Line 2 "Cannot edit a record in Order Lines(SalesLine). Another user changed one of more fields in the records, or the form has not selected all fields"

Has anyone ever seen this error before? I am not sure what it is because, I can't duplicate it when trying to enter the same information as the error message was generated by. I am not sure if this is a user profile related problem, because I can't duplicate it, or if it's just a strange Axapta issue.

Either way,. any help at all on this would be great!

thanks,
Brandon


From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of MichaelSent: Friday, September 23, 2005 10:57 AMTo: Axapta-Knowledge-Village@yahoogroups.comSubject: [Axapta-Knowledge-Village] Re: axapta quanity delivered column
Hello James, No, i'm not familiar with 'summary update'. I can Post an order, deliver now an order, make proformas, pro forma picklist,make business codes/shipping codes from sales order exports ( this allows us to import the info into fedex/ups then we use a scangun to scan a barcode on the package. The address fields populate and then we ship it out. makes things quicker all over ).And other things.I have been, using as you showed me, for multiple invoices to post all at once instead of one at a time. Not for multiple lines but multiple sales orders. Which saves time for me immensely.So what is summary update?Thanks,Michael--- In Axapta-Knowledge-Village@yahoogroups.com, "James Flavell" [EMAIL PROTECTED] wrote: Just wondering did they show you summary update? Not sure are you combining several orders into one invoice? Summary update might save you a
 bit more (although might be a little more risky...)  All the best James   -Original Message- From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Sent: 22 September 2005 23:44 To: Axapta-Knowledge-Village@yahoogroups.com Subject: [Axapta-Knowledge-Village] Re: axapta quanity delivered column   I tried what you said and it was aweseome!! i used some really small sales order so if i did mess up i could fix it. I don't know why in our training classes they never showed us this. Can't wait to learn more. Thanks again! You have indeed saved my fingers.  Michael   --- In Axapta-Knowledge-Village@yahoogroups.com, "James Flavell"  [EMAIL PROTECTED] wrote:  Yes that's right, is this what you want to
 be able to do?  -Original Message-  From: Axapta-Knowledge-Village@yahoogroups.com  [mailto:[EMAIL PROTECTED] On Behalf Of Michael  Sent: 21 September 2005 23:49  To: Axapta-Knowledge-Village@yahoogroups.com  Subject: [Axapta-Knowledge-Village] Re: axapta quanity delivered column  hello James,Do you mean goto posting  packslip, change quantity to all, then below  that at "overview, setup, lines, line details" choose lines and edit the  update column? i do have limited permissions.  My posting button has 'picking list' ,   'picking list registration' ( greyed
 out )  'packing slip'as the choices on it.thanksMichael--- In Axapta-Knowledge-Village@yahoogroups.com, "James Flavell"  [EMAIL PROTECTED] wrote:   Hi Michael,  Why not got to posting screen (posting button) and select ALL. Then onthe lines it returns you can manually edit just the line  that needs   backorder  Hope that helps your poor fingers   James -Original Message-   From: Axapta-Knowledge-Village@yahoogroups.com  
 [mailto:[EMAIL PROTECTED] On Behalf Of  Michael   Sent: 21 September 2005 13:14   To: 

Re: [Axapta-Knowledge-Village] Re: Not able to do RAF

2005-09-27 Thread Harry \(Harshawardhan Deshpande



hi Pritam

Your conclusion is correct. Please visit my site www.systomatics.biz and read thediscussion on InventMovement class where I have (tried to)explain the logic.

**In my case I think when user has deleted un-posted RAF journal child reference has not got removed.**
This is a bug in standard system and (me thunks) it happens because of different cachelookup property on the journal header and journal lines. This happens even with BOM journals.I tried to log this call but wastoldit cannot be logged since it cannot be replicated.

Right now the only solution is to stop allowing users from deleting the journal linesfrom the header. If they want to delete a journal, then click on lines toopen the lines form, delete the lines and then delete theheader. Simple modification (just change the delete action from cascade to restricted)

regards

harry

Pritam [EMAIL PROTECTED] wrote:
= Checkbox "automatic addition" on inventory parmaeters is checked.= Item or warehouse is not marked for quarantine.= There is no customization done.I think this is the bug as Herry and Gokhan have mentioned.When users make on Production Order with qty 70 it creates one Inventory Transaction line.When users post one RAF journal with qty 5 it splits 70 into 65 and 5. The status of 70 is Ordered and status of 5 is received.When users create one more RAF journal with qty 9 it splits 65 into 56 and 9. The status of 56 is Ordered and has no Inventory reference, status of line with qty 9 is also Ordered but Inventory Reference is filled as "Report as finished Journal".In my case I think when user has deleted un-posted RAF journal child reference has not got removed.I have checked the code of
 RAF update. While picking up transaction lines Axapta picks up lines having no reference. Hence quantity do not balance and throws error.Please suggest any solution to stop this ? Or suggest if above conclusion is wrong. I am using Axapta 3.0 with service pack 3.0Thanks in advancePritam Karkhanis--- In Axapta-Knowledge-Village@yahoogroups.com, "Harry \(Harshawardhan Deshpande" [EMAIL PROTECTED] wrote: hi  1. The problem with the deletion of RAF journal.. Did you delete the RAF that has been posted ? If yes, then Axapta will keep the child references. If you are deleting RAF that has not been posted then Axapta should remove the child references (in reality it sometimes does not, this is a bug in standard axapta).  2. Splitting of the inventtrans. Do you have any transactions that are registered etc? is the checkbox "automatic
 addition" on inventory parameters checked?  3. second line of 65 where you do not have any reference number is serious. Have you done any modifications?  4. I am stumped as to why you should get an error while posting a quantity of zero? Can you reproduce this in standard system? May be the problem will go away when you fix the above problem (number 3)  regards  harry  Gokhan Can [EMAIL PROTECTED] wrote: v\:* {behavior:url(#default#VML);}o\:* {behavior:url(#default#VML);}w\:* {behavior:url(#default#VML);}.shape {behavior:url(#default#VML);} We faced the same kind of error a lot of times.  When you create a RAF journal and delete it or we could not find actually after which action ; Axapta split inventtrans in to 2 lines and   Keep RAF referance on Inventtrans ( TransChildRefID and
 TransChildRefType ) and this is dangling referance.When you delete that   Referance from inventtrans probably the problem will be fixed but I am asking the same question does anybody know what is the real action  Cause this error bucause we opened and indicent but could not tell the real reason so we could not fix the bug.  Gokhan-   From: Axapta-Knowledge-Village@yahoogroups.com [mailto:Axapta-[EMAIL PROTECTED] On Behalf Of Pritam Sent: Monday, September 26, 2005 2:11 PM To: Axapta-Knowledge-Village@yahoogroups.com Subject: [Axapta-Knowledge-Village] Not able to do RAF Dear gurus  I am facing below problem in Axapta. I have a Production Order of quantity
 70. It has one RAF journal with good quantity 5.  So when I check Inventory-Transaction I think it should show 2  lines as follows..  (1) Ordered = 65 (2) Raf = 5  But in my case it shows 3 lines  (1) Ordered = 9 (2) Ordered = 56 (2) Raf = 5  For the first Line which is having quantity 9, Inventory reference  columns (Inventory reference  Number) are filled. Second line has  no reference attached.  When I try to do RAF without any quantity to update Production  Order's status from Route Consumption to RAF I get below error  "Quantity ordered cannot be reduced, as there are not enough open  inventory transactions with the Ordered status. The items are  Purchased, Received or Registered"  This happens because while updating
 status to RAF, records got  picked up with status Ordered and having blank reference fields.  Axapta try to reduce remaining qty (65) on order from second line  only.  If anybody knows about this behaviour of Axapta, please let me 

Re: [Axapta-Knowledge-Village] Re: Not able to do RAF

2005-09-27 Thread Koh Meng Chiat



Hi all,

Forgive my ignorare. Can someone tell me what's RAF journal?"Harry (Harshawardhan Deshpande" [EMAIL PROTECTED] wrote:

hi Pritam

Your conclusion is correct. Please visit my site www.systomatics.biz and read thediscussion on InventMovement class where I have (tried to)explain the logic.

**In my case I think when user has deleted un-posted RAF journal child reference has not got removed.**
This is a bug in standard system and (me thunks) it happens because of different cachelookup property on the journal header and journal lines. This happens even with BOM journals.I tried to log this call but wastoldit cannot be logged since it cannot be replicated.

Right now the only solution is to stop allowing users from deleting the journal linesfrom the header. If they want to delete a journal, then click on lines toopen the lines form, delete the lines and then delete theheader. Simple modification (just change the delete action from cascade to restricted)

regards

harry

Pritam [EMAIL PROTECTED] wrote:
= Checkbox "automatic addition" on inventory parmaeters is checked.= Item or warehouse is not marked for quarantine.= There is no customization done.I think this is the bug as Herry and Gokhan have mentioned.When users make on Production Order with qty 70 it creates one Inventory Transaction line.When users post one RAF journal with qty 5 it splits 70 into 65 and 5. The status of 70 is Ordered and status of 5 is received.When users create one more RAF journal with qty 9 it splits 65 into 56 and 9. The status of 56 is Ordered and has no Inventory reference, status of line with qty 9 is also Ordered but Inventory Reference is filled as "Report as finished Journal".In my case I think when user has deleted un-posted RAF journal child reference has not got removed.I have checked the code of
 RAF update. While picking up transaction lines Axapta picks up lines having no reference. Hence quantity do not balance and throws error.Please suggest any solution to stop this ? Or suggest if above conclusion is wrong. I am using Axapta 3.0 with service pack 3.0Thanks in advancePritam Karkhanis--- In Axapta-Knowledge-Village@yahoogroups.com, "Harry \(Harshawardhan Deshpande" [EMAIL PROTECTED] wrote: hi  1. The problem with the deletion of RAF journal.. Did you delete the RAF that has been posted ? If yes, then Axapta will keep the child references. If you are deleting RAF that has not been posted then Axapta should remove the child references (in reality it sometimes does not, this is a bug in standard axapta).  2. Splitting of the inventtrans. Do you have any transactions that are registered etc? is the checkbox "automatic
 addition" on inventory parameters checked?  3. second line of 65 where you do not have any reference number is serious. Have you done any modifications?  4. I am stumped as to why you should get an error while posting a quantity of zero? Can you reproduce this in standard system? May be the problem will go away when you fix the above problem (number 3)  regards  harry  Gokhan Can [EMAIL PROTECTED] wrote: v\:* {behavior:url(#default#VML);}o\:* {behavior:url(#default#VML);}w\:* {behavior:url(#default#VML);}.shape {behavior:url(#default#VML);} We faced the same kind of error a lot of times.  When you create a RAF journal and delete it or we could not find actually after which action ; Axapta split inventtrans in to 2 lines and   Keep RAF referance on Inventtrans ( TransChildRefID and
 TransChildRefType ) and this is dangling referance.When you delete that   Referance from inventtrans probably the problem will be fixed but I am asking the same question does anybody know what is the real action  Cause this error bucause we opened and indicent but could not tell the real reason so we could not fix the bug.  Gokhan-   From: Axapta-Knowledge-Village@yahoogroups.com [mailto:Axapta-[EMAIL PROTECTED] On Behalf Of Pritam Sent: Monday, September 26, 2005 2:11 PM To: Axapta-Knowledge-Village@yahoogroups.com Subject: [Axapta-Knowledge-Village] Not able to do RAF Dear gurus  I am facing below problem in Axapta. I have a Production Order of quantity
 70. It has one RAF journal with good quantity 5.  So when I check Inventory-Transaction I think it should show 2  lines as follows..  (1) Ordered = 65 (2) Raf = 5  But in my case it shows 3 lines  (1) Ordered = 9 (2) Ordered = 56 (2) Raf = 5  For the first Line which is having quantity 9, Inventory reference  columns (Inventory reference  Number) are filled. Second line has  no reference attached.  When I try to do RAF without any quantity to update Production  Order's status from Route Consumption to RAF I get below error  "Quantity ordered cannot be reduced, as there are not enough open  inventory transactions with the Ordered status. The items are  Purchased, Received or Registered"  This happens because while updating
 status to RAF, records got  picked up with status Ordered and having blank reference fields.  Axapta 

[Axapta-Knowledge-Village] Axapta and Oracle Parallel Query Execution

2005-09-27 Thread hwimmer
Hi!
We are using Axapta 3.0SP3 on an Oracle 9.2.0.4. The DB server is a 
dual Xeon 3.2 Ghz (so I see 4 CPU threads in task manager).

Now, from time to time one of the CPU threads goes up to almost 100% 
and the others are still at 1-2 %.
So it seems to me that Oracle does not spread it's CPU load to more 
CPU's (at least for one process). I have found that on Oracle, you 
have to activate the Parallel option on each table.

Question now: has anybody of you made that? Is it advisable to 
activate it when using Axapta? Any thoughts on it?

Best regards,
Helmut Wimmer
http://axaptafreak.blogspot.com




 Yahoo! Groups Sponsor ~-- 
Make a difference. Find and fund world-changing projects at GlobalGiving.
http://us.click.yahoo.com/PcNrnD/PbOLAA/cosFAA/kGEolB/TM
~- 

Sharing the knowledge on Axapta. 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [Axapta-Knowledge-Village] Re: Not able to do RAF

2005-09-27 Thread Christoph Malherbe










I was in the dark too. Thanks for asking.











From:
Axapta-Knowledge-Village@yahoogroups.com
[mailto:Axapta-Knowledge-Village@yahoogroups.com]
On Behalf Of Koh Meng Chiat
Sent: 27 September 2005 10:03 AM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: Re:
[Axapta-Knowledge-Village] Re: Not able to do RAF







Hi all,











Forgive my ignorare. Can someone tell me what's RAF journal?

Harry
(Harshawardhan Deshpande [EMAIL PROTECTED]
wrote:







hi Pritam











Your conclusion is correct. Please visit my site www.systomatics.biz and read
thediscussion on InventMovement class where I have (tried
to)explain the logic.











**In my case I think when user has deleted un-posted
RAF journal child 
reference has not got removed.**





This is a bug in standard system and (me thunks) it happens because of
different cachelookup property on the journal header and journal lines. This
happens even with BOM journals.I tried to log this call but
wastoldit cannot be logged since it cannot be replicated.











Right now the only solution is to stop allowing users from deleting the
journal linesfrom the header. If they want to delete a journal, then
click on lines toopen the lines form, delete the lines and then delete
theheader. Simple modification (just change the delete action from
cascade to restricted)











regards











harry












Pritam
[EMAIL PROTECTED] wrote:






= Checkbox automatic addition on
inventory parmaeters is checked.
= Item or warehouse is not marked for
quarantine.
= There is no customization done.

I think this is the bug as Herry and Gokhan have
mentioned.

When users make on Production Order with qty 70 it
creates one 
Inventory Transaction line.

When users post one RAF journal with qty 5 it
splits 70 into 65 and 
5. The status of 70 is Ordered and status of 5 is
received.

When users create one more RAF journal with qty 9
it splits 65 into 
56 and 9. The status of 56 is Ordered and has no
Inventory 
reference, status of line with qty 9 is also
Ordered but Inventory 
Reference is filled as Report as finished
Journal.

In my case I think when user has deleted un-posted
RAF journal child 
reference has not got removed.

I have checked the code of RAF update. While
picking up transaction 
lines Axapta picks up lines having no reference.
Hence quantity do 
not balance and throws error.

Please suggest any solution to stop this ? Or
suggest if above 
conclusion is wrong. 

I am using Axapta 3.0 with service pack 3.0

Thanks in advance

Pritam Karkhanis


--- In Axapta-Knowledge-Village@yahoogroups.com,
Harry 
\(Harshawardhan Deshpande
[EMAIL PROTECTED] wrote:
 hi
 
 1. The problem with the deletion of RAF
journal..
 Did you delete the
RAF that has been posted ? If yes, then 
Axapta will keep the child references. If you are
deleting RAF that 
has not been posted then Axapta should remove the
child references 
(in reality it sometimes does not, this is a bug
in standard axapta).
 
 2. Splitting of the inventtrans. Do you have
any transactions that 
are registered etc? is the checkbox
automatic addition on 
inventory parameters checked?
 
 3. second line of 65 where you do not have
any reference number is 
serious. Have you done any modifications?
 
 4. I am stumped as to why you should get an
error while posting a 
quantity of zero? Can you reproduce this in
standard system? May be 
the problem will go away when you fix the above
problem (number 3)
 
 regards
 
 harry
 
 Gokhan Can [EMAIL PROTECTED] wrote:
 v\:* {behavior:url(#default#VML);}o\:*
{behavior:url
(#default#VML);}w\:*
{behavior:url(#default#VML);}.shape 
{behavior:url(#default#VML);}
 We faced the same kind of error a lot of
times.
 
 When you create a RAF journal and delete it
or we could not find 
actually after which action ; Axapta split
inventtrans in to 2 lines 
and 
 
 Keep RAF referance on Inventtrans (
TransChildRefID and 
TransChildRefType ) and this is dangling
referance.When you delete 
that 
 
 Referance from inventtrans probably the
problem will be fixed but 
I am asking the same question does anybody know
what is the real 
action
 
 Cause this error bucause we opened and
indicent but could not tell 
the real reason so we could not fix the bug.
 
 
 
 
 
 Gokhan
 
 
 
 -
 
 
 From: Axapta-Knowledge-Village@yahoogroups.com
[mailto:Axapta-
[EMAIL PROTECTED] On Behalf Of
Pritam
 Sent: Monday, September 26, 2005 2:11 PM
 To: Axapta-Knowledge-Village@yahoogroups.com
 Subject: [Axapta-Knowledge-Village] Not able
to do RAF
 
 
 
 
 Dear gurus
 
 I am facing below problem in Axapta.
 I have a Production Order of quantity 70.
 It has one RAF journal with good quantity 5.
 
 So when I check Inventory-Transaction I think
it should show 2 
 lines as follows..
 
 (1) Ordered = 65
 (2) Raf = 5
 
 But in my case it shows 3 lines
 
 (1) Ordered = 9
 (2) Ordered = 56
 (2) Raf = 5
 
 For the first Line which is having quantity
9, Inventory 

[Axapta-Knowledge-Village] Productiom planning problem

2005-09-27 Thread Axa Cons
Hi all,

I need your help about planning.

We have defined for all products routes attached a
workcenter(WC)/workcenter group (WCG) and a task group
including alternative WC/WCGs. 

But as we prefer orders to be produced parallel we
want Axapta always to use alternative WC/WCG in task
groups together.

Is there a solution for this.

Best Regards



__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


 Yahoo! Groups Sponsor ~-- 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/kGEolB/TM
~- 

Sharing the knowledge on Axapta. 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [Axapta-Knowledge-Village] Productiom planning problem

2005-09-27 Thread Harry \(Harshawardhan Deshpande



hi

if you have a task group and a work center group on a route. Axapta will always select machines in the task group. Is this not happening on your system?

regards

harry
Axa Cons [EMAIL PROTECTED] wrote:
Hi all,I need your help about planning.We have defined for all products routes attached aworkcenter(WC)/workcenter group (WCG) and a task groupincluding alternative WC/WCGs. But as we prefer orders to be produced parallel wewant Axapta always to use alternative WC/WCG in taskgroups together.Is there a solution for this.Best Regards  __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
		Yahoo! for Good 
Click here to donate to the Hurricane Katrina relief effort. 






Sharing the knowledge on Axapta.








  
  
SPONSORED LINKS
  
  
  

Business finance course
  
  
Business to business finance
  
  
Small business finance
  
  


Business finance consultant
  
  
Business finance magazine
  
  
Business finance uk
  
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

2005-09-27 Thread Brandon George





Hello All!

I am writing custom Intercompany code. The "Out 
of the Box" Axapta Intercompany code works nothing like my company wants it too. 
Not to get to much into detail here, but that is that. So I have wrote a class, 
and created two tables that will handle the Intercompany Sales Order process. 


Anyway there is a piece of code in the SalesFormLetter, 
the insertJournal() method. This method, to me, is setup 
strange:

ttsbegin; 
numberSeq = 
this.allocateNumAndVoucher(); [number, 
voucher] = this.getNumAndVoucher();

 if 
(this.updateNow()) {

 
this.postUpdate();

 
TransactionLog::create(this.transactionLogType(),this.transactionLogTxt()); 
ttscommit; } 
else
 throw 
error

What is strange to me is why the ttsbegin: and 
ttscommit are not on the same "level" or scope? I have seen this cause issues, 
and cause an unbalanaced TTSbegin / TTSCommit error, which makes the user have 
to close out and start a new session. 

This happens of course when the Else is fired because 
the updateNow() returns false. Reason of course is the ttscommit is never 
reached, I believe. I was wondering if anyone has ever had any experince with 
this method, and why this method must execute like it does?

thanks,
Brandon






Sharing the knowledge on Axapta.





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [Axapta-Knowledge-Village] Productiom planning problem

2005-09-27 Thread Axa Cons
No, the situation is so :

Lets assume that all capacities are free and you have
enough time to produce the order on an unique WC till
the delivery date. So Axapta uses always the same
primary WC.
But we want to use paralel production although there
is  enough capacity for the primary WC/WCG.



--- Harry (Harshawardhan Deshpande
[EMAIL PROTECTED] wrote:

 hi
  
 if you have a task group and a work center group on
 a route. Axapta will always select machines in the
 task group. Is this not happening on your system?
  
 regards
  
 harry
 
 
 Axa Cons [EMAIL PROTECTED] wrote:
 Hi all,
 
 I need your help about planning.
 
 We have defined for all products routes attached a
 workcenter(WC)/workcenter group (WCG) and a task
 group
 including alternative WC/WCGs. 
 
 But as we prefer orders to be produced parallel we
 want Axapta always to use alternative WC/WCG in task
 groups together.
 
 Is there a solution for this.
 
 Best Regards
 
 
 
 __ 
 Yahoo! Mail - PC Magazine Editors' Choice 2005 
 http://mail.yahoo.com
 
 
 Sharing the knowledge on Axapta. 
 
 
 
 SPONSORED LINKS 
 Business finance course Business to business finance
 Small business finance Business finance consultant
 Business finance magazine Business finance uk 
 
 -
 YAHOO! GROUPS LINKS 
 
 
 Visit your group Axapta-Knowledge-Village on
 the web.
   
 To unsubscribe from this group, send an email
 to:
 
 [EMAIL PROTECTED]
   
 Your use of Yahoo! Groups is subject to the
 Yahoo! Terms of Service. 
 
 
 -
 
 
 
   
 -
 Yahoo! for Good
  Click here to donate to the Hurricane Katrina
 relief effort. 




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


 Yahoo! Groups Sponsor ~-- 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/kGEolB/TM
~- 

Sharing the knowledge on Axapta. 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

2005-09-27 Thread Brandon George





Ok,

So here is what I did...

protected void 
insertJournal(){;

 ttsbegin; 
numberSeq = 
this.allocateNumAndVoucher(); [number, 
voucher] = this.getNumAndVoucher();

 if 
(this.updateNow()) {

 
this.postUpdate();

 
TransactionLog::create(this.transactionLogType(),this.transactionLogTxt()); 
ttscommit; } 
else { throw 
error(strFmt("@SYS21533"));ttscommit; }

}

Added another 
ttscommit in the else{} block. I believe this is a bug, and maybe a lot of 
people have not entered into causing the updateNow() to return false based on 
conditions. That's why I am writing. If this is a bug, I will report it, and 
post the fix on the web! Either way, I just confirmed this works 
well.

-Brandon



From: Axapta-Knowledge-Village@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Brandon 
GeorgeSent: Tuesday, September 27, 2005 9:12 AMTo: 
Axapta-Knowledge-Village@yahoogroups.comSubject: 
[Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

Hello All!

I am writing custom Intercompany code. The "Out 
of the Box" Axapta Intercompany code works nothing like my company wants it too. 
Not to get to much into detail here, but that is that. So I have wrote a class, 
and created two tables that will handle the Intercompany Sales Order process. 


Anyway there is a piece of code in the SalesFormLetter, 
the insertJournal() method. This method, to me, is setup 
strange:

ttsbegin; 
numberSeq = 
this.allocateNumAndVoucher(); [number, 
voucher] = this.getNumAndVoucher();

 if 
(this.updateNow()) {

 
this.postUpdate();

 
TransactionLog::create(this.transactionLogType(),this.transactionLogTxt()); 
ttscommit; } 
else
 throw 
error

What is strange to me is why the ttsbegin: and 
ttscommit are not on the same "level" or scope? I have seen this cause issues, 
and cause an unbalanaced TTSbegin / TTSCommit error, which makes the user have 
to close out and start a new session. 

This happens of course when the Else is fired because 
the updateNow() returns false. Reason of course is the ttscommit is never 
reached, I believe. I was wondering if anyone has ever had any experince with 
this method, and why this method must execute like it does?

thanks,
Brandon






Sharing the knowledge on Axapta.








  
  
SPONSORED LINKS
  
  
  

Business finance course
  
  
Business to business finance
  
  
Small business finance
  
  


Business finance consultant
  
  
Business finance magazine
  
  
Business finance uk
  
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

2005-09-27 Thread Amit Jain



why dont you try try catch block and handle ttsbegin and ttscommit accordinglySøren Ager [EMAIL PROTECTED] wrote:
Den 27. september 2005 15:26 skrev Brandon George: protected void insertJournal() {; ttsbegin; numberSeq = this.allocateNumAndVoucher(); [number, voucher] = this.getNumAndVoucher();  if (this.updateNow()) { this.postUpdate(); TransactionLog::create(this.transactionLogType(),this.transactionLogTxt()); ttscommit;  }  else  {
  throw error(strFmt("@SYS21533"));  ttscommit;  }   }  Added another ttscommit in the else{} block. I believe this is a bug,From the Developers guide:Notice that when an exception is thrown inside a transaction, the transaction is automatically aborted. This applies both for exceptions thrown manually and for exceptions thrown by the system.According to that you should not get tts problems. The "right" code would be to have the commit after the else block (on the same level as the begin)Hilsen Søren
		Yahoo! for Good 
Click here to donate to the Hurricane Katrina relief effort. 






Sharing the knowledge on Axapta.





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

2005-09-27 Thread Subrahmanyam, Mamidi



Hello Brandon,
I believe this should solve it..You can browse similar code on AOT\classedd..
 

 ttsbegin; numberSeq = this.allocateNumAndVoucher(); [number, voucher] = this.getNumAndVoucher();


 if (this.updateNow()) {

 this.postUpdate();

 TransactionLog::create(this.transactionLogType(),this.transactionLogTxt()); ttscommit; } else
{
 throw error
  ttsabort; // Subbu
}
Brandon George [EMAIL PROTECTED] wrote:


Hello All!

I am writing custom Intercompany code. The "Out of the Box" Axapta Intercompany code works nothing like my company wants it too. Not to get to much into detail here, but that is that. So I have wrote a class, and created two tables that will handle the Intercompany Sales Order process. 

Anyway there is a piece of code in the SalesFormLetter, the insertJournal() method. This method, to me, is setup strange:

ttsbegin; numberSeq = this.allocateNumAndVoucher(); [number, voucher] = this.getNumAndVoucher();

 if (this.updateNow()) {

 this.postUpdate();

 TransactionLog::create(this.transactionLogType(),this.transactionLogTxt()); ttscommit; } else
 throw error

What is strange to me is why the ttsbegin: and ttscommit are not on the same "level" or scope? I have seen this cause issues, and cause an unbalanaced TTSbegin / TTSCommit error, which makes the user have to close out and start a new session. 

This happens of course when the Else is fired because the updateNow() returns false. Reason of course is the ttscommit is never reached, I believe. I was wondering if anyone has ever had any experince with this method, and why this method must execute like it does?

thanks,
Brandon

		Yahoo! for Good 
Click here to donate to the Hurricane Katrina relief effort. 






Sharing the knowledge on Axapta.





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

2005-09-27 Thread Brandon George





Sabbu,

I believe you are right... that is the best 
approach...



From: Axapta-Knowledge-Village@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of 
Subrahmanyam, MamidiSent: Tuesday, September 27, 2005 11:31 
AMTo: Axapta-Knowledge-Village@yahoogroups.comSubject: Re: 
[Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

Hello Brandon,
I believe this should solve it..You can browse similar code on 
AOT\classedd..
 

 
ttsbegin; 
numberSeq = 
this.allocateNumAndVoucher(); [number, 
voucher] = this.getNumAndVoucher();


 if 
(this.updateNow()) {

 
this.postUpdate();

 
TransactionLog::create(this.transactionLogType(),this.transactionLogTxt()); 
ttscommit; } 
else
{
 throw 
error
  ttsabort; // Subbu
}
Brandon George [EMAIL PROTECTED] 
wrote:

  
  Hello All!
  
  I am writing custom Intercompany code. The "Out 
  of the Box" Axapta Intercompany code works nothing like my company wants it 
  too. Not to get to much into detail here, but that is that. So I have wrote a 
  class, and created two tables that will handle the Intercompany Sales Order 
  process. 
  
  Anyway there is a piece of code in the 
  SalesFormLetter, the insertJournal() method. This method, to me, is setup 
  strange:
  
  ttsbegin; 
  numberSeq = 
  this.allocateNumAndVoucher(); [number, 
  voucher] = this.getNumAndVoucher();
  
   if 
  (this.updateNow()) {
  
   
  this.postUpdate();
  
   
  TransactionLog::create(this.transactionLogType(),this.transactionLogTxt()); 
  ttscommit; } 
  else
   throw 
  error
  
  What is strange to me is why the ttsbegin: and 
  ttscommit are not on the same "level" or scope? I have seen this cause issues, 
  and cause an unbalanaced TTSbegin / TTSCommit error, which makes the user have 
  to close out and start a new session. 
  
  This happens of course when the Else is fired because 
  the updateNow() returns false. Reason of course is the ttscommit is never 
  reached, I believe. I was wondering if anyone has ever had any experince with 
  this method, and why this method must execute like it 
does?
  
  thanks,
  Brandon
  


Yahoo! for GoodClick here 
to donate to the Hurricane Katrina relief effort. 





Sharing the knowledge on Axapta.








  
  
SPONSORED LINKS
  
  
  

Business finance course
  
  
Business to business finance
  
  
Small business finance
  
  


Business finance consultant
  
  
Business finance magazine
  
  
Business finance uk
  
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









SV: [Axapta-Knowledge-Village] Axapta X++ Newbie

2005-09-27 Thread Steen Andreasen



Hi Nazrvl,

I am writing a book on Axapta X++ and Morphx. End this week, one of the chapters from the book will be available for download at my website at:

http://www.steenandreasen.com/axaptabook.asp
Regards,
Steen
Moch Nasrullah [EMAIL PROTECTED] skrev:
Hi all,I'm a newbie in Axapta/X++, I start using Axapta/X++ about 2 weeks agon never hear it or even use it before [^_^]my background is java, I use it since 2000 (til 2 weeks ago).So, the question is ... can some one give me guidance or trail for meto help me learn Axapta/X++? maybe some books/ebooks, url, orsomething usefulis the question ever asked and answered before ?thanks.regards,Nazrvl--T I M E





Sharing the knowledge on Axapta.








  
  
SPONSORED LINKS
  
  
  

Business finance course
  
  
Business to business finance
  
  
Small business finance
  
  


Business finance consultant
  
  
Business finance magazine
  
  
Business finance uk
  
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

2005-09-27 Thread John Lindsay










The ttsabort will not execute after the
throw error. But after a through reading of the Axapta Transaction
documentation, you will discover the true intent of the original code.




 This is
 a nested ttsbegin.
 The insertJournal method starts with a ttsbegin
 this.allocateNumAndVoucher contains a ttsbegin
 this.getNumAndVoucher contains a ttsbegin
 this.updateNow could have a ttsbegin (method overrides FormLetter method)
 this.PostUpdate has a ttsbegin
 
 
 Nothing
 is committed until the final ttscommit
 
 
 The
 throw statement automatically aborts the current transaction.




 ttsbegin;

numberSeq =
this.allocateNumAndVoucher();
 [number, voucher] = this.getNumAndVoucher();



 if (this.updateNow())
 {




this.postUpdate();




TransactionLog::create(this.transactionLogType(),this.transactionLogTxt());
 ttscommit;
 }
 else

{


throw error

  ttsabort;

}



Transactions
from the Axapta
Developers Guide

A
transaction is a logical unit of work. Transactions - all or nothing operations
- ensure data integrity.

Consider
the example where you want to update all prices in the system. If the system
broke down or was aborted in the middle of the operation, some records would
have been updated and others not. Performing the update inside a transaction
guarantees that either everything is completed or nothing is done at all.

Another
aspect of transactions is the capacity to lock records (or tables). If, for
instance, someone is updating prices and another is using the prices at the
same time, the result will be unknown (is it the price before or after the
update?). Transactions ensure that, depending on the concrete alterations of the
records, users get consistent data from the database (that is either all or no
prices are altered). An even more difficult to manage example is the
lost update:




 
  
  Time
  
  
  Task
  A
  
  
  Task
  B
  
 
 
  
  1.
  
  
  -
  
  
  -
  
 
 
  
  2.
  
  
  FETCH Record
  
  
  -
  
 
 
  
  3.
  
  
  -
  
  
  FETCH Record
  
 
 
  
  4.
  
  
  UPDATE Record
  
  
  -
  
 
 
  
  5.
  
  
  -
  
  
  UPDATE Record
  
 


 

In this
example, task A reads a record, performs some changes and updates the record.
Meanwhile task B reads the (original) record and performs some changes and
updates the record afterwards. The update in task A at time 4 is lost. The
solution is to lock the records (or tables) during update transactions (insert,
update, and delete). This can be done by using the select forupdate
statement.

ttsbegin

To mark the
beginning of a transaction, you use the ttsbegin statement. This
ensures data integrity and guarantees that all updates performed until the
transaction ends (by ttscommit
or ttsabort)
are consistent (all or none).

TransactionBegin
= ttsbegin ;

Starting a
transaction is not meaningful if it is not ended, which is done by ttscommit
or ttsabort.
Therefore, there is only one coherent example illustrating those three
commands. This example can be found below ttsabort.

ttscommit

To mark
the successful end of a transaction, you use the ttscommit
statement. This ends and commits a transaction. MorphX guarantees that a
committed transaction will be performed according to intentions.

TransactionCommit
= ttscommit ;

Transaction
blocks may be nested

Statements
between ttsbegin
and ttscommit
may include one or more transaction blocks, like the example below.

ttsbegin;

// some statements

ttsbegin;

//statements

ttscommit;

ttscommit;

In such
cases you should note that nothing is actually committed until the successful
exit from the final ttscommit.

ttsabort

The ttsabort
command allows you to explicitly discard all changes in the current
transaction. This results in the database being rolled back to the initial
state: Nothing will have been changed.

TransactionAbort
= ttsabort ;

Typically
you will use this if you have detected that the user want to break the current
job. Using ttsabort makes sure that the database is
consistent.

Note

Most often the best
solution is to use exception handling instead of ttsabort.
The throw
statement automatically aborts the current transaction. 











From: Axapta-Knowledge-Village@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Brandon George
Sent: Tuesday, September 27, 2005
9:37 AM
To:
Axapta-Knowledge-Village@yahoogroups.com
Subject: RE:
[Axapta-Knowledge-Village] SalesFormLetter.insertJournal()





Sabbu,



I believe you are right... that is
the best approach...











From:
Axapta-Knowledge-Village@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Subrahmanyam, Mamidi
Sent: Tuesday, September 27, 2005
11:31 AM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: Re:
[Axapta-Knowledge-Village] SalesFormLetter.insertJournal()



Hello Brandon,





I believe this should solve it..You can browse similar code on
AOT\classedd..





 











 ttsbegin;

numberSeq =
this.allocateNumAndVoucher();
 [number, 

RE: [Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

2005-09-27 Thread Subrahmanyam, Mamidi



Hi John,

Thank you for the nice email. But, can you tell me why there is an inbalance between ttsbegin and ttscommit levels?

I understand its a nested tts . ttsabort which I put will accout for immediate ttscommit. I guess it will not account for other ttsbegin nesteded loops.

May be , I need to do more invenstigation.
thanks,
subbuJohn Lindsay [EMAIL PROTECTED] wrote:









The ttsabort will not execute after the throw error. But after a through reading of the Axapta Transaction documentation, you will discover the true intent of the original code.


This is a nested ttsbegin.The insertJournal method starts with a ttsbeginthis.allocateNumAndVoucher contains a ttsbeginthis.getNumAndVoucher contains a ttsbeginthis.updateNow could have a ttsbegin (method overrides FormLetter method)this.PostUpdate has a ttsbegin
Nothing is committed until the final ttscommit
The throw statement automatically aborts the current transaction.

 ttsbegin; numberSeq = this.allocateNumAndVoucher(); [number, voucher] = this.getNumAndVoucher();

 if (this.updateNow()) {

 this.postUpdate();

 TransactionLog::create(this.transactionLogType(),this.transactionLogTxt()); ttscommit; } else
{
 throw error
  ttsabort;
}

Transactionsfrom the Axapta Developers Guide
A transaction is a logical unit of work. Transactions - all or nothing operations - ensure data integrity.
Consider the example where you want to update all prices in the system. If the system broke down or was aborted in the middle of the operation, some records would have been updated and others not. Performing the update inside a transaction guarantees that either everything is completed or nothing is done at all.
Another aspect of transactions is the capacity to lock records (or tables). If, for instance, someone is updating prices and another is using the prices at the same time, the result will be unknown (is it the price before or after the update?). Transactions ensure that, depending on the concrete alterations of the records, users get consistent data from the database (that is either all or no prices are altered). An even more difficult to manage example is the “lost update”:





Time

Task A

Task B


1.

-

-


2.

FETCH Record

-


3.

-

FETCH Record


4.

UPDATE Record

-


5.

-

UPDATE Record
 
In this example, task A reads a record, performs some changes and updates the record. Meanwhile task B reads the (original) record and performs some changes and updates the record afterwards. The update in task A at time 4 is lost. The solution is to lock the records (or tables) during update transactions (insert, update, and delete). This can be done by using the select forupdate statement.
ttsbegin
To mark the beginning of a transaction, you use the ttsbegin statement. This ensures data integrity and guarantees that all updates performed until the transaction ends (by ttscommit or ttsabort) are consistent (all or none).
TransactionBegin = ttsbegin ;
Starting a transaction is not meaningful if it is not ended, which is done by ttscommit or ttsabort. Therefore, there is only one coherent example illustrating those three commands. This example can be found below ttsabort.
ttscommit
To mark the successful end of a transaction, you use the ttscommit statement. This ends and commits a transaction. MorphX guarantees that a committed transaction will be performed according to intentions.
TransactionCommit = ttscommit ;
Transaction blocks may be nested
Statements between ttsbegin and ttscommit may include one or more transaction blocks, like the example below.
ttsbegin;
// some statements
ttsbegin;
//statements
ttscommit;
ttscommit;
In such cases you should note that nothing is actually committed until the successful exit from the final ttscommit.
ttsabort
The ttsabort command allows you to explicitly discard all changes in the current transaction. This results in the database being rolled back to the initial state: Nothing will have been changed.
TransactionAbort = ttsabort ;
Typically you will use this if you have detected that the user want to break the current job. Using ttsabort makes sure that the database is consistent.
Note
Most often the best solution is to use exception handling instead of ttsabort. The throw statement automatically aborts the current transaction. 





From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brandon GeorgeSent: Tuesday, September 27, 2005 9:37 AMTo: Axapta-Knowledge-Village@yahoogroups.comSubject: RE: [Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

Sabbu,

I believe you are right... that is the best approach...





From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Subrahmanyam, MamidiSent: Tuesday, September 27, 2005 11:31 AMTo: Axapta-Knowledge-Village@yahoogroups.comSubject: Re: [Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

Hello Brandon,

I believe this should solve it..You can browse similar code on AOT\classedd..

 



 

RE: [Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

2005-09-27 Thread Subrahmanyam, Mamidi



Hi John,

do you agree if I modify this way or do you see any problems?

 // ttsbegin; (comented out )
(I don;t know why MS wants to hit this ttscommit for every condition.)
 numberSeq = this.allocateNumAndVoucher(); [number, voucher] = this.getNumAndVoucher();


 if (this.updateNow()) {
 ttsbegin; // Subbu
 this.postUpdate();

 TransactionLog::create(this.transactionLogType(),this.transactionLogTxt()); ttscommit; } else
{
 throw error
}


any thoguhts?
John Lindsay [EMAIL PROTECTED] wrote:









The ttsabort will not execute after the throw error. But after a through reading of the Axapta Transaction documentation, you will discover the true intent of the original code.


This is a nested ttsbegin.The insertJournal method starts with a ttsbeginthis.allocateNumAndVoucher contains a ttsbeginthis.getNumAndVoucher contains a ttsbeginthis.updateNow could have a ttsbegin (method overrides FormLetter method)this.PostUpdate has a ttsbegin
Nothing is committed until the final ttscommit
The throw statement automatically aborts the current transaction.

 ttsbegin; numberSeq = this.allocateNumAndVoucher(); [number, voucher] = this.getNumAndVoucher();

 if (this.updateNow()) {

 this.postUpdate();

 TransactionLog::create(this.transactionLogType(),this.transactionLogTxt()); ttscommit; } else
{
 throw error
  ttsabort;
}

Transactionsfrom the Axapta Developers Guide
A transaction is a logical unit of work. Transactions - all or nothing operations - ensure data integrity.
Consider the example where you want to update all prices in the system. If the system broke down or was aborted in the middle of the operation, some records would have been updated and others not. Performing the update inside a transaction guarantees that either everything is completed or nothing is done at all.
Another aspect of transactions is the capacity to lock records (or tables). If, for instance, someone is updating prices and another is using the prices at the same time, the result will be unknown (is it the price before or after the update?). Transactions ensure that, depending on the concrete alterations of the records, users get consistent data from the database (that is either all or no prices are altered). An even more difficult to manage example is the “lost update”:





Time

Task A

Task B


1.

-

-


2.

FETCH Record

-


3.

-

FETCH Record


4.

UPDATE Record

-


5.

-

UPDATE Record
 
In this example, task A reads a record, performs some changes and updates the record. Meanwhile task B reads the (original) record and performs some changes and updates the record afterwards. The update in task A at time 4 is lost. The solution is to lock the records (or tables) during update transactions (insert, update, and delete). This can be done by using the select forupdate statement.
ttsbegin
To mark the beginning of a transaction, you use the ttsbegin statement. This ensures data integrity and guarantees that all updates performed until the transaction ends (by ttscommit or ttsabort) are consistent (all or none).
TransactionBegin = ttsbegin ;
Starting a transaction is not meaningful if it is not ended, which is done by ttscommit or ttsabort. Therefore, there is only one coherent example illustrating those three commands. This example can be found below ttsabort.
ttscommit
To mark the successful end of a transaction, you use the ttscommit statement. This ends and commits a transaction. MorphX guarantees that a committed transaction will be performed according to intentions.
TransactionCommit = ttscommit ;
Transaction blocks may be nested
Statements between ttsbegin and ttscommit may include one or more transaction blocks, like the example below.
ttsbegin;
// some statements
ttsbegin;
//statements
ttscommit;
ttscommit;
In such cases you should note that nothing is actually committed until the successful exit from the final ttscommit.
ttsabort
The ttsabort command allows you to explicitly discard all changes in the current transaction. This results in the database being rolled back to the initial state: Nothing will have been changed.
TransactionAbort = ttsabort ;
Typically you will use this if you have detected that the user want to break the current job. Using ttsabort makes sure that the database is consistent.
Note
Most often the best solution is to use exception handling instead of ttsabort. The throw statement automatically aborts the current transaction. 





From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brandon GeorgeSent: Tuesday, September 27, 2005 9:37 AMTo: Axapta-Knowledge-Village@yahoogroups.comSubject: RE: [Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

Sabbu,

I believe you are right... that is the best approach...





From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Subrahmanyam, MamidiSent: Tuesday, September 27, 2005 11:31 AMTo: Axapta-Knowledge-Village@yahoogroups.comSubject: Re: [Axapta-Knowledge-Village] 

RE: [Axapta-Knowledge-Village] SalesFormLetter.insertJournal()

2005-09-27 Thread Sonny Wibawa Adi
Hi, Subbu  Brandon,


I think the code in SalesFormLetter.insertJournal() is
correct. There is nothing wrong with the code. No
matter the level or depth difference between ttsbegin
and ttscommit location, Axapta will simply count the
level mannually. If the total of begin transaction and
total of commit transaction reach zero, then Axapta
will COMMIT TRANSACTION if it is ttscommit and BEGIN
TRANSACTION if it is ttsbegin.

This is the sample code for that:
static void SWATestTTS(Args _args)
{
SalesTable  a;
xApplication xApplication = new xApplication();

void test2()
{
ttsbegin;
//Class2::method1();
//ttscommit;ttscommit;

throw error(x);
}

void test()
{
ttsbegin;

test2();
}
;

info(strFmt(%1, xApplication.ttsLevel())); //
should be 0
ttsbegin;
select firstonly forupdate a;
info(strFmt(%1 - %2,a.SalesId,a.DeliveryDate));
a.DeliveryDate  = today();
a.update();
test();
}
//Class2::
static void method1()
{
ttscommit;
}

Above code in a job will not affect salesTable. But,
if you remove the comments in test2 local method, then
Axapta will commit the transaction, hence salesTable
will be modified.

Axapta will detect an unbalanced transaction log when
running multiple processes, usually in a form.

Basically, for a better readable code, count the
transaction counter in one method for all conditions
and the counter should be 0 when calling the method
has finished. (+1 when ttsbegin and -1 when ttscommit,
throw will count it into zero).

protected void  insertJournal()
{;
ttsbegin; //counter = 0 + 1 = 1

numberSeq   =
this.allocateNumAndVoucher();
   [number, voucher]= this.getNumAndVoucher();

if (this.updateNow())
{ //condition 1
this.postUpdate();

   
TransactionLog::create(this.transactionLogType(),this.transactionLogTxt());
ttscommit; //counter = 1 - 1 = 0
}
else //condition 2
throw error(strFmt(@SYS21533)); // counter =
0
}

You see for condition 1 and condition 2 will have
counter equal to 0. So, there is no problem with this
method. If there is anything wrong, then it's because
of the caller codes or the sub methods.

ttsbegin was placed above numberSeq, because a
continuous number sequence needs transaction handling
(see NumberSeq class, checkSetUpNum method).


So, in my opinion, noo need to change the method.

--- Subrahmanyam, Mamidi [EMAIL PROTECTED] wrote:

 Hi John,
  
 do you agree if I modify this way or do you see any
 problems?
 
 // ttsbegin;  (comented out )
  (I don;t know why MS wants to hit this ttscommit
 for every condition.)
 
   numberSeq   =
 this.allocateNumAndVoucher();
[number, voucher]= this.getNumAndVoucher();
  
 if (this.updateNow())
 {
   ttsbegin; // Subbu
 
 this.postUpdate();
  


TransactionLog::create(this.transactionLogType(),this.transactionLogTxt());
 ttscommit;
 }
 else
 {
 throw error
 
   }
 
 
  
 
  
 
  any thoguhts?
 
 
 John Lindsay [EMAIL PROTECTED] wrote:
 v\:* {behavior:url(#default#VML);}o\:*
 {behavior:url(#default#VML);}w\:*
 {behavior:url(#default#VML);}.shape

{behavior:url(#default#VML);}st1\:*{behavior:url(#default#ieooui)
 }
 The ttsabort will not execute after the throw error.
 But after a through reading of the Axapta
 Transaction documentation, you will discover the
 true intent of the original code.
 
  
 
This is a nested ttsbegin.
 The insertJournal method starts with a ttsbegin
 this.allocateNumAndVoucher contains a ttsbegin
 this.getNumAndVoucher contains a ttsbegin
 this.updateNow could have a ttsbegin (method
 overrides FormLetter method)
 this.PostUpdate has a ttsbegin
 
 
Nothing is committed until the final ttscommit
 
 
The throw statement automatically aborts the
 current transaction.
 
  
 
 ttsbegin;
 numberSeq   =
 this.allocateNumAndVoucher();
[number, voucher]= this.getNumAndVoucher();
 
  
 
 if (this.updateNow())
 {
 
  
 
 this.postUpdate();
 
  
 


TransactionLog::create(this.transactionLogType(),this.transactionLogTxt());
 ttscommit;
 }
 else
 
 {
 
 throw error
 
ttsabort;
 
 }
 
  
 Transactions
 from the Axapta Developers Guide
 A transaction is a logical unit of work.
 Transactions - all or nothing operations - ensure
 data integrity.
 
 Consider the example where you want to update all
 prices in the system. If the system broke down or
 was aborted in the middle of the operation, some
 records would have been updated and others not.
 Performing the update inside a transaction
 guarantees that either everything is completed or
 nothing is done at all.
 
 Another aspect of transactions is the capacity to
 lock records (or tables). If, for instance, someone
 is updating prices and another is using the prices
 at the same time, the result will be unknown (is it
 

[Axapta-Knowledge-Village] DataStatus on inventtrans

2005-09-27 Thread James Flavell
Title: Message





Hi can 
somebody tell me the field 'DateStatus' on inventtrans is set at what 
points?

I am 
just trying to improve performance on inventtrans searchs and can see the index 
'StatusItemIdx' is useful to me. Basically I want to find all the 
inventtrans cost for sales invoices for a period of time and hence why any index 
that has a date in it would be very useful.

My 
thinking is if date financial exists on inventtrans can I assume date status 
will ALWAYS be the same date as financial for that particular inventtrans 
record? And therfore replace in my select using datefinancialwith 
datastatus...

Part 
of my select originally would be (basically the std selectto calc cost for 
an custinvoicetrans but with date range added):

 
 inventTrans.dateFinancial = 
_runStart 
 inventTrans.dateFinancial = 
_runEnd 
 
inventTrans.ItemId 
== 'ABC'
 
 
inventTrans.qty 
!= 
0 
 inventTrans.packingSlipReturned == 
0 
 
inventTrans.statusReceipt = 
StatusReceipt::Purchased 
 
inventTrans.statusIssue 
= StatusIssue::Sold 
 _invoiceTrans.InventTransId != 
""
but I 
am wondering can I change it to:


 
 inventTrans.dateStatus = 
_runStart 
 inventTrans.dateStatus  = 
_runEnd 
 
inventTrans.ItemId 
== 'ABC'
 
 
inventTrans.qty 
!= 
0 
 inventTrans.packingSlipReturned == 
0 
 
inventTrans.statusReceipt = 
StatusReceipt::Purchased 
 
inventTrans.statusIssue 
= StatusIssue::Sold 
 _invoiceTrans.InventTransId != 
""
and be 
sure of always getting the same result (i.e. once data finanical then the 
inventtrans datastatus will not change)?

Also I 
am just wondering the order of my where clause statements is important or 
not? I know in XAL previously that supposedly it was best to put them in 
the same order as the fields used in the index but not sure if any such 
'feature' is still present in Axapta

If I 
can use dateStatus would you recommend I use this StatusItemIdx as an index 
hint? I am just wondering since ItemId is not the first component then to 
me the search will have to go through ALL inventtrans that are sold or 
purchased. If I use an index with itemid as the first component then the 
search will immediately be narrowed down to the item


Thanks
James






Sharing the knowledge on Axapta.








  
  
SPONSORED LINKS
  
  
  

Business finance course
  
  
Business to business finance
  
  
Small business finance
  
  


Business finance consultant
  
  
Business finance magazine
  
  
Business finance uk
  
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[Axapta-Knowledge-Village] To add or not to add an index?

2005-09-27 Thread James Flavell
Hi 

I have an import script that is inserting/updating info to an Axapta temp
table that has about 7 fields in it.

In my import script I need to go into this temp table to check if a record
already exists based on three of the fields that are being imported (i.e.
checking what I am importing whetehr it has been imported before etc).

I am wondering is it worth while to put a unqiue index on this table for
these 3 fields or not?

I am expecting maybe to have 50,000 records in this temp table every time I
run the import script and will need to search it maybe 500,000 times during
the import

If there is no index will SQL do some 'optimization' so the performance
difference is minimal? (I mean the number of fields on the table is not that
many more than the index and I am wondering given the small size of the
record SQL will cache or keep all the records in memory - although since it
is a TMP table I am not sure will any of this be stored in the SQL or on the
client - should I cahnge from TMP to normal table???)

Appreaciate some advice so as to speed up this import
Thanks
James



 Yahoo! Groups Sponsor ~-- 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/kGEolB/TM
~- 

Sharing the knowledge on Axapta. 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/