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: 

converison problem

Former Member
0 Kudos
150

Hi,

the following code giving me dump.

what i need to do is i need to convert this chatr valuw to numeric value and i need to use for furthrer processing.

DATA: UPCHELP(11) TYPE C,

EAN(16) TYPE C,

UPCHELP1 TYPE i.

WORK_EAN = 'KK-NT5/BBS'.

*CALL FUNCTION 'CHAR_NUMC_CONVERSION'

  • EXPORTING

  • INPUT = EAN

  • IMPORTING

  • NUMCSTR = UPCHELP1.

.

UPCHELP1 = EAN.

MOVE: UPCHELP TO UPCHELP1.

UNPACK UPCHELP1 TO UPCHELP.

EAN = UPCHELP.

CLEAR UPCHELP1.

WRITE:EAN .

i will reward u with the good points.

5 REPLIES 5

Former Member
0 Kudos
117

Hi,

UPCHELP1 = EAN.
MOVE: UPCHELP TO UPCHELP1.
Write UPCHELP1 TO UPCHELP.
EAN = UPCHELP.
CLEAR UPCHELP1.

Regards

Sudheer

0 Kudos
117
data: wl_char(3) type c value '123',
wl_num type n .

CALL FUNCTION 'MOVE_CHAR_TO_NUM'
EXPORTING
CHR = wl_char
IMPORTING
NUM = wl_num
EXCEPTIONS
CONVT_NO_NUMBER = 1
CONVT_OVERFLOW = 2
OTHERS = 3.

p291102
Active Contributor
0 Kudos
117

Hi,

Pls try through FM like CONVERSION_EXIT*

Thanks,

Shankar

Former Member
0 Kudos
117

It seems more suitable:

C14W_CHAR_NUMBER_CONVERSION

but it don't accept special charachters..

Also can u let us know the exact requirement... I don't understand wht sort of conversion u need exactly...

Just tell me the the output u r expecting for this string... 'KK-NT5/BBS'

so that i can help...

Former Member
0 Kudos
117

hi

u had given EAN and also work_ean..pleasee giiv d proper code

vijay