‎2006 Nov 29 11:39 AM
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.
‎2006 Nov 29 4:26 PM
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
‎2006 Nov 29 11:42 AM
hi,
You need to programmatically copy excel sheet data into internal table.
‎2006 Nov 29 11:48 AM
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.
‎2006 Nov 29 11:52 AM
‎2006 Nov 29 12:03 PM
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
‎2006 Nov 29 12:05 PM
‎2006 Nov 29 12:51 PM
Hi
Sorry!
In 4.6C I don't believe it can do it, it can only past field by field, record by record.
Max
‎2006 Nov 29 11:46 AM
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.
‎2006 Nov 29 11:47 AM
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
‎2006 Nov 29 11:50 AM
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.
‎2006 Nov 29 4:26 PM
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