2007 Jul 15 2:55 AM
Hi All,
I am sending an excel attachment using the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'. Everything works perfectly fine except that the excel I populate is dynamically generated and the row width can go upto a maximum of 470 characters. Whereas the maximum length permissible in the OBJECTBIN in the interface of the function module is only 255 characters wide. So in case I need to send my excel sheet of a length wider than that how can I do that? Do let me know in case anyone has any pointers.
Regards,
Karthik
2007 Jul 15 4:50 AM
When sending a binary attachment you just treat your input data as a single long stream of characters, and break it into 255 long blocks to put it into the internal table for the message send function.
so if input is in 470 char table, something like the following will work. NB Dont use concatenate as it will condense spaces.
data: l_string(1000) type c,
l_start type i,
l_cnt type i,
l_len type i.
loop at input_tab.
l_cnt = l_cnt + 1.
l_start = l_len + ( l_cnt - 1) * 470.
l_string+l_start = input_tab.
l_len = strlen( l_string ).
while l_len > 255.
out_tab = l_string+0(255).
append out_tab.
l_string = l_string+255.
l_len = strlen( l_string ).
endwhile.
endloop.
l_len = strlen( l_string ).
while l_len > 0.
out_tab = l_string+0(255).
append out_tab.
l_string = l_string+255.
l_len = strlen( l_string ).
endwhile.
Hi All,
I am sending an excel attachment using the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'. Everything works perfectly fine except that the excel I populate is dynamically generated and the row width can go upto a maximum of 470 characters. Whereas the maximum length permissible in the OBJECTBIN in the interface of the function module is only 255 characters wide. So in case I need to send my excel sheet of a length wider than that how can I do that? Do let me know in case anyone has any pointers.
Regards,
Karthik
2007 Jul 15 4:50 AM
When sending a binary attachment you just treat your input data as a single long stream of characters, and break it into 255 long blocks to put it into the internal table for the message send function.
so if input is in 470 char table, something like the following will work. NB Dont use concatenate as it will condense spaces.
data: l_string(1000) type c,
l_start type i,
l_cnt type i,
l_len type i.
loop at input_tab.
l_cnt = l_cnt + 1.
l_start = l_len + ( l_cnt - 1) * 470.
l_string+l_start = input_tab.
l_len = strlen( l_string ).
while l_len > 255.
out_tab = l_string+0(255).
append out_tab.
l_string = l_string+255.
l_len = strlen( l_string ).
endwhile.
endloop.
l_len = strlen( l_string ).
while l_len > 0.
out_tab = l_string+0(255).
append out_tab.
l_string = l_string+255.
l_len = strlen( l_string ).
endwhile.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |