10-04-2015 7:56 AM
My requirement is to put a line of asterisk just bellow whenever there is change in long text in transaction IW22 by default.
Can anybody guide me how to solve this issue ?
10-04-2015 9:08 AM
ramesh,
Regards
KJogeswaraRao
10-04-2015 9:08 AM
ramesh,
Regards
KJogeswaraRao
10-05-2015 7:38 AM
Check could be : "if text is not initial, and last line is not *****" then add line with "***"
Hint: Also read online help for FM READ_TEXT and SAVE_TEXT and statements as DESCRIBE TABLE and APPEND.
Regards,
Raymond
10-05-2015 1:38 PM
Hi,
Thanks for your reply.
Could you please explain me how to append a line to existing long text object.
Regards,
Ramesh
10-05-2015 2:19 PM
That I already explained. Your requirement is to add a fixed line (line of asterisk everyitme you add a longtext).
For this first you need to create a standard text through tcode SO10. (This will have one.line full of asterisk). Say you have created theis stdtext with name Test. Then in the exit specified, you will first retrieve the line of this stdtext to an internal table through fm READ_TEXT .And then update the Longtext with this internal table through fm SAVE_TEXT.
Sample code for the above is attached for the above purpose. (Notice where I used the word 'Test' (This for Stdtext).
Now the crucial thing is
How would you know the longtext had undergone changes? For this posted an idea. According to this prior to the attached code you need to use the same fm READ_TEXT this time to read the entire longtext of the Notification into an internal table.And then your If condifiton will be based on whether the last line of the table is the Asterisk line or not . If this is not the Asterisk line, then it is understood that some one has just added lines to your longtext and hence the attached code will be adding an asterisk line.
Bottom-line
All workable logic has been explained to you. Now you have to explore the fm READ_TEXT for that part to which I haven't provided any code. ( if you haven't earlier worked with.)
Regards
KJogeswaraRao
10-10-2015 6:52 PM
Hi,
Thanks for your quickest reply.
I have another requirement to draw a box around the item data in sap script. But the problem is how can I determine the height at runtime ?
Best Regards,
Ramesh