Application Development 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: 

PM Notification

Former Member
0 Kudos

Hi, I have a problem.

I have to change the status of a maintenance Notification

(PM, transaction iw52) in complete mode in automatic way: through a BAPI or function. Can someone help me?

1 ACCEPTED SOLUTION

suresh_datti
Active Contributor
0 Kudos

Hi Fabio,

Did you try using IQS0_COMPLETE_NOTIFICATION?

Good Luck,

Suresh Datti

3 REPLIES 3

suresh_datti
Active Contributor
0 Kudos

Hi Fabio,

Did you try using IQS0_COMPLETE_NOTIFICATION?

Good Luck,

Suresh Datti

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Check out this function group. Maybe there is something here that you can use.

IQS6                           SM notifications BAPIs                                                
BAPI_SERVNOT_ADD_DATA          Added Items, Causes, Activities, Tasks, Partners of the service notif.
<b>BAPI_SERVNOT_CHANGEUSRSTAT     Change the user status of a service notification                     </b> BAPI_SERVNOT_CLOSE             Complete service notification                                         
BAPI_SERVNOT_CREATE            Create service notification                                           
BAPI_SERVNOT_DEL_DATA          Delete Items, Causes, Activities, Tasks, Partners of the service notif
BAPI_SERVNOT_GET_DETAIL        Get details about a service notification                              
BAPI_SERVNOT_MODIFY_DATA       Modify a service notification or associated subdata                   
BAPI_SERVNOT_POSTPONE          Postpone service notification                                         
BAPI_SERVNOT_PUTINPROGRESS     Put in process a service notification                                 
BAPI_SERVNOT_SAVE              Save service notification                                            

Regards,

Rich HEilman

Former Member
0 Kudos

Hi ,

Use Enhancement IWOC0002 (EXIT_SAPLIQS0_001).

Please use the following function to change the status :

If ststus is user defined then use

CALL FUNCTION 'STATUS_CHANGE_EXTERN'

EXPORTING

CHECK_ONLY = ' '

CLIENT = SY-MANDT

OBJNR = LT_OUTTAB-OBJNR1

USER_STATUS = ZSTATUS

SET_INACT = ' '

EXCEPTIONS

OBJECT_NOT_FOUND = 1

STATUS_INCONSISTENT = 2

STATUS_NOT_ALLOWED = 3

OTHERS = 4.

Other wise use

CALL FUNCTION 'STATUS_CHANGE_INTERN'

EXPORTING

CHECK_ONLY = ' '

CLIENT = SY-MANDT

OBJNR = LT_OUTTAB-OBJNR1

USER_STATUS = ZSTATUS

SET_INACT = ' '

EXCEPTIONS

OBJECT_NOT_FOUND = 1

STATUS_INCONSISTENT = 2

STATUS_NOT_ALLOWED = 3

OTHERS = 4.

Hope this will work.