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 ,     ...

Lock object in SAP

Lock objects in DDIC. In ABAP, Data Dictionary (DDIC) lock objects are used to synchronize access to the same data by different programs or users to ensure data consistency. Lock objects are defined in the Data Dictionary to manage the locking mechanism. Here is an overview of how to work with lock objects in DDIC: ->Creating a Lock Object ->Transaction Code: SE11 ->Open the ABAP Dictionary initial screen by using the -> transaction code SE11. -> Define Lock Object: -> Select the "Lock Object" radio button. -> Enter a name for the lock object (e.g., EZS_, where EZS is the standard prefix for custom lock objects) and click "Create." *Lock Object Definition:In the definition screen, you need to fill in the following fields: *Short Text: A brief description of the lock object. *Primary Table: The main table that will be locked. You can add additional tables if needed. *Lock Mode: Defines the type of lock (read lock, write lock, etc.). **Lock Parameters: Specify the key fields that will be used for the lock. These are usually the primary key fields of the table. **Generate Lock Object: Once all the details are filled, save and activate the lock object. This will generate the function modules required to set and release locks. **Using the Lock Object: After creating the lock object, you can use it in your ABAP programs to set and release locks. Each lock object generates two function modules: one for setting the lock (ENQUEUE_) and one for releasing the lock (DEQUEUE_).

Comments

Popular posts from this blog

New commodity code create in SAP S/4 Hana

BAPI to Change STO PO/ PO Delivery date in SAP

Alpha IN/OUT to Handle Leading Zeros in SAP ABAP