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

table entries

Former Member
0 Likes
948

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
Read only

Former Member
0 Likes
913

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
Read only

Former Member
0 Likes
914

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

Read only

Former Member
0 Likes
913

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

Read only

Former Member
0 Likes
913

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

Read only

0 Likes
913

Hi Swarna,

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

Thanks,

Chidanand

Read only

0 Likes
913

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

Read only

Former Member
0 Likes
913

Thanks Chaida

Its working.

Shree

Read only

Former Member
0 Likes
913

solved

Shree