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

Problem due to different Field types

Former Member
0 Likes
738

Hi all,

I have to join AFRU table with a Z table based on two fields

1) RUECK

2) RMZHL

The problem with joining these two fields is in AFRU table both these field's type is Numeric but in Z table both are Character.

Due to that the data is not picked even if both fields have the same value.

In AFRU table both fields have values 000000 and then the no.How I can write the select query so that they can match and give a proper output?

Regards,

Sunny

Hi all,

I have to join AFRU table with a Z table based on two fields

1) RUECK

2) RMZHL

The problem with joining these two fields is in AFRU table both these field's type is Numeric but in Z table both are Character.

Due to that the data is not picked even if both fields have the same value.

In AFRU table both fields have values 000000 and then the no.How I can write the select query so that they can match and give a proper output?

Regards,

Sunny

4 REPLIES 4
Read only

Former Member
0 Likes
715

Hi,

The join will not work unless you change the data type in the ztable.

Other way is to do independent selects without using the join.

Shruthi

Read only

Former Member
0 Likes
715

Hi,

You can fetch the data without using join statements as follows:

Select f1 f1 from table1 into itab1

where.........

if itab1 is not initial.

select f1 f2 from table 2 into itab2

for all entries in itab1

where f1 = itab1-f1

and f2 = itab1-f2.

endif.

Read only

prasanth_kasturi
Active Contributor
0 Likes
715

hi,

first create a database view by directly writing the join conditions in se11

(donot use foreign key relation ships button),

then use this database view in your program

use your select query normally.

it will fetch records having the same value of fields in join conditions

hope i am clear

reward if helpful

prasanth

Read only

Former Member
0 Likes
715

the two table fields should have same domain

other wise u can't fetch.

better to change ztable fields as like that standard table

hope it helps..