Application Development and Automation 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: 
Read only

Regarding Datatypes

rohit_kaikala
Participant
0 Likes
495

Hi All,

For my calculation purpose i'm using Charater datatype,

So the issue here is, I'm getting *(asterik) for the first value in the internal table,

I cannot use integer bcoz for some records there are no calculation, so for that it had to display space, but if we use integer we will get 0(zero).

So please suggest wat is the way to avoid * for the first record.

Best Regards,

Rohit

4 REPLIES 4
Read only

Former Member
0 Likes
476

Hi,

Try with N(Numeric) or P(Packed) type instead of Char. it will work.

for further detail check

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm

Anirban

Read only

Former Member
0 Likes
476

Hi Rohit,

Go with num.

I am sure you are also refreshing the table before fetching the data into that.

Type N is a text type, not a numeric data type (although its values are strings of digits), because the strings are not used for calculation purposes. Typical examples of type N fields are account and article numbers (provided they contain only digits), as well as the sub-fields of date and time fields.

calculations involving packed numbers (type P) are programmed, and thus noticeably slower.

Type F values range from /- 2.2250738585072014E-308 to 1.7976931348623157E308, as well as the number 0, with an accuracy of at least 15 decimal places.

I Guess go for the Num data type.

Please do have a look when using the data type if in case its large data dont go for packed .

Mohinder

Read only

Former Member
0 Likes
476

Hi Rohit.

I would like to suggest a couple of references,

[SDN Weblog Code Gallery - Standard Reference for Automatic Calculation of Totals in Table Controls - See Avoiding Asterisks ( Refer: See what's going whatu2019s going on Section)|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/9802] [original link is broken] [original link is broken] [original link is broken];

[SDN - Reference - Passing asterick with Table name in programs|;

Hope that's usefull.

Good Luck & Regards.

Harsh Dave

Read only

rohit_kaikala
Participant
0 Likes
476

thank u