Category Archives: Abap

Abap coding

#abap2xlsx is relocating… Welcome to GITHub

It was June 2010 when I published the first release of abap2xlsx.

Thanks to this community, the project grew up quickly and acquired a lot of popularity…

I always loved open source approach, but in SAP this was not so easy to achieve. ABAP is a proprietary language and it had always some limitation in code sharing, but fortunately Code Exchange was born and the community found the pleasure of collaborating together in a project.

This was a first step to the real idea of open source, because Code Exchange was bounded to a very “sophisticated” TOU (Terms of Use), that obliged you to publish your code only under the Code Exchange Licence and on SAP Code Exchange Repository.

Just in time for the SAPTechEd Bangalore, the New Unified Developer Licence was released (read this blog Announcing the unified SAP Developer License by Juergen Schmerder and watch SAP Live Interview with Abesh BhattacharjeeArshit K and Marek Kowalkiewicz) and it gives you the freedom to choose your licence and share YOUR code using whatever channel you prefer 

What a great opportunity… GITHub I’m coming…

So today I decided to migrate abap2xlsx from Assembla to GITHub… I hope that this decision will give more visibility to the project and also simplify the collaboration between us in order to easily contribute.

Currently all the revisions’ history and issues (unfortunately with my username) have been migrated.

Unfortunately, Assembla doesn’t offer an easy way to export discussions, so I’m considering to collect the best discussions in the GITHub wiki. It will be very long work  (looking for volunteers).

In order to better manage discussions, I decided to use Code Exchange discussion board as the official channel for help requests, suggestions and so on…

More information on how to collaborate on the project will come soon… Stay tuned!

So what is missing? The new address 

It is so easy, it is always the same www.plinky.it/abap/abap2xlsx.php

abap2xlsx – Business charts

In July 2010, SAP Mentor Ivan Femia released the first version of the open source project abap2xlsx that allowed ABAP developers to generate professional spreadsheets from scratch with all the advanced features that stand alone Excel editors provide like: style and cell data formats, drawings support, conditional formatting, formulas, and so on.

This project has improved the user experience compared to excel generated using SAP standard components (such as ABAP ALV, WebDynpro ALV, System menu, etc.) and it has made ABAP developers more freedom adding, for example, the ability to generate an excel from non dialog processes and to include the generated excel as email attachment. At last but not least, this framework allows the use of spreadsheets in an interactive way, making possible to read them via ABAP for further processing.

Time after time, more and more SDN community members joined into the project and improved its functionalities. The abap2xlsx project reaches a large number of contributors, so today it is almost time for the new release that will include many new features such as the use of template files for charts, very hidden sheet, many bug fixes and so on. In this blog we will focus on one of the most important news: the ability to create custom charts from scratch!

1.jpg

Yes, that’s right: with just a few simple ABAP code lines, you can create business graphics within the excel file and send it, for example, to many iPhone/iPad via a push notification or via an html email (as weekly summary for example).

2.jpg

3.jpg          4.jpg

Another interesting way to use abapxlsx charts is to generate them using abap and then catch them as an image in order to show the chart in a WebDynpro or to send it directly to a mobile device! You believe that this is not possible? It is not easy, but you can do it following these steps:

  1.      Generate the excel file with the chart as you wish via ABAP using abap2xlsx
  2.      Add a simple macro to the excel via ABAP using abap2xlsx in order to enable the excel to export the chart in an image file like this:
     
    5.jpg
     
  3.      Write a simple vbs file via ABAP in order to run the image generation like this:
     
    6.jpg
     
  4.      Save the excel file and the vbs on the SAP NetWeaver Application Server filesystem via ABAP 
     
    * Opening the File
    OPEN DATASET lv_filename FOR OUTPUT IN TEXT MODE
           MESSAGE lv_msgtxt.
    IF SY-SUBRC NE 0.
          WRITE: ‘File cannot be opened. Reason:’, lv_msgtxt.
          EXIT.
    ENDIF.* Transferring Data
    LOOP AT lt_table.
          TRANSFER lt_table-line TO FILENAME.
    ENDLOOP.* Closing the File
    CLOSE DATASET lv_filename.
     
  5.      Run the saved VBScript file via ABAP
     

    v_command = ‘cscript.exe test.vbs’.

     

    CALL ‘SYSTEM’ ID ‘COMMAND’ FIELD v_command.

     
  6.      The chart image has been generated! Get it from the Application Server filesystem via ABAP and display or send it!    
    7.jpg

#InnoJam Madrid @ #SAPTechEd – Develop like never before

After the great victory last year, I’m so happy to have attended the SAP InnoJam event in Madrid also this year.

Don’t you know what InnoJam is?

I suggest you to have a look to the wiki page to get more detail, but basically it is a innovation game where people, coming from different countries, join in different groups and in 30 hours no stop coding they try to solve thematic business cases using the latest SAP technologies such as SAP HANA, SAP NetWeaver Gateway, SUP 2.2, NetWeaver Cloud…

For me SAP InnoJam is one of the most valuable resource in the entire SAP TechEd week, you get in touch with your peers, that sometimes you know form the SCN Community or you’re never knew. You create a team combining different skills and expertise you try to create the most coolest application.

Each InnoJam has a theme, in Madrid it was Better Cities – Better Lives and we got 5 business cases:

  1. Pooling: Redesign the experience of cities and their inhabitants to setup and actively participate in polls.
  2. Education: Redesign the information and interaction experience for parents in the context of schools.
  3. Better my Journey. Redesign the service experience for commuters and city inhabitants in the context of getting around in the city.
  4. Free Parking ad-hoc. Redesign the service experience for visitors of the city or big events in the context of finding a parking lot.
  5. Neighborhood Care. Redesign the neighborhood experience for people in the context of helping each other.

photo 1.JPG

I chose to join the into the Education challenge and with my fellow SAP Mentor Fred Verheul, 3 SAP consultants and 1 SAP university student we formed theeKid team!

What we decided to build?

Most of the parents wants to know if their children are feeling good at school, if their mood is ok and also interact to teacher and other parents to help children to feel better at school/home. We created an application (eKid) that improves the interaction between the school/teacher and the parents; and we also had the opportunity to use some cool technologies such as: SAP HANA, SAP NetWeaver Cloud Portal and Windows Mobile 8.

This year, we didn’t start to code immediately, but we had the possibility to learn from SAP coach how to start using the Design Thinking!

I have to admit that I was really curious about, and now, I should say that Design Thinking is really something that helps developers (but not only, it covers the entire project phases) to create an application that fulfill customer needs.

If I look back to that hours collecting interviews, feedbacks, synthesizing information and prototyping solution I‘ll remember for sure the stickies.

This was our working area after few hours of design thinking  😀

photo 2-4.JPG

photo 2-3.JPG

And here we are, after creating a prototype we needed to start coding; some of us coded the entire night (I took 4 hours of sleep).

8175789598_399acf0233_b.jpg

Exactly at 3pm we finished our application and we were ready to get into the stage.

8179259687_ee691eee61_b.jpg

8179290648_1058e6205f_b.jpg

I’m really proud to receive from the Microsoft team their award, but more over they invited our team to present our application to the Microsoft Booth Camp at SAPphire! Is it cool?

8179254575_df141cc66d_b.jpg

photo 3.JPG

Finally I have to thank all the InnoJam Crew, Technical Experts and all the participants to transform this event in a great event.

Next year I’ll attend again the InnoJam, because you learn that you’ll develop like never before.

NOTE: After 30 hours, I’m still here at 1am writing this blog… This is the Power of sapteched  😉

abap2xlsx – half thousand of members and more…

In July 2010, I released the first version of the open source project abap2xlsx and it gets an incredible success from SDN members.

Today I would like to celebrate the overcoming of 500 members in SAP Code Exchange, thanks to Amarpreet Singh for being the 500th.

Time after time, more and more SDN community members joined into the project and improved its functionalities. There are a lot of great developers in SDN and as I always believed if some of them can join together can do incredible things.

I would like to give you some numbers:

  • more than 5000 donwloads in 2 year (without considering daily build)
  • more than 500 members
  • more than 250 workbench object
  • most popular project for 2 years in a row in Code Exchange

This is really incredible, it can be now considered as a real add-on for you SAP system and it would not possible without SAP Code Exchange contributors!

I would like you to know some of them and give them the deserved compliments.

What is planned in next releases?

  • Consolidate the code
  • Bugs fixing
  • Add unit tests in all the classes
  • Use Code Exchange /CEX/ namespace

So now, what are you waiting for? Join abap2xlsx project

Even if you are a young ABAPer you can join us, you have the possibility to learn ABAP-OO, Unit Tests, SAPLink and why not ABAP in Eclipse.

Happy New year SCN and Happy New Excel with abap2xlsx

Dear community, it was in the far July 2011 that I gave you updates on the abap2xlsx project with the reporting of my adventures at SAP Inside Track in Chicago (blog). In the last weeks, I had the idea to write a blog and few days ago a great present by SAP Mentor Gregor Wolf to the project (I will give you more detail below, keep reading) gave me the final sprint to be there on time for the New Year celebration.

Abap2xlsx is still the most popular project on Code Exchange with more than 3,500 downloads and close to 300 members. There is a great interest for this project, discussion board on Code Exchange is very hot, many people are asking and helping and many members are contributing (thanks you all) to improve this project adding new features and fixing some bugs ( yes, we had some 🙂 ).

Continue reading Happy New year SCN and Happy New Excel with abap2xlsx