05-08-2006 10:45 AM
Hi,
How can we move value from a Quantity field to Char field.
Regards
Ahasan
05-08-2006 10:46 AM
move v_quan to v_char. "v_char must be of suffuent length.
write v_quan to v_char. " This will also do.
05-08-2006 10:46 AM
move v_quan to v_char. "v_char must be of suffuent length.
write v_quan to v_char. " This will also do.
05-08-2006 10:49 AM
Hi,
quan field is of length 13 .So what should be the ideal length of char field.
ahasan
05-08-2006 10:49 AM
Hi,
yes you can. But the character field should be long enough (equal to or more than the output length of the quan field).
Thanks
Satya
05-08-2006 10:50 AM
Hi Mohamed..
here is the example.
data menge like eket-menge." or define any quantity field
data char(13) type c.
menge = '10.00'.
move menge to char.
write char.
Cheers,
Abdul
Reward Points for all useful answers....
05-08-2006 10:52 AM
Hi Mohammed,
Take a character field of length which can acccomdate Quantity field and use Move statement.
data: v_quauntity type konp-kbetr,
v_quan_char(11) type c.
<b>move v_quauntity to v_quan_char. (or)
v_quan_char = v_quauntity (or)
write v_quauntity to v_quan_char.</b>
But assignment of char value consists of quantity field into Quantity field is gives you error.
Thanks,
Vinay
05-08-2006 10:56 AM
Hi,
My Fields are
Data : v_lotszm type /sapapo/bstmi.
data element of type Quan length 13
Data : c_var(40) type C.
SELECT SINGLE bstmi
FROM /sapapo/matlotsz
INTO v_lotszm
WHERE lszid = v_lszid.
move v_lotszm to c_var.
But this is not working.
regards
Ahasan
05-08-2006 10:58 AM
hi
u define your field with ref to the table field rather than with the data element.
Abdul
05-08-2006 11:07 AM
Hi Mohammed,
first chk if data is getting selected into ur field.put a breakpoint at ur select statem,ent n c the value of sy-subrc after the select statement..if value is there, then
no problem...
declare like this
data : v_lotszm like /sapapo/matlotsz-bstmi for the quantity field n proceed.
Hope it helps,
Regards,
Bikash