‎2007 Apr 05 10:30 AM
Hi Gurus,
I just implement CNEX006 to insert customized field called history log no. It works OK. But now I need to update this field using Z program.
I have gone thru all BAPIs for PS but could not find that update the field in append structure of PROJ.
Can I update direct? Update PROJ ........
Pls assist.
‎2007 Apr 10 11:41 PM
Hi,
No! You should go for a BAPI update as this is the "right" way to do this and will coding "survive" any future upgrades. So, no "UPDATE PROJ set..." or (even worse) BDC updating via CALL TRANSACTION.
Use BAPI BAPI_BUS2001_CHANGE to change the project definition for instance. This FM has the needed EXTENSIONIN table parameter. If you have a look at the docu for this FM via tx SE37 in English note that there is a part for the extension part of the BAPI.
It might be some work and "headache" before these extension do work correctly. I know this from experience with other BAPIs. But - it can be done.
Hope this can help.
Regards, Johan
‎2012 Apr 30 9:12 AM
Hi Johan,
Can please provide the code for
BAPI_BUS2001_CHANGE
because i have same reqiurment
Regards,
Raghavendra
‎2007 Apr 11 12:29 AM
Hi,
We are using project system too. And we are using following BAPIs to create / Change Project / WBS element
I use function module from Function group CJ2001 ( Project related BAPIs ), CJ2054 ( WBS related BAPIs ) and PS_BAPI ( pre/post processing BAPIs ). There are specific order in which you need to execute these BAPIs.
For example if you want to create / change the WBS element, the BAPIs sequence is:
1. BAPI_PS_INITIALIZATION "Initilize
2. BAPI_BUS2001_CHANGE( to change Project)
3. BAPI_PS_PRECOMMIT "Precommit
4. BAPI_TRANSACTION_COMMIT "Commit
These BAPIs should call in the order specified above. Check the documentation of BAPI "BAPI_BUS2001_CHANGE" to see how these function modules work.
We use around 25 custom field for WBS element. And we use WBS related BAPIs in above order.
Let me know if you need further information.
Regards,
RS