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

Internal Table?

Former Member
0 Likes
553

Hi all,

in my itab

i have a record like

matnr maktx plant vkorg alnum

55 abngdk 0008 2020

now based on thsese fields i got the field value of ALNUM

CATEGORY V

IC018

now i have 2 update my table like

matnr maktx plant vkorg alnum

55 abngdk 0008 2020 CATEGORY V

55 abngdk 0008 2020 IC018

how is it possiblke...

gavas.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
536

HI,

While retriving the ALNUM field, do not write a separete Select statment, Just write a Select with FOR ALL ENTRIES, then you will get the final one

Regards Sudheer

5 REPLIES 5
Read only

Former Member
0 Likes
537

HI,

While retriving the ALNUM field, do not write a separete Select statment, Just write a Select with FOR ALL ENTRIES, then you will get the final one

Regards Sudheer

Read only

Former Member
0 Likes
536

Hi

ITAB1 contains

MATNR MAKTX WERKS VKORG ALNUM

ITAB2 also should have atleast MATNR along with ALNUM values

then

LOOP AT ITAB1.

read table ITAB2 with key MATNR = ITAB1-matnr.

if sy-subrc = 0.

modify ITAB1 index sy-tabix transporting ALNUM.

end if.

endloop.

Regards

ANji

Read only

0 Likes
536

Hi Anji,

its updating only the first record.

after updating the first record its coming out of loop.

gavas.

Read only

Former Member
0 Likes
536

Hi,

You can use For all entries for this issue.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
536

Hi,

try to implement this following code...

LOOP AT itab.

select single alnum into itab1-alnum from dbtab where

matnr eq itab-matnr and

maktx eq itab-maktx and

werks eq itab-plant and

vkorg eq itab-vkorg.

IF sy-subrc = 0.

MODIFY itab INDEX sy-tabix.

end if.

ENDLOOP.

regards

sudha

Message was edited by:

sapsudha rao