tags:

views:

61

answers:

2

Guys i am new to abap and my knowledge is only limited to report creation .I was wondering whether stuff like creation of a file etc can be done in abap??

+2  A: 

Yes it can be done. You can code in ABAP by using 'open dataset' / 'transfer' / 'close dataset' statements to create files on the Application Server.

You can also create your file directly to a certain application for e.g. MS Excel like so.

Also there are several function modules and classes that can simplify certain tasks like gathering your report output, putting your file on the AS (such as 'GUI_UPLOAD' / 'GUI_DOWNLOAD' / 'WS_DOWNLOAD' / 'SAP_CONVERT_TO_CSV_FORMAT' / etc.) ...

Bear in mind that certain functions modules were built for foreground tasks so they won't work in background job scheduling ...

nict
A: 

Yes, it's possible, as nict said before. You should start reading here - that's the official documentation, it covers pretty much everything, including working with files on both the application and the presentation server. It also explains how to use platform-independent filenames - always remember, someday you might encounter an application server running on OS/400 that will not let you write stuff to C:\Temp\MyExport.csv. One more hint: Be careful about the function modules nict mentioned, some of them are not safe to use when unicode content is involved. Always use the methods of class CL_GUI_FRONTEND_SERVICES to be on the safe side.

vwegert