Skip to Content
author's profile photo Former Member
Former Member

Work Manager 6.2 (CS) - Longtext not set for multiplie Notification Activities

Hi all,

I am trying to post multiple activities, each with its own long text from the work manager. The thing is that only the first activity will have the long text. While debugging /SYCLO/IF_CORE_DO_HANDLER~CREATE (/SMERP/CL_CS_NOTIFICATION_DO), I found a curious piece of code, that basically does the following:

  • Loop over activities (outer loop)
    • Get a fresh sort number
    • Loop over long texts (inner loop)
      • if the long text sort number matches the activity sort number (the activity from the outer loop)
        • then replace the long text sort number by the fresh sort number and remove the long text from the list of long texts and copy its values to another list
        • else remove the long text from the list of long texts and copy its values to another list
    • replace the activity sort number (the activity from the outer loop) with the fresh sort number

What happens with multiple activities is that in the inner loop, all the long texts are removed from the list of long texts (even those that are matching the second, third, ... activity in the activity list). Therefore, only for the first activity, long texts are added. Did anyone else encounter this problem (if this is working for anyone, could you provide me with your BAPI parameters)? Any idea on what SAPWM-911 is about (would it be safe to get rid of that part)?

LOOP AT me->tab_notif_activity ASSIGNING <notif_activity>.
ADD 1 TO lv_sort_no.
LOOP AT lt_notif_longtext INTO ls_notif_longtext WHERE objtype = lc_ltext_notif_activity.
lv_index = sy-tabix.
IF ls_notif_longtext-objkey+4(4) = <notif_activity>-act_sort_no.
ls_notif_longtext-objkey+4(4) = lv_sort_no.
APPEND INITIAL LINE TO me->tab_notif_longtext ASSIGNING <notif_longtext>.
MOVE-CORRESPONDING ls_notif_longtext TO <notif_longtext>.
DELETE lt_notif_longtext INDEX lv_index.
"<--Ins 332_700 SP1 - SAPWM-911 - Start
ELSE.
"Check for remaining longtext rows not matching with parent table
"is considered as update to the existing activity notes
APPEND INITIAL LINE TO me->tab_notif_longtext ASSIGNING <notif_longtext>.
MOVE-CORRESPONDING ls_notif_longtext TO <notif_longtext>.
DELETE lt_notif_longtext INDEX lv_index.
"<--Ins 332_700 SP1 - SAPWM-911 - End
ENDIF.
ENDLOOP.
<notif_activity>-act_sort_no = lv_sort_no.
ENDLOOP.

Thanks in advance for any contribution to this problem.

Regards, Daniel

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Apr 23, 2015 at 01:21 AM

    Hi Daniel,

    I would suggest you raise an OSS message to get this fixed if you believe its bug.

    With Regards

    Murali

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.