The data to be transferred to the SAP system is prepared in a sequential file, BBSEG is a standard ABAP Table available within SAP system, this operation is called Data Transfer Workbench.
A file may only contain data that can be processed with the same transfer program and the program creates batch input sessions from this file.
In SAP this file type is called BBSEG, his structure is complicate and the documentation is poor and not so detailed.
The main structure is formed from a Session header record, Header data and Subsequent data
These structures contain data from the master records and the line items. This includes, for example, the line item amounts.
for more information you can find all documentation is SAP help here
http://help.sap.com/saphelp_erp2004/helpdata/en/e9/cb8a85eb0011d184650000e8a6bfbe/frameset.htm
Master record type table
Main document structure
All of these are composed from a more of 500+ different fields
After two days of work I recreated the same structure in XSD schemas to use this in a important project
Actually I using this schemas structure in a important BizTalk solution
You can download the schema project here