I have the internal table lt_final as shown below.BKPF(Accounting doc BSEG(Cost center) Flag 0000000259
For first row 259 (accounting Document ) Cost Center is initial.but second row is having Cost Center value(N100000002 ) so if any one the item is having cost center value all accounting Documents (259 documents) FLAG will be set to 'X'.similarly 957 are having 3 items in which two are having cost center value so all 957 FLAG will be set to 'X'.
But in 958 none of the Item is having cost center so all 958 items will be set to null( no value)
output should be look like thisBKPF(Accounting doc BSEG(Cost center) Flag 0000000259
i have tried so many logic's but couldn't able to fetch exact results.
kindly help on this ....
Thanks in advance.