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: 

table entries

former_member487858
Active Participant
0 Kudos

HI experts

I I have set of business partner numbers available in one internal table.

I want to get the list of business partner numbers which are in this table but not in another standard table.

How do I this.

Want to list the business partners in the internal table but not in the EEIN table.

Thanks

Shree

1 ACCEPTED SOLUTION

former_member598013
Active Contributor
0 Kudos

Hi Swarna,

Hope I understood your problem.

You are saying that you have one internal table which contains business partner number/

And another table also contains the business parnter number but want to remove from the the internal table 2. If this is the problem the below is the sample logic.


DATA: V_TABIX TYPE SY-TABIX.
LOOP AT ITAB2.
  V_TABIX = SY-TABIX.
  READ TABLE ITAB1 WITH KEY BUSINESS_PARTNER = ITAB2-BUSINESS_PARTNER.
  IF SY-SUBRC = 0. 
    DELETE ITAB2 INDEX V_TABIX.
  ENDIF.
ENDLOOP.

Thanks,

Chidanand

7 REPLIES 7

former_member598013
Active Contributor
0 Kudos

Hi Swarna,

Hope I understood your problem.

You are saying that you have one internal table which contains business partner number/

And another table also contains the business parnter number but want to remove from the the internal table 2. If this is the problem the below is the sample logic.


DATA: V_TABIX TYPE SY-TABIX.
LOOP AT ITAB2.
  V_TABIX = SY-TABIX.
  READ TABLE ITAB1 WITH KEY BUSINESS_PARTNER = ITAB2-BUSINESS_PARTNER.
  IF SY-SUBRC = 0. 
    DELETE ITAB2 INDEX V_TABIX.
  ENDIF.
ENDLOOP.

Thanks,

Chidanand

Former Member
0 Kudos

Internal table is a temporary storage and will be available only during the programs runtime. I'm not sure what exactly is your requirement.

regards,

Advait

former_member487858
Active Participant
0 Kudos

HI Advaid,

I want to get all the business parrtner numbers in the first internal table and not in the std table to be stored in another internal table.

Thanks

Shree

0 Kudos

Hi Swarna,

Did you see what I have written in my previous reply.

Thanks,

Chidanand

0 Kudos

Hi,

Then simply loop at that internal table and append the entries to the other internal table.

something like this :


loop at itab1 into wa.
move-corresponding wa to wa_2.
append wa_2 to itab_2
endloop.

Hope this helps.

regards,

Advait

former_member487858
Active Participant
0 Kudos

Thanks Chaida

Its working.

Shree

former_member487858
Active Participant
0 Kudos

solved

Shree