Skip to Content
0
Mar 07, 2005 at 04:56 PM

Update Long text for Notification

2917 Views

Hi all

I have a problem updating the “long text” for a PM/SM notification.

Scenario:

When the service notification is created (transaction IW51) the long text should have an additional row added upon saving the notification.

We really want this added information in the long text and not in some Z-field because the information is to be passed to a PDA running SAP MAM (Mobile Asset Management) and a customer defined field is not the first option.

I have so far used user-exit defined by transaction SMOD like QQMA0014, QM/PM/SM: Checks before saving a notification.

In the customer implementation (transaction CMOD) of QQMA0014 the following code is used:

*----------------------------------------------------------------------*
*   INCLUDE ZXQQMU20                                                   *
*----------------------------------------------------------------------*
DATA:
  ltxttab TYPE standard table of tline,
  line    TYPE tline,
  lines   TYPE sy-tabix.

---

*   Read long text for Notification from memory
    import tline to ltxttab from memory id 'SAPLSTXD000001'.
    if sy-subrc eq 0.
      describe table ltxttab lines lines.
      line-tdformat = '*'.
      line-tdline   = 'X1234567Y1234567'.
      append line to ltxttab.
      export tline = ltxttab to memory id 'SAPLSTXD000001'.
    endif.

---

This does work so far. I get the long text in table ltxttab and can add a line to this table. I can see that perfectly when debugging. I then hit F8 to continue the save processing of the new notification.

Now to the problem:

R/3 does not save the notification but issues an error message TD062, Text object is not available. Hm. I have a feeling that the update of the SAP defined memory id does not like to be changed at all.

As the notification number is not known in the user exit (as far as I understand it) then a direct update of the long text using function module SAVE_TEXT can not be done because the necessary key is not known.

Has anyone faced something similar and found a solution?

Any input is highly appreciated!

Yes, I have scanned OSS and the Internet and SDN etc. No luck so far.

Regards, Johan