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

Getting values based on where condition for space

Former Member
0 Likes
2,787

Hi everyone,

i have one situation ,

select extended_sort  from zgah into table  it where EXTENDED_SORT = ' '.


here zgah is a table and it is internal table and extended_sort is field in zgah.


In zgah table , extended sort field is having two values X and space ie ' ' . i want all space values but i am not getting

please help me out.

Thank you.

11 REPLIES 11
Read only

pranay570708
Active Contributor
0 Likes
2,112

use EXTENDED_SORT <> 'X'.

Read only

Former Member
0 Likes
2,112

i have Tried <>,space but still it is not working

Read only

0 Likes
2,112

have you tried EXTENDED_SORT is NULL?

Read only

Ashg1402
Contributor
0 Likes
2,112

Hi,

    your query is :- select extended_sort  from zgah into table  it where EXTENDED_SORT = ' '.

  This doesn't make any sense you are selecting the value for a field which is not having any value.

Can you post your full query.

Regards

Ashish

Read only

Former Member
0 Likes
2,112

Hi,

Just check if table ZGAH is having data or not? Run the table in SE16 for the same selection criteria and see the table behavior.

Read only

Former Member
0 Likes
2,112

hi,

please check your table and post your full requirement.

however you can try this also if your table does not have lots of data and if it does not affect your performance.

select extended_sort  from zgah into table  it .

delete it where extended_sort ne ' '.

Read only

Former Member
0 Likes
2,112

It's difficult to see what you are trying to do. From what you've said, you will end up with a table with one field and many empty rows.

Rob

Read only

nikhil_kalawade
Explorer
0 Likes
2,112

Hi,

Let me take you via long way as per two points mentioned by Pranay it should work but anyway; do one thing fetch all data without where condition so you will get 'X' and '<space>' now delete the itab where <field> EQ 'X'.

Hope this will help you.

Regards

Nikhil

Read only

VenkatRamesh_V
Active Contributor
0 Likes
2,112

field   extended_sort  is   not   key  field.  fetch   the   data is  internal table.   sort   the  itab  and  delete  itab   by condition.

Hope  it helpful,

Regards,

Venkat.

Read only

Former Member
0 Likes
2,112

What's the used data element / domain for the field? Can you show us the definition? How is the field defined in your table?

Read only

former_member653066
Participant
0 Likes
2,112

hi ,

i have pretty answers for this question..

you are selecting nothing from nothing..!

pity.. how can you expect there should be data?

question is logically wrong..!!!

try like this,

select * from zgah into table it where extended_sort = ' '.