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

ABAP debugging : excel to internal table

raja_ksravankumarreddy
Product and Topic Expert
Product and Topic Expert
0 Likes
4,849

Hi ,

I would like to know if there is any way to copy excel sheet data into internal table during Debugging? Any pointers to this are highly appreciated.

Thank you in Advance.

Sravan.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,791

Here is one technique if you have Basis 640 or higher - you can use the advanced debugger (New ABAP Debugger). I have done this many times.

1) Select the tables tab when you are at a place in the code where you wnat to change the internal table

2) Use a single table versus the split screen within the tables tab to maximize fields on the screen

3) Select the tools for the service (wrench) on the right side of the screen - pop up window will appear and select 'Change row content'. Note there is a change column but I have not tried that to see if the entire table column changed or if only the visible rows column changed.

4) Align excel fields in the same order as the internal table fields and copy the data

5) Place cursor in the first position of the starting field and paste

This can only be done for the rows that are visible on the screen so you will need to page down to continue to paste. Perhaps since you work for SAP you can suggest a better way to paste in an internal table. Also there is a limitation with the number of records that can be displayed/changed in the advanced debugger.

Andy

10 REPLIES 10
Read only

Former Member
0 Likes
2,791

hi,

You need to programmatically copy excel sheet data into internal table.

Read only

0 Likes
2,791

My requirement is , when debugging a program (SAP standard programs), I want to replace an internal table values with excel sheet data without modifying the program itself.

Read only

0 Likes
2,791

Hi Raja ,

chk this thread

and give ur excel data after u click APPEND

Read only

0 Likes
2,791

Hi

U can try to go to Go To->Display Data Object-> Structure Editor

Here you can create a file (because you have an abap list).

Max

Read only

0 Likes
2,791

My need to is to copy excel data into internal table.

Read only

0 Likes
2,791

Hi

Sorry!

In 4.6C I don't believe it can do it, it can only past field by field, record by record.

Max

Read only

Former Member
0 Likes
2,791

during debugging u can't copy excel data to internal table, but u can modify the internal data or append new records to the internal table manually by entering each field of a record.

to upload data from excel sheet to internal table u can use "ALSM_EXCEL_TO_INTERNAL_TABLE' FM.

Read only

Former Member
0 Likes
2,791

Hi Raja,

In debugging mode, after retrieving the data into internal table , double click on internal table which holds the data, put the cursor in internal table data area --> right click of your mouse (context menu) ---> choose the option 'SAVE AS EXCEL WORK BOOk' --> press 'OK' --> give the name of file and path.

If it helps plz reward points.

Regards

Bhupal Reddy

Read only

Former Member
0 Likes
2,791

Hi,

Use FM 'KCD_EXCEL_OLE_TO_INT_CONVERT'

or FM 'ALSM_EXCEL_TO_INTERNAL_TABLE'

to read data from excel.

Run your code in debugging mode and see if data is loaded correctly..

Thats the max that you can do.

Regards,

Kirti.

Read only

Former Member
0 Likes
2,792

Here is one technique if you have Basis 640 or higher - you can use the advanced debugger (New ABAP Debugger). I have done this many times.

1) Select the tables tab when you are at a place in the code where you wnat to change the internal table

2) Use a single table versus the split screen within the tables tab to maximize fields on the screen

3) Select the tools for the service (wrench) on the right side of the screen - pop up window will appear and select 'Change row content'. Note there is a change column but I have not tried that to see if the entire table column changed or if only the visible rows column changed.

4) Align excel fields in the same order as the internal table fields and copy the data

5) Place cursor in the first position of the starting field and paste

This can only be done for the rows that are visible on the screen so you will need to page down to continue to paste. Perhaps since you work for SAP you can suggest a better way to paste in an internal table. Also there is a limitation with the number of records that can be displayed/changed in the advanced debugger.

Andy