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: 

get number of records before uploading to SAP

emanuel_sanchez
Participant
0 Kudos

Hi Guys!

I'm using TEXT_CONVERT_XLS_TO_SAP to upload an Excel file. In the context of an ABAP program, is there a way to know how many records are on the file before uploading to an internal table?

I've been checking a lot of posts but I haven't found an answer yet.

thanks in advance!

regards!

Emanuel

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

It would be quite "complex" to do. TEXT_CONVERT_XLS_TO_SAP is based on DOI for Excel. You can develop your own DOI program with a macro to return the number of lines (there is a documentation for macros -> search the forum/SAP documentation for I_OI_SCRIPT_COLLECTION). That will start Excel, which will load the file at the frontend, but it should be quick because avoiding the transfer of the whole data to the application server.

2 REPLIES 2

Sandra_Rossi
Active Contributor
0 Kudos

It would be quite "complex" to do. TEXT_CONVERT_XLS_TO_SAP is based on DOI for Excel. You can develop your own DOI program with a macro to return the number of lines (there is a documentation for macros -> search the forum/SAP documentation for I_OI_SCRIPT_COLLECTION). That will start Excel, which will load the file at the frontend, but it should be quick because avoiding the transfer of the whole data to the application server.

Jelena
Active Contributor
0 Kudos

Why do you need this?