6

ABAP to Excel

Update: Even though I mentioned it in the end of this post, as well as on the TXT file with the original ABAP code, it is worth mentioning again that this is an original article written by Alvaro Tejada (@blag). For more information, click here to access Alvario Tejada’s blog. Also, please refer to a recent post that I’ve written called “10 SAP Blogs you must follow“, which also mentions @Blag’s blog as one of my 10 SAP favorite blogs.

If you’re an ABAP programmer, chances are that one of these days your team leader asks to you build a Report to export ERP data into an Excel sheet. The idea behind this ABAP report is simple. The user runs the report from the ERP system and is able to save it locally as an Excel worksheet, probably to send it to a Line Manager or someone from business who wants to look at figures. Of course this is just an example but it will give you the basic tools on how to work with ABAP and Excel OLE. It also gives you some pointers on how to manipulate cell colors. So, here are the steps to enable this simple example.

1. Create the Report, transaction code SE38

ABAP Report - Export to Excel

2. In the example, I named the report ZHCM_ABAP_TO_EXCEL. Click on Create

3. Next you should type in some normal report creation parameters

ABAP Report - Export to Excel

4. Hit Save, choose your development package and you’re ready to start editing your report source code

5. Copy and paste the source code available for download here

6. Hit Activate and click on F8 or the Direct Processing button

ABAP Report - Export to Excel

7. Upon executing the report, you will need to define the name and location of the result Excel file. On the example defined in a folder \test-excel\test-excel.xls. Hit Save

ABAP Report - Export to Excel

8. Back on the selection screen, confirm your entries and execute the Report

SAP Report - Export to Excel

9. The result will be something like

ABAP Report - Export to Excel

Additional links and resources

Author : webmaster

Author's Website | Articles from

Working as an Information Systems Consultant for over 10 years now, I've found that working with SAP brought me added value on how to deal and manage IT and Information Systems Projects. More than a hobby, this blog is aimed to propagate SAP knowledge exchange and help other SAP technology or functional Consultants finding any piece of useful information. Please participate with your comments and opinions, it will help enrich the SAP community. Thanks!


Related Posts


User Comments


  1. Hien Ngo Minh
    August 20, 2010

    this is a very good tutorial, it helps me a lot. Thx admin

    Reply


  2. Hong Son
    October 18, 2010

    Thank You very much, I am new to ERP,these materials are very useful for me.

    Reply


  3. crepmaster
    December 5, 2010

    how can download the excel into a application server?

    Reply


  4. Tony
    February 21, 2011

    Try to use abap2xlsx SCN Community Project
    http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20046

    Regards

    Reply


    • webmaster
      February 23, 2011

      Dear Tony,

      Thank you for your contribution.
      Regards.

      Antonio Caldas

      Reply


  5. Jenith Kumar
    March 1, 2011

    I need to set the format of the cell as TEXT, which can be found in the Number Tab of the Format Cells Window.

    How to Get these properties in the program?

    Regards,

    Jenith Kumar.

    Reply




Community Feeds

  • SAP BPC Training | SAPBPC Placement | SAP Business Planning Consolidation Process Training | SAP BPC

    NewyorkSys is one of the leading top IT Training and Consulting Company in US, with a good placement Track Record. We have certified trainers. We will provide Online Training, Fast Track online training, with job assistance Courses: SAP Technologies, Dataware housing Tools, Oracle Technologies, SAS, JAVA, .NET, BA… Etc.
    ATTEND FREE DEMO CLASS
    NewyorkSys Inc
    USA: +1- 718- 313-0499
    USA: +1-718-305-1757
    E-mail ID: training@NewyorkSys.com
    Visit: http://www.NewyorkSys.com

  • Expertise technique SAP, ABAP

    Expert Technique SAP, ABAP

  • SAP Training and Certification Courses

    Be a part of SAP training and online sap certification to boost up your skills and career. SAP training helps to improve your business methodologies which are beneficial to generate business around the world. JKT SAP Academy is an authorize education partner of sap and provide sap training for sap abap, sap erp, sap basis, sap fi,sap co, sap mm, sap sd, sap pp and other functional modules.

  • SAP All Modules Training & Placement By Newyorksys.com

    NewyorkSys is one of the leading top IT Training and Consulting Company in US, with a good placement track record. We have certified trainers. We will provide Online Training, Fast Track online training, with job assistance Courses : SAP Technologies,Dataware housing Tools , Oralce Technologies,SAS,JAVA,.NET,BA .. etc. ATTEND FREE DEMO CLASS NewyorkSys Inc USA:+1- 718 – 313-0499
    USA:+1-718-305-1757
    E-mail ID: training@NewyorkSys.com
    Visit: http://www.NewyorkSys.com

  • SAP HR/HCM Training | SAP HR/HCM Placement | SAP Human Resource / Human Capital Management Training,

    SAP HR/HCM Online Course. NewyorkSys is one of the leading top IT Training and Placement Company in US, with a Good placement track record. We have Certified Trainers. We will provide Online Training, Fast Track Online Training, with Job Assistance. SAP Technologies, Data Warehousing Tools, Oralce Technologies, SAS, JAVA, .NET, BA . ATTEND FREE DEMO CLASS. NewyorkSys Inc. – USA: +1- 718-313-0499;+1-718-305-1757 E: training@newyorksys.com

  • NEWYORKSYS: SAP FICO Training | SAP FICO Placement | sap finance controlling training | SAP FICO Onl

    SAP FICO Online Course. NewyorkSys is one of the leading top IT Training and Placement Company in US, with a Good placement track record. We have Certified Trainers. We will provide Online Training, Fast Track Online Training, with Job Assistance. SAP Technologies, Data Warehousing Tools, Oralce Technologies, SAS, JAVA, .NET, BA . ATTEND FREE DEMO CLASS. NewyorkSys Inc. – USA: +1- 718-313-0499;+1-718-305-1757 E: training@newyorksys.com

  • NEWYORKSYS: SAP FICO Training | SAP FICO Placement | sap finance controlling training | SAP FICO Onl

    SAP FICO Online Course. NewyorkSys is one of the leading top IT Training and Placement Company in US, with a Good placement track record. We have Certified Trainers. We will provide Online Training, Fast Track Online Training, with Job Assistance. SAP Technologies, Data Warehousing Tools, Oralce Technologies, SAS, JAVA, .NET, BA . ATTEND FREE DEMO CLASS. NewyorkSys Inc. – USA: +1- 718-313-0499;+1-718-305-1757 E: training@newyorksys.com

  • Sap Training

    Sappractices offers customized SAP training based on changing demands of SAP industry.Our SAP Certified experts are real time working professionals having multiple domain implementation experience.They have worked on almost all the verticals and add on technologies.They have an experience in handling the critical issues.Our Training model not only focus on key technologies,it also brings the knowledge feeding on other related technologies,based on the job market.

    sappractices@gmail.com
    http://www.sappractices.com

  • SAP Training Manuals

    Teach yourself SAP with our SAP Training Course Manuals. This is the best low cost solution to learning SAP. Our training course is easy to follow, up-to-date, well formatted, uses plain language and is illustrated in colour. We supply all our documents in Microsoft Word format so you can easily customise the manuals for your project.

  • SAP SD Certification Material

    It is a website that you can use to build you SAP SD skills and prepare for SAP Certification. SAP sample questions, books, tips&tricks are provided. Good luck with certification!

Submit More
;;