sap inside track chicago presentation: abap2xlsx

42
2003 2011 Techedge - All rights reserved Any Techedge external diffusion is forbidden, except if specifically authorized ISO 9001:2008 Ivan Femia SCN Active Member @IvanFemia Generate your professional Excel spreadsheet from ABAP abap2xlsx Date: July 2011

Upload: others

Post on 27-Nov-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SAP Inside Track Chicago Presentation: abap2xlsx

2003 – 2011 Techedge - All rights reservedAny Techedge external diffusion is forbidden, except if specifically authorized

ISO 9001:2008

Ivan FemiaSCN Active Member

@IvanFemia

Generate your professionalExcel spreadsheet from ABAP

abap2xlsx

Date: July 2011

Page 2: SAP Inside Track Chicago Presentation: abap2xlsx

Agenda

2

Introduction

Export data AS-IS

• Standard solution

• Custom solution

abap2xlsx solution

Why abap2xlsx?

Orchestration

abap2xlsx on Code Exchange

References

Page 3: SAP Inside Track Chicago Presentation: abap2xlsx

Agenda

3

Introduction

Export data AS-IS

• Standard solution

• Custom solution

abap2xlsx solution

Why abap2xlsx?

Orchestration

abap2xlsx on Code Exchange

References

Page 4: SAP Inside Track Chicago Presentation: abap2xlsx

4

Mr. abap2xlsx ID

abap2xlsxCommunity Driven project for happier users

BirthdayJuly, 12th 2010

Numbersmost viewed SDN blog of 2010most popular project on SAP Code Exchangemore than 2,500 downloadsmore than 150 project members9 active developers

AddressCode Exchange at https://cw.sdn.sap.com/cw/groups/abap2xlsx

StandardOpen XML supported by MS Excel 2007, MS Excel 2010, LibreOffice, Open Officeand many others

Page 5: SAP Inside Track Chicago Presentation: abap2xlsx

The goal

5

Improving ABAP capabilities to create and read rich .xlsx files

Page 6: SAP Inside Track Chicago Presentation: abap2xlsx

“you know, to work I use this Excel but now we need to upload it into the system…”

Some days later…

“well Ivan, you know, to work I need to download from the system an Excel like this…”

The problem space

6

Page 7: SAP Inside Track Chicago Presentation: abap2xlsx

The result

7

Wow

Page 8: SAP Inside Track Chicago Presentation: abap2xlsx

The result

8

“Ivan, you know, everyday the system has also to eMail the Excel to each recipient and

let them download an fresh version from our portal”

“before going home, Ivan remember that recipients need also to update the Excel and

send it back to the system…”

“he’s a bit crazy, whenhe can’t do his simplejob, he begin speakingalone. He believes in a

community…”

“I have to say himeverything to do

but he’s not a badguy”

Page 9: SAP Inside Track Chicago Presentation: abap2xlsx

Agenda

9

Introduction

Export data AS-IS

• Standard solution

• Custom solution

abap2xlsx solution

Why abap2xlsx?

Orchestration

abap2xlsx on Code Exchange

References

Page 10: SAP Inside Track Chicago Presentation: abap2xlsx

Standard solution

10

Most of the standard SAP components (such as ABAP ALV, WebDynpro ALV, System

menu, etc.) provide the option to export data in MS Excel 2003 or in many other MS

Excel compatible file formats (csv, plain text, mhtml and so on).

What are the limits?

Depend on SAP GUI or Web Dynpro

Are not available for example in case you want to

send it as email attachment or in a batch process.

Have a no professional Look and Feel

Page 11: SAP Inside Track Chicago Presentation: abap2xlsx

Custom solution

11

To avoid some limitations and create spreadsheet with a professional look and feel

SAP Mentor Sergio Ferrari proposed in 2006 a great trick: create an HTML file and

open in Excel.

What are the limits again?

Only one sheet for each workbook

No conditional formatting

HTML extension is not associated by default

with MS Excel

No advanced features

Page 12: SAP Inside Track Chicago Presentation: abap2xlsx

Custom solution

12

Community was really active, SDN contributors began to create workbooks using the

OLE Object technology; this was a good approach with great results, but…

What are the limits?

SAPGui dependent

Cannot be used in a no dialog process

Cannot send as email attachment (without some

dirty trick)

Is platform dependent

Page 13: SAP Inside Track Chicago Presentation: abap2xlsx

Export data AS-IS

13

Which one do you prefer?

Page 14: SAP Inside Track Chicago Presentation: abap2xlsx

New frontiers

14

I prefer this one!

abap2xlsx inside – full optional – unlimited miles

Page 15: SAP Inside Track Chicago Presentation: abap2xlsx

Agenda

15

Introduction

Export data AS-IS

• Standard solution

• Custom solution

abap2xlsx solution

Why abap2xlsx?

Orchestration

abap2xlsx on Code Exchange

References

Page 16: SAP Inside Track Chicago Presentation: abap2xlsx

Old scenario

16

It is so difficultto analyze the

data

Page 17: SAP Inside Track Chicago Presentation: abap2xlsx

abap2xlsx scenario

17

Green light!I can get my

bonus this year!

Page 18: SAP Inside Track Chicago Presentation: abap2xlsx

abap2xls solution

18

On June 2010 I had an idea; use ABAP to create Excel from scratch based on Open XML

standard.

Basically abap2xlsx is a powerfull ABAP framework that creates pure Excel files

directly from ABAP without any plugin.

Page 19: SAP Inside Track Chicago Presentation: abap2xlsx

Open XML was developed by Microsoft starting from 2000 and has been standardized

in 2006 by Ecma International (as ECMA-376) and in 2008 by ISO and IEC (ISO/IEC

29500).

In Microsoft Office 2007 Suite, Open XML become the default file format for all

documents (Excel, Word, Power Point).

Open XML

19

Page 20: SAP Inside Track Chicago Presentation: abap2xlsx

Open XML

20

An Office Open XML file is a ZIP-compatible OPC package containing XML documents

and other resources. That is, one can see the contents of an OOXML file, for example

by renaming it to a .zip file and opening it with any zip tool. The actual .xml files can

then be viewed in a web browser or a plain text editor.

Page 21: SAP Inside Track Chicago Presentation: abap2xlsx

Agenda

21

Introduction

Export data AS-IS

• Standard solution

• Custom solution

abap2xlsx solution

Why abap2xlsx?

Orchestration

abap2xlsx on Code Exchange

References

Page 22: SAP Inside Track Chicago Presentation: abap2xlsx

Compare tecnologies

22

SCN Olympic Games2011

Page 23: SAP Inside Track Chicago Presentation: abap2xlsx

CSV Properties

23

Page 24: SAP Inside Track Chicago Presentation: abap2xlsx

HTML & MHTML Properties

24

Cell style

Images

Formulas

External Hyperlinks

Column merge

Text alignment

Row merge

Font styles

Page 25: SAP Inside Track Chicago Presentation: abap2xlsx

OLE Properties

25

Font styles

Cell style

Data validationImages

Sheet protection

Workbook protection

Sheet hiding

Formulas

Password protection

Page layout

External Hyperlinks

Internal Hyperlinks

Freezing panes

Ranges

Column merge

Row merge

Column size

Row height

Column hide

Row hide

Iconset

Conditional formatting

Text alignment

Shrink text

Hide zerosPrint settings

Gridlines control

Hide/Show cell labels

Cell formatCell lock

Table auto filter

Table totals Multi sheets

Table style

Page 26: SAP Inside Track Chicago Presentation: abap2xlsx

abap2xlsx properties

26

Font styles

Cell style

Data validationImages

Visual Basic forApplication

Sheet protection

Workbook protection

Sheet hiding

Formulas

RGB Colors

Color tynts XLSX Reader

Password protection

Table binding

Table style

Page layout

External Hyperlinks

Internal Hyperlinks

Freezing panes

Ranges

Column merge

Row merge

Column size

Row height

Column hide

Row hide

Iconset

Conditional formatting

Text alignment

Shrink text

Hide zerosPrint settings

Gridlines control

Hide/Show cell labels

Cell format

i8n compliant

SU01 proprerties

Export in CSV

Export in XLSM

Cell lock

Table auto filter

Table totals

DDIC Field Label

Batch support

Multi sheets

Page 27: SAP Inside Track Chicago Presentation: abap2xlsx

Final result

27

CSV

OLE

MHTMLabap2xlsx

Page 28: SAP Inside Track Chicago Presentation: abap2xlsx

Demo time

28

Page 29: SAP Inside Track Chicago Presentation: abap2xlsx

Agenda

29

Introduction

Export data AS-IS

• Standard solution

• Custom solution

abap2xlsx solution

Why abap2xlsx?

Orchestration

abap2xlsx on Code Exchange

References

Page 30: SAP Inside Track Chicago Presentation: abap2xlsx

Orchestration

30

Is abap2xls ready for orchestration?

Page 31: SAP Inside Track Chicago Presentation: abap2xlsx

Orchestration

31

Ok serious! Is abap2xls ready for orchestration?

Page 32: SAP Inside Track Chicago Presentation: abap2xlsx

Orchestration

32

Page 33: SAP Inside Track Chicago Presentation: abap2xlsx

Orchestration

33

SAPGui NetWeaver Business Client

Page 34: SAP Inside Track Chicago Presentation: abap2xlsx

Orchestration

34

Page 35: SAP Inside Track Chicago Presentation: abap2xlsx

Orchestration

35

Page 36: SAP Inside Track Chicago Presentation: abap2xlsx

Orchestration

36

Page 37: SAP Inside Track Chicago Presentation: abap2xlsx

Orchestration

37

Page 38: SAP Inside Track Chicago Presentation: abap2xlsx

Agenda

38

Introduction

Export data AS-IS

• Standard solution

• Custom solution

abap2xlsx solution

Why abap2xlsx?

Orchestration

abap2xlsx on Code Exchange

References

Page 39: SAP Inside Track Chicago Presentation: abap2xlsx

Informations: Download, Install and Learn

39

abap2xlsx is the leading project on SAP Code Exchange platform

It has more than 150 active members and 9 contributors

It is free and it is released under SAP NetWeaver Developer License Agreement (NDLA)

Stable releases are distributed as nugg file (SAPLink) and Transport Request

There are about 30 demos available to test and learn abap2xlsx

Page 40: SAP Inside Track Chicago Presentation: abap2xlsx

Code Exchange

40

Page 41: SAP Inside Track Chicago Presentation: abap2xlsx

References

41

Open XML definition

http://en.wikipedia.org/wiki/Office_Open_XML

Standard ECMA-376

http://www.ecma-international.org/publications/standards/Ecma-376.htm

Standard ISO/IEC 29500-1:2008

http://www.iso.org/iso/catalogue_detail?csnumber=51463

abap2xlsx SDN related blogs

http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/u/251856298

abap2xlsx Code Exchange project

https://cw.sdn.sap.com/cw/groups/abap2xlsx

Page 42: SAP Inside Track Chicago Presentation: abap2xlsx

All rights reserved

42