2007 Dec 18 5:09 PM
Hi,
I am trying to convert a spool to an excell but i get an abap dump saying ' JAVABEANNOTSUPPORTED'
Has anybody got experience with this ? this is my test code :
data declaration :
types: begin of t_spool.
include structure BAPIXMSPOO.
types: end of t_spool.
data t_spools TYPE STANDARD TABLE of t_spool WITH DEFAULT KEY.
data : it_spool_xls like t_spools.
DATA: it_spool_xls_return TYPE truxs_t_text_data.
form convert_spool_to_excell.
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
RQIDENT = mi_rqident
FIRST_LINE = 1
TABLES
BUFFER = it_spool_xls
EXCEPTIONS
NO_SUCH_JOB = 1
NOT_ABAP_LIST = 2
JOB_CONTAINS_NO_DATA = 3
SELECTION_EMPTY = 4
NO_PERMISSION = 5
CAN_NOT_ACCESS = 6
READ_ERROR = 7
OTHERS = 8.
check sy-subrc = 0.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = '|'
I_LINE_HEADER = '-'
I_FILENAME = 'report.xls'
I_APPL_KEEP = ' '
TABLES
I_TAB_SAP_DATA = it_spool_xls
CHANGING
i_tab_converted_data = it_spool_xls_return
CHANGING
I_TAB_CONVERTED_DATA =
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
ENDIF.
endform. "CONVERT_SPOOL_TO_EXCELL
with regards
Erik
Hi,
I am trying to convert a spool to an excell but i get an abap dump saying ' JAVABEANNOTSUPPORTED'
Has anybody got experience with this ? this is my test code :
data declaration :
types: begin of t_spool.
include structure BAPIXMSPOO.
types: end of t_spool.
data t_spools TYPE STANDARD TABLE of t_spool WITH DEFAULT KEY.
data : it_spool_xls like t_spools.
DATA: it_spool_xls_return TYPE truxs_t_text_data.
form convert_spool_to_excell.
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
RQIDENT = mi_rqident
FIRST_LINE = 1
TABLES
BUFFER = it_spool_xls
EXCEPTIONS
NO_SUCH_JOB = 1
NOT_ABAP_LIST = 2
JOB_CONTAINS_NO_DATA = 3
SELECTION_EMPTY = 4
NO_PERMISSION = 5
CAN_NOT_ACCESS = 6
READ_ERROR = 7
OTHERS = 8.
check sy-subrc = 0.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = '|'
I_LINE_HEADER = '-'
I_FILENAME = 'report.xls'
I_APPL_KEEP = ' '
TABLES
I_TAB_SAP_DATA = it_spool_xls
CHANGING
i_tab_converted_data = it_spool_xls_return
CHANGING
I_TAB_CONVERTED_DATA =
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
ENDIF.
endform. "CONVERT_SPOOL_TO_EXCELL
with regards
Erik
2007 Dec 18 5:22 PM
It was because i was running the sap gui in linux, in windows it works.
But my requirement is :
Get the spool, convert it to an excel and send it by email.
is this possible ?
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |