How can I import a Sales Order (Sales Header, sales Lines) using dataport? For text file, there is no blank line between header and line.
looks like below
in your txt file there shold be a record identifier e.g.: lines that begin with 'H' are headers and lines that begin with 'L' are lines...
you will surely have to write some code in order to place the values in the right tables.
If I don't understood your problem...tell me if something's missing...
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso My Blog
The default value is "<<NewLine><NewLine>>", which is one blank line between dataitems. NAV puts the < and the > around default properties, so if you want to set a custom value, you need to remove the outer < and >.
The <NewLine> does not work. The dataport just read one line of the Sales Line Data.
You know that is just borderline rude, a little grace would go a long way, we are all volunteering our time. Would you rather I didn't try to help? :shock:
The more I think of it the more I think it's not going to work with one header record and an unknown number of line records. You're going to have to import into variables and keep track of the number of records inside the dataport. For the first line you put the values into a Header record, for the second line and on you put the values into line records.
Here is the new example.
Doc No. Doc Type Sell-to Cust No.
Doc No. Doc Type Line No. Sell-to Cust No. Type No.
Below is waht I will receive from the text file:
SO-1001 Order C00019
SO-1001 Order 10000 C00019 ITEM IT10002
SO-1001 Order 20000 C00019 ITEM IT10003
SO-1001 Order 30000 C00019 ITEM IT10004
SO-1001 Order 10000 C00019 ITEM IT10002
...................................
...................................
Could you please tell me how to import it via dataport? expecially, what the DataItemSeparator should I use? (We just assume no validate needed all data is examed)
It's not possible to do it with multiple dataitems, because there is nothing specific that separates the two. The reason why one NewLine didn't work is because after the first line record it thought the dataitem was done due to the NewLine.
You will have to import the fields into variables and program the records yourself.
(We just assume no validate needed all data is examed)
In addition, validation also fills in other fields upon doing so.
Like when the customer # is entered - there Terms are also inserted, dimensions, amongst other fields. So don't just blow off Validating fields just because the data is correct.
ps in your example line data 1 & 4 are the same (typo?)
Thanks all of your for help.
especially for DenSter :idea:
I tried several times. You are right. It's no possible to do like that.
Now I am trying to import like below format.
SO-1001 Order C00019 ####
any characters but not blank line
SO-1001 Order 10000 C00019 ITEM IT10002
SO-1001 Order 20000 C00019 ITEM IT10003
SO-1001 Order 30000 C00019 ITEM IT10004
SO-1001 Order 40000 C00019 ITEM IT10005
If you have control over the file layout, why not put a blank line in between, so it looks like this:
SO-1001 Order C00019
SO-1001 Order 10000 C00019 ITEM IT10002
SO-1001 Order 20000 C00019 ITEM IT10003
SO-1001 Order 30000 C00019 ITEM IT10004
SO-1001 Order 40000 C00019 ITEM IT10005
You've probably already ruled that out, but I had to try . That way your dataport with two dataitems would work without a problem. Is there a technical reason why you can't put a blank line in there?
true!, the sales line contains
-Order Number
-Document Type
-Sell-to Customer No.
Should be enuf to INSERT into the sales header table using the variables it's being imported into.
Variables:
-vDocType
-vDocNo
-vCustNo
OnAfterImportRecord()
Comments
ERP Consultant (not just Navision) & Navision challenger
you will surely have to write some code in order to place the values in the right tables.
If I don't understood your problem...tell me if something's missing...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
if this is what you are talking about then view the properties of the blank under the last dataitem to change it
http://www.BiloBeauty.com
http://www.autismspeaks.org
every file contain one sales order (one header and multi-lines).
The filed separator is tab----this is no problem.
The problem i met is the DataItemSeparator. On the file, first line is header, from second line are lines. layout as below:
H H1 H2 H3
L L1 L2 L3
L L4 L5 L6
It is simple to import the data if there is a blank line between header data and line data.
Unfortunatly, there is no blank line!!! ](*,)
How can I import them using dataport? :?:
:oops:
http://www.BiloBeauty.com
http://www.autismspeaks.org
Try entering "<NewLine>" and try again.
RIS Plus, LLC
The <NewLine> does not work. The dataport just read one line of the Sales Line Data.
Are you specifying a different Line No. for each sales line?
http://www.BiloBeauty.com
http://www.autismspeaks.org
I created two testing tables. one is header another is line. both of them have three fields, and first field is premiry key.
then try to import below data. I use <NewLine> as dataitem separator.
ather imported, in the second table just one line data: "L1 L2 L3"
H1 H2 H3
L1 L2 L3
L4 L5 L6
Specify a "Document Type" & a "No."
For the Sales Line you must
Specify a "Document Type", a "Document No." & a "Line No".
How does your dataport know when the data for the next line is beginning if it's 1 long line..(if I understand correctly)
http://www.BiloBeauty.com
http://www.autismspeaks.org
http://www.BiloBeauty.com
http://www.autismspeaks.org
The more I think of it the more I think it's not going to work with one header record and an unknown number of line records. You're going to have to import into variables and keep track of the number of records inside the dataport. For the first line you put the values into a Header record, for the second line and on you put the values into line records.
RIS Plus, LLC
Here is the new example.
Doc No. Doc Type Sell-to Cust No.
Doc No. Doc Type Line No. Sell-to Cust No. Type No.
Below is waht I will receive from the text file:
SO-1001 Order C00019
SO-1001 Order 10000 C00019 ITEM IT10002
SO-1001 Order 20000 C00019 ITEM IT10003
SO-1001 Order 30000 C00019 ITEM IT10004
SO-1001 Order 10000 C00019 ITEM IT10002
...................................
...................................
Could you please tell me how to import it via dataport? expecially, what the DataItemSeparator should I use? (We just assume no validate needed all data is examed)
It's not possible to do it with multiple dataitems, because there is nothing specific that separates the two. The reason why one NewLine didn't work is because after the first line record it thought the dataitem was done due to the NewLine.
You will have to import the fields into variables and program the records yourself.
RIS Plus, LLC
In addition, validation also fills in other fields upon doing so.
Like when the customer # is entered - there Terms are also inserted, dimensions, amongst other fields. So don't just blow off Validating fields just because the data is correct.
ps in your example line data 1 & 4 are the same (typo?)
http://www.BiloBeauty.com
http://www.autismspeaks.org
especially for DenSter :idea:
I tried several times. You are right. It's no possible to do like that.
Now I am trying to import like below format.
SO-1001 Order C00019
####
any characters but not blank line
SO-1001 Order 10000 C00019 ITEM IT10002
SO-1001 Order 20000 C00019 ITEM IT10003
SO-1001 Order 30000 C00019 ITEM IT10004
SO-1001 Order 40000 C00019 ITEM IT10005
Is it possible?
RIS Plus, LLC
unfortunately, the layout is out of my control. The Text file is from 3'd Party mapping provider. They can insert any characters but not blank line .
This is the core/key problem!!! This is the reason why I looking for help. ](*,)
RIS Plus, LLC
One of the choices of DataItemSeperator is
"other Strings" -<The Literal String Entered>
If this 3rd party place can enter <Next> or whatever as a header for the sales line section you should be ready to go.
I can't believe they can't add a false header to the lines.
http://www.BiloBeauty.com
http://www.autismspeaks.org
RIS Plus, LLC
-Order Number
-Document Type
-Sell-to Customer No.
Should be enuf to INSERT into the sales header table using the variables it's being imported into.
Variables:
-vDocType
-vDocNo
-vCustNo
OnAfterImportRecord()
Don't forget to VALIDATE!
http://www.BiloBeauty.com
http://www.autismspeaks.org