Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9129

logic required to populate internal table

$
0
0

Hi Experts,

 

I am not able to figure out How populate an internal table field with data of another internal table field based on conditions.

 

internal table A and B is having data like this:

Internal table A

 

work order Aoperationstart date
work order 1  operation 1wo 1 date 1
work order 1   operation 2wo 1 date 2
work order 1   operation 3

wo 1 date 3

work order 1   operation 4wo 1 date 4
work order 2   operation 1wo 2 date 1
work order 3   operation 1wo 3 date 1
work order 3  operation 2wo 3 date 2
work order 3  operation 3wo 3 date 3

 

 

 

 

 

INTERNAL TABLE B

work order B

operation start date
work order 1operation 1wo 1 date 1
work order 1operation 3wo 1 date 3
work order 1operation 4wo 1 date 4
work order 2operation 1wo 2 date 1
work order 3operation 2          wo 1 date 3

 

 

now i have to populate table B start date into table A start date in such a way..

 

Just a brief Idea..

 

if record in internal table A have entry in internal table B then populate the start date of internal table B into internal table A.

if record in internal table A does not have corresponding entry in internal table B then populate the start date of previous record of the same work order if found else populate start date of the next record of that same work order if found.

 

 

Final data in internal table A : Should have entries like this

 

work order Aoperationstart date
work order 1  operation 1wo 1 date 1
work order 1   operation 2wo 1 date 1
work order 1   operation 3

wo 1 date 3

work order 1   operation 4wo 1 date 4
work order 2   operation 1wo 2 date 1
work order 3   operation 1wo 3 date 2
work order 3  operation 2wo 3 date 2
work order 3  operation 3wo 3 date 3

 

'

thank you!!


Viewing all articles
Browse latest Browse all 9129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>