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

Serial Number in SAP ALV report

In sap there are multiple types of report , ALV is one of them.Today I am sharing my real life experience with you.I faced lots of problem to solve it but at last I did it with out having any problem.
One of my report functional people gave me a requirement where serial Number column is allocated.
But in ALV serial no is not referenced,better to ignore coz when you need to sort it then the serial number sequence is not maintain, that's the bad impact of it.

At the very first time I declared a variable and then control it in my final internal table and modify my internal table.
 Like:
Data: Slno type i.
Slno = 0.

Loop at itab into wa.

 Slno = Slno + 1.
wa-Slno = Slno.
modify itab from wa.

Endloop.

Another way is very simple ,just take a variable and assign sy-tabix, your work is done.
Data: Slno type i.

Loop at itab into wa.

Slno = sy-tabix
wa-Slno = Slno.

Endloop.

If it helps you then give me a feedback, your feedback boost me a lot.

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