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: 

How to Update Custom fields for RESB and AFVC tables...?

0 Kudos

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

3 REPLIES 3

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

Try BAdI WORKORDER_UPDATE.

BR
Caetano

Former Member
0 Kudos

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

vamsixk
Active Participant