‎2007 Jan 26 11:42 AM
Dear Friends,
I have an internal table A like below show, i am looping the interal table
A and inside i am reading the internal table B to assign the field value STLKN
based on PLNKN and modifying the internal table A. So for all (PLNKN) 5 values
(STLKN) 1 is assiged. this is ok
now my requirement is for the second 5 (PLNKN)value in internal table B , the value 5(STLKN) should assign by appending new records.
when you see the internal table B contains two 5 PLNKN and
two 7 value in PLNKN and contains different STLKN values.
when i loop internal table A and modify only the first value is assigned.
now remaining value to be appended for the second value 5 PLNKN
if not understandable below i given example.
WARPL ABNUM PLNKN STLKN Internal table A
211--
0
211--
0
211--
0
211--
0
211--
0
211--
1
211--
1
211--
1
211--
1
211--
1
211--
6
211--
6
211--
7
-
example-here need to append----
211--
5 like this
211--
5
211--
5
211--
5
211--
5
-
211--
1
PLLNR----
PLNKN -
STLKN Internal table B
106900--
0
106900--
1
106900--
5
106900--
6
106900--
7
106900--
1
can anyone give the code for this. keep in mind the internal table B contains
more than 2 or 3 values repeated in PLNKN.
Thnaks in advance
karthik
‎2007 Jan 26 12:32 PM
Hi Karthik,
While getting data into internal table you need to get some other field which is also available in the internal table A. If you can specify from which table ur getting this data then i may help you better.
Regards,
Satya.
‎2007 Jan 26 1:01 PM
Dear sathya,
I am getting internal table A records form PLPO table. and internal table B from PLMZ. table.
can you give me the field you mentioned
thanks
karthik
‎2007 Jan 26 12:53 PM
Hi Karthick,
The read statement fetches the first record.Now for the below scenario you loop through internal table A and inside it you perform a read on internal table B based on key PLNKN.Now if there are multiple 5's in B it will always pick the first one.So to avoid it you may have to use one more key field while reading from table B in sync with your requirement.
Pls reward if you found useful.
Thanks
Shyam