Application Development and Automation 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: 
Read only

How to upload different flat files into BW server by using single coding

Former Member
0 Likes
363

Hi All,

I am working on BW systems. I have hundreds of flat files in my PC. I have to write the single program to upload all flat files. Actually my requirement is, i have to sum the values of numeric fields existing in the flat files and print them. There may be any number of numeric fields existing in a flat file. And I need to develop a single code for any flat file. Please suggest and try to provide sample coding.

Thanks

Sasi

2 REPLIES 2
Read only

christian_wohlfahrt
Active Contributor
0 Likes
338

Hi Sasi!

Sounds funny: I don't know which kind of data I have (it's different all the times), but they expect me to show the right number in the end.

OK, in class CL_GUI_FRONTEND_SERVICES you will find the tools to get the data into SAP. I would propose more a binary style, automatic field splits need corresponding variables in SAP.

Then have a look at the split-command. I think there is a version, where you can put in one line and get out a internal table with every column as a line. -> variable number of columns is no longer a problem, you can loop. Of course you need a field separator, but that's hopefully no problem.

And then process the next line... and the next file...

Regards,

Christian

Read only

Former Member
0 Likes
338

this is for ABAP forum. BW has a separate forum wherein U can post questions of BW in that.

Award Points and close the thread.