Posts

Showing posts with the label Select for all entries in SAP ABAP

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

Select for all entries in SAP ABAP

Select statement for all entries: SELECT FOR ALL ENTRIES is the best alternative for SELECT WITH JOINS, this statement is very helpful for reading data from more than 2 tables. The load on database will be very less. Ensure before using SELECT FOR ALL ENTRIES Parent internal table must not be empty ( If it is empty, where condition fails and it will get all records from database). Remove all duplicate entries in parent internal table. Syntax: SELECT Table_FIELDS FROM DBTBL1 INTO TABLE ITAB1  WHERE <CONDITION>.  SELECT TABLE_FIELDS FROM DBTBL2 INTO ITAB2 FOR ALL ENTRIES IN ITAB1  WHERE TABLE_FIELD1 = ITAB1-TABLE_FIELD1.