Posts

Showing posts with the label SQL Update & Delete Statement

Using BAPI upload excel file for t-code AS02 in SAP

Using BAPI " BAPI_FIXEDASSET_CHANGE " create a zprogram to upload excel file for mass change fixed asset in SAP. REPORT  ZAS02_ASSET_CHANGE_UPLOAD . TYPE-POOLS :  truxs . " Structure for Excel data TYPES :  BEGIN  OF  ty_excel ,          anln1  TYPE  anln1 ,          bukrs  TYPE  bukrs ,          kostl  TYPE  kostl ,          werks  TYPE  werks ,          prctr  TYPE  prctr ,         END  OF  ty_excel . DATA :  lt_excel     TYPE  TABLE  OF  ty_excel ,       ls_excel     TYPE  ty_excel ,     ...

Update & Delete Query

UPDATE & Delete Statement Update Statement:  UPDATE statement is used to modify the existing records in a table.with We need to use Where Clause with Update statement to update the selected row,otherwise all the rows would be affected. The Update Statement look like : UPDATE table_name SET column1 = value1, column2 = value2...., columnN = valueN WHERE [condition];     If anyone forget to use Where Clause then the total row will be updated. So use Where clause with Update statement.   Delete Statement: The Delete Statement use to delete the existing record in a table.We need to use Where Clause with Delete Statement,Otherwise all the rows would be affected. The Statement look like: DELETE FROM table_name WHERE condition ;