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

Difference between Select Single and Select up to 1 rows in SAP ABAP

What is the difference between Select Single and Select up to 1 rows in SAP ABAP ?

These statements are the part of reading data from database table.
By using SELECT SINGLE and SELECT UPTO 1 ROWS we can able to read single record from a database table .

Look at a glance below table:


SELECT SINGLE
SELECT UP TO 1 ROWS
Used to read exact record from database table.

Used to read appropriate record from database table.
To read exact record from database table we need to provide all key fields.
We can read appropriate record from database table, we may not need to provide all key fields.
This statement should be used only if all the key fields are available.

This statement should be used only if we have some key fields or no key fields.
How to Write:
SELECT SINGLE * FROM Table_Name INTO WA WHERE ALL KEY FIELDS
For performance this is better than select upto statement.

How to Write:
SELECT * FROM Table_name INTO WA UP TO 1 ROWS WHERE ALL KEY FIELDS/SOME FIELDS.
ENDSELECT.
From effective performance this is slow.
 

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

Decimal remove in a smartforms report