10-09-2007 12:31 AM
Hello,
I have a requirement to export a couple of files that need to be in a fixed length format.
I've tried opening the dataset and writing the records passing the column that the records should appear:
WRITE /, field1, 10 field2, etc...
I've also tried to do it through SAP_CONVERT_TO_CSV_FORMAT and the text version as well.
Is there a predefined function that will allow me to export as fixed length?
Thank you in advance
10-09-2007 4:16 AM
Function Modules
http://www.erpgenie.com/abap/functions.htm
http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
http://www.erpgenie.com/abap/index.htm
http://www.geocities.com/victorav15/sapr3/abapfun.html
Rewards if useful..........
Minal
10-09-2007 1:37 AM
Hi Jeff,
Can you expalin in more details as what is your exact requirement.
Regards,
Atish
10-09-2007 4:16 AM
Function Modules
http://www.erpgenie.com/abap/functions.htm
http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
http://www.erpgenie.com/abap/index.htm
http://www.geocities.com/victorav15/sapr3/abapfun.html
Rewards if useful..........
Minal
10-09-2007 4:19 AM
Hi Jeff,
Following is the code to do the same:
DATA: file TYPE string VALUE `flights.dat`,
wa TYPE spfli.
FIELD-SYMBOLS TYPE x.
OPEN DATASET file FOR OUTPUT IN BINARY MODE.
SELECT *
FROM spfli
INTO wa.
ASSIGN wa TO CASTING.
TRANSFER TO file.
* TRANSFER LENGTH 200 to file.
ENDSELECT.
CLOSE DATASET file.
Best regards,
Prashant