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

complete notification while changing workorder status to release

0 Likes
557

Hi,

I want to complete notification which attached to a workroder while changing system status, but i could not able to find any method to change the notification status to complete using bapi_alm_order_maintain while updating Workorder.

Is this can be achievable through the standard BAPI. I referred documentation of BAPI provided by SAP, but no method I found which suits my requirement.

If it is achievable how to use the BAPI(passing data) .

Thanks in advance!

1 ACCEPTED SOLUTION
Read only

jogeswararao_kavala
Active Contributor
0 Likes
469

Hello janu,

Put the following code in the include ZXWOCU07 of user-exit IWO10009. Your intended result will be noticed.


IF CAUFVD_IMP-IPHAS = '2'.

  DATA: V_OBJNR TYPE VIQMEL-OBJNR.

  CLEAR V_OBJNR.

  DATA: IT_STAT TYPE TABLE OF JSTAT,

           WA_STAT TYPE JSTAT.

  WA_STAT-STAT =  'I0072'.

  WA_STAT-INACT = ' '.

  APPEND WA_STAT TO IT_STAT.

  SELECT SINGLE OBJNR FROM VIQMEL INTO V_OBJNR

WHERE QMNUM = CAUFVD_IMP-QMNUM.

  CALL FUNCTION 'STATUS_CHANGE_INTERN'

    EXPORTING

      OBJNR  = V_OBJNR

    TABLES

      STATUS = IT_STAT.

ENDIF.

After this when you Release an Order and save the Notification associated with it will be completed (NOCO).

Good luck

KJogeswaraRao

1 REPLY 1
Read only

jogeswararao_kavala
Active Contributor
0 Likes
470

Hello janu,

Put the following code in the include ZXWOCU07 of user-exit IWO10009. Your intended result will be noticed.


IF CAUFVD_IMP-IPHAS = '2'.

  DATA: V_OBJNR TYPE VIQMEL-OBJNR.

  CLEAR V_OBJNR.

  DATA: IT_STAT TYPE TABLE OF JSTAT,

           WA_STAT TYPE JSTAT.

  WA_STAT-STAT =  'I0072'.

  WA_STAT-INACT = ' '.

  APPEND WA_STAT TO IT_STAT.

  SELECT SINGLE OBJNR FROM VIQMEL INTO V_OBJNR

WHERE QMNUM = CAUFVD_IMP-QMNUM.

  CALL FUNCTION 'STATUS_CHANGE_INTERN'

    EXPORTING

      OBJNR  = V_OBJNR

    TABLES

      STATUS = IT_STAT.

ENDIF.

After this when you Release an Order and save the Notification associated with it will be completed (NOCO).

Good luck

KJogeswaraRao