2009 Jan 24 1:52 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 ).
2009 Jan 24 2:01 PM
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 ).
2009 Jan 24 2:01 PM
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
2009 Jan 24 2:26 PM
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
2009 Jan 24 6:27 PM
Aha, it seems the parameter of the class method expects a number, but you are passing something else here. Perhaps a string.
regards,
Advait
2009 Jan 24 7:16 PM
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
2009 Jan 25 3:19 AM
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к
2009 Jan 25 5:55 AM
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
2009 Jan 25 5:57 AM
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
2009 Jan 25 5:57 AM
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
2009 Jan 25 5:59 AM
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
2009 Jan 25 7:19 AM
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к
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |