Hi,
it can be a little bit frustrating to add longtexts for items, tasks, causes and activities in qm notifications – if the objects are related to a notification item and if you are not really sure how to fill the field OBJKEY correctly.
In our scenario we used BAPI_QUALNOT_ADD to add longtexts for new objects and BAPI_QUALNOT_MODIFY_DATA to add text to the longtext of existing objects.
We use the sorting number of the item for some special logic. This means that in our case the sorting number (qmfe-posnr) and the item number (qmfe-fenum) are not always the same. In such a case we had issues adding a new cause with a longtext (using BAPI_QUALNOT_ADD). The corresponding item (to which the new cause is related) was already created. So I thought the OBJKEY should be qmur-fenum + qmur-urnum OR qmur-fenum + qmur-qurnum. This was not the case.
Below you'll find a list of how the field OBJKEY in the NOTFULLTXT table of the two BAPIs should be filled: BAPI_QUALNOT_ADD (listed as "add"), BAPI_QUALNOT_MODIFY_DATA (listed as "modify"):
- items
- add: qmfe-posnr
- modify: qmfe-fenum
- tasks
- add: qmfe-posnr + qmsm-qsmnum
- modify:
- qmsm-fenum + qmsm-manum OR
- qmsm-manum ALPHA IN => with leading zeros
- causes
- add: qmfe-posnr + qmur-qurnum
- modify: qmur-fenum + qmur-urnum
- activities
- add: qmfe-posnr + qmma-qmanum
- modify:
- qmma-fenum + qmma-manum OR
- qmma-manum ALPHA IN => with leading zeros
I hope this is useful for somebody else who is also struggling with this.
Daniel