2008 Feb 07 7:18 AM
Hello All,
We are following some process for Material Stock transfer. The process goes like this.
Reservation(SAP Std) ->Packing List(Z pgm)->Material issue(SAP Std.)
As per the requirement I need to update one flag fields of table RESB (Reservation Details) with the z program packing List, But Here we have decided not to create BDC instead of that directly update the table from z program.
I as per my knowledge it's not recommanded directly to update saP tables . Some one tell me some good solution which is better way to do the same.
Best Regards
Swati ......
2008 Feb 07 7:21 AM
It is never recomended to update table using z programs, instead you can you some BAPI or functional module if you are not interested to use BDC.
Check the following bapis for this purpose:
BAPI_RESERVATION_CHANGE
BAPI_RESERVATION_CREATE1
BAPI_RESERVATION_DELETE
BAPI_RESERVATION_GETDETAIL
BAPI_RESERVATION_GETITEMS1
BAPI_RESERVATION_CREATE
BAPI_RESERVATION_GETDETAIL
BAPI_RESERVATION_GETITEMS
Edited by: Abhishek Sarkar on Feb 7, 2008 8:23 AM
Hello All,
We are following some process for Material Stock transfer. The process goes like this.
Reservation(SAP Std) ->Packing List(Z pgm)->Material issue(SAP Std.)
As per the requirement I need to update one flag fields of table RESB (Reservation Details) with the z program packing List, But Here we have decided not to create BDC instead of that directly update the table from z program.
I as per my knowledge it's not recommanded directly to update saP tables . Some one tell me some good solution which is better way to do the same.
Best Regards
Swati ......
2008 Feb 07 7:21 AM
It is never recomended to update table using z programs, instead you can you some BAPI or functional module if you are not interested to use BDC.
Check the following bapis for this purpose:
BAPI_RESERVATION_CHANGE
BAPI_RESERVATION_CREATE1
BAPI_RESERVATION_DELETE
BAPI_RESERVATION_GETDETAIL
BAPI_RESERVATION_GETITEMS1
BAPI_RESERVATION_CREATE
BAPI_RESERVATION_GETDETAIL
BAPI_RESERVATION_GETITEMS
Edited by: Abhishek Sarkar on Feb 7, 2008 8:23 AM
2008 Feb 07 7:24 AM
Hi Swati,
You are completely right: never update SAP tables directly, because you can never be sure if you get inconsisency in your database (this flag might be linked to fields in other tables).
Regards,
John.
2008 Feb 07 7:25 AM
Hi,
Generally it is not recomended to use direct update to dataabse table as there is possibilty of inconsistancy..but here as u r updating one flag,it don't think there should be problem with it..u can do it...but remeber before u do any update to dbtable u should lock the table
use the FM "ENQUEUE_E_TABLE".
now update the table
then use FM "DEQUEUE_E_TABLE".
Regards,
Nagaraj
2008 Feb 07 7:28 AM
Hi Swati,
You can directly update the table RSEB. But be clear with the requirement that when you are just upadting that particular table it doesnot effect other. As the table is related to many other table.
Would suggest to use BAPI instead.
Jayant Sahu.
2008 Feb 07 7:40 AM
Of course, we can upadte the standard table using the UPDATE statement from a WORK AREA.
But it is strongly recommended that we should not update the standard tables directly.
If u do so, only onle table will be updated, all other related tables won't get updated. It leads to database inconsistancy.
So, u have to use Transaction (BDC) or FM (BAPI) to update the standard tables.
Do not update by writing a UPDATE query.
Pl reward if useful
Narendra