SlideShare a Scribd company logo
SAP ALV Excel Inplace with Macro recording




SAP ALV Excel Inplace with Macro recording

Author:    Aromal Raveendran
Email:aromalr@gmail.com
SAP ALV Excel Inplace with Macro recording




Pre-requisites:
SAP NetWeaver ABAP 7.0 and above with SAP GUI 7.20and MSExcel 2007/2010 installed in front
end computer

Purpose
This article explains how we can make use of MS Excel Inplace functionality in the SAP ALV toolbar
with macro recording to avoid repetitive tasks such as adding custom calculation field in the standard
/Custom/ Query reports (e.g. Order Qty- Delivery Qty, Pivot Table chart etc)



Intended Audience
SAP Consultants/Users
SAP ALV Excel Inplace with Macro recording




Table of Contents




Introduction......................................................................................................................................................... 4
General Settings to enable macro in Excel 2007 ............................................................................................... 4
Addition of a custom field in ALV report using Excel Inplace and Macro .......................................................... 5
Summary .......................................................................................................................................................... 16
Related Content ............................................................................................................................................... 17
Copyright ............................................................................................................ Error! Bookmark not defined.
SAP ALV Excel Inplace with Macro recording




Introduction
It is quite often that we have downloaded the standard/custom SAP ALV report as Excel document to
the front-end computer and added some calculation fields, converting to pivot table etc. These
repetitive tasks in Excel can be recorded as an Excel macro and we can upload this excel layout
containing macro to SAP as a new ALV layout, so that, when you run the report/selecting the layout,
immediately the output will be displayed as Excel with the repetitive task automatically executed. With
this we can avoid building of Custom fields (derived fields) in standard / Custom / Query report and
save lot of time.



General Settings to enable macro in Excel 2007
When we run the Excel in place functionality in the SAP ALV, by default, the data will not get
automatically transferred to Excel. For that we have to do some macro security settings. Following
screen shots explains how to enable a macro in excel 2007. After activating this we have to close
Excel and run Excel in place functionality once again. Then the data can be seen in Excel. Excel In
place will also work in MSExcel 2010 and MSExcel 2003 with Latest GUI (7.20 advisable) + patches
installed at frond end computer

Step 1: Select Excel options




Step 2: Go to Trust center settings
SAP ALV Excel Inplace with Macro recording




Step3: Go to Macro Settings and select details as per following screen shot.




Addition of a custom field in ALV report using Excel Inplace and Macro

E.g. Adding Rejection%column in standard report (E.g. t-code COID)
In the standard report transaction COID we want to add a Rejection % column. Either we can do it by
ABAP code or download the report to excel and do a formula calculation. But there is an easier
method than writing code in Enhancement spot/Exits/download to achieve this. Following screen
shots explain step by step methods to run a macro along Excel in place functionality.


Step 1: Select Excel in place functionality in the ALV.




Normally in standard /custom report we can also see Excel Inplace functionality like this.
SAP ALV Excel Inplace with Macro recording




Step 2: After seeing the data in Excel go to RawData tab




Step 3: Now go toview tab and select Record Macro.




Step 4: Give the name for the macro and assign a shortcut key (Ctrl + Shift + L)
SAP ALV Excel Inplace with Macro recording




Step 5: Write the formula in the cell as shown. Also leave one cell for heading. (It is better to put the
Heading after the formula calculation otherwise we have to re-adjust the macro code)
. Eg (ROUND(h2/e2*100,2) which will give you rejection percentage rounded upto 2 decimal place




Step 6: Double click/drag outside cell selection, so that this makes the formula applicable for the
entire column.




Step 7: After formula, enter the heading for the column (eg. Rejection %)
SAP ALV Excel Inplace with Macro recording




Step 8: Apply borders for the column if needed and do necessary formatting




Step 9: Stop recording the macro as shown below. Now the tasks that we have done from step 5 to
step 8 has been recorded as macro named RejectionPer(see Step 4).




Step 10: Now you can see the recorded macro in View Macros.
SAP ALV Excel Inplace with Macro recording




Step 11: Save the Excel in the front end computer
SAP ALV Excel Inplace with Macro recording




Step 12: Now select change layout to upload the excel macro (alv_macro_eample.xls) in front end
machine to SAP .




Step 13: Now go to the view tab and select Microsoft Excel and use Upload to BDS option
SAP ALV Excel Inplace with Macro recording




Step 14: Select the excel file we saved in the desktop and upload
SAP ALV Excel Inplace with Macro recording




Step 15: Save this layout by selecting the template we have just uploaded.
SAP ALV Excel Inplace with Macro recording




Step 16. Now go out of the report and run the report and select the layout we have saved.
SAP ALV Excel Inplace with Macro recording




Step 17: You can run the macro by pressing the shortcut Ctrl+Shift+L(we assigned it in Step 4) or go
to view tab and run the macro manually.
SAP ALV Excel Inplace with Macro recording




Step 18: We can see the output now as below




We can automatically run the macro when we select the Raw Data tab in the Excel .For this, Edit the
macro and put below piece of code in ThisWorkbook ->Workbook->SheetActivate method (as
shown below).


  If Sh.Name = "RawData" Then
    Module1.RejectionPer
  End If
SAP ALV Excel Inplace with Macro recording




Summary

All the above tasks we can easily do within couple of minutes. If we consider enhancing the standard
report and transporting it through the landscapes to PRD or downloading it to excel and do the
activities,this functionality saves a lot of time for the consultants/Users.

Try to record some Pivot table with charts and start exploring.
SAP ALV Excel Inplace with Macro recording


Related Content
http://office.microsoft.com/en-us/excel-help/change-macro-security-settings-in-excel-
HP010096919.aspx
http://help.sap.com/saphelp_470/helpdata/en/e3/41a138c4397a42e10000009b38f842/content.htm

More Related Content

What's hot

Presentation on resource related billing
Presentation on resource related billingPresentation on resource related billing
Presentation on resource related billing
Amlan Sarkar
 
SAP Draft Solution for GST India
SAP Draft Solution for GST IndiaSAP Draft Solution for GST India
SAP Draft Solution for GST India
Sandeep Mahindra
 
Hana for copa
Hana for copaHana for copa
Hana for copanc27770
 
Blueprint process questions_ics
Blueprint process questions_icsBlueprint process questions_ics
Blueprint process questions_ics
walldorf_share
 
mizing Fileds in FBL1N/FBL5N
mizing Fileds in FBL1N/FBL5Nmizing Fileds in FBL1N/FBL5N
mizing Fileds in FBL1N/FBL5NImran M Arab
 
Copa implementation
Copa implementationCopa implementation
Copa implementation
suryanarayana tata
 
Sap co
Sap coSap co
Sap co
gabrielsyst
 
New gl functionality_by_guntupalli_hari_krishna_
New gl functionality_by_guntupalli_hari_krishna_New gl functionality_by_guntupalli_hari_krishna_
New gl functionality_by_guntupalli_hari_krishna_
Hari Krishna
 
Cash Management in SAP
Cash Management in SAPCash Management in SAP
Cash Management in SAP
KamalGaur11
 
sap-co-configuration
sap-co-configurationsap-co-configuration
sap-co-configurationMohd Rehan
 
Tables fi co
Tables fi coTables fi co
Tables fi co
KickOff_75
 
SAP BODS Designer PDF
SAP BODS Designer PDFSAP BODS Designer PDF
SAP BODS Designer PDF
chalasani kamesh
 
Curso co sap
Curso co sapCurso co sap
Curso co sap
gabrielsyst
 
Su01 parameters fico_guntupalliharikrishna
Su01 parameters fico_guntupalliharikrishna Su01 parameters fico_guntupalliharikrishna
Su01 parameters fico_guntupalliharikrishna
Hari Krishna
 
Cutover activities
Cutover activitiesCutover activities
Cutover activities
Shobhnath Singh
 
56321818 sap-hr-stepwise-screen-shots
56321818 sap-hr-stepwise-screen-shots56321818 sap-hr-stepwise-screen-shots
56321818 sap-hr-stepwise-screen-shotssandykodali
 
Automatic vendor payment advice notes by mail
Automatic vendor payment advice notes by mailAutomatic vendor payment advice notes by mail
Automatic vendor payment advice notes by mail
SURESH BABU MUCHINTHALA
 
Sudheer Reddy Business Blue Print Sample
Sudheer Reddy Business Blue Print SampleSudheer Reddy Business Blue Print Sample
Sudheer Reddy Business Blue Print Sample
Sudheer Reddy Himmathrao
 

What's hot (20)

Presentation on resource related billing
Presentation on resource related billingPresentation on resource related billing
Presentation on resource related billing
 
SAP Draft Solution for GST India
SAP Draft Solution for GST IndiaSAP Draft Solution for GST India
SAP Draft Solution for GST India
 
Hana for copa
Hana for copaHana for copa
Hana for copa
 
Easy dms basic process guide
Easy dms basic process guideEasy dms basic process guide
Easy dms basic process guide
 
Blueprint process questions_ics
Blueprint process questions_icsBlueprint process questions_ics
Blueprint process questions_ics
 
mizing Fileds in FBL1N/FBL5N
mizing Fileds in FBL1N/FBL5Nmizing Fileds in FBL1N/FBL5N
mizing Fileds in FBL1N/FBL5N
 
The ABAP Query
The ABAP QueryThe ABAP Query
The ABAP Query
 
Copa implementation
Copa implementationCopa implementation
Copa implementation
 
Sap co
Sap coSap co
Sap co
 
New gl functionality_by_guntupalli_hari_krishna_
New gl functionality_by_guntupalli_hari_krishna_New gl functionality_by_guntupalli_hari_krishna_
New gl functionality_by_guntupalli_hari_krishna_
 
Cash Management in SAP
Cash Management in SAPCash Management in SAP
Cash Management in SAP
 
sap-co-configuration
sap-co-configurationsap-co-configuration
sap-co-configuration
 
Tables fi co
Tables fi coTables fi co
Tables fi co
 
SAP BODS Designer PDF
SAP BODS Designer PDFSAP BODS Designer PDF
SAP BODS Designer PDF
 
Curso co sap
Curso co sapCurso co sap
Curso co sap
 
Su01 parameters fico_guntupalliharikrishna
Su01 parameters fico_guntupalliharikrishna Su01 parameters fico_guntupalliharikrishna
Su01 parameters fico_guntupalliharikrishna
 
Cutover activities
Cutover activitiesCutover activities
Cutover activities
 
56321818 sap-hr-stepwise-screen-shots
56321818 sap-hr-stepwise-screen-shots56321818 sap-hr-stepwise-screen-shots
56321818 sap-hr-stepwise-screen-shots
 
Automatic vendor payment advice notes by mail
Automatic vendor payment advice notes by mailAutomatic vendor payment advice notes by mail
Automatic vendor payment advice notes by mail
 
Sudheer Reddy Business Blue Print Sample
Sudheer Reddy Business Blue Print SampleSudheer Reddy Business Blue Print Sample
Sudheer Reddy Business Blue Print Sample
 

Similar to Sap alv excel inplace with macro recording sapignite

SYSTEM APPLICATION PRODUCTS AND DATA PROCESING
SYSTEM APPLICATION PRODUCTS AND DATA PROCESINGSYSTEM APPLICATION PRODUCTS AND DATA PROCESING
SYSTEM APPLICATION PRODUCTS AND DATA PROCESING
sivacristiano64
 
Creating reports in oracle e business suite using xml publisher
Creating reports in oracle e business suite using xml publisherCreating reports in oracle e business suite using xml publisher
Creating reports in oracle e business suite using xml publisher
Samchi Fouzee
 
Spring AOP
Spring AOPSpring AOP
Spring AOP
Lhouceine OUHAMZA
 
How to create_an_ecatt
How to create_an_ecattHow to create_an_ecatt
How to create_an_ecatt
Mohammed Azhad
 
XLS PE How To Tutorials Tips & Tricks
XLS PE How To Tutorials Tips & TricksXLS PE How To Tutorials Tips & Tricks
XLS PE How To Tutorials Tips & Tricksguest92a5de
 
XLS Processor Engine How To, Tutorials, Tips & Tricks
XLS Processor Engine How To, Tutorials, Tips & TricksXLS Processor Engine How To, Tutorials, Tips & Tricks
XLS Processor Engine How To, Tutorials, Tips & TricksEarl Grau
 
Spreadsheet Analytical Tools
Spreadsheet Analytical ToolsSpreadsheet Analytical Tools
Spreadsheet Analytical Tools
Joselito Perez
 
How To Automate Part 3
How To Automate Part 3How To Automate Part 3
How To Automate Part 3
Sean Durocher
 
SAP BPC Learning Notes and Insights.docx
SAP BPC Learning Notes and Insights.docxSAP BPC Learning Notes and Insights.docx
SAP BPC Learning Notes and Insights.docx
Ken T
 
Oracle application express
Oracle application expressOracle application express
Oracle application express
Abhinaw Kumar
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express pptAbhinaw Kumar
 
First steps with Scilab
First steps with ScilabFirst steps with Scilab
First steps with Scilab
Scilab
 
770_0629.pdf dump for oracle cloud interface
770_0629.pdf dump for oracle cloud interface770_0629.pdf dump for oracle cloud interface
770_0629.pdf dump for oracle cloud interface
lknam1982
 
New features of sql server 2005
New features of sql server 2005New features of sql server 2005
New features of sql server 2005Govind Raj
 
Microsoft Excel Dashboards and Their Features.pdf
Microsoft Excel Dashboards and Their Features.pdfMicrosoft Excel Dashboards and Their Features.pdf
Microsoft Excel Dashboards and Their Features.pdf
Nitin
 
Automating SolidWorks with Excel
Automating SolidWorks with ExcelAutomating SolidWorks with Excel
Automating SolidWorks with Excel
Razorleaf Corporation
 
( 13 ) Office 2007 Coding With Excel And Excel Services
( 13 ) Office 2007   Coding With Excel And Excel Services( 13 ) Office 2007   Coding With Excel And Excel Services
( 13 ) Office 2007 Coding With Excel And Excel ServicesLiquidHub
 
Introduction to Excel VBA/Macros
Introduction to Excel VBA/MacrosIntroduction to Excel VBA/Macros
Introduction to Excel VBA/Macros
arttan2001
 

Similar to Sap alv excel inplace with macro recording sapignite (20)

SYSTEM APPLICATION PRODUCTS AND DATA PROCESING
SYSTEM APPLICATION PRODUCTS AND DATA PROCESINGSYSTEM APPLICATION PRODUCTS AND DATA PROCESING
SYSTEM APPLICATION PRODUCTS AND DATA PROCESING
 
Creating reports in oracle e business suite using xml publisher
Creating reports in oracle e business suite using xml publisherCreating reports in oracle e business suite using xml publisher
Creating reports in oracle e business suite using xml publisher
 
Spring AOP
Spring AOPSpring AOP
Spring AOP
 
How to create_an_ecatt
How to create_an_ecattHow to create_an_ecatt
How to create_an_ecatt
 
XLS PE How To Tutorials Tips & Tricks
XLS PE How To Tutorials Tips & TricksXLS PE How To Tutorials Tips & Tricks
XLS PE How To Tutorials Tips & Tricks
 
XLS Processor Engine How To, Tutorials, Tips & Tricks
XLS Processor Engine How To, Tutorials, Tips & TricksXLS Processor Engine How To, Tutorials, Tips & Tricks
XLS Processor Engine How To, Tutorials, Tips & Tricks
 
Spreadsheet Analytical Tools
Spreadsheet Analytical ToolsSpreadsheet Analytical Tools
Spreadsheet Analytical Tools
 
How To Automate Part 3
How To Automate Part 3How To Automate Part 3
How To Automate Part 3
 
SAP BPC Learning Notes and Insights.docx
SAP BPC Learning Notes and Insights.docxSAP BPC Learning Notes and Insights.docx
SAP BPC Learning Notes and Insights.docx
 
Oracle application express
Oracle application expressOracle application express
Oracle application express
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express ppt
 
Excel
ExcelExcel
Excel
 
First steps with Scilab
First steps with ScilabFirst steps with Scilab
First steps with Scilab
 
Bo analusis macros
Bo analusis  macrosBo analusis  macros
Bo analusis macros
 
770_0629.pdf dump for oracle cloud interface
770_0629.pdf dump for oracle cloud interface770_0629.pdf dump for oracle cloud interface
770_0629.pdf dump for oracle cloud interface
 
New features of sql server 2005
New features of sql server 2005New features of sql server 2005
New features of sql server 2005
 
Microsoft Excel Dashboards and Their Features.pdf
Microsoft Excel Dashboards and Their Features.pdfMicrosoft Excel Dashboards and Their Features.pdf
Microsoft Excel Dashboards and Their Features.pdf
 
Automating SolidWorks with Excel
Automating SolidWorks with ExcelAutomating SolidWorks with Excel
Automating SolidWorks with Excel
 
( 13 ) Office 2007 Coding With Excel And Excel Services
( 13 ) Office 2007   Coding With Excel And Excel Services( 13 ) Office 2007   Coding With Excel And Excel Services
( 13 ) Office 2007 Coding With Excel And Excel Services
 
Introduction to Excel VBA/Macros
Introduction to Excel VBA/MacrosIntroduction to Excel VBA/Macros
Introduction to Excel VBA/Macros
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 

Sap alv excel inplace with macro recording sapignite

  • 1. SAP ALV Excel Inplace with Macro recording SAP ALV Excel Inplace with Macro recording Author: Aromal Raveendran Email:aromalr@gmail.com
  • 2. SAP ALV Excel Inplace with Macro recording Pre-requisites: SAP NetWeaver ABAP 7.0 and above with SAP GUI 7.20and MSExcel 2007/2010 installed in front end computer Purpose This article explains how we can make use of MS Excel Inplace functionality in the SAP ALV toolbar with macro recording to avoid repetitive tasks such as adding custom calculation field in the standard /Custom/ Query reports (e.g. Order Qty- Delivery Qty, Pivot Table chart etc) Intended Audience SAP Consultants/Users
  • 3. SAP ALV Excel Inplace with Macro recording Table of Contents Introduction......................................................................................................................................................... 4 General Settings to enable macro in Excel 2007 ............................................................................................... 4 Addition of a custom field in ALV report using Excel Inplace and Macro .......................................................... 5 Summary .......................................................................................................................................................... 16 Related Content ............................................................................................................................................... 17 Copyright ............................................................................................................ Error! Bookmark not defined.
  • 4. SAP ALV Excel Inplace with Macro recording Introduction It is quite often that we have downloaded the standard/custom SAP ALV report as Excel document to the front-end computer and added some calculation fields, converting to pivot table etc. These repetitive tasks in Excel can be recorded as an Excel macro and we can upload this excel layout containing macro to SAP as a new ALV layout, so that, when you run the report/selecting the layout, immediately the output will be displayed as Excel with the repetitive task automatically executed. With this we can avoid building of Custom fields (derived fields) in standard / Custom / Query report and save lot of time. General Settings to enable macro in Excel 2007 When we run the Excel in place functionality in the SAP ALV, by default, the data will not get automatically transferred to Excel. For that we have to do some macro security settings. Following screen shots explains how to enable a macro in excel 2007. After activating this we have to close Excel and run Excel in place functionality once again. Then the data can be seen in Excel. Excel In place will also work in MSExcel 2010 and MSExcel 2003 with Latest GUI (7.20 advisable) + patches installed at frond end computer Step 1: Select Excel options Step 2: Go to Trust center settings
  • 5. SAP ALV Excel Inplace with Macro recording Step3: Go to Macro Settings and select details as per following screen shot. Addition of a custom field in ALV report using Excel Inplace and Macro E.g. Adding Rejection%column in standard report (E.g. t-code COID) In the standard report transaction COID we want to add a Rejection % column. Either we can do it by ABAP code or download the report to excel and do a formula calculation. But there is an easier method than writing code in Enhancement spot/Exits/download to achieve this. Following screen shots explain step by step methods to run a macro along Excel in place functionality. Step 1: Select Excel in place functionality in the ALV. Normally in standard /custom report we can also see Excel Inplace functionality like this.
  • 6. SAP ALV Excel Inplace with Macro recording Step 2: After seeing the data in Excel go to RawData tab Step 3: Now go toview tab and select Record Macro. Step 4: Give the name for the macro and assign a shortcut key (Ctrl + Shift + L)
  • 7. SAP ALV Excel Inplace with Macro recording Step 5: Write the formula in the cell as shown. Also leave one cell for heading. (It is better to put the Heading after the formula calculation otherwise we have to re-adjust the macro code) . Eg (ROUND(h2/e2*100,2) which will give you rejection percentage rounded upto 2 decimal place Step 6: Double click/drag outside cell selection, so that this makes the formula applicable for the entire column. Step 7: After formula, enter the heading for the column (eg. Rejection %)
  • 8. SAP ALV Excel Inplace with Macro recording Step 8: Apply borders for the column if needed and do necessary formatting Step 9: Stop recording the macro as shown below. Now the tasks that we have done from step 5 to step 8 has been recorded as macro named RejectionPer(see Step 4). Step 10: Now you can see the recorded macro in View Macros.
  • 9. SAP ALV Excel Inplace with Macro recording Step 11: Save the Excel in the front end computer
  • 10. SAP ALV Excel Inplace with Macro recording Step 12: Now select change layout to upload the excel macro (alv_macro_eample.xls) in front end machine to SAP . Step 13: Now go to the view tab and select Microsoft Excel and use Upload to BDS option
  • 11. SAP ALV Excel Inplace with Macro recording Step 14: Select the excel file we saved in the desktop and upload
  • 12. SAP ALV Excel Inplace with Macro recording Step 15: Save this layout by selecting the template we have just uploaded.
  • 13. SAP ALV Excel Inplace with Macro recording Step 16. Now go out of the report and run the report and select the layout we have saved.
  • 14. SAP ALV Excel Inplace with Macro recording Step 17: You can run the macro by pressing the shortcut Ctrl+Shift+L(we assigned it in Step 4) or go to view tab and run the macro manually.
  • 15. SAP ALV Excel Inplace with Macro recording Step 18: We can see the output now as below We can automatically run the macro when we select the Raw Data tab in the Excel .For this, Edit the macro and put below piece of code in ThisWorkbook ->Workbook->SheetActivate method (as shown below). If Sh.Name = "RawData" Then Module1.RejectionPer End If
  • 16. SAP ALV Excel Inplace with Macro recording Summary All the above tasks we can easily do within couple of minutes. If we consider enhancing the standard report and transporting it through the landscapes to PRD or downloading it to excel and do the activities,this functionality saves a lot of time for the consultants/Users. Try to record some Pivot table with charts and start exploring.
  • 17. SAP ALV Excel Inplace with Macro recording Related Content http://office.microsoft.com/en-us/excel-help/change-macro-security-settings-in-excel- HP010096919.aspx http://help.sap.com/saphelp_470/helpdata/en/e3/41a138c4397a42e10000009b38f842/content.htm