Hi,
I am having a problem with a dataport. I would like to import invoice data from a different programme into table 81 "Gen. Journal Line". In addition I need to import data into table 356 "Journal Line Dimension" as the entries include values for one shortcut dimension. My problem is that the import-file has all the information in one line. How can I tell my dataport that the last field of each recordset belongs into table 356 instead of table 81?
If anybody has an idea I will be glad for any hint.
Best regards,
Jens
0
Comments
Define a global variable and fill it with the value of the last field in your recordset.
After that you can insert your value into the table using script
thanks so far. But I am still having a problem. I based my dataport on table 81. In the OnAfterImportRecord() trigger of "Gen. Journal Line" I put the following code where I refer to table 356:
But then I get the message that variable "Journal Line Dimension" is not defined. Any idea where/how I explain Navision that it should refer to another table? Thanks in advance.
Jens
You have to define a variable and assign the table to it e.g.
Name Datatype Subtype
JnlDim Record "Journal Line Dimension"
then place the following code
JnlDim.init;
JnlDim."Table ID":=81;
JnlDim."Dimension Value Code":=Variable;
........
........
........
JnlDim.insert;
Patrick
it works!!! Thank you very much!!!
Jens
Patrick