‎2010 Sep 16 1:04 PM
Through transaction iw21 i want to automatically populate the tasks for notification type P2 without having the user to navigate from EDIT->TASKS->DETERMINE. I need to automatically determine the tasks during SAVE of iw21 .
I have implemented a method in BADI NOTIF_EVENT_POST. I have the following line of code -
select * from T355E_W into TABLE it_T355E_W where priok = is_new_viqmel-priok.
Now how do I assign the contents of this table for the corresponding Notification number.. Is there any function module to do this?
‎2012 Jun 20 6:13 AM
This issue is solved as
You need to to write the code in Badi: NOTIF_EVENT_SAVE
METHOD : CHANGE_DATA_AT_SAVE
if sy-tcode = 'IW21'.
if flt_val = 'Z2'.
DATA: wa_wqmsm TYPE wqmsm.
wa_wqmsm-QSMNUM = '0001'.
wa_wqmsm-qmnum = cs_viqmel-qmnum.
wa_wqmsm-mngrp = 'PM1'.
wa_wqmsm-mncod = '1'.
wa_wqmsm-aeknz = 'I'.
wa_wqmsm-TXTCDGR = 'Take Care of Permit'.
wa_wqmsm-MANUM = '1'.
wa_wqmsm-MNKAT = '2'.
wa_wqmsm-STTXT = 'TSOS'.
APPEND wa_wqmsm TO ct_iwqmsm.
ENDIF.
ENDIF.
Regards,
Bablu
‎2010 Sep 16 3:27 PM
Hi,
you have to implented the user exit EXIT_SAPMIWO0_003 in order to automatically determine the tasks .
Kostas
‎2010 Sep 17 5:21 AM
Hi Kostas,
Thank you. I have activated the exit. I get all the related tasks for the notification type in an internal table. Now how do i assign these tasks to the notification. I am not able to find any function module which does this. Any idea on this one?
‎2010 Sep 17 5:37 AM
Hi,
Could you please check this function module READ_NOTIFICATION_TASK
Regards,
Keerthi
‎2010 Sep 17 6:20 AM
Hi Keerthi,
Thanks for that one.. But I found that the FM is used to read the tasks for the notification which is already existing. In my case i want to assign tasks to the notification I am creating.
‎2010 Sep 17 6:29 AM
Hi,
How about IQS1_POST_NOTIFICATION function module.
You can also search for the function modules under the package IWOC.
Regards,
Keerthi
‎2010 Sep 17 8:24 AM
Hi,
you have to fill the E_QMSM parameter with the tasks you want to assign and then raise the exception no_sap_std_task_determination, in order to skip the standard task determination...
Kostas
‎2010 Sep 24 6:22 AM
Hello Kostas,
This exit is triggered only when the user goes through Edit->taks->Determine.. But I want to add the tasks on save without doing this. I tried using BADI NOTIF_EVENT_POST and have called the BAPIs API_ALM_NOTIF_DATA_ADD' followed by 'BAPI_ALM_NOTIF_SAVE and BAPI_TRANSACTION_COMMIT.
Doesnt seem to work.. The notification gets created without the tasks... Pls help..
‎2012 Jun 19 12:49 PM
Hi,
I wrote the code in exit EXIT_SAPLIQS0_017 to set the default value in the task tab. If you select the task tab and save then the default values are gating saved, where as if you won’t select the task tab and save the notification the notification gets created without default value in task tab.
Please help.
Regards,
Bablu
‎2012 Jun 20 6:13 AM
This issue is solved as
You need to to write the code in Badi: NOTIF_EVENT_SAVE
METHOD : CHANGE_DATA_AT_SAVE
if sy-tcode = 'IW21'.
if flt_val = 'Z2'.
DATA: wa_wqmsm TYPE wqmsm.
wa_wqmsm-QSMNUM = '0001'.
wa_wqmsm-qmnum = cs_viqmel-qmnum.
wa_wqmsm-mngrp = 'PM1'.
wa_wqmsm-mncod = '1'.
wa_wqmsm-aeknz = 'I'.
wa_wqmsm-TXTCDGR = 'Take Care of Permit'.
wa_wqmsm-MANUM = '1'.
wa_wqmsm-MNKAT = '2'.
wa_wqmsm-STTXT = 'TSOS'.
APPEND wa_wqmsm TO ct_iwqmsm.
ENDIF.
ENDIF.
Regards,
Bablu