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

Task list Sort criteria on Notification

Former Member
0 Likes
901

Hi all,

I have develop on BADI IF_EX_NOTIF_EVENT_SAVE a method to add automatically Tasks when Activity Type change in notification according to Custom table.

I have a problem with sort criteria, when one or more task have short/long text or it closed, when I add new task, the critertia should be by Codegrupe/task Code, expample:

UGAS-0101Cmplete Site VisitShort TextTSOS
UGAS-0110Send Notif. Letters-Resident PreconstrucLong textTSOS
UGAS-0112Prepare Design PlansTSCO
UGAS-0115Prepare QuoteTSOS
UGAS-0118IRoad PermitTSOS
UGAS-0141Assign Order To CrewTSOS
UGAS-0145Update As-BuiltsTSOS
UGAS-0146AOrder Received by Master Data AdminTSOS
UGAS-0146BCreate/Update Functional Location & EquiTSOS
UGAS-0147BGas Order Sent to Central MappingTSOS
UGAS-0147CGas Order Completed in GIS DatabaseTSOS
UGAS-0149Cmplt Permanent RestorationTSOS

This sort criteria it's ok at first time, but when i change Activity Type, the new Task List is:

UGAS-0101Cmplete Site VisitShort TextTSOS
UGAS-0110Send Notif. Letters-Resident PreconstrucLong textTSOS
UGAS-0102Cmplete Corrosion ReviewTSOS
UGAS-0112Prepare Design PlansTSCO
UGAS-0109Create Required Gas ProcedureTSOS
UGAS-0118IRoad PermitTSOS
UGAS-0141Assign Order To CrewTSOS
UGAS-0146BCreate/Update Functional Location & EquiTSOS

Correct Sort should be:

UGAS-0101Cmplete Site VisitShort TextTSOS
UGAS-0102Cmplete Corrosion ReviewTSOS
UGAS-0109Create Required Gas ProcedureTSOS
UGAS-0110Send Notif. Letters-Resident PreconstrucLong textTSOS

That is incorrect to my request, I change Sort criteria in to Badi with call function 'BAPI_ALM_NOTIF_DATA_MODIFY'  in background task.


loop at lt_task_bapi into ls_task_bapi.

     lv_num = sy-tabix.

     unpack lv_num to lv_num.

     ls_task_bapi-task_sort_no sy-tabix.

     modify lt_task_bapi from ls_task_bapi index sy-tabix.

     ls_task_bapi_x-task_key = ls_task_bapi-task_key.

     ls_task_bapi_x-task_sort_no  = abap_true.

     ls_task_bapi_x-item_sort_no  = abap_true.

     append ls_task_bapi_x to lt_task_bapi_x.

   endloop.

call function 'BAPI_ALM_NOTIF_DATA_MODIFY'  in background task

   exporting

     number                           i_viqmel-qmnum

tables

   notiftask                        = lt_task_bapi

    notiftask_x                      = lt_task_bapi_x

    return                           = lt_return.

           Any one Knows how to solve it.

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
742

Hi All,

Finally I found the solution to this Issue,

in IF_EX_NOTIF_EVENT_SAVE interface into CHANGE_DATA_AT_SAVE Method a changing parameter exist who allow you to add, delete modify any data of task, This parameter is CT_IWQMSM and just changing value of  qsmnum setting in position that you wont.

Regards

Hi all,

I have develop on BADI IF_EX_NOTIF_EVENT_SAVE a method to add automatically Tasks when Activity Type change in notification according to Custom table.

I have a problem with sort criteria, when one or more task have short/long text or it closed, when I add new task, the critertia should be by Codegrupe/task Code, expample:

UGAS-0101Cmplete Site VisitShort TextTSOS
UGAS-0110Send Notif. Letters-Resident PreconstrucLong textTSOS
UGAS-0112Prepare Design PlansTSCO
UGAS-0115Prepare QuoteTSOS
UGAS-0118IRoad PermitTSOS
UGAS-0141Assign Order To CrewTSOS
UGAS-0145Update As-BuiltsTSOS
UGAS-0146AOrder Received by Master Data AdminTSOS
UGAS-0146BCreate/Update Functional Location & EquiTSOS
UGAS-0147BGas Order Sent to Central MappingTSOS
UGAS-0147CGas Order Completed in GIS DatabaseTSOS
UGAS-0149Cmplt Permanent RestorationTSOS

This sort criteria it's ok at first time, but when i change Activity Type, the new Task List is:

UGAS-0101Cmplete Site VisitShort TextTSOS
UGAS-0110Send Notif. Letters-Resident PreconstrucLong textTSOS
UGAS-0102Cmplete Corrosion ReviewTSOS
UGAS-0112Prepare Design PlansTSCO
UGAS-0109Create Required Gas ProcedureTSOS
UGAS-0118IRoad PermitTSOS
UGAS-0141Assign Order To CrewTSOS
UGAS-0146BCreate/Update Functional Location & EquiTSOS

Correct Sort should be:

UGAS-0101Cmplete Site VisitShort TextTSOS
UGAS-0102Cmplete Corrosion ReviewTSOS
UGAS-0109Create Required Gas ProcedureTSOS
UGAS-0110Send Notif. Letters-Resident PreconstrucLong textTSOS

That is incorrect to my request, I change Sort criteria in to Badi with call function 'BAPI_ALM_NOTIF_DATA_MODIFY'  in background task.


loop at lt_task_bapi into ls_task_bapi.

     lv_num = sy-tabix.

     unpack lv_num to lv_num.

     ls_task_bapi-task_sort_no sy-tabix.

     modify lt_task_bapi from ls_task_bapi index sy-tabix.

     ls_task_bapi_x-task_key = ls_task_bapi-task_key.

     ls_task_bapi_x-task_sort_no  = abap_true.

     ls_task_bapi_x-item_sort_no  = abap_true.

     append ls_task_bapi_x to lt_task_bapi_x.

   endloop.

call function 'BAPI_ALM_NOTIF_DATA_MODIFY'  in background task

   exporting

     number                           i_viqmel-qmnum

tables

   notiftask                        = lt_task_bapi

    notiftask_x                      = lt_task_bapi_x

    return                           = lt_return.

           Any one Knows how to solve it.

Regards

1 REPLY 1
Read only

Former Member
0 Likes
743

Hi All,

Finally I found the solution to this Issue,

in IF_EX_NOTIF_EVENT_SAVE interface into CHANGE_DATA_AT_SAVE Method a changing parameter exist who allow you to add, delete modify any data of task, This parameter is CT_IWQMSM and just changing value of  qsmnum setting in position that you wont.

Regards