cancel
Showing results for 
Search instead for 
Did you mean: 

CONVT_NO_NUMBER when looping over internal table

ArthurParisius
Contributor
0 Kudos

I have a internal table based on structure STRUC. The internal table was filled using the RH_STRUC_GET function module.  I added some lines to the table where I made the value of the field OBJID contain values like 50005215_5025 and since the field is a CHAR45 field I get no issues.

However when in try to loop over the table with a statement like below. I get the CONVT_NO_NUMBER shortdump. I don't understand this since the field is a CHAR field.

LOOP AT gt_struc ASSIGNING FIELD-SYMBOL(<s1>) WHERE objid NE p_toporg.
   ....
ENDLOOP.

 Can anybody suggest a way for me to deal with this issue?

Sandra_Rossi
Active Contributor
What type is P_TOPORG? If you look at the ABAP documentation, if one is type C and the other is type N or numeric, C is converted to numeric type to do the comparison.
DominikTylczyn
Active Contributor
0 Kudos

@ArthurParisius

You need to share some more details e.g definition of gt_struct, especially what is the type of objid, the type of p_toporg. Otherwise is all but impossible to get the cause of the conversion error.

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor
0 Kudos
Comment from ArthurParisius
 
The shortdump shows the 50005215_5025 as the value that can't be converted. I have however used a different solution since than. I changed my internal table to use the STRUC structure but added some extra fields and used these to get the effect I wanted to achieve.

Answers (2)

Answers (2)

raymond_giuseppi
Active Contributor

Have you checked that it's this field that's causing the error?

ArthurParisius
Contributor
0 Kudos
The shortdump shows the 50005215_5025 as the value that can't be converted. I have however used a different solution since than. I changed my internal table to use the STRUC structure but added some extra fields and used these to get the effect I wanted to achieve.
SachinArtani
Participant
0 Kudos

You seem to be comparing objid with p_toporg. Are both of the same type?

ArthurParisius
Contributor
0 Kudos
Yes they are, but as I said in my reply to Raymond I've found another way to get the end result I wanted.