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

join between 2 different field,

Former Member
0 Likes
558

Hi to everybody

I should join the table EQUI and AUSP. Below the code, but I get a mistale because the fileds 'objek' and 'equnr 'don't have same type and same lenght.

Theare are some techique to find the solution?

*joi between equi and ausp

SELECT * FROM ausp

INTO CORRESPONDING FIELDS OF lt_asup

FOR ALL ENTRIES IN lt_equi

WHERE objek = lt_equi-equnr.

APPEND lt_asup.

ENDSELECT.

Thanks a lot in advance.

4 REPLIES 4
Read only

Former Member
0 Likes
506

Hello

Try to use field EQUI-CUOBJ instead of EQUI-EQUNR.

Read only

ThomasZloch
Active Contributor
0 Likes
506

You could add a helper field in lt_equi with the format of ausp-objek and fill this with the equnr values before the selection.

Thomas

Read only

Former Member
0 Likes
506

Hi,

I just saw the tables EQUI and AUSP.

The field OBJEK in table AUSP is Char of length 50.

The field EQUNR in table EQUI is Char of length 18.

According to your code you would have already selected the EQUI-EQUNR in an internal table. Now move these entries to another internal table with a field EQUNR which is declared as Char of length 50.

Now when you use your select statement both the fields would have the same type and length.

Hope this helps.

Thanks,

Harini

Read only

Former Member
0 Likes
506

Thanks

post close