Dear Sanjeev,
1. In the %CODE4 - Why you are fetching the text items for the Loop of MSEG table. Which is not
required. However, keep it as now.
2. In the %CODE4 - after every READ_TEXT - refresh the dt_lines. (If some text items are not there then the READ_TEXT item will not refresh the dt_lines. So make sure before calling the READ_TEXT everytime refresh the dt_lines.
Example at Line 19, Line 81, Line 140.. etc...
Your code should look like
* Terms of delivery text
REFRESH dt_lines.
CALL FUNCTION 'READ_TEXT' ...........
Regards,
Venkat