Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Long text issue in IW22

former_member663091
Discoverer
0 Kudos

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 ?

1 ACCEPTED SOLUTION

jogeswararao_kavala
Active Contributor
0 Kudos

ramesh,

  • Create a standard text (SO10) with a line of asterisk.
  • Use QQMA0014 to add this line at SAVE event by using the fms READ_TEXT and SAVE_TEXT.
  • Only thing I am unable to tell and you need to explore is: To know whether there is any change in the Longtext.

Regards

KJogeswaraRao

5 REPLIES 5

jogeswararao_kavala
Active Contributor
0 Kudos

ramesh,

  • Create a standard text (SO10) with a line of asterisk.
  • Use QQMA0014 to add this line at SAVE event by using the fms READ_TEXT and SAVE_TEXT.
  • Only thing I am unable to tell and you need to explore is: To know whether there is any change in the Longtext.

Regards

KJogeswaraRao

0 Kudos

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

0 Kudos

Hi,

Thanks for your reply.

Could you please explain me how to append a line to existing long text object.

Regards,

Ramesh

0 Kudos

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

0 Kudos

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