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

internal table

Former Member
0 Likes
386

Hi,

I have created an internal table as

<b>DATA : BEGIN OF t_menge OCCURS 0,

menge TYPE p DECIMALS 5,

value TYPE f,

END OF t_menge.</b>

The data present in this is as below

<b>20322<3445.2=303 | 5.5427315026343518E+00 |

20322<3445.2=303 | 5.5427315026343518E+00 |

20322<3445.2=303 | 5.5427315026343518E+00 |

20332<3845.2=303 | 1.1080800842992622E-01 |</b>

Now at runtime it is showing dump while sorting this table

<b> SORT t_menge BY menge value.</b>

DELETE ADJACENT DUPLICATES FROM t_menge.

Dump saying that

<b>A packed number contains no sign.</b>

now i want to correct this without changing the internal table field type.

i want to sort the table and delete the adjacent duplicates.

thanks in advance

regards,

shoban

4 REPLIES 4
Read only

Former Member
0 Likes
369

Hi Shoban,

The problem is type 'Packed decimals' i.e. p doesn't allow u to enter special char like <, >, = , |, etc., So try to make the type as char 'C' and then do the sorting...

Try changing like this

DATA : BEGIN OF t_menge OCCURS 0,

**********************************

menge TYPE c ,

**********************************

value TYPE f,

END OF t_menge.

Read only

Former Member
0 Likes
369

Hi Shoban,

Try to make the type as char 'C' and then do the sorting... because, the problem is type 'Packed decimals' , p doesn't allow u to enter any special characters.

Reward If Useful.

Regards,

Chitra

Read only

Former Member
0 Likes
369

Hi all,

Making menge as type C is not the solution becuase i have done some arithmetical operation on that so please suggest some other advice.

Read only

0 Likes
369

Hi Shoban,

Do one thing...

Try to do all your calculation in one particaular work area or an internal table without these special characters, then finally transfer these to another internal table which has both these fields...

In this internal table just use the menge of type c and concatenate those special char like < > = etc...

Then sort this internal table...

I think this might solve your problem....

Regards

Naveen