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

Convt as number error

Former Member
0 Likes
1,444

HI,

I want move dynamic table to the class cl_aunit_assert, i use for that sy-index

So in the loop sometimes i want to send <EXP_XP1> and sometimes <EXP_XP2> in ( exp ).

When i do that i get error :Convt as number error .

What i miss here ?

Regards

data:
v_index type  string, exp TYPE string.

CONCATENATE '<EXP_XP' lv_index '>' INTO exp.

 cl_aunit_assert=>assert_equals( exp = ( exp) quit = cl_aunit_assert=>no act = lt_act  msg = msg ).

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,404

Hi,

Try to condense 'exp' with no-gaps after you concatenate.

Also use sy-tabix if you are using loop..endloop.

regards,

Advait

Edited by: Advait Gode on Jan 24, 2009 3:02 PM

HI,

I want move dynamic table to the class cl_aunit_assert, i use for that sy-index

So in the loop sometimes i want to send <EXP_XP1> and sometimes <EXP_XP2> in ( exp ).

When i do that i get error :Convt as number error .

What i miss here ?

Regards

data:
v_index type  string, exp TYPE string.

CONCATENATE '<EXP_XP' lv_index '>' INTO exp.

 cl_aunit_assert=>assert_equals( exp = ( exp) quit = cl_aunit_assert=>no act = lt_act  msg = msg ).

10 REPLIES 10
Read only

Former Member
0 Likes
1,405

Hi,

Try to condense 'exp' with no-gaps after you concatenate.

Also use sy-tabix if you are using loop..endloop.

regards,

Advait

Edited by: Advait Gode on Jan 24, 2009 3:02 PM

Read only

0 Likes
1,404

HI Advait,

I try it but it's not work ,

Any other idea?

The error long text is:

'The argument 'exp' cannot be interpreted as a number'

Thanks

Read only

0 Likes
1,404

Aha, it seems the parameter of the class method expects a number, but you are passing something else here. Perhaps a string.

regards,

Advait

Read only

0 Likes
1,404

HI Advait,

The parameter that the class expect is table (any table) ,

And this is what i want to pass to it.

When i move the table its working o.k. but the problem when i try to pass it dynamic.

I do that wrong?

Thanks

Read only

0 Likes
1,404

Do u mean to say <EXP1> and <EXP2> are dynamic tables then u cant have the data type of exp as string and pass it like that, I dont think the system will take them as names of dynamic table but it will see them as string parameter so since some time u want to pass <exp1> and sometimes <exp2> use an if condition and call it conditionally.

кu03B1ятu03B9к

Read only

0 Likes
1,404

HI ,

<EXP1> and <EXP2> are not dynamic tables ,

I just want to pass it dynamic (if the loop with index 1 to pass <EXP1> ....) .in the class the type of the table or object that i have to pass in exp is any.

With if ,is the only way?

Regards

Read only

0 Likes
1,404

HI ,

<EXP1> and <EXP2> are not dynamic tables ,

I just want to pass it dynamic (if the loop with index 1 to pass <EXP1> ....) .in the class the type of the table or object that i have to pass in exp is any.

With if ,is the only way?

Regards

Read only

0 Likes
1,404

HI ,

<EXP1> and <EXP2> are not dynamic tables ,

I just want to pass it dynamic (if the loop with index 1 to pass <EXP1> ....) .in the class the type of the table or object that i have to pass in exp is any.

With if ,is the only way?

Regards

Read only

0 Likes
1,404

HI ,

<EXP1> and <EXP2> are not dynamic tables ,

I just want to pass it dynamic (if the loop with index 1 to pass <EXP1> ....) .in the class the type of the table or object that i have to pass in exp is any.

With if ,is the only way?

Regards

Read only

0 Likes
1,404

Well u cant pass them dynamically the way u r trying to pass them currently, it will only interpret <exp1> and <exp2> as two string constants not as objects whose name is <exp1> or <exp2>,

so only option is to use if or case.

кu03B1ятu03B9к