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

Notification Completion Issue

Former Member
0 Likes
4,980

Hi Experts,

I am using BAPI_ALM_ORDER_MAINTAIN for doing TECO of a PLM order. It is working fine.

But when I check the order in IW32, all the fields are grayed out except Notification.

I checked by doing TECO manually in IW32, the pop-up appears to complete the notification after clicking the complete notification check box and saving it.

My requirement is to do it programmatically in report.

I used BAPIs BAPI_ALM_NOTIF_CLOSE after BAPI_ALM_ORDER_MAINTAIN to do it, but not able to do.

I checked many threads in scn, but not able to figure out the problem.

Is there any way to set system status to TECO and do the notification completion by same BAPI or FM.

Kindly help me by giving some examples to check where I am making mistake in my code.

Thanks & Regards,

Swati

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,588

Hi Experts,

I found the solution by myself only.

I used BAPI  'BAPI_ISUSMORDER_SETSTATUSTECHN' instead of 'BAPI_ALM_ORDER_MAINTAIN'. Below is the code:-

CALL FUNCTION 'BAPI_ISUSMORDER_SETSTATUSTECHN'

  EXPORTING

    number              = *ordernumber*
    referencedate    = sy-datum
    referencetime    = sy-uzeit
  tables
    return                 = lt_ret.

  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
   EXPORTING

     wait          = 'X'.

Regards,

Swati

10 REPLIES 10
Read only

kirankerudi
Active Participant
0 Likes
3,588

Hi Swati,

Did you use BAPI_TRANSACTION_COMMIT and DEQUEUE_ALL after calling the BAPI_ALM_ORDER_MAINTAIN ?

Regards,

Kiran

Read only

0 Likes
3,588

HI Kiran,

Yes I used BAPI_TRANSACTION_COMMIT but I didn't used DEQUEUE_ALL.

but I am not able to do notification complete using BAPI_ALM_ORDER_MAINTAIN.

Kindly help me with some examples.

Regards,

Swati

Read only

jogeswararao_kavala
Active Contributor
0 Likes
3,588

Hello Swati,

I know there are issues with the fm BAPI_ALM_NOTIF_CLOSE. So I resolved my similar issue of Notification closing through few lines of Batch input (based on SHDB recording). It is simple. This would resolve your problem.

Good luck

KJogeswaraRao

Read only

0 Likes
3,588

Hi Jogeswara,

I have to do it without BDC. Kindly help me in it.

Thanks & Regards,

Swati

Read only

0 Likes
3,588

Swati,

The answer is fm 'STATUS_CHANGE_INTERN'.

Suppose the notification in in 'NOPR' status, the code will be:


DATA: it_stat TYPE TABLE OF jstat,
          wa_stat TYPE jstat.


wa_stat1-stat 'I0070'.
wa_stat1-inact = 'X'.
APPEND wa_stat1 TO it_stat1.
wa_stat1-stat 'I0072'.
wa_stat1-inact = ' '.
APPEND wa_stat1 TO it_stat1.


CALL FUNCTION 'STATUS_CHANGE_INTERN'
       EXPORTING
         objnr  = v_objnr
       TABLES
         status = it_stat.

     COMMIT WORK.

This puts your Notification to NOCO status. You'd feel that your job is done with this, but.....


This has got one manageable issue:

  • i.e., This NOCO through fm does not update the viqmel-phase  field from '3' (NOPR) to '4' (NOCO).
  • I hope you can very well manage this, if you want this update. One method I suggest is include ZXQQMU20  (user-exit QQMA0014).
  • Here you read the runtime system status of the Notification through fm 'STATUS_READ' and if you found 'I0072' (NOCO) then put the code e_viqmel-phase = '4'.
  • With this when your program changes the status from NOPR to NOCO, the notification passes through a save event, during which the above exit code should update the viqmel-phase too.

Hope this helps
Regards
KJogeswaraRao


Read only

0 Likes
3,588

Hi Jogeswara,

I tried this FM as well. It is just updating the Jest table, but the exact notification completion is not happening when I see order in IW32 tcode. I am doing it in report program.

Kindly help to give some examples for this.

Regards,

Swati

Read only

0 Likes
3,588

I already used this. Check whether there is 'Commit work' is being used or not. I believe your solution lies in what I have already replied to you. Also your contents tab shows that so far you haven't been benefited from the forum. Almost all threads are in unanswered state.

Read only

0 Likes
3,588

Hi Jogeswara,

I tried your solution but still the same thing happening.

I am attaching the image of the tabs for which I need the fields to get disbale when doing teco.

When I am trying it doing manually, one pop-up appears and the by checking the complete notification button, the fields under the below tabs get grayed out. but with the above FM, only status NOCO, I could only see in system status.

Kindly help me in this.

Regards,

Swati

Read only

0 Likes
3,588

Enough inputs given. You can not stick to fms only when the solutions are available with BDC. Further solutions you need to find yourself. Replying further amounts to spoon-feeding.

Read only

Former Member
0 Likes
3,589

Hi Experts,

I found the solution by myself only.

I used BAPI  'BAPI_ISUSMORDER_SETSTATUSTECHN' instead of 'BAPI_ALM_ORDER_MAINTAIN'. Below is the code:-

CALL FUNCTION 'BAPI_ISUSMORDER_SETSTATUSTECHN'

  EXPORTING

    number              = *ordernumber*
    referencedate    = sy-datum
    referencetime    = sy-uzeit
  tables
    return                 = lt_ret.

  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
   EXPORTING

     wait          = 'X'.

Regards,

Swati