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

where condition solution

Former Member
0 Likes
574

SELECT tabname

as4local

FROM dd02l

INTO TABLE i_table_delete

FOR ALL ENTRIES IN i_fetch_data_temp

WHERE tabname = i_fetch_data_temp-obj_name.

char 30(DD02L) char 40( table TADIR)

in the above where condition the length is not matching but i need to compare the two fields is there any solution for this.

4 REPLIES 4
Read only

Former Member
0 Likes
539

Hi,

You can not compare two fields with diff length,

Declare one of the field with the same length as that of the other and then compare.

Else you can use offset like :

Field1+0(30) = field2.

Just give a try....should be helpful to you.

One more thing : When ever you use for All Entries Clause Select All the Primary Key fields else you will not get complete data. As in this case if there are two values for same TABNAME, AS4LOCAL but diff AS4VERS then you will get only one.

Regards,

Lalit

Read only

Nimesh_S_Patel
Explorer
0 Likes
539

Hi Rocky

One solution.

Define one more table having the same structure exept one field obj_name, change field length to 30 char.

Before writing query transfer all data of i_table_delete into new table by MOVE-CORRESPONDING syntax and write down your query.

Regards

Nimesh S. Patel

Read only

0 Likes
539

the data is moving into the new internal table properly but it is causing dump in select statement.

Read only

former_member386202
Active Contributor
0 Likes
539

Hi,

While declaring the structure of internal table declare both the fields as same data element.

Regards,

Prashant