2016 May 17 1:12 PM
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-01 | 01 | Cmplete Site Visit | Short Text | TSOS |
| UGAS-01 | 10 | Send Notif. Letters-Resident Preconstruc | Long text | TSOS |
| UGAS-01 | 12 | Prepare Design Plans | TSCO | |
| UGAS-01 | 15 | Prepare Quote | TSOS | |
| UGAS-01 | 18I | Road Permit | TSOS | |
| UGAS-01 | 41 | Assign Order To Crew | TSOS | |
| UGAS-01 | 45 | Update As-Builts | TSOS | |
| UGAS-01 | 46A | Order Received by Master Data Admin | TSOS | |
| UGAS-01 | 46B | Create/Update Functional Location & Equi | TSOS | |
| UGAS-01 | 47B | Gas Order Sent to Central Mapping | TSOS | |
| UGAS-01 | 47C | Gas Order Completed in GIS Database | TSOS | |
| UGAS-01 | 49 | Cmplt Permanent Restoration | TSOS |
This sort criteria it's ok at first time, but when i change Activity Type, the new Task List is:
| UGAS-01 | 01 | Cmplete Site Visit | Short Text | TSOS |
| UGAS-01 | 10 | Send Notif. Letters-Resident Preconstruc | Long text | TSOS |
| UGAS-01 | 02 | Cmplete Corrosion Review | TSOS | |
| UGAS-01 | 12 | Prepare Design Plans | TSCO | |
| UGAS-01 | 09 | Create Required Gas Procedure | TSOS | |
| UGAS-01 | 18I | Road Permit | TSOS | |
| UGAS-01 | 41 | Assign Order To Crew | TSOS | |
| UGAS-01 | 46B | Create/Update Functional Location & Equi | TSOS |
Correct Sort should be:
| UGAS-01 | 01 | Cmplete Site Visit | Short Text | TSOS |
| UGAS-01 | 02 | Cmplete Corrosion Review | TSOS |
| UGAS-01 | 09 | Create Required Gas Procedure | TSOS |
| UGAS-01 | 10 | Send Notif. Letters-Resident Preconstruc | Long text | TSOS |
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
2016 May 20 6:53 AM
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-01 | 01 | Cmplete Site Visit | Short Text | TSOS |
| UGAS-01 | 10 | Send Notif. Letters-Resident Preconstruc | Long text | TSOS |
| UGAS-01 | 12 | Prepare Design Plans | TSCO | |
| UGAS-01 | 15 | Prepare Quote | TSOS | |
| UGAS-01 | 18I | Road Permit | TSOS | |
| UGAS-01 | 41 | Assign Order To Crew | TSOS | |
| UGAS-01 | 45 | Update As-Builts | TSOS | |
| UGAS-01 | 46A | Order Received by Master Data Admin | TSOS | |
| UGAS-01 | 46B | Create/Update Functional Location & Equi | TSOS | |
| UGAS-01 | 47B | Gas Order Sent to Central Mapping | TSOS | |
| UGAS-01 | 47C | Gas Order Completed in GIS Database | TSOS | |
| UGAS-01 | 49 | Cmplt Permanent Restoration | TSOS |
This sort criteria it's ok at first time, but when i change Activity Type, the new Task List is:
| UGAS-01 | 01 | Cmplete Site Visit | Short Text | TSOS |
| UGAS-01 | 10 | Send Notif. Letters-Resident Preconstruc | Long text | TSOS |
| UGAS-01 | 02 | Cmplete Corrosion Review | TSOS | |
| UGAS-01 | 12 | Prepare Design Plans | TSCO | |
| UGAS-01 | 09 | Create Required Gas Procedure | TSOS | |
| UGAS-01 | 18I | Road Permit | TSOS | |
| UGAS-01 | 41 | Assign Order To Crew | TSOS | |
| UGAS-01 | 46B | Create/Update Functional Location & Equi | TSOS |
Correct Sort should be:
| UGAS-01 | 01 | Cmplete Site Visit | Short Text | TSOS |
| UGAS-01 | 02 | Cmplete Corrosion Review | TSOS |
| UGAS-01 | 09 | Create Required Gas Procedure | TSOS |
| UGAS-01 | 10 | Send Notif. Letters-Resident Preconstruc | Long text | TSOS |
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
2016 May 20 6:53 AM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |