Posts

Showing posts with the label Sort Internal Table

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

Sort Internal Table

Sometimes we need to sort our internal table based on functional requirement. We can sort it like : Ascending , Descending , text or Alphabetically. Syntax like : Sort itab Ascending. or sort itab by field_name  Ascending Sort itab Descending  or sort itab by field_name  Descending Sort itab by field_name.