Hi navies,
I have created a dataport to import the lines from csv file.
But the Requierment is toalso cretate the header when a filter is selected on the dataport and then create the lines for the dataport.
Purchase header does not have any dataport fields only purchsae line has dataport fields
My dataport looks like this(wihout indentation)
Purchase Header
Purchase Line
I wrote the code on the Predataport
"Purchase Header"."Document Type":="Purchase Header"."Document Type"::Order;
NS.RESET;
IF NS.GET('INV-NUM',10000) THEN
LN:=INCSTR(NS."Last No. Used");
"Purchase Header"."No.":=LN;
"Purchase Header"."Buy-from Vendor No.":="Purchase Header".GETFILTER("Purchase Header"."Buy-from Vendor No.");
"Purchase Header".INSERT(TRUE);
when i run the code unit the dialog box appears but nothing is accomplished.....thaks for any help
Comments