‎2009 Dec 15 2:45 AM
dear all,
can you help me solve the below abap coding problem? thanks.
somewhere at the top
DATA: L_S_RANGE LIKE LINE OF E_T_RANGE.
DATA: L_S_VAR_RANGE LIKE E_T_RANGE.
LOOP AT I_T_VAR_RANGE INTO L_S_VAR_RANGE.
FIND l_s_var_range-vnam IN TABLE it_vnam.
IF sy-subrc = 0.
l_check = 'X'.
EXIT.
ENDIF.
ENDLOOP.
Error message...
"L_S_VAR_RANGE" cannot be converted to the line type of "I_T_VAR_RANGE".
Thanks all.
‎2009 Dec 15 6:05 AM
Hi SCHT,
Try below way...
Tell us what is E_T_RANGE is it internal table ?? or anything else.
At which statment exactly you are getting error ?
Assign l_s_var_range-vnam to char type variable.
DATA: L_S_RANGE LIKE LINE OF E_T_RANGE.
DATA: L_S_VAR_RANGE LIKE E_T_RANGE.
DATA: L_CHAR(10) TYPE C. " I am assuming lenght of vnam is 10 change it as per your need
LOOP AT I_T_VAR_RANGE INTO L_S_VAR_RANGE.
L_CHAR = l_s_var_range-vnam.
FIND L_CHAR IN TABLE it_vnam.
IF sy-subrc = 0.
l_check = 'X'.
EXIT.
ENDIF.
CLEAR L_CHAR.
ENDLOOP.Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya
‎2009 Dec 15 2:51 AM
‎2009 Dec 15 2:56 AM
J,
after changing that i got a new error
Type "E_T_RANGE" is unknown
any advice?
‎2009 Dec 15 5:50 AM
Hi,
try this
DATA: L_S_VAR_RANGE type E_T_RANGE.
Or try using the field symbols..
Field-symbols: L_S_VAR_RANGE TYPE ANY.
Regards,
Aditya
‎2009 Dec 15 5:32 AM
Hi SCHT,
Can you show how E_T_RANGE, I_T_VAR_RANGE are defined?
Regards,
Swarna Munukoti
‎2009 Dec 15 6:05 AM
Hi SCHT,
Try below way...
Tell us what is E_T_RANGE is it internal table ?? or anything else.
At which statment exactly you are getting error ?
Assign l_s_var_range-vnam to char type variable.
DATA: L_S_RANGE LIKE LINE OF E_T_RANGE.
DATA: L_S_VAR_RANGE LIKE E_T_RANGE.
DATA: L_CHAR(10) TYPE C. " I am assuming lenght of vnam is 10 change it as per your need
LOOP AT I_T_VAR_RANGE INTO L_S_VAR_RANGE.
L_CHAR = l_s_var_range-vnam.
FIND L_CHAR IN TABLE it_vnam.
IF sy-subrc = 0.
l_check = 'X'.
EXIT.
ENDIF.
CLEAR L_CHAR.
ENDLOOP.Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya
‎2009 Dec 15 9:14 AM
hiye,
this ABAP is in BI and my error is at L_S_VAR_RANGE.
E_T_RANGE is of type EXPORTING ans association type of RSR_T_RANGESID.
hope this helps.
LOOP AT I_T_VAR_RANGE INTO L_S_VAR_RANGE. *<-- error msg stops here.*
FIND l_s_var_range-vnam IN TABLE it_vnam.
IF sy-subrc = 0.
l_check = 'X'.
EXIT.
ENDIF.
ENDLOOP.
‎2009 Dec 15 9:24 AM
Hi SCHT,
One more small information required,
What is the data type of table I_T_VAR_RANGE ?
Regards,
Swarna Munukoti
‎2009 Dec 15 10:06 AM
Hello,
You have defined the work area incorrectly :
DATA: L_S_VAR_RANGE LIKE E_T_RANGE.It should be :
DATA: L_S_VAR_RANGE LIKE LINE OF E_T_RANGE.Change this & check.
BR,
Suhas