Skip to Content
0
Former Member
Dec 11, 2008 at 07:22 AM

modify internel table

33 Views

Dear Experts,

i am modify one internel table.

for eg :

itab name is -->it_ekpo1

MAT NO ADD NO

1 10

2 10

3 10

4 15

I am Passing ADD NO to The ADRC(it_adrc) table. Pick the address.

for eg : 10 -


> should be one address.

15------>should be one address.

I am modify to (it_ekpo).

1-- -> 10 >address(NOT STORED)

2 -- > 10-->address (stored)

3 -> 10 >address(NOT STORED)

4 > 15 >address (stored)

My case same address will be stored in 1,2,3.

my code is.

select ADDRNUMBER name1 street STR_SUPPL1 STR_SUPPL3 location city1 post_code1 from adrc

into corresponding fields of table it_adrc for all entries in it_ekpo1

where ADDRNUMBER = it_ekpo1-adrn2.

loop at it_adrc into wa_adrc.

read table it_ekpo1 into wa_ekpo1 with key adrn2 = wa_adrc-ADDRNUMBER.

if sy-subrc = 0.

wa_ekpo1-adrn2 = wa_adrc-ADDRNUMBER.

wa_ekpo1-STR_SUPPL1 = wa_adrc-STR_SUPPL1.

wa_ekpo1-NAME1 = wa_adrc-NAME1.

wa_ekpo1-Street = wa_adrc-street.

wa_ekpo1-STR_SUPPL3 = wa_adrc-STR_SUPPL3.

wa_ekpo1-Location = wa_adrc-Location.

wa_ekpo1-city1 = wa_adrc-city1.

wa_ekpo1-POST_CODE1 = wa_adrc-POST_CODE1.

modify table it_ekpo1 from wa_ekpo1.

modify it_ekpo1 from wa_ekpo1 index sy-tabix.

endif.

endloop

PLZ HELP ME

regards,

raj