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

Convert spool to Excell

Former Member
0 Likes
433

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

1 REPLY 1
Read only

Former Member
0 Likes
363

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 ?