Dataport Export

viriatoviriato Member Posts: 105
I need to export data through a dataport, a Customer list, but I need to compare if the customer exist in a file(cvs) that I have. If it exists in the csv file that I have then the customer is exported. Which would be the ideal way to solve this problem.

Thank you in advance.

Comments

  • garakgarak Member Posts: 3,263
    you can read during the export the csv file or if it is easier for you, you import the csv before in a table (possible a temptable) and check if the customer exist in the temptable.

    Regards
    Do you make it right, it works too!
  • viriatoviriato Member Posts: 105
    Thanks Garak.

    Have a nice weekend.
  • viriatoviriato Member Posts: 105
    Just one last question.

    How would you implement the process of reading the file into a temporary table?

    Thanks.
  • garakgarak Member Posts: 3,263
    as temporary table you use a variable of type record with the property "temporary" of the variable.

    For your example you can use a temptable in your dataport self. To fill this temptable you must declare a table as variable and set then the property to temporary. Then before you export the datas you import the csv file in the temptable with using the systemvariable file. But i think that this is to "complex" for you. An other, easier, solution is:

    1. You must have the csv file and must know the structure
    2. you create you own table (like 50000 MyCSVImportTable)
    3. You create a dataport to import the csv file into your table MyCSVImportTable
    4. After the import you start your export dataport and check, before you export a rec, if the customer is in the "MyCSVImportTable".
    5. after ExportDataport is finished, you can, if you doesn't need the datas, the table MyCSVImportTable.

    Regards
    Do you make it right, it works too!
  • viriatoviriato Member Posts: 105
    Great thanks once again Garak.
  • viriatoviriato Member Posts: 105
    I was thinking of actually creating a dataport that imports the file in a temp table and from there try to the dataport that exports the data.
    I'm not sure if I can do this, I haven't tried it out.


    Thanks.
Sign In or Register to comment.