XMLPort to import data into sales header and sales line

I want to import data from xmlports into sales header and sales line tables. i want the code for both xmlport and xml file.

When you are asking for both here, what is the reason for you to ask for this option?

Maybe you should give a little more information on your request.

Hai pavan…first u have to create a xmlport…In that XMLport u have to create a Node Name,Node Type,Source Type and Data Source…Then u have to create a codeunit to run the xml port.In that code unit u have to create a

TestFile -File

TestStream-InStream .

Then On Run() trigger type the following:
TestFile.OPEN(‘C:\XML\sample.xml’);
TestFile.CREATEINSTREAM(TestStream);
XMLPORT.IMPORT(XMLPORT::“Sample Sales Header”,TestStream);
TestFile.CLOSE;
MESSAGE(‘Imported successfully’);

Finally Save and compile the codeunit…The data’s are imported into the table…

Hai Pavan…First you have to create a xmlport.In that XMLport you have to mention the Node Name,Node Type,Source type,Data Source…After that you have to create a codeunit to run the xmlport…so in that codeunit create a,

TestFile-File

TestStream-Instream.

Then under the On Run() type the following code:

TestFile.OPEN(‘C:\XML\sample.xml’);
TestFile.CREATEINSTREAM(TestStream);
XMLPORT.IMPORT(XMLPORT::“Sample Sales Header”,TestStream);
TestFile.CLOSE;
MESSAGE(‘Imported successfully’);

After that save and compile the codeunit,the data’s are imported into that table successfully…