Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a dynamic file via ABAP

Former Member
0 Kudos

Hi all,

We have a requirement of storing all internal table data into a temporary file in application server and later the same file will be passed as an input to shell script to meet our business requirement. Here I'm not sure how can we create a temporary file at run time through abap . I'm sure this is certainly possible via Java, Can any one suggest me how temporary file will be create via abap. Also please note that developer shouldn't give this file name any where from selection screen and system itself should create a file with certain name.

Please advise.

Thanks

3 REPLIES 3

former_member156446
Active Contributor
0 Kudos

Hope this helps: [Working with files |http://wiki.sdn.sap.com/wiki/display/ABAP/Workingwithfiles#Workingwithfiles-Workingwithfilesontheapplicationserver] you need to use open dataset stmt to create files in app server..

if you check the open dataset stmt in any examples in net, you will find the file name which is of type string... to generate a dynamic file name all you need to do is to build the file name dynamically say by using concatenate statements..

concatenate 'PROGNAME' sy-datum sy-uzeit into <filename>.

open dataset <filename> for input .

0 Kudos

Hi

Thanks for your solution.

I think this way we can atleast create file name dynamically. Thanks very much.