How to use sale invoice as a table in new Doctype

Hi, I am using Sale Invoice as a table in my new Doctype. But on selecting item from table its rate quantity and the amount is not showing as it shows in Sale Invoice. Please help I am new in ERPNext.

Because its a separate table called Sales Invoice Items

Yeah its a separate table.
Basically I want to use sale invoice item table in my new doctype as a table field type. Now I want to know why its rate and amount is not showing on selecting the items. Please help.

as you can see in the screen shot I have selected the item. On selecting the item its rate and amount and quantity is not shown as it did in sales invoice item.

You need to write python script to fetch items details from sales invoice.

I don’t know how to write python script to show item’s detail. if you have then plz share.