Copying records from a table into Subform

vios15vios15 Member Posts: 43
Dear Expert,

Recently, due to huge volume of records required, I need to import data into the Item Purchase order instead of manually data entry into the system.

So, I have created a temp table for user to dataport their csv file. The temp table will do the necessary cleaning of the data e.g. valid item numbers.

My steps are;

1.The user create a header in the Item Purchase order.
2. User will click the "copy button" that I intend to create in the Purchase Order. It will copy the temp table data into the the Purchase Order.

Now, my question, how can I copy those data into the correct Item Purchase Order? e.g. the Purchase Order Header is Order1234, so when the data copied must goes to Order1234 in subform.

Many Thanks.

Comments

  • matttraxmatttrax Member Posts: 2,309
    If you are not going to automatically create a header you will have to force the user to select the header they want to add to.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    As Mattrax says, some how you need to link your new table to the correct Purchase IOrder Header. What I normally do in these cases, is to add my code into report 492, find the "DocType" variable and add a new option at the end (something like Quote,Blanket Order,Order,Invoice,Return Order,Credit Memo,Posted Receipt,Posted Invoice,Posted Return Shipment,Posted Credit Memo,,,,,,,,Import). Add code to "lookup doc no." to choose the correct records to import using some document number.

    This makes it really simple and all the code you need to create the order is already written for you, so no work to do.

    Money for Jam \:D/
    David Singleton
  • suresh111suresh111 Member Posts: 32
    You can create two csv files one is for Header and another one is for line. and header will have the document type and No. and the line will have Document No. and line no. then u import first the header and next the lines

    suresh
  • raveendran.sraveendran.s Member Posts: 119
    You said header will be created by user manually.

    Lines has been imported in to some other table using dataport.

    now the lines has to be copied to Purchase Order Subform (Purchase Line table). Give them a provision select the lines in the Temp table. And then when they click ok, set the selections as a filter and copy them to Purchase Line. wile copying, Change the Document No & Type as same as your purchase Header's Document Type & No.

    Hope, this will work for you.
    --
    Regards,
    Raveendran.BS
  • vios15vios15 Member Posts: 43
    Dear All,

    Thanks for all the replies, your suggestion is getting closer to my expectation. I might go for the user input the PO number manually when copying data into the PO lines. They can copy the PO header Nos first, when time to copy they paste into the prompt.

    Of course might create some internal check for valid PO header nos before import and numbers of records = 0, in this way, user can only input into a empty PO to cover the risk of corrupting other PO.
Sign In or Register to comment.