‎2007 May 23 7:56 AM
Hi,
this statement is not working,
please anybody let me know how to compare offset values in where clause
this statement is showing an error,
Select rebel rebel from lesser into table get_purchase
for all entries in get_ship
Where verdant in s_date
and TX+0(10) = get_ship-tokenism.
please give me an idea how to rectify it..
regards,
Adair
‎2007 May 23 8:04 AM
Hi,
try
Select rebel from lesser into table get_purchase
for all entries in get_ship
Where verdant in s_date
and TX(10) = get_ship-tokenism.
‎2007 May 23 8:01 AM
Hi
You can't compare the offset values in where clause
better compare it in the loop of a internal table and ignore them.
Select rebel from lesser into table get_purchase
for all entries in get_ship
Where verdant in s_date.
loop at get_purchase.
read table get_ship with key.....
if get_purchase-TX+0(10) <> get_ship-tokenism.
delete get_purchase index sy-tabix.
endif.
endloop.
Reward points if useful
Regards
Anji
‎2007 May 23 8:02 AM
Hi Madhavi,
why u are select the same field(REBEL) two times .
Thanks & Regards
Bhaskar Rao.M
‎2007 May 23 8:03 AM
Hi,
We can't give offset values in WHERE clause of a SELECT stmt. After retriving the data only we can do it in the internal table.
Cheers,
Bujji
‎2007 May 23 8:04 AM
Hi,
try
Select rebel from lesser into table get_purchase
for all entries in get_ship
Where verdant in s_date
and TX(10) = get_ship-tokenism.
‎2007 May 23 8:04 AM
Hi,
its not possible to use offset operator in where condition.
try for some other alternative.
rgds,
bharat.
‎2007 May 23 8:05 AM
you cannot use offsets to the right hand fields in select
try this
if not get_ship[] is initial.
Select rebel rebel from lesser <b>TX</b> into table get_purchase
for all entries in get_ship
Where verdant in s_date.
endif.
loop at get_pucharse.
v_tabix = sy-tabix.
read table getship with key tokenism eq get_pucharse-TX+0(10).
if sy-subrc ne 0.
delete get_purchase index v_tabix.
endif.
endloop.
Message was edited by:
Chandrasekhar Jagarlamudi
‎2007 May 23 8:06 AM
Hi.
"" TX+0(10) = get_ship-tokenism"" This checking is not possible in the where clause.It will Consider this whole word as a field and that is the reason u r getting an error..After the selection write an "IF" condition seperately to for Checking... Then why u r selecting rebel field twice..Correct that also..there is no other mistakes.....
Reward All the helpfull Answers..
‎2007 May 23 8:16 AM
Hi Madhavi,
You cannot use offset value on table field in where clause while retreving.
Read value TX into internal table , Ex: get_purchase. and then compare it using offset by looping internal table. Ex. get_purchase-TX+0(2).
Reward points to all useful answers.
Regards,
SaiRam