XML Port

Hi,

I have an XML file which contains data relating to GL transactions.

I need to find a way to import this file to NAV through XML PORT (in Object Designer)

I have read the manual from MS regarding how to define an XML port etc. But I need more help.

Thanks in advance.

regards

Thomas

Hi Thomas,

how far have you got with your solution. Are you saying you are struggling with a particular part or are you just looking for someone to build an XMLPort for you?

If you have a specific problem, I’m sure someone can point to a solution or provide an answer.

Regards,

Dave.

Hi Thompl,

Can you clearly define your problem? R u looking for the definition of how to design XMLPort or you have already done but not working…

Does your table has Lines tables. N your XML file contains nested data. If its like that then you got to have a main table, link lines tables with that main table.

Design in XML Designer, hope you you how it works, i mean the xml file.

With that knowledge, first you have to define your main table as table in Source Type field, Leave Tag Type as it is (Default Element) after that define all the fields as you wish but donot forget to indent the fields of the table.

After that for Lines table you have to start from the last fields of the main table. donot indent it. and go to the properties of the lines table in xml designer and you will see Link Table and Link Fields properties. Give the name of your main table or just press F6 and choose the table you have defined in Link Table properties and for Link Fields you have to define all the fields you have used to link your Lines table with main table.

Try this you will get what you need.

Hope you will get it done.

Sangam, Nepal

Thanks for the reply,

I am just getting started

regards

Thomas

Hi,

The content of my XML file is as below. I am now in the design stage of XML port, but don’t know how to get started, from which line should I do indentation.

The file contains test data from a Sytem which I should upload to the Gen. Journal lines table. I know the data is incomplete, I can ask for more information to be included in this XML file. But currently I have to get started. Any one can please tell me more about this.

-

-

20090619

ZZ

-

-

200711

DEMO

AA0001

Automated Approval Journal

0.00

0.00

0.00

USD

-

200711

DEMO

CC0001

CC Settlement Journal

0.00

0.00

0.00

USD

Just one word of advice… don’t import straight into the ledger tables. Import the transactions into the journals, and use the NAV posting routines to post the transactions. This way you let the application take care of all related information, and it also forces you to get the setup to a state in which it is even possible to post transactions.

Your XMLPort structure will probably look something like this (I’ve not looked at SourceType or DataSource - you have to figure out that yourself [:D]), and please heed Denster’s advice!

8233.XMLPort.jpg

Hi Daniel,

I am trying to import to Gen. Journal lines table only, from there somebody can check and post it.

regards

Thomas

Hi,

Please find a part of the XML file:

Automated Approval Journal

0.00

In my XML port I have defined JournalLocalAmounts as follows

<TagName = JournalLocalAmounts , Tag Type = Element , SourceType=Text, DataSource =

When I execute, I get an error message as

"The Element is unexpected

In the property of this field, I changed the MINOCCURS to ZERO, still no luck

Any Idea, what is wrong

regards

Thomas

the element in your XMLPort is in a different place than what is in the XML Document itself. The element in the XML Document is at a place where the XMLPort is not expecting it. Redefine your XMLPort so that the elements are in the correct order, and you should be able to work past this error message…

Hi all,

I am almost getting there. I have a new issue.

While I am importing data to the Gen. Journal Line table, I need to have each line numbered consecutively. Can any body tell me how can I do so by writing a piece of code. Also please tell me how the tags should be defined for this.

regards

Thomas

Hi,

I managed to import the follwing XML file

20090619 ZZ GENERAL TEST AA0001 1000 0.00 0.00 0.00 USD GENERAL TEST CC0001 2000 0.00 0.00 0.00 USD GENERAL TEST XX0001 3000 0.00 0.00 0.00 USD 15

But when I checked in the Gen. Journal Line table, I could find only the 3rd record, no other record got inserted, Can anybody tell me why it is so.

The tag 3000 represents the Line No. field.

I have numbered it consecutively as 1000,2000 and 3000 as seen

regards

Thomas