2008 Apr 22 11:09 PM
Hi friends,
why extracts are used?
how is it different from reports? advantages?
Plz explain the same with a simple example.
Appreciate your help.
2008 Apr 22 11:14 PM
Since internal tables have fixed line structures, they are not suited to handle data sets with varying structures. For this purpose, ABAP offers the possibility to create so-called extract datasets (extracts, for short).
More Detailed information is available in the below link
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9ed135c111d1829f0000e829fbfe/content.htm
Sample program
report zfwr0001 no standard page heading.
tables: lfa1, bsik.
field-groups: header, item1, item2.
insert lfa1-lifnr bsik-belnr into header.
insert lfa1-land1 lfa1-name1 into item1.
insert bsik-belnr bsik-budat into item2.
start-of-selection.
get lfa1.
....extract item1.
get bsik.
....extract item2.
end-of-selection.
loop.
....at item1 with item2.
........skip.
........write:/ 'Vendor number:', 28 'Name:', 56 'City:'.
........write: 16 lfa1-lifnr, 33(20) lfa1-name1, 62(20) lfa1-ort01.
........write:/ 'Document no.', 15 'Date'.
....endat.
....at item2.
........write:/ bsik-belnr, 13 bsik-budat.
....endat.
endloop.
Saravanan
Edited by: Saravanan on Apr 23, 2008 12:16 AM
2008 Apr 22 11:33 PM
Extracts are already saved report output.
Let say, if u have a report which takes lot of time to run,
then for those kind of reports an extract would be created during off peak times by scheduling a job.
Later they can be viewed online so that performance is very fast.
Advantages :
It is very fast compared to running the online report as it does not need to hit the database and perform all the logic needed.
Dis advantages :
It is not upto date with the data. It holds all the data till the point it was run.
2008 Apr 23 12:38 AM
extracts can be used for data migration.. think that ur in a data migration project from 4.6 legacy to 6.0Ecc you need to load data in to ECC by LSMW or BDC or BAPI .. in that case you can use extract programs to extract data from legacy to give a input to the load tools..
if you dont write the data to flat file.. and send it to ALV function modules it will be report..