Better way to create item journal entries

slmaluwaslmaluwa Member Posts: 366
Hi
I have to create around 500,000 lines of Item Journal Entries through code using a process only report.

My current plan is to have a separate function inside the report to open the journal line table, write the singly entry with calling EVALUATE, INSERT and then close it. This function could be called from OnAfterGetRecord of the report.

Or, I can open the line table in PreDateItem and write the lines directly inside OnAfterGetRecord. In this way, i feel that the table will be locked for a long time. Is my opinion is correct? or, is there a better way to do this?

(The data is already exists in a customer table in the same database).
"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    slmaluwa wrote:
    Hi
    I have to create around 500,000 lines of Item Journal Entries through code using a process only report. ...

    Why?
    David Singleton
  • rhpntrhpnt Member Posts: 688
    Good one David!
    slmaluwa wrote:
    I have to create around 500,000 lines of Item Journal Entries through code using a process only report. (The data is already exists in a customer table in the same database).
    I think somebody just handed you a lemon...
  • slmaluwaslmaluwa Member Posts: 366
    rhpnt wrote:
    Good one David!
    slmaluwa wrote:
    I have to create around 500,000 lines of Item Journal Entries through code using a process only report. (The data is already exists in a customer table in the same database).
    I think somebody just handed you a lemon...

    Rotten lemon :lol:
    This was a special request for an Indian client. based on past 4 years transaction, they are passing positive/negative entries (dunno why). The previous person has create a table with all basic data like Item No, location, +/- and quantity.

    I already done this using the method i mention above. But, used a COMMIT after creating each entry and updating a boolean field in source table. So, the user can stop the process anytime and resume later.

    By the time I type this line, 50% of the work is done. Posting the actual line is going to be a nightmare for them and beyond my domain.
    "A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."
  • SogSog Member Posts: 1,023
    nevermind, didn't read it correctly
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • David_SingletonDavid_Singleton Member Posts: 5,479
    rhpnt wrote:
    Good one David!
    slmaluwa wrote:
    I have to create around 500,000 lines of Item Journal Entries through code using a process only report. (The data is already exists in a customer table in the same database).
    I think somebody just handed you a lemon...
    :lol:
    David Singleton
Sign In or Register to comment.