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: 

char and n types can I use

Former Member
0 Kudos

I have commented and coded as below

  • Commented - start - 20081008

  • DATA: lv_order_qty TYPE wmeng,

  • lv_cancelled1 TYPE wmeng,

  • lv_cancelled2 TYPE wmeng,

  • lv_delivery TYPE lfimg,

  • lv_open_qty TYPE lfimg,

  • lv_neworderqty TYPE lfimg,

  • lv_pickedqty TYPE lfimg,

  • lv_unshipped_qty TYPE lfimg,

  • Commented - End - 20081008

  • Code addition - start - 20081008

DATA: lv_order_qty(13) TYPE c,

lv_cancelled1(13) TYPE c,

lv_cancelled2(13) TYPE c,

lv_delivery(13) TYPE c,

lv_open_qty(13) TYPE c,

lv_neworderqty(13) TYPE c,

lv_pickedqty(13) TYPE c,

lv_unshipped_qty(13) TYPE c,

  • Code addition - End - 20081008

The quantities are not working .

Means space is coming as CHAR type has by default SPACE.

SO CAN I USE all n TYPES instead of c ? like below

lv_order_qty(13) TYPE

n

,

instead of

lv_order_qty(13) TYPE c,

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I don't want 0.000 decimal points.

So can I commented

*DATA: lv_order_qty TYPE wmeng,

and used DATA: lv_order_qty(13) TYPE c,

But some times comparison is failing as char has default value as SPACE.

So can I use DATA: lv_order_qty(13) TYPE c DEFAULT '0'

THANKS IN ADV.

5 REPLIES 5

Former Member
0 Kudos

use DE menge_d.

DATA : lv_order_qty type menge_d.

Note :N cannot hold decimals values , so dont use.

former_member188685
Active Contributor
0 Kudos

if you define like that you will end up with lot of problems... and if you don't want decimals you can move them to char, or numc or intiger type fields.

use write to when you are moving to char fields. and what is the reason can i know, why you are going for the change in data types...?

Former Member
0 Kudos

I don't want 0.000 decimal points.

So can I commented

*DATA: lv_order_qty TYPE wmeng,

and used DATA: lv_order_qty(13) TYPE c,

But some times comparison is failing as char has default value as SPACE.

So can I use DATA: lv_order_qty(13) TYPE c DEFAULT '0'

THANKS IN ADV.

0 Kudos

if you don;t want the decimals you have to do like this

DATA: lv_qty TYPE wmeng.

DATA: lv_order_qty(13) TYPE c.

lv_qty = '10.00'.

write lv_qty to lv_order_qty decimals 0.

write lv_order_qty.

if the char declaration has space then check using the intial condition..

Former Member
0 Kudos

THANK YOU VIJAY.