‎2015 Nov 19 12:40 PM
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
‎2015 Nov 20 7:45 AM
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
‎2015 Nov 19 1:15 PM
Hi Swati,
Did you use BAPI_TRANSACTION_COMMIT and DEQUEUE_ALL after calling the BAPI_ALM_ORDER_MAINTAIN ?
Regards,
Kiran
‎2015 Nov 20 3:19 AM
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
‎2015 Nov 19 2:06 PM
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
‎2015 Nov 20 3:20 AM
Hi Jogeswara,
I have to do it without BDC. Kindly help me in it.
Thanks & Regards,
Swati
‎2015 Nov 20 3:45 AM
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:
‎2015 Nov 20 4:03 AM
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
‎2015 Nov 20 4:17 AM
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.
‎2015 Nov 20 5:00 AM
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
‎2015 Nov 20 6:51 AM
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.
‎2015 Nov 20 7:45 AM
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