12-12-2007 11:54 AM
Hi,
I am sending an e-mail using FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'. However, it requires a parameter as size of the file.
So, my requirement is to get the size of the file based on the records from the internal table.
Is there any way to get it??
TIA,
Nitin
12-12-2007 12:00 PM
YOu can know how much space each record occupies by the declaration of the itab.
for eg:
data: begin of itab,
field1(60),
field2(40),
end of itab.
this makes 100 chars or 100 bytes of data per record.
use describe statemnet to know how many records are there in a table.
describe itab lines v_lines.
total_size - v_lines * 100. "In this example.
total_size will get the value in bytes.
if you want it in KB, divide it with 1024.
Please check it you have the class CL_ABAP_MEMORY_UTILITIES in SE24
If you do have it check out for the method GET_MEMORY_SIZE_OF_OBJECT
this would give you the size of your internal table
Please check out this thread
https://forums.sdn.sap.com/click.jspa?searchID=1006391&messageID=86317
12-12-2007 11:58 AM
Hi,
Check this link,
https://forums.sdn.sap.com/click.jspa?searchID=7364765&messageID=86317
Thanks,
Reward If Helpful.
12-12-2007 12:00 PM
12-12-2007 12:00 PM
YOu can know how much space each record occupies by the declaration of the itab.
for eg:
data: begin of itab,
field1(60),
field2(40),
end of itab.
this makes 100 chars or 100 bytes of data per record.
use describe statemnet to know how many records are there in a table.
describe itab lines v_lines.
total_size - v_lines * 100. "In this example.
total_size will get the value in bytes.
if you want it in KB, divide it with 1024.
Please check it you have the class CL_ABAP_MEMORY_UTILITIES in SE24
If you do have it check out for the method GET_MEMORY_SIZE_OF_OBJECT
this would give you the size of your internal table
Please check out this thread
https://forums.sdn.sap.com/click.jspa?searchID=1006391&messageID=86317
12-12-2007 12:06 PM
hi Nitin
<b>sy-toccu:</b>
it give info about how much memory is allocated for the itabs.
sy-toccu gives tye momory occupied by the itabs.
The size of the internal tables are set using the 'occurs n' clause. Here n refers to a integer number that specifies the size. Usually its given as 'occurs 0' which creates an itab <b>with the memmory space of 8kb.</b>
12-12-2007 12:31 PM