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

SQ02

Former Member
0 Likes
676

I make Internal table in the SQ02 and fetch data from table BUT020.

CODE:

Data: begin of it_but020 occurs 0,
        PARTNER like but020-PARTNER,
        ADDRNUMBER like but020-ADDRNUMBER,
      end of it_but020,

START-OF-SELECTION

SELECT PARTNER ADDRNUMBER FROM BUT020
       INTO TABLE IT_BUT020
       WHERE PARTNER = BUT000-PARTNER.
SORT IT_BUT020 BY ADDRNUMBER DESCENDING PARTNER ASCENDING.
DELETE ADJACENT DUPLICATES FROM IT_BUT020 COMPARING PARTNER.

Now i want to do connection(Join) between Itnernal Table & ADRC.

But how i can do it without using Additional Fields.
Bcoz if i use Additional Fields then query got slower, so that option is not done.

I want to do connection(Join) between Itnernal Table & ADRC. How?
Can any one help me?

Thanks & Regards
Jahnavee


4 REPLIES 4
Read only

nmkarthikeya
Active Participant
0 Likes
608

Hi,

May be you can do for all entries like below.

   Select ADDRNUMBER
       DATE_FROM
       NATION
       from ADRC into table it_adrc
       FOR ALL ENTRIES IN IT_BUT020
       WHERE ADDRNUMBER = IT_BUT020-ADDRNUMBER.

Regards,

Karthikeya                   

Read only

0 Likes
608

Hi, Karthikeya

yes, but after taking data in the internal table how i can join that internal table to database table with JOIN condition in SQ02?

I am facing that proble, kindly help if possible

Thanks & regards,

jahnavee

Read only

0 Likes
608

Hi,

Why you need to join internal table with the database table?

You can join BUT020 and ADRC based on ADDRNUMBER in SQ02 without creating any internal table.

What are you trying to achieve using this infoset? What is the expected out put?


Regards,

Karthikeya

Read only

0 Likes
608

Hi,

IN BUT020 there is Business Partner ADDRESSNUMBER. When the BP address change it will append into the BUT020 Table as "line item".

I have to take the latest Address number of BP.

For that i ahve to write query on BUT020 and take all the data in to itab then delete the extra data.

after that i can get the latest addressnubmer of BP which is unique.

and as on that ADDRNUMBER i have to pick address from ADRC

so now u can understand what is the use of internal table.

Thanks,

Jahnavee