Application Development 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: 

While using for all entries its ignoring details of where condition

Former Member
0 Kudos
124

i am using one select statement as follows

SELECT ORGVEND LOTNO INTO TABLE IT_ORG

FROM /BAY4/IC_IN_SEED

FOR ALL ENTRIES IN IT_DATA

WHERE LOTNO = IT_DATA-CHARG+0(9).

its showing error as below

In the use of FOR ALL ENTRIES, the long statement fur "CHARG" in this condition is ignored.

how to avoid that.

and

we are using one field called "MITTLEWERT"

we have declared it as type P decimals 2.

in report we are using one statement

SHIFT MITTELWERT LEFT DELETING LEADING ' '.

its showoing error that MITTLEWERT should be C,N,String soem thing likie that.........how to avoid that

3 REPLIES 3

Former Member
0 Kudos
92

Hi deepti,

SELECT ORGVEND LOTNO INTO TABLE IT_ORG

FROM /BAY4/IC_IN_SEED

FOR ALL ENTRIES IN IT_DATA

WHERE LOTNO = IT_DATA-CHARG+0(9).

For this create one for field in IT_DATA of char9 and move IT_DATA-CHARG+0(9) for all data in itab before this select.

then add this field in where clause.

and

FOr second issue

Shift wil only work for character or string fields.

there wont be any spaces in type P decimals 2.

so i dont think you require to remove spaces.

hope this will help.

thanks,

Dhiraj.

Former Member
0 Kudos
92

Hi,

For field "MITTLEWERT" you should move this value in a character or string field first, then only you can use SHIFT command.

For 1st issue, you can add one more field in IT_DATA same as LOTNO field & pass that field value in this column by ussing offset which you wrote in select query then you can use this new added field(LOTNO) insted of CHARG+0(9).

Hope this helps.

Former Member
0 Kudos
92

Hi,

i am using one select statement as follows

SELECT ORGVEND LOTNO INTO TABLE IT_ORG
FROM /BAY4/IC_IN_SEED
FOR ALL ENTRIES IN IT_DATA
WHERE LOTNO = IT_DATA-CHARG+0(9).

its showing error as below

In the use of FOR ALL ENTRIES, the long statement fur "CHARG" in this condition is ignored.

how to avoid that.

and 

we are using one field called "MITTLEWERT"

we have declared it as type P decimals 2.

in report we are using one statement

SHIFT MITTELWERT LEFT DELETING LEADING ' '.

its showoing error that MITTLEWERT should be C,N,String soem thing likie that.........how to avoid that

first of all you can not use offset for for all entries which you have used in select query

SELECT ORGVEND LOTNO INTO TABLE IT_ORG
FROM /BAY4/IC_IN_SEED
FOR ALL ENTRIES IN IT_DATA
WHERE LOTNO = IT_DATA-CHARG+0(9). " You can not use IT_DATA-CHARG+0(9).

2) field MITTLEWER you have declared as type P decimals 2.

Keep in mind that P is not character tupe it is numeric type so it will have initial values as 0 and not ' ' (space).

try below kind of code

REPORT  ZTEST_UM2.
DATA: a TYPE p DECIMALS 2 VALUE 000123 ,
      lv_with_zeros(15) TYPE c.

WRITE: a to lv_with_zeros.
WRITE lv_with_zeros.

Hope above will help u.

Regards,

Umang mehta