SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 1
Customer Exit Variables in SAP
BW/BI Reports – First day of the
Current/Previous Month
Applies to:
SAP BW 7.0 and will also work on BW 3.5. For more information, visit the EDW homepage.
Summary
This article explains step by step process about how to use Customer Exit Variables in SAP BW/BI reports.
Author: Prakash Kumar Sahu
Company: Tata Technologies Limited (Pune/India)
Created on: 07 April 2011
Author Bio
Prakash Kumar Sahu is a SAP BI consultant with more than 2 years of SAP BI/BW experience and
currently working with Tata Technologies Limited (Pune/India). He has got rich experience and
worked on various BW/BI implementation/Support projects.
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 2
Table of Contents
Introduction: ........................................................................................................................................................3
Business Scenario: .............................................................................................................................................3
Steps:………….. .................................................................................................................................................3
Code:…………… ................................................................................................................................................6
Testing of Code: .................................................................................................................................................9
Report Designer:...............................................................................................................................................12
Execute the Report: ..........................................................................................................................................13
See the Report Result: .....................................................................................................................................13
Related Content................................................................................................................................................14
Disclaimer and Liability Notice..........................................................................................................................15
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 3
Introduction:
This article explains requirement of Customer Exit Variables in BW/BI reports. We will learn how to use
characteristic Customer Exit variables in our BI reports.
Customer Exit Variable: In BI project, consultant often come across the situation when they need to use a
processing type other than manual entry / default value, replacement path, SAP exit, or authorization to fulfill
the requirement of the customer, then a customer exit gives you the option of setting up a processing type for
variables, tailor-made to your specific needs.
Business Scenario:
In many BI reports (For example Sales Report) user want to see the MTD (Month-To-Date) sales data. For
example if user runs the sales report on 7
th
April, 2011 then report should give the sales data from 1
st
April,
2011 to 6
th
April, 2011. Similarly if user runs the sales report on 1
st
day of any month then report should give
the sales data of all the days of last month. For example, if user runs the report on 1
st
April, 2011 then report
should give the sales data from 1
st
March, 2011 to 31
st
March, 2011.
In order to reflect the data in our BI report as per above requirement, we need to use the Customer Exit
Variable on Calendar Day (0CALDAY)
Steps:
1.Create Customer Exit Variable on Calendar Day (0CALDAY)
Create Z_FDCPM (First Day of CurrentPrevious Month). The properties of the variable are as below:-
Type of Variable : Characteristic
Variable Name : Z_FDCPM
Processing By : Customer Exit
Characteristic : Calendar Day
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 4
Variable Represents: Single Value
Variable Entry : Mandatory
Do not check ready for input.
Below are some screenshots for better understanding:-
1.1 Double click on Calendar day InfoObject in your query or right click and select restrict.
1.2 Select Variables from drop-down box.
1.3 Select Characteristic Value Variable as a type from dropdown box.
1.4 Click on “Create New Variable”.
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 5
1.5 Make the setting as below in General tab.
1.6 Make the settings as below in the Details Tab. Leave the other tabs in its default settings. Click OK.
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 6
Code:
Go to T-Code CMOD in BW and then give your Project Name and click on Change button.
Click on Components.
Double Click on EXIT_SAPLRRS0_001.
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 7
Double click on ZXRSRU01.
Write the following code in the ABAP Editor.
*---------------------------------------------------------- *
* INCLUDE ZXRSRU01 *
*---------------------------------------------------------- *
* *************** Data Type Declaration ****************** *
DATA : l_s_range TYPE RSR_S_RANGESID,
loc_var_range LIKE RRRANGEEXIT,
yyyy(4) TYPE n,
mm(2) TYPE n,
dd(2) TYPE n,
fst_date LIKE sy-datum,
begdt LIKE sy-datum.
CASE i_vnam.
* Below codes calculate first day of current/previous month
* (If Date is first day of the month then it gives first day
* of the previous month, If date is not the first date of the
* month then it gives first day of the current month)
WHEN 'Z_FDCPM'.
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 8
IF i_step = 2.
REFRESH e_t_range.
dd = sy-datum+6(2).
mm = sy-datum+4(2).
yyyy = sy-datum+0(4).
IF dd = '01' AND mm = '01'.
mm = '12'.
yyyy = yyyy - 1.
ELSEIF dd = '01' AND mm <> '01'.
mm = mm - 1.
ELSEIF dd <> '01'.
mm = mm.
ENDIF.
CLEAR : fst_date.
CONCATENATE yyyy mm '01' INTO fst_date.
begdt = fst_date.
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = begdt
* I_MONMIT = 00
i_periv = 'V3'
IMPORTING
e_buper = mmm
e_gjahr = yyyy.
CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = yyyy
* I_MONMIT = 00
i_periv = 'V3'
i_poper = mmm
IMPORTING
e_date = firdt.
CLEAR: ls_ra_sid.
ls_ra_sid-sign = 'I'.
ls_ra_sid-opt = 'EQ'.
ls_ra_sid-low = firdt.
CLEAR: ls_ra_sid-high.
APPEND ls_ra_sid TO e_t_range.
ENDIF.
* Above codes calculate first day of current/previous month
ENDCASE.
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 9
Testing of Code:
We will test our codes to check if our customer exit variable works as per the given requirement or not. We
will provide the date manually and will check for its return value. Following are some test cases.
Input Date Expected output date
01.01.2011 ( 20110101 ) 01.12.2010 ( 20101201 )
01.02.2011 ( 20110201 ) 01.01.2011 ( 20110101 )
07.02.2011 ( 20110207 ) 01.02.2011 ( 20110201 )
In data type declaration declare temporary variable curdt as below.
curdt LIKE sy-datum,
For testing purpose only, temporarily modify your codes as below.
Set the External Breakpoint as below.
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 10
Enter the t-code RSRT in BW, give the query name and press enter. After this, click on Execute + Debug.
Following are some function Keys for debugging.
F5 Single Step
F6 Execute
F7 Return
F8 Continue
Press F5 one by one till cursor points to ENDFUNCTION. When cursor points to ENDFUNCTION then click
F8 to continue.
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 11
Double click on the variable during the debugging to get the current value of the variable at that instant. After
debugging is complete we get the values of variables as below.
We can see that, we are getting the output date as expected.
Following are screenshots for other two cases after debugging.
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 12
Report Designer:
In Report Rows: Drag and Drop Calendar Day and Factory Characteristics.
In Report Columns: Drag and Drop Quantity key figure.
In Report Fitter: Restrict the 0CALDAY(Calendar day) with a range whose lower limit is Customer Exit
Variable Z_FDCPM(First Day of CurrentPrevious month) and upper limit is 0DAT (Current Calendar Day)
with offset -1. Please note that 0DAT gives today’s date so 0DAT-1 will give yesterday’s date.
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 13
Execute the Report:
See the Report Result:
See the date ranges in the report. Report was executed on 7
th
April, 2011 so it is giving data from 1
st
April,
2011 to 6
th
April, 2011.
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 14
Related Content
https://www.sdn.sap.com/irj/sdn/index
Implementing Customer Exit Reporting Variables as Methods
SAP Library - Customer Exits
SAP Library - BI Suite - Reporting Variables-Customer Exits
For more information, visit the EDW homepage
Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 15
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces
and therefore is not supported by SAP. Changes made based on this information are not supported and can
be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods
suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of
this technical article or code sample, including any liability resulting from incompatibility between the content
within this document and the materials and services offered by SAP. You agree that you will not hold, or
seek to hold, SAP responsible or liable with respect to the content of this document.

Más contenido relacionado

La actualidad más candente

How to extend an outbound i doc
How to extend an outbound i docHow to extend an outbound i doc
How to extend an outbound i docrupesh chouhan
 
Business partner-2
Business  partner-2Business  partner-2
Business partner-2abc
 
Step by step on changing ecc source systems without affecting data modeling o...
Step by step on changing ecc source systems without affecting data modeling o...Step by step on changing ecc source systems without affecting data modeling o...
Step by step on changing ecc source systems without affecting data modeling o...Andre Bothma
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modificationsscribid.download
 
Lo extraction – part 5 sales and distribution (sd) datasource overview
Lo extraction – part 5  sales and distribution (sd) datasource overviewLo extraction – part 5  sales and distribution (sd) datasource overview
Lo extraction – part 5 sales and distribution (sd) datasource overviewJNTU University
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantAnkit Sharma
 
SAP Adding fields to dynamic selection for fbln transactions (2)
SAP Adding fields to dynamic selection for fbln transactions (2)SAP Adding fields to dynamic selection for fbln transactions (2)
SAP Adding fields to dynamic selection for fbln transactions (2)Imran M Arab
 
How to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwHow to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwLuc Vanrobays
 
Fi vendor ageing functional spec.
Fi vendor ageing functional spec.Fi vendor ageing functional spec.
Fi vendor ageing functional spec.ANILKUMARPULIPATI1
 
Dso job log and activation parameters
Dso job log and activation parametersDso job log and activation parameters
Dso job log and activation parameterssakthirobotic
 
Sap bpc nw 10.0 consolidations ( ic elimination) implementation guide v1 p
Sap bpc nw 10.0 consolidations ( ic  elimination) implementation guide v1 pSap bpc nw 10.0 consolidations ( ic  elimination) implementation guide v1 p
Sap bpc nw 10.0 consolidations ( ic elimination) implementation guide v1 pJothi Periasamy
 
Bw writing routines in update rules
Bw writing routines in update rulesBw writing routines in update rules
Bw writing routines in update rulesknreddyy
 
mizing Fileds in FBL1N/FBL5N
mizing Fileds in FBL1N/FBL5Nmizing Fileds in FBL1N/FBL5N
mizing Fileds in FBL1N/FBL5NImran M Arab
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.docKranthi Kumar
 
How to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selectionHow to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selectionValko Arbalov
 
SAP BI Generic Extraction Using a Function Module.pdf
SAP BI Generic Extraction Using a Function Module.pdfSAP BI Generic Extraction Using a Function Module.pdf
SAP BI Generic Extraction Using a Function Module.pdfKoushikGuna
 

La actualidad más candente (20)

How to extend an outbound i doc
How to extend an outbound i docHow to extend an outbound i doc
How to extend an outbound i doc
 
Bapi programming
Bapi programmingBapi programming
Bapi programming
 
Business partner-2
Business  partner-2Business  partner-2
Business partner-2
 
Bapi step-by-step
Bapi step-by-stepBapi step-by-step
Bapi step-by-step
 
Step by step on changing ecc source systems without affecting data modeling o...
Step by step on changing ecc source systems without affecting data modeling o...Step by step on changing ecc source systems without affecting data modeling o...
Step by step on changing ecc source systems without affecting data modeling o...
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
 
Lo extraction – part 5 sales and distribution (sd) datasource overview
Lo extraction – part 5  sales and distribution (sd) datasource overviewLo extraction – part 5  sales and distribution (sd) datasource overview
Lo extraction – part 5 sales and distribution (sd) datasource overview
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional Consultant
 
SAP Adding fields to dynamic selection for fbln transactions (2)
SAP Adding fields to dynamic selection for fbln transactions (2)SAP Adding fields to dynamic selection for fbln transactions (2)
SAP Adding fields to dynamic selection for fbln transactions (2)
 
How to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwHow to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bw
 
Fi vendor ageing functional spec.
Fi vendor ageing functional spec.Fi vendor ageing functional spec.
Fi vendor ageing functional spec.
 
Dso job log and activation parameters
Dso job log and activation parametersDso job log and activation parameters
Dso job log and activation parameters
 
Sap abap
Sap abapSap abap
Sap abap
 
Sap bpc nw 10.0 consolidations ( ic elimination) implementation guide v1 p
Sap bpc nw 10.0 consolidations ( ic  elimination) implementation guide v1 pSap bpc nw 10.0 consolidations ( ic  elimination) implementation guide v1 p
Sap bpc nw 10.0 consolidations ( ic elimination) implementation guide v1 p
 
Bw writing routines in update rules
Bw writing routines in update rulesBw writing routines in update rules
Bw writing routines in update rules
 
Session 14 validation_steps_sap
Session 14 validation_steps_sapSession 14 validation_steps_sap
Session 14 validation_steps_sap
 
mizing Fileds in FBL1N/FBL5N
mizing Fileds in FBL1N/FBL5Nmizing Fileds in FBL1N/FBL5N
mizing Fileds in FBL1N/FBL5N
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
 
How to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selectionHow to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selection
 
SAP BI Generic Extraction Using a Function Module.pdf
SAP BI Generic Extraction Using a Function Module.pdfSAP BI Generic Extraction Using a Function Module.pdf
SAP BI Generic Extraction Using a Function Module.pdf
 

Similar a Customer exit variables in sap

Variables in sap bi
Variables in sap biVariables in sap bi
Variables in sap bishabari76
 
Dynamic variant creation
Dynamic variant creationDynamic variant creation
Dynamic variant creationyoung moon woo
 
Reporting data in alternate unit of measure in bi 7.0
Reporting data in alternate unit of measure in bi 7.0Reporting data in alternate unit of measure in bi 7.0
Reporting data in alternate unit of measure in bi 7.0Ashwin Kumar
 
Beginner's guide create a custom 'copy' planning function type
Beginner's guide  create a custom 'copy' planning function typeBeginner's guide  create a custom 'copy' planning function type
Beginner's guide create a custom 'copy' planning function typeNaveen Kumar Kotha
 
Electronic bank statement mt940 format
Electronic bank statement mt940 formatElectronic bank statement mt940 format
Electronic bank statement mt940 formatHisham Emam
 
_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdf_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdfssuserfe1f82
 
Creating new unit of measure in sap bw
Creating new unit of measure in sap bwCreating new unit of measure in sap bw
Creating new unit of measure in sap bwRajat Agrawal
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...Rajeev Kumar
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...Kranthi Kumar
 
J62_S4HANA2021_BPD_EN_FR.pdf
J62_S4HANA2021_BPD_EN_FR.pdfJ62_S4HANA2021_BPD_EN_FR.pdf
J62_S4HANA2021_BPD_EN_FR.pdfNareshKumar564728
 
Resume - Namrata Pawar
Resume - Namrata PawarResume - Namrata Pawar
Resume - Namrata PawarNamrata Pawar
 
Vinoth kumar ravi sap abap technical consultant
Vinoth kumar ravi sap abap technical consultantVinoth kumar ravi sap abap technical consultant
Vinoth kumar ravi sap abap technical consultantVinoth Kumar
 
1 eg s4hana1909_bpd_en_mx
1 eg s4hana1909_bpd_en_mx1 eg s4hana1909_bpd_en_mx
1 eg s4hana1909_bpd_en_mxzulmirgd
 
Receive payment flowe
Receive payment floweReceive payment flowe
Receive payment floweAnil Kumar G
 
Creating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsCreating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsHicham Khallouki
 
SAP FI automatic payment program (configuration and run)
SAP FI automatic payment program (configuration and run)SAP FI automatic payment program (configuration and run)
SAP FI automatic payment program (configuration and run)kalralalit1
 

Similar a Customer exit variables in sap (20)

Variables in sap bi
Variables in sap biVariables in sap bi
Variables in sap bi
 
Dynamic variant creation
Dynamic variant creationDynamic variant creation
Dynamic variant creation
 
Reporting data in alternate unit of measure in bi 7.0
Reporting data in alternate unit of measure in bi 7.0Reporting data in alternate unit of measure in bi 7.0
Reporting data in alternate unit of measure in bi 7.0
 
Copa realignment
Copa realignmentCopa realignment
Copa realignment
 
Beginner's guide create a custom 'copy' planning function type
Beginner's guide  create a custom 'copy' planning function typeBeginner's guide  create a custom 'copy' planning function type
Beginner's guide create a custom 'copy' planning function type
 
Electronic bank statement mt940 format
Electronic bank statement mt940 formatElectronic bank statement mt940 format
Electronic bank statement mt940 format
 
Blue print Configuration
Blue print ConfigurationBlue print Configuration
Blue print Configuration
 
_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdf_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdf
 
Creating new unit of measure in sap bw
Creating new unit of measure in sap bwCreating new unit of measure in sap bw
Creating new unit of measure in sap bw
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
 
J62_S4HANA2021_BPD_EN_FR.pdf
J62_S4HANA2021_BPD_EN_FR.pdfJ62_S4HANA2021_BPD_EN_FR.pdf
J62_S4HANA2021_BPD_EN_FR.pdf
 
Resume - Namrata Pawar
Resume - Namrata PawarResume - Namrata Pawar
Resume - Namrata Pawar
 
Resume
ResumeResume
Resume
 
BPC Article original
BPC Article originalBPC Article original
BPC Article original
 
Vinoth kumar ravi sap abap technical consultant
Vinoth kumar ravi sap abap technical consultantVinoth kumar ravi sap abap technical consultant
Vinoth kumar ravi sap abap technical consultant
 
1 eg s4hana1909_bpd_en_mx
1 eg s4hana1909_bpd_en_mx1 eg s4hana1909_bpd_en_mx
1 eg s4hana1909_bpd_en_mx
 
Receive payment flowe
Receive payment floweReceive payment flowe
Receive payment flowe
 
Creating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsCreating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflows
 
SAP FI automatic payment program (configuration and run)
SAP FI automatic payment program (configuration and run)SAP FI automatic payment program (configuration and run)
SAP FI automatic payment program (configuration and run)
 

Último

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Customer exit variables in sap

  • 1. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 1 Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month Applies to: SAP BW 7.0 and will also work on BW 3.5. For more information, visit the EDW homepage. Summary This article explains step by step process about how to use Customer Exit Variables in SAP BW/BI reports. Author: Prakash Kumar Sahu Company: Tata Technologies Limited (Pune/India) Created on: 07 April 2011 Author Bio Prakash Kumar Sahu is a SAP BI consultant with more than 2 years of SAP BI/BW experience and currently working with Tata Technologies Limited (Pune/India). He has got rich experience and worked on various BW/BI implementation/Support projects.
  • 2. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 2 Table of Contents Introduction: ........................................................................................................................................................3 Business Scenario: .............................................................................................................................................3 Steps:………….. .................................................................................................................................................3 Code:…………… ................................................................................................................................................6 Testing of Code: .................................................................................................................................................9 Report Designer:...............................................................................................................................................12 Execute the Report: ..........................................................................................................................................13 See the Report Result: .....................................................................................................................................13 Related Content................................................................................................................................................14 Disclaimer and Liability Notice..........................................................................................................................15
  • 3. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 3 Introduction: This article explains requirement of Customer Exit Variables in BW/BI reports. We will learn how to use characteristic Customer Exit variables in our BI reports. Customer Exit Variable: In BI project, consultant often come across the situation when they need to use a processing type other than manual entry / default value, replacement path, SAP exit, or authorization to fulfill the requirement of the customer, then a customer exit gives you the option of setting up a processing type for variables, tailor-made to your specific needs. Business Scenario: In many BI reports (For example Sales Report) user want to see the MTD (Month-To-Date) sales data. For example if user runs the sales report on 7 th April, 2011 then report should give the sales data from 1 st April, 2011 to 6 th April, 2011. Similarly if user runs the sales report on 1 st day of any month then report should give the sales data of all the days of last month. For example, if user runs the report on 1 st April, 2011 then report should give the sales data from 1 st March, 2011 to 31 st March, 2011. In order to reflect the data in our BI report as per above requirement, we need to use the Customer Exit Variable on Calendar Day (0CALDAY) Steps: 1.Create Customer Exit Variable on Calendar Day (0CALDAY) Create Z_FDCPM (First Day of CurrentPrevious Month). The properties of the variable are as below:- Type of Variable : Characteristic Variable Name : Z_FDCPM Processing By : Customer Exit Characteristic : Calendar Day
  • 4. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 4 Variable Represents: Single Value Variable Entry : Mandatory Do not check ready for input. Below are some screenshots for better understanding:- 1.1 Double click on Calendar day InfoObject in your query or right click and select restrict. 1.2 Select Variables from drop-down box. 1.3 Select Characteristic Value Variable as a type from dropdown box. 1.4 Click on “Create New Variable”.
  • 5. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 5 1.5 Make the setting as below in General tab. 1.6 Make the settings as below in the Details Tab. Leave the other tabs in its default settings. Click OK.
  • 6. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 6 Code: Go to T-Code CMOD in BW and then give your Project Name and click on Change button. Click on Components. Double Click on EXIT_SAPLRRS0_001.
  • 7. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 7 Double click on ZXRSRU01. Write the following code in the ABAP Editor. *---------------------------------------------------------- * * INCLUDE ZXRSRU01 * *---------------------------------------------------------- * * *************** Data Type Declaration ****************** * DATA : l_s_range TYPE RSR_S_RANGESID, loc_var_range LIKE RRRANGEEXIT, yyyy(4) TYPE n, mm(2) TYPE n, dd(2) TYPE n, fst_date LIKE sy-datum, begdt LIKE sy-datum. CASE i_vnam. * Below codes calculate first day of current/previous month * (If Date is first day of the month then it gives first day * of the previous month, If date is not the first date of the * month then it gives first day of the current month) WHEN 'Z_FDCPM'.
  • 8. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 8 IF i_step = 2. REFRESH e_t_range. dd = sy-datum+6(2). mm = sy-datum+4(2). yyyy = sy-datum+0(4). IF dd = '01' AND mm = '01'. mm = '12'. yyyy = yyyy - 1. ELSEIF dd = '01' AND mm <> '01'. mm = mm - 1. ELSEIF dd <> '01'. mm = mm. ENDIF. CLEAR : fst_date. CONCATENATE yyyy mm '01' INTO fst_date. begdt = fst_date. CALL FUNCTION 'DATE_TO_PERIOD_CONVERT' EXPORTING i_date = begdt * I_MONMIT = 00 i_periv = 'V3' IMPORTING e_buper = mmm e_gjahr = yyyy. CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET' EXPORTING i_gjahr = yyyy * I_MONMIT = 00 i_periv = 'V3' i_poper = mmm IMPORTING e_date = firdt. CLEAR: ls_ra_sid. ls_ra_sid-sign = 'I'. ls_ra_sid-opt = 'EQ'. ls_ra_sid-low = firdt. CLEAR: ls_ra_sid-high. APPEND ls_ra_sid TO e_t_range. ENDIF. * Above codes calculate first day of current/previous month ENDCASE.
  • 9. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 9 Testing of Code: We will test our codes to check if our customer exit variable works as per the given requirement or not. We will provide the date manually and will check for its return value. Following are some test cases. Input Date Expected output date 01.01.2011 ( 20110101 ) 01.12.2010 ( 20101201 ) 01.02.2011 ( 20110201 ) 01.01.2011 ( 20110101 ) 07.02.2011 ( 20110207 ) 01.02.2011 ( 20110201 ) In data type declaration declare temporary variable curdt as below. curdt LIKE sy-datum, For testing purpose only, temporarily modify your codes as below. Set the External Breakpoint as below.
  • 10. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 10 Enter the t-code RSRT in BW, give the query name and press enter. After this, click on Execute + Debug. Following are some function Keys for debugging. F5 Single Step F6 Execute F7 Return F8 Continue Press F5 one by one till cursor points to ENDFUNCTION. When cursor points to ENDFUNCTION then click F8 to continue.
  • 11. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 11 Double click on the variable during the debugging to get the current value of the variable at that instant. After debugging is complete we get the values of variables as below. We can see that, we are getting the output date as expected. Following are screenshots for other two cases after debugging.
  • 12. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 12 Report Designer: In Report Rows: Drag and Drop Calendar Day and Factory Characteristics. In Report Columns: Drag and Drop Quantity key figure. In Report Fitter: Restrict the 0CALDAY(Calendar day) with a range whose lower limit is Customer Exit Variable Z_FDCPM(First Day of CurrentPrevious month) and upper limit is 0DAT (Current Calendar Day) with offset -1. Please note that 0DAT gives today’s date so 0DAT-1 will give yesterday’s date.
  • 13. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 13 Execute the Report: See the Report Result: See the date ranges in the report. Report was executed on 7 th April, 2011 so it is giving data from 1 st April, 2011 to 6 th April, 2011.
  • 14. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 14 Related Content https://www.sdn.sap.com/irj/sdn/index Implementing Customer Exit Reporting Variables as Methods SAP Library - Customer Exits SAP Library - BI Suite - Reporting Variables-Customer Exits For more information, visit the EDW homepage
  • 15. Customer Exit Variables in SAP BW/BI Reports – First day of the Current/Previous Month SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 15 Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.