Application Development and Automation 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: 
Read only

long text

former_member650792
Participant
0 Likes
750

Dear Experts,

In IW22 i.e. notification change we have the long text field. i am fetching that using 'READ _TEXT', but in the i am getting date, time, user name. i don't want that. how it is possble to delete?

4 REPLIES 4
Read only

Former Member
0 Likes
696

Explain the format of data you are getting throgh READ_TEXT

Regards

Vinod

Read only

Former Member
0 Likes
696

Could you share the attributes for the long text or the values passed to READ_TEXT FM?

Anyways, you must be getting all the long text details in an internal table. If the unwanted details like user name, date are coming at a particular area say first line, you can truncate the same from the internal table.

Read only

Former Member
0 Likes
696

I'm assuming that you're referring to the automated log lines that can be added automatically to the long text in the service notification whenever a user enters text there. This can be configured per notification type, which you can check for your notification type via SM30 for view V_TQ80_L. If you're talking about something different, ignore my comments...

Automated removal of those log lines is not straightforward, as unfortunately the entered log line format might vary a bit. I.e. it contains of a timestamp, which depends on the user settings (so date and time format might vary). After that you have the user name followed by the user ID in brackets. In theory you could craft some patterns for matching those lines, but that is in my opinion still questionable.

It might be worthwhile to double check why those lines should be removed. After all, they will appear in the notification, so why should your program ignore them?

Cheers, harald

Read only

Former Member
0 Likes
696

Hi Venky,

In READ_TEXT, you typically get an internal table with two fields: TDFORMAT and TDLINES.

There are two cases to distinguish text attributes, and that depends on the object you pass to the FM:

1) In some cases, you can find the text in those lines where TDFORMAT is '/='. So fetch only those lines and delete the other lines.

2) In others, the text is explicitly maintained in TDLINES with a prefix "%TEXT%" and a closing tag "%EOF_NOTE%". In this case, fetch all text lines between these tags. There may be multiple such text blocks, so if you want all the text to appear, fetch everything.

Hope this helps! Please let me know if you need anything else!!

Cheers,

Shailesh.