10-13-2008 7:07 PM
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
10-13-2008 7:20 PM
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
10-13-2008 7:20 PM
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
10-13-2008 7:20 PM
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
10-13-2008 7:22 PM
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
10-13-2008 7:27 PM
Hi Swarna,
Did you see what I have written in my previous reply.
Thanks,
Chidanand
10-13-2008 7:27 PM
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
10-13-2008 7:49 PM
10-13-2008 7:49 PM