Application Development 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: 

Sending email as attachment

Former Member
0 Kudos
63

Hi,

When I used the class cl_abap_char_utilities to build the xls data table it is saying class "cl_abap_char_utilities" is unknown. In another prog it was working fine. What is the problem, please guide me.

Thanks

Veni

FORM build_xls_data_table .

CONSTANTS:

con_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,

con_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf.

CONCATENATE 'MATERIAL' 'NET PRICE'

INTO i_attach

SEPARATED BY con_tab.

CONCATENATE con_cret i_attach INTO i_attach.

APPEND i_attach.

LOOP AT ITAB_VBRP.

CONCATENATE VBRP-MATNR

VBRP-NETWR

INTO i_attach SEPARATED BY con_tab.

CONCATENATE con_cret i_attach INTO i_attach.

APPEND i_attach.

ENDLOOP.

ENDFORM. " build_xls_data_table

1 ACCEPTED SOLUTION

furlan
Participant
0 Kudos
36

Veni,

This code is it the code that works fine?

What the version of your system, because I didn't found the class cl_abap_char_utilities in my system (4.6D).

Flávio

10 REPLIES 10

suresh_datti
Active Contributor
0 Kudos
36

Why don't you declare the constants as Global Data in stead of inside the subroutine?

Good luck,

suresh Datti

furlan
Participant
0 Kudos
37

Veni,

This code is it the code that works fine?

What the version of your system, because I didn't found the class cl_abap_char_utilities in my system (4.6D).

Flávio

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
36

This code works fine in my 6.40 engine. Are you on an earlier version of SAP. It does not exist in my 46c system.

REgards,

Rich HEilman

suresh_datti
Active Contributor
0 Kudos
36

Vani,

try the following..

In the global data of the Program, put the statement

CLASS cl_abap_char_utilities DEFINITION LOAD.

In the form replace the two constants with

STATICS:

con_tab TYPE c ,

con_cret TYPE c .

con_tab = cl_abap_char_utilities=>horizontal_tab.

con_cret = cl_abap_char_utilities=>cr_lf.

Good Luck,

Suresh Datti

Former Member
0 Kudos
36

Hi Suresh,

I tried the way told by you. It is saying

Unable to interpret 'cl_abap_char_utilities'.

Thanks

Veni

Former Member
0 Kudos
36

Hi Rich,

How do I find out the version of my system.

Thanks

Veni.

suresh_datti
Active Contributor
0 Kudos
36

to find out the version go to system--> status

can you check in SE24 if this class does exist in y9our system?

Suresh

Former Member
0 Kudos
36

Hi Suresh,

The version I have is 4.6c.

I donot have authorization to go to se24.

Thanks

Veni.

suresh_datti
Active Contributor
0 Kudos
36

I guess you cannot use it then.. Rich & Furlan already mentioned in their replies that the class doesn't exist in 46c & 46d..

have fun,

Suresh Datti

P.S. you do not have access to SE24? may be I should stop cribbing about our security folks!!!

Message was edited by: Suresh Datti

Former Member
0 Kudos
36

Thanks Rich, Flávio and Suresh.

-Veni.