‎2007 Jan 18 10:13 AM
Hi all
I need to convert an integer to char type.will u please tell me it.
Thanks
Regards
GIRI.
‎2007 Jan 18 10:15 AM
data : val type i .
data : val2(10) type c.
val1 = 14.
val2 = val1. "integer to character .
write:/ val2.
regards,
vijay
‎2007 Jan 18 10:15 AM
Just assign the integer to the char with "=".
data : w_char(5) type c,
w_integer type i.
w_char = w_integer.Hope this helps,
Erwan
‎2007 Jan 18 10:19 AM
I did this.
data: l_top_key type lvc_nkey,
pos type i.
l_top_key = pos.
but I am getting short dump.lvc_nkey is char type.
Thanks
Regards.
‎2007 Jan 18 10:23 AM
Hello !
Try the WRITE instruction instead :
WRITE pos TO l_top_key.
Regards,
Mathieu
‎2007 Jan 18 10:25 AM
USE THIS -
DATA: D_CHAR(4),
D_INT TYPE I.
D_INT = 12.
D_CHAR = D_INT.
WRITE: D_CHAR.
‎2007 Jan 18 10:31 AM
what is the Dump info .
In st22 can u see what the dump is ?Please let us know and also pass the code of urs so that we can see the same for clear picture.
data: l_top_key type lvc_nkey,
pos type i.
pos = 12.
l_top_key = pos.
write:/ l_top_key." no dump for this """
regards,
vijay.
‎2007 Jan 18 10:37 AM
I am usng this code in the alv tree control.
data: l_top_key type lvc_nkey,
pos type i.
pos = 12.
l_top_key = pos.
if ls_alv_fields-ind ne 'X'.
on change of ls_alv_fields-bez50.
perform add_rel_line using ls_alv_fields
l_top_key
changing l_bez50.
endon.
else.
on change of ls_alv_fields-bez50_2.
perform add_rel_line using ls_alv_fields
l_top_key
changing l_bez50.
endon.
endif.
I am getting the short dump when i am calling the method fush.