07-27-2015 3:39 PM
Hi All,
I need to create/update entries for custom Z fields in RESB and AFVC tables when ever there is any create/change in the Order.
I have developed the same for AUFK table, In which i had CI_AUFK include structure provided by SAP. Where i have followed the following link
http://scn.sap.com/thread/2136542 and http://scn.sap.com/docs/DOC-30791,Here i had BAPI, BAPI_TE_AUFK which i had sent during BAPI extension of BAPI_ALM_ORDER_MAINTAIN.
Can anybody help me out in finding the same in this case or is there any other method to update these tables...?
Thanks,
Prasanna
07-27-2015 7:45 PM
07-27-2015 10:32 PM
Hi Prasanna,
I grappled with this for a long time a few years ago since I had to update reservations while in an exit within order save. And since I was extending existing code I did not have the option of writing code outside this enhancement. After trying to use MB_CHANGE_RESERVATION unsuccessfully I found a usage pattern in SAP code to update the RESB table.
Note - this required a lot of testing to ensure all entries were correctly updated in the DB.
The sequence of FM calls to update memory variables for reservations was:
1. CO_BT_RESB_SET - Call this providing order number
The following in a DO...ENDDO. loop.
2. CO_BT_RESB_GET - Call this to retrieve a single row of RESB entries for the order
(Exit loop on exception eof)
3. Modify the retrieved RESB workarea as required
4. Finally call CO_BT_RESB_UPDATE providing updated WA from step 3 and index of current loop.
That should do it.
Cheers,
Ash
10-05-2015 4:29 PM
Please refer to this note from SAP.
669370 - BAPI_ALM_ORDER_MAINTAIN: BAdI not for append structures