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

select

Former Member
0 Likes
958

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

1 ACCEPTED SOLUTION
Read only

dev_parbutteea
Active Contributor
0 Likes
935

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.

8 REPLIES 8
Read only

Former Member
0 Likes
935

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

Read only

Former Member
0 Likes
935

Hi Madhavi,

why u are select the same field(REBEL) two times .

Thanks & Regards

Bhaskar Rao.M

Read only

Former Member
0 Likes
935

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

Read only

dev_parbutteea
Active Contributor
0 Likes
936

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.

Read only

Former Member
0 Likes
935

Hi,

its not possible to use offset operator in where condition.

try for some other alternative.

rgds,

bharat.

Read only

Former Member
0 Likes
935

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

Read only

Former Member
0 Likes
935

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..

Read only

former_member196280
Active Contributor
0 Likes
935

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