开发者

File handling in ABAP

Can file operations开发者_如何转开发, like creation of a file, be done in ABAP?


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 ...


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.


You can use CL_GUI_FRONTEND_SERVICES class or GUI_DOWNLOAD function. Here is a link


You may use CL_GUI_FRONTEND_SERVICES class. But this services only work on front end. Or you can use some function modules like GUI_DOWNLOAD, GUI_UPLOAD etc.


we can create a flat file with data entered into it, with tabs-separated. Now, that dota corresponds to the sap tables-fields, where the tables are related to an application, like say, material master. Now we can use the standard FMs to upload the data to the internal tables of the program and followed by updating the database.

So, uploading flat-file data can be done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜