07-16-2009 11:00 PM
Hi,
I need to update standard SAP table in my program(two fields).
How to avoid direct update to SAP table?
For example,
Modity skb1from itab.
I tried to search Function modules, BAPI to update the skb1 data but couldnt find any. Can somebody please help?
Thanks,
Yogita
Edited by: yogita sap on Jul 17, 2009 12:00 AM
Edited by: yogita sap on Jul 17, 2009 12:01 AM
07-16-2009 11:23 PM
Hi Yogita,
You should avoid updating SAP standard table.
If still you want to update the standard table, then try finding the user exit/BADi linked to the transaction which is updating that SAP standard table and try customising your requirement there.
Regards,
Jacky
07-17-2009 3:57 AM
hi yogita,
You should not update tables directly. The right way is to find the BAPI or set of BAPI's used for that process. So except of finding a bapii for the table SKB1 you should find bapi for the process like bapi for user creation. You can find a set of bapis, that you can use in a sequence to make the required change.
But if the update is not a process then you should update the table directly carefully.
Regards,
FS
07-17-2009 5:16 AM
Hi,
Writing directly in SAP tables is not recommended.
Check if the FM "GL_ACCOUNT_INSERT" satisfies the requirement. you can do a where-used of the table SKB1 to see for a specific FM that satisfies the requirement.
also if there is a business justification of the requirement and not SAP code helps, you can request SAP via OSS to help providing an appropriate code.
Regards,
Nirmal
07-17-2009 5:28 AM
Dear Yogita,
You can try using these 2 FMs.
GL_ACCOUNT_IN_COMPANY_UPDATE
GL_ACCOUNT_UPDATE
Regards
Arindam
07-17-2009 5:29 AM
hi yogita ,
you can Refer to the below link as reference , in order to get rid out of your problem
https://wiki.sdn.sap.com/wiki/display/Snippets/CodesnippettoreaddatafromExcelfileanddeleteorupdateorinsertdataintoSAP+table
regards
Saurabh Goel
07-17-2009 6:06 AM
Hi Yogita
It is not recommended to directly update a database table. It'll be great if you can do the same by using a some BAPIs or FMs. Just try searching by typing GL_ACCOUNT_* in SE37. You get a lot of BAPI/FM which can do that. Some of them will be GL_ACCOUNT_INSERT (In case its a new entry) and GL_ACCOUNT_UPDATE (if you are modifying an already existing entry).
Also, you can do the same using BDC, but it is not a very reliable method to do.
Hope this helps.
Harsh