Quantcast
Channel: SCN : Blog List - SAP Business Explorer (SAP BEx)
Viewing all 103 articles
Browse latest View live

Formula Variable Demystification

$
0
0

Scenario

 

A year and a half ago i came across a post in SCN where the requirement was to get the difference of days based on the user input interval on the variable selection screen.

 

Let's say for Eg: if user input is 01.03.2012 to 13.03.2012 so the difference would be 13 days.

 

Most of the people suggested tryIing with code in cmod and i thought of exploring the options in BEx query designer itself.So after searching for a while i stumble across this Difference radio button in formula variable.I tried my hands out with it and achieved the desired result.

 

So now i will be sharing the same approach with detailed navigation on the same.

 

Step 1--Create a new formula ---Under that you have folder named as formula variable--Right click on it --New variable---Give the details as mentioned in below screenshot.

 

I have created on Actual GI date you can choose any other time characteristic based on your requirement.

FV1.JPG

Step 2--Hit the replacement path tab and give the details as per the below screenshot.

 

Give the technical name of variable created on date (User input variable) of type interval.

 

In the Use interval section choose Difference radio button

fv2.JPG

 

Step 3---In the details and default values tab nothing needs to be selected.

 

Step 4---In the currency/Unit tab choose dimension as Number.

 

fv3.JPG

 

Step 5----Save this formula variable and Drag and drop into formula.Refer the screenshot.

 

fv4.JPG

 

Save the query and now let's execute the query and check the results.

 

Variable screen:

 

fv5.JPG

 

Output:

 

fv6.JPG

 

So as you can see that based on the input in variable selection screen we got the difference of days.

 

Hope this might be helpful and useful.


Last Week (Mon-Sun) Customer Exit variable logic based on user input date ot system date

$
0
0

Dear All,

I have a month exp in SAP BI/BW. We have a requirement to calculate last week (Mon-Sun) based on the user input date/system date.

Could any one pls give us your valuable inputs. Your assistance are appreciable...

Regards

Venkat..

Tabs in SAP BI Object

$
0
0

Tabs:

Data Source:                                                                                      Info Objects:

  1. 1.       General Information                                                     1.General
  2. 2.       Extraction                                                                            2. Business Explorer
  3. 3.       Proposal                                                                              3.Master Data/Texts
  4. 4.       Fields                                                                                    4.Hierarchy
  5. 5.       Preview                                                                                            5.Attribute           6. Compounding

Info Package:                                                                                     Key Fig:

  1. 1.       Data Selection                                                                   1.Type/Unit
  2. 2.       Extraction(FF Only)                                                         2.Aggregation
  3. 3.       Processing 3.Additional Properties
  4. 4.       Data Targets
  5. 5.       Update
  6. 6.       Schedule                                                                                                                                            

DTP (Data Transfer Process):                                              DSO:

  1. 1.       Extraction 1.Contents
  2. 2.       Update                                                                  2.Requests
  3. 3.       Execute                                                                                 3.Reconstruction

Cube:

  1. 1.       Contents
  2. 2.       Performance
  3. 3.       Requests
  4. 4.       Rollup
  5. 5.       Collapse/Compression
  6. 6.       Reconstruction

Standard Variables in BEX related to Time Charcteristics

$
0
0

Hi,

 

This blog will shows list of standard bex variables Specifically  Date Based Scenarios.

 

 

Path : Modelling ---> Business Content---->  Query elements ----> Variable.

 

Below is the List of  Standard variables available for date based logics.

 

Characteristic

Variable

Description

0CALDAY

0CWD

Current Workday (SAP Exit)

0CALDAY

0CYTCD

Cumulated to Current Day (SAP Exit)

0CALDAY

0DAT

Current Calendar Day (SAP Exit)

0CALDAY

0DAY_***

Cumulation of all Values to Key Date (SAP-Exit)

0CALDAY

0LYTCLD

Cumulated to Current Day of Previous Year

0CALDAY

0LYTCLD

Previous Year Cumulated to Current Day (SAP Exit)

0CALDAY

0L_DATE

Last Calendar Date

0CALDAY

0P_LY_R

Comparative Period for Last Year

0CALDAY

0P_TY_R

Period for Current Year up to Yesterday

0CALDAY

0S_KDATE

Key Date Interval for Previous Year (SAP Exit)

0CALDAY

0S_KDAY

Key Date Interval Current Year (SAP Exit)

0CALMONTH

0CMCMLY

Current Month of Previous Year

0CALMONTH

0CMCQUAR

Current Quarter

0CALMONTH

0CMCQULY

Current Quarter in Previous Year

0CALMONTH

0CML12CM

Last 12 Months Including Current Month

0CALMONTH

0CML12LM

Last 12 Months Excluding the Current Month

0CALMONTH

0CML3CM

Last 3 Months Including Current Month

0CALMONTH

0CML3LM

Last 3 Months Excluding the Current Month

0CALMONTH

0CMLMLY

Last Month of Previous Year

0CALMONTH

0CMLMON

Last Month

0CALMONTH

0CMLYTCM

Previous Year Cumulated to Current Month

0CALMONTH

0CMLYTLM

Previous Year Cumulated to Last Month

0CALMONTH

0CMONTH

Current Calendar Month

0CALMONTH

0CYTCM

Cumulated to current month

0CALMONTH

0CYTLM

Cumulated to last month

0CALMONTH

0I_CMY01

Current Year Cumulated to Current Month (SAP Exit

0CALMONTH

0LYM_***

Cumulation of all Values to End of Previous Year

0CALQUARTER

0CQUART

Current Quarter

0CALQUARTER

0P_PRQUA

Previous Calendar Quarter (SAP Exit)

0CALWEEK

0CWEEK

Current calendar week

0CALWEEK

0PREVWK

Previous Week

0CALYEAR

0CYEAR

Current calendar year

0CRM_EXPEND

0I_CMDEX

Current Month

0CRM_EXPEND

0I_MP1EX

Current Month + 1

0CRM_EXPEND

0I_MP2EX

Current Month + 2

0CRM_EXPEND

0I_MP3EX

Current Month + 3

0CRM_EXPEND

0I_MP4EX

Current Month + 4

0CRM_EXPEND

0I_MP5EX

Current Month + 5

0ORGUNIT

0ORGUNIT

Organizational Unit for a Report User (Hierarchy node)

0TCTUSERNM

0TCTUSEE

User in the Business Information Warehouse

1FORMULA

0F_ADAY

Formula Variable for Current Calenda

 

Some more useful Standard Varibles Related to FISCPER,FISCYEAR .

 

Variable

Description

0I_CUFYE

All Periods of Current Fiscal Year (SAP Exit)  

CALDAY

cal day text

DAY

Calendar Date

0S_CADAY

Calendar Day

MONTH

Calendar Month 

0CYTCD

Cumulated to Current Day (SAP Exit)

0CYTCM

Cumulated to current month

0CYTLM

 

Cumulated to last month

0FYTCFP

Cumulated up to Current Fiscal Year/Period (SAP Exit

0I_BA107

Cumulated Up To End of Prior Year (SAP Exit for 0P_FPER)

0I_BA106

Cumulated Up To Prior FY Period (SAP Exit for 0P_FPER

0I_BA104

Cumulated Up To Period (SAP Exit for 0P_FPER)

0LYM_***

Cumulation of all Values to End of Previous Year

0I_BA105

Cumulated Up To Prior Period (SAP Exit for 0P_FPER

 

0DAY_***

Cumulation of all Values to Key Date (SAP-Exit)

0DAT

Current Calendar Day (SAP Exit)

0DATT

Current calendar day (T)

0CMONTH

Current Calendar Month

0CWEEK

Current calendar week

0CYEAR

Current calendar year

0CDFY

Current Fiscal Year

 

0P_ACTD6

Current Date (SAP Exit)

0FPER

Current Fiscal Year/Period (SAP Exit)

OP_RTFPM

Current Month of Fiscal Year

0F_CUFPE

Current Period of Fiscal Year (Formula Variable)

0P_RTFPQ

Current Quarter of Fiscal Year

0I_P2FQU

Current Quarter of Fiscal Year - 2 (SAP Exit)

0I_P3FQU

Current Quarter of Fiscal Year - 3 (SAP Exit)

0P_RTFPW

Current Week of Fiscal Year

0CWD

Current Workday (SAP Exit)

0I_VD3

day count til key date (quart)

0I_PD02

Day Count Until Key Date (Month, Posting Date)

0P_1DOW

Day of Week

0FI_YEAR

Financial year

0P_PD04

First Day in Month (Posting Date)

0P_VD01

First Day in Week (Value Date)

0P_VD01

First Day in Week (Value Date)

0P_PD10

First Day in Year (Posting Date)

0L12MTDY

Last 12 Month to current day

0F_NUMM

Number of Months (from Variable 0I_FPER)

0F_ANZPE

Number of Periods

0T_CMONV

Text Variable 0CALMONTH From Value (Name)

0T_DAYTX

Text Variable Replaced by 0CALDAY

 

 

 

 

 

Regards,

Giri

Future of BEx Query Designer...

$
0
0
Hi,
in my Job as SAP BI Instructor I regularly get questions like the ones below  from my participants.
"What is the future of BEx Query Designer?"
"Which BO client will replace BEx Query Designer?"
"Do I need to learn BEx Query Design if we are using BO clients against our BW system?"
Are you also wondering about that? Are you also uncertain about the use of BEx Query Designer in future?
Here is what I explain my customers...
You might know that the BEx Reporting clients will no longer be enhanced as they all have a Premium Alternative client in the BI client family. Check Table below for details:
BEx ClientPremium Alternative
BEx Web Application DesignerSAP BusinessObjects Design Studio
BEx AnalyzerSAP BusinessObjects Analysis, edition for Microsoft Office
BEx Web AnalyzerSAP BusinessObjects Analysis, OLAP edition
BEx Report DesignerSAP Crystal Reports
You see that the BEx Query Designer is not part of the list... why?
Most of us BW user would say that the Query Designer is also a frontend client because it comes with the frontend installation. BUT it is not a reporting client. SAP puts the Query Designer to the BW backend because it is a tool that models data for reporting purposes. That is also the reason why you do not find a roadmap for that in the BI clients part at http://service.sap.com/roadmap
As we learned the Query Designer belongs to the BW backend so lets take a look that the corresponding roadmap. Go to http://service.sap.com/roadmap> Database & Technology > Product Roadmaps > SAP NetWeaver Business Warehouse and open that file. On page 9 you will find an entry called "Eclipse based modeling environment in BW (e.g. BW Query Designer, CompositeProvider)".
Hey what's that...? BW will get a new BEx Query Designer! Eclipse based like the SAP HANA Studio or Design Studio.
I also found a twitter entry on that with a screenshot in it https://twitter.com/tfxz/status/322677745937178624
So YES the Query will stay THE object you use to create reporting scenarios on BW data. Of course you can connect to an infoprovider directly for ad-hoc scenarios.
Hope that helps.
Dirk

Hide Author and Status of data from Bex analyzer

$
0
0

Dear all,

 

Some times if user don't want to see author and status of the data in analyzer then we can hide

that information  in bex analyzer.

 

Open Bex analyzer and

 

 

select author cell and Click on this designer toolbox.

 

 

Click on this symbol. you will get below this screen.

 

Then Go to constant tab and un check Display Author.

 

 

again click on designer toolbox now check you can see Author will be hide.

 

Note : We can do same procedure for Status of date also.

 

Thanks

Status of Tickets based on their Dates

$
0
0

Scenario:

 

Sometimes we may get the requirement to find the status of ticket based on their created on and closed date.This document can be applicable for any object which has some validity period and we need to find the status of it based on any date.

 

Lets say for eg:

 

TicketCreated onClosedStatus
10012013010120130115CLOSED

 

So now if user enter any date in between those two dates then we need to get the status of the same.

 

The approach which we can follow to achieve the same will be sharing with you with all the steps and screenshots.

 

Data Sheet:

8.JPG

 

 

Data Loaded in DSO:

9.JPG

 

Step 1--Go to  BEx Query Designer--Drag and Drop Created on date in Characteristic Restrictions panel--Right click on Created date---Restrict--Show--Value ranges---Less than or equal to--Choose the variable 0I_DAYWT (User input variable).

1.JPG

 

Step 2--Now drag and drop Closing Date in Characteristic Restrictions panel--Right click on Closing date--Restrict--Variable--Create new variable.Refer the screenshot for details.

2.JPG

Hit the Replacement Path tab and give the details as mentioned in below screenshot

3.JPG

Now Save this variable.

 

Restrict the Closing date with the newly created variable as shown in below screenshot.

4.JPG

Users also need to see the date which has been entered by them on Selection screen in Query Columns as well.So for that our approach will be explained in furhter steps.

 

Step 3--Go to Columns panel in query designer create a new formula--Under Available Operands--Formula variable--Right click--New variable.Refer the Screenshot for reference.

5.JPG

Hit the Replacement Path tab and give the details as mentioned in below screenshot

6.JPG

Hit the Currency/Unit tab and give the details as mentioned in below screenshot.

7.JPG

Save this Variable and use it in your formula.

 

Query Format

11.JPG


Variable Screen:

12.JPG

 

Query Output:

14.JPG

So you can see based on the input date we got the status of tickets and also we got the date entered by user on selection screen in User Input column.

 

Hope this will be helpful.

Suppress broadcasting when data is not there in the report

$
0
0

Hi Experts

 

I want to suppress broadcasting of the report, when data is not  there in the report.

 

Please guide.

 

Thanks & Regarda

      Anuja


How to show First and Latest Record at BEx Level

$
0
0

Introduction:

 

Lately i came across so many threads where the requirement was to show the first or latest record at bex level.I tried to replicate the same scenario in my system.Here i will be showing the sales of a particular plant on first and last day of particular month.


 

Data Sheet:

2.JPG

 

Data Loaded in DSO:

3.JPG

Query Format :

8.JPG

Here we have Converted the Characteristic 0calday into Keyfigure (Date KF) with the help of formula variable with replacement path.

Make sure to choose Unit/Dimension as Number.I am not giving a walkthrough on the steps of the same as it has been discussed so many times.

 

Refer the below document for step by step navigation:

Convert a Characteristic into a Key Figure (BEx)

 



Approach to show the First Record:

 

Step 1--Hit the condition tab at BEx query designer--Right click on empty space--New condition--Edit


Step 2--Hit the New tab---Keyfigures--Date KF--Operator--Bottom N--Values = 1.Then Hit the Transfer tab.Refer the below screenshot.

9.JPG

 

Step 3--Hit the Characteristic Assignment Tab..Choose the options as per the screenshot below.

 

7.JPG

Step 4--Save the condition and Query.

 

Query Output: To show first Record

10.JPG

 

Approach to show the Latest Record:


All the steps to get the latest record will be same except with the slight change in conditions tab.

Instead of Operator Bottom N we will choose Top N.Refer the below screenshot.

12.JPG

 

Query Output:To show Latest Record

11.JPG

 

Conclusion:It's apparent that after following the above approach we got the desired result as per our data stored in DSO.

 

Hope this helps.All suggestions and comments are welcome.

How to Find Queries used in BI workbook

$
0
0

Just wanted to share the steps to find whcih queries are used in workbook.

 

1)Go to Transaction SE16 -> Provide Table Name RSRWORKBOOK.

 

10-25-2013 4-14-42 PM.jpg

 

Provide Workbook ID  to above table it will gives you GENJNID

 

 

2) Copy the GENJID and provide to the table RSRREPDIR

 

2.jpg

 

This table gives you Queries technical name, Infoprovider name.

Where to Find default template for Analyzer and web template in BI System.

$
0
0

Purpose: Just want to share the information about location of default template for analyzer and Web Template.

 

Many Times question comes in mind whenever we see the out put of reports- from where it is taking the format of report.

Some time it is business requirement that we need to show logo of company on each report.

There are two different places where the default templates are stored.

1)Location of Analyzer template

Go to Tcode SE16

Table Name: RSRWBTEMPLATE

temp1.jpg

Press Execute

Here you will find the default analyzer template (ID) which is used by all your reports in BI system executed through Analyzer.

Copy that Id and provide to the following table which will give you the description of your workbook template

       SE16 - > RSRWBINDEXT

 

 

temp2.jpg

  Open this workbook template through Analyzer whenever you want ot modify.

 

2)      Location of Web template:

You can find this setting through SPRO which is shown in following screen or directly with Tcode RSCUSTV27

temp3.jpg

Click on set standard Web Templates.

Here you will find the Technical name of web template which is used by all the BI reports executed on web.

Open that web template through Web Application Designer whenever you want to modify.

 

Thanks for Reading…

BEx Delete Duplicate queries

$
0
0

Applies to:

SAP BW 3.5x / Business Intelligence 7.3x, Business Explorer (BEx).

 

Summary:

This document is intended to a specific case where Multiple Queries gets created with Same Technical Name.

 

Author(s)     :  Ganesh Wathare

Created on  :  11 November 2013

 

Author Bio:

Ganesh Wathare works as Technology Lead in Infosys Limited. He has 7 years of experience in IT Consulting Industry during this time he has worked majorly on SAP NetWeaver BW and relational databases together with different BI reporting tools. He has worked on Various Support and implementation Projects.

 

 

Summary:

While transporting query to further landscape some time multiple entries gets created for a same query (Technical Name). This happens in a special cases like  we delete query in development which is already sent in landscape and then we create new query with same technical name. But while transport we just send a Transport for newly created query. In such a cases sometime system creates new query with same technical name and previous query will be still present. Because of this when we execute query it will execute old query itself. Even multiple time transport does not help.

This blog is to those specific cases where such a scenario gets created. Some times when we execute query system takes new query sometimes it takes old query, in such a case this blog will help to clear orphan queries.

 

 

Steps to Delete Queries:
1) Check if multiple queries present with same technical name

Query elements are stored in table RSZCOMPDIR i.e. Directory of reporting components. We can check if there are multiple entries for same query technical name. For each query there will be 2 version's so to check if there are multiple queries with same technical name, provide query technical name in Query filter and Provide Version as 'A' to check active records. Below screen shows a selection for table. ( We can see table data in se11 or se12 or se16)

 

 

 

If there are multiple queries present then in table there will be two or multiple entries in the table. These entries will be having different UUID hence it is possible to have such a entries in table.

1.jpg

 

When we execute query if old query is still getting executed then it is because of multiple entries in tables, which we need to clean, so that system will recognize new query. We can identify the entries for respective queries by using Changed by, Changed At, etc fields as below.


 

2)Delete Entries from table using RSZDELETE

We can delete these entries from table using t-code RSZDELETE for deletion of entry of a query we need to provide UUID for query. Query is identified by Type field, so provide input as a REP in Type field. Select Version Transport System Based on Process related to your system.

Dependent Objects like Workbooks, Query Views and BBS Sender/Recipient we need to delete before we run this transaction individually.


 

If there are no dependent Objects in the system, transaction will show output as below. You can identify dependent Objects from this screen also, so that you can delete those objects also from system.

 

Once we click on Execute button prompt will come to confirm for deletion. Select Yes to delete the query from system.

 

 

Confirmation screen will pop-up once query is deleted as below.

 

 

To confirm deletion in the system we can go back to table RSZCOMPDIR and see entries, we can see one entry got deleted from system and only one entry is present in the table.

 

 

Also as we start executing query then system will not find any query, as query is deleted.

 

3)Remove inconsistency in tables using program "ANALYZE_RSZ_TABLES"

Once we delete the query using a transaction RSZDELETE then it creates a inconsistency in tables which can be identified and correct using a program ANALYZE_RSZ_TABLES (we can execute Program using se38 transaction).

This Program has selection screen as below, where we can select tables where the program should check inconsistency,

 

Once we click on execute, program will give a output with all inconsistencies. Icon shows Inconsistencies which need to be fixed. As we have delete one query we can see count 1 in front of RSRREPDIR table.

 

 

If we click on button in front of count we can see the query as below.

 

1.jpg

Once we confirm and click on Execute Button system ask for confirmation, click on Yes.

 

 

Once program gets executed below screen comes which will shows 0 count for RSRREPDIR table. This shows that inconsistency got corrected.

 

 

For ANALYZE_RSZ_TABLES check reference attached to this blog.

Now if we execute query we can see that new query is getting executed without any error.

 

Suggestions for using these steps

Its better to avoid problem than solve problems, so always transport Query deletion request in system. Don't use this program if correct query is getting executed.

 

References:

https://scn.sap.com/thread/10671

https://scn.sap.com/thread/1997950

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/602074dd-bcc9-2e10-4eb5-8107050066bc?QuickLink=index&overridelayout=true

How to derive Calmonth, Calyear from Calday easily

$
0
0

Introduction

 

This may be obvious topic in BEx. I believe "Replacement Path" processing type is the most smartest one which can avoid many User Exit variables, for which we break our heads to write Code to do our Trend Analysis. Hope you guys got now, what am I going to demonstrate in this simple blog.

 

Scenarios covered are :

 

  1. Dummy KF to enable Selection in variable Screen
  2. Calmonth from Calday
  3. Calmonth from Calday (Range)
  4. Calyear from Calday and Calmonth

 

The basic pre-requisite to derive above scenarios is a Calday Variable. This can be a "Single Value" or "Interval" as well.

 

Imagine below in my screen shots

 

Calday = Invoice Clearing Date

Calmonth = Invoice Clearing Month

 

1. Dummy KF to enable Selection in Variable screen

 

Why a dummy KF is required?

 

Let's suppose we have a Calday variable in Filter or in Default Values pane in our query designer. This means, we are restricting globally our time period as per the variable entry, by which we cannot calculate for past or future periods. To overcome this, we have to bring our variable to KF pane by restricting to a dummy KF and hide the KF. Then this variable becomes local and appears on the variable screen which is our desire.

Dummy KF.JPG

 

2. Calmonth from Calday

 

Suppose User enters Calday : 01.11.2013, then 11.2013 can be picked by creating a Replacement Path variable under Calmonth like below.

Calmonth from Calday.JPG

The offset length: 6 is the Key Parameter to pick up 11.2013 from 01.11.2013. This is some thing like we are considering only 6 Characters out of 8 characters through ABAP Code.

 

3. Calmonth from Calday (Range)

 

Suppose we have a Calday (Interval) : 01.07.2013 to 10.08.2013. Please observe To Date is a different month. Now we want to see our KFs as per From and To Dates.

I mean one of your KF has to show data for 07.2013  by based on From date and your Other KF has to show data for 05.2013 by based on To date.

Create two variables like Calmonth FROM and Calmonth TO by replacement path of Calday (Interval)Variable like below.

Calmonth from Calday Range.JPG

Finally you have to restrict your KFs with respective Calmonth FROM and Calmonth TO and apply Offset-3 to get 05.2013 like below. You can apply any Offset value for both variables. That's How we can play with these derived variables.

Both KFs.JPG

After executing the report, you will get the result like below.

Result.JPG

To cross check whether our two variables have really replaced our Interval variable or not, I have drill downed with Invoice Clearing Month(Calmonth). It shows correct months for the corresponding KFs, by which we can confirm that our mechanism works.

Result with drill.JPG

 

 

4. Calyear from Calday and Calmonth

 

Suppose we have Calmonth and Calday variables, we can derive Calyear by creating two separate variables by considering offset parameters like below.

Calyear from calmonth and Calday.JPG

Conclusion :

 

We can do many of our Trend Analysis by just using "Replacement Path" and applying Offsets for past and future periods. This will reduce unnecessary time spending on User exits. We should go with User exits unless they are really required.

Copy Queries Between Same & Different Structure Source/Target Infoproviders

$
0
0
  • Copy queries between two different targets are very common activity any project.

 

  • For this we use RSZC transaction code however this RSZC has some limitation we cannot perform query copy activity if source/target has different structure.

 

  • For this developed on ABAP program through this we can copy queries between source/target irrespective of structure either same or different

    

  • Program Selection Screen image

 

1.png

 

 

  1. R_T_NAME -->Provide single or multiple report technical names (multiple reports means queries should be SAME INFOPROVIDER)
  2. W_SOURCE-->Provide Source Infoprovider
  3. W_TARGET-->Provide Target Infoprovider

2.png

After execution

3.png

Gives the list of reports those are created in ALV grid display format.

 

Please find the code in attached document.

All about I_STEP variable :

$
0
0

Hi...

 

 

All about I_STEP

When we execute the BEx query, the sequence of execution starts with the variable selection screen being  popped up  if any variable is present in the query,  and then the output will be displayed based on the values which  passed in the variable selection as per below sequence.

 

1.1.JPG

I_STEP  is a variable, generally used in ABAP Customer exit, which can take the values 0,1, 2 or 3.

I_STEP = 1 :

In some of the reports, we may have a need to display default values in the variable selection screen even before its execution.  For example, to display the execution date, time. In such cases we need to write /execute some of the ABAP customer exit code before the variable selection screen starts.

In Customer Exits, if the variable I_STEP = 1, it means ABAP customer exit code will be executed before the variable selection screen pops up.

 

 

1.2.JPG

I_STEP = 1 is before the processing of the variable and hence this we can be used for default selection-screen values.

 

 

I_STEP = 2 :

In some of the reports, we may have a need to calculate MTD(Month to Date), YTD (Year to Date) . In such cases the report output is based on the input value in the selection screen and  ABAP Customer exit calculation. In such cases the ABAP customer exit code has to be executed after the input screen.

 

1.3.JPG

 

The above screen indicates the sequence followed when we execute the MTD, YTD et al.  reports.

1.       The input values are passed to the variable selection screen.

2.       ABAP Customer exit is executed based on the input selection screen.

3.       The output is displayed based on the ABAP Customer exit code.

I_STEP = 2 is useful to find the YTD, MTD, rolling quarter, etc…

 

 

 

In a report we can have I_STEP = 1 and I_STEP = 2 depending on the requirement as shown below.

 

1.4.JPG

 

Hope you got it,

 

 

Thanx & Regards,

RaviChandra.


How to achieve Slab Wise or Bucket Wise and Age Wise requirements in BEx

$
0
0

Introduction

 

              Analysis of KPIs can be done in many ways during Annual Business Plans in any Business. Especially our Users require Slab Wise or Buckets Wise and Age Wise analysis of data. I am going to demonstrate these requirements in this blog in an easy manner.

 

Scenarios Covered :

 

1. Revenue Slabs in Rows along with any Char in Columns

Slab 2.JPG

This requirement can be easily achieved by Creating Buckets with New Formulas(Exception Aggregation of Counter of all Detailed values which are not Null). Your Rows definition is the driving factor to show Columns. You need not to define your Columns. There is already a beautiful document existing in SCN. You may refer the document by Neelesh Jainin http://scn.sap.com/docs/DOC-11080


2. Revenue Slabs in Rows along with other KFs

Slab 1.JPG

This is a tricky requirement and it is not as straight forward as Scenario 1. That's the reason I have taken Scenario 1 to make you understand How to deal Scenario 2.

 

Please observe here that we need to define both Rows(Slabs) and Columns(other KFs) as well. How to define both at a same time? Here comes the concept of Cell Definitions which can be done on each Cell which is intersecting by Rows and Columns.

 

Concepts Used here :

 

a. Cell Definitions

b. If..else Formulas

c. Exception Aggregation

 

From the above Layout, we should achieve Order Count, Labor Rev and Parts Net as per the Rev Slabs accordingly.

 

Assume all required CKFs and RKFs are readily available in BEx. If not you may have to create them and then follow the procedure.

 

Step 1 : Go to BEx Query designer and Start creating the Query by dragging Branch into Rows Pane

Step 2 : Create a Structure in Rows Pane and name it as "Rev Slabs". Under Structure, Create New Selections for all Slabs and just enter Descriptions like below. Need not to define them. These New Selections will just act as Descriptions and we will have to define them in Cell Definitions.

Slab 4.JPG

Finally your Structure will look like below along with Branch Char in Rows Pane.

Slab 5.JPG

Step 3 : Drag your respective Order Count Settled,Net Labor and Net Parts CKFs into KF Pane. The moment you drag, it enables "Cells" on top of Query to define Cell definitions for particular rows as per your structure defined.

 

I will show you How to Calculate Row1 i.e., < = RO 500 for each Cell. You can observe highlighted Cells.

Slab 6.JPG

Hope you all aware that when you Double Click each Cell, it takes the definition of the CKF/RKF dragged into KF pane.

 

Mistakes while coming to the right direction :

 

Your Cell Definitions will look like below after double-clicking each cell.

Slab 7.JPG

 

Are we in right direction?

No, we are not in right direction to achieve our requirement.


Our requirement is to show values as per Rev Slabs. So we should change our strategy now. It will be interesting now.


Step 4 : We should bring If.. Else concept here now to consider all 3 KFs which Order Numbers Total values( which is a combination of all Components like Labor, Parts, Sublet etc..These are our business terms. Don't get confused) should be < = RO 500 only. I mean we should show only KF values which has Order No.s whose individual Order Value should not cross RO 500. For better understanding, an Order No which total value = RO 510 should not come here. It should come in second slab only.


To incorporate your own Formula/Selections in Cells, you must hide original CKFs/RKFs. Otherwise you will not be able to see them while defining Cell like below.

Slab 8.JPG

Step 5 : You must create new Formulas for 3 KPIs and define by based on first Slab i.e., < = RO 500 with If..Else conditions and Exception Aggregation like below.

Slab 10.JPG

I am considering all Components(Labor+Parts+etc.. which is nothing but Net Rev-Order)while defining "Order Count Sett".

Net Labor will be considering only Labor Component and Net Parts will be considering only Parts Component. Please observe above image which reflects my explanation.

 

Hence your KF pane looks like below.

Slab 9.JPG

Step 6 : Now Click on Cells tab and double click on the cells for all Hidden KFs relevant as well as our first Slab relevant Cells like below.

Slab 11.JPG

Step 7 : Right click on the Cell-->New Formula-->Again right Click on the Cell-->Edit and define If..Else Formula as per 2nd Slab like below.

Slab 13.JPG

While defining our Cells, we should consider only the relevant cells which are in same row. You can make sense of above image by reading Step 5 again. All double clicked Cells will be available under Cells in Formula editor to make use them in our If..Else Formulas like below.

Slab 14.JPG

Slab 15.JPG

After defining all empty cells, your cells pane looks like below image.

Slab 16.JPG

Execute the query in Analyzer to see the final report. We have achieved our Scenario 2 requirement finally.

 

Slab 17.JPG

 

3. Age Wise Slabs of a particular Char in rows along with KFs

Slab 3.JPG

Age Wise requirements can also be achieved in a similar fashion. You must achieve the Age CKF first by based on your business logic. You can use this CKF in your If..Else conditions in Cells.


Conclusion : I have tried my level best to make it very clear to achieve this peculiar requirement. I am sure this is going to help us, as many clients does this kind of analysis during Annual Business Plans.

Scrolling Customizations in Web Application Designer (BEx)

$
0
0

Objective

This document will provide information on how to enable scroll bars for an analysis item in WAD and steps to customize scrolling

 

Steps

 

Step 1: Create a Web Application

 

Step 2: In the ANALYSIS ITEM that is assigned a query, navigate to ‘Internal Display’ properties, set Modification as ‘Module List’ or ‘Single Module’.

Note: If you’re going to implement multiple modification modules besides Scrolling, then use Module List as Modification

 

1.JPG

 

 

Step 3: Create a new Single modification module as below and define Generic Module (com.sap.ip.bi.rig.Scrolling) for Scrolling as shown below

 

2.JPG

 

Step 4: Customizations

    

          1. Define a required number of columns/rows for scrolling

 

For defining a required number of columns to be available for scrolling, we need to define additional parameter for this.  The parameter used is COLUMN and defined as shown below.  The parameter is BOOLEAN and placeholder is INTEGER of value 4. This will freeze first four columns in your analysis item. The same is applicable for freezing rows by defining ROW instead of COLUMN              

 

 

3.JPG

 

          2. Define adjustable window of Scroll enabled Analysis item

Once we have enabled scrolling the window size you have defined for Analysis item may not work and hence you need to define parameters for adjusting width of the window. The parameter used is WIDTH and define as below. I have used the below width to set the pane according to my window size. This parameter is of type string and value as document.body.clientWidth - 100. In order to set the analysis item width to be half of window size define string value as document.body.clientWidth / 2

 

 

4.JPG

 

 

 

 

Note:

 

  • Scrolling will work if all the rows and columns of the analysis item are displayed. To set these parameters, assign zero to the following parameters
    1. Number of Data columns displayed at once
    2. Number of Data rows displayed at once

5.JPG

 

  • If any ROW or COLUMN is not defined, by default, the header row and leading columns are selected for scrolling.

Derive YTD and PYTD based on 0Calday Input

$
0
0

Dear friend this blog will help you to derive YTD and PYTD based on Calday input.

 

So first we will discuss what is YTD and PYTD.

 

YTD -Year-to-date is a period, starting from the beginning of the current year, and continuing up to the present day. The year usually starts on January 1 (calendar year), but depending on purpose, can start also on July 1, April 1. YTD is often provided in financialstatements detailing the performance of a businessentity. Providing current YTD results, as well as YTD results for one or more past years as of the same date, allows owners, managers, investors, and other stakeholders to compare the company's current performance to that of past periods.


PYTD - Previous year data for same date input.


Derive YTD Based on Calday input


after all the selection we need this screen



Now first we creating cal day input variable


Create a date Variable here value range is less then Equal or equal to ( ≤ ) single value mandatory input.

Date Variable—


 

Details tab setting

 

 

this input date variable should be less then or equal. Because when user will input any date then it will fetch data from that data or less then.

 

 

Now we need to create a customer exit variable on FISCAL YEAR.

 

 

 

Details tab setting

 

 

This is the code to derive YTD based on Calday input.

 

Customer Exit Code to derive YTD from Calday.

 

DATA : L_S_RANGE TYPE RSR_S_RANGESID ,
LOC_VAR_RANGE
TYPE RRRANGEEXIT,
L_PP
(3) TYPE C,
L_QQ
(3) TYPE C,
L_YY
(4) TYPE C,
L_MM
(2) TYPE C,
L_DD
(2) TYPE C.

 

CASE I_VNAM.

WHEN 'ZVAR_YR_CUST'. {Customer Exit Variable}
IF I_STEP = 2.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZSJ_CALDAY'. {Input Variable}

L_YY
= LOC_VAR_RANGE-LOW+0(4).
L_MM
= LOC_VAR_RANGE-LOW+4(2).

IF L_MM = '01' OR l_MM = '02' OR L_MM = '03'.

L_YY
= L_YY - 1.

ENDIF.
L_S_RANGE
-LOW = L_YY.
L_S_RANGE
-SIGN = 'I'.
L_S_RANGE
-OPT = 'EQ'.

APPEND L_S_RANGE TO E_T_RANGE.
ENDLOOP.

ENDCASE.

 

Derive PYTD based on Calday -

 

We need this selection Screen after all the selection

 

 

 

Create a new customer exit variable for date input variable. Give technical name and description and Variable process type customer exit. 


 

 

Go in Details tab and maintain all these settings.


 

Details tab settings,

 

 

Our cal day input variable is less then equal to cal day variable.


 

Select customer exit Fiscal year variable and select offset minus 1 for last 1Year.




Customer Exit Code for cal day variable ZCL_DAY_CUST (Cal day from customer Exit Var 1)

 

DATA : L_S_RANGE TYPE RSR_S_RANGESID ,
LOC_VAR_RANGE
TYPE RRRANGEEXIT,

L_YY
(4) TYPE C,
L_MM
(2) TYPE C,
L_DD
(2) TYPE C.

 

CASE I_VNAM.

 

WHEN 'ZCL_DAY_CUST'.
IF I_STEP = 2.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZSJ_CALDAY'.

L_YY
= LOC_VAR_RANGE-LOW+0(4).
L_MM
= LOC_VAR_RANGE-LOW+4(2).
L_DD
= LOC_VAR_RANGE-LOW+6(2).

L_YY
= L_YY - 1.
CONCATENATE L_YY L_MM L_DD INTO L_S_RANGE-LOW.
L_S_RANGE
-SIGN = 'I'.
L_S_RANGE
-OPT = 'EQ'.

APPEND L_S_RANGE TO E_T_RANGE.
ENDLOOP.
ENDIF.

ENDCASE.

 

Waiting for yours valuable suggestion

 

Thanks for reading this Blog.

Derive QTD (Quarter to Date) from 0Calday

$
0
0

In this blog, I want to show you how to create QTD Variable for 0Calday Input.

 

First let we know what is QTD (Quarter to Date)?

 

A Period between the start of the quarter to the present date. It acts as a financialtool to highlight all business

activities undertaken by a company from the start of the quarter to the date at which the information on activities

were collated. QTD is useful in informing corporate decision-makers the progress of the business in that quarter.


We need to create a selection like this.



So, First we need to create Calday input input variable below like this.


Create a date Variable here value range is less then Equal or equal to ( ≤ ) single value mandatory input.

Date Variable—




Maintain below this Details tab Settings



Our cal day input variable is less then equal to cal day variable.




Now we are going to create ZQUA_DATE_CUST Variable on top of 0Cal year/month object.


Process Type - Customer Exit

Reference Char - Cal Year/Month




Details tab settings


Variable Type - Interval

Variable is Mandatory

Un check check box for variable is ready for input



Then save and Exit.


Now write ABAP code to Derive QTD from Calday


 

DATA : L_S_RANGE TYPE RSR_S_RANGESID ,
LOC_VAR_RANGE
TYPE RRRANGEEXIT,


  L_YY(4) TYPE C,
L_MM
(2) TYPE C.

 

CASE I_VNAM.

WHEN 'ZQUA_DATE_CUST'. (QTD Customer Exit Variable)
IF I_STEP = 2.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZSJ_CALDAY'. (Cal day Input Variable)

L_YY
= LOC_VAR_RANGE-LOW+0(4).
L_MM
= LOC_VAR_RANGE-LOW+4(2).

IF L_MM = '01' OR L_MM = '02' OR L_MM = '03'.

CONCATENATE L_YY L_MM INTO L_S_RANGE-LOW.
CONCATENATE L_YY L_MM INTO L_S_RANGE-HIGH.

ELSEIF L_MM = '04' OR L_MM = '05' OR L_MM = '06'.

CONCATENATE L_YY L_MM INTO L_S_RANGE-LOW.
CONCATENATE L_YY L_MM INTO L_S_RANGE-HIGH.

ELSEIF L_MM = '07' OR L_MM = '08' OR L_MM = '09'.

CONCATENATE L_YY L_MM INTO L_S_RANGE-LOW.
CONCATENATE L_YY L_MM INTO L_S_RANGE-HIGH.

ELSEIF L_MM = '11' OR L_MM = '12' OR L_MM = '13'.

CONCATENATE L_YY L_MM INTO L_S_RANGE-LOW.
CONCATENATE L_YY L_MM INTO L_S_RANGE-HIGH.


L_S_RANGE
-SIGN = 'I'.
L_S_RANGE
-OPT = 'BT'.

APPEND L_S_RANGE TO E_T_RANGE.

ENDIF.


  
ENDLOOP.
ENDIF.

ENDCASE.


Thanks for reading this blog .


Waiting for your valuable feedback and ratings.









Maximize SAP GUI Window after launching a transaction with appintegrator

$
0
0

I recently was faced with the challenge to start a transaction in our SAP-System with Windows-SAPGui.
This can be done with the appintegrator in the SAP-portal.

 

 

 

Here's an example how to call MM03:

 

/irj/servlet/prt/portal/prtroot/com.sap.portal.appintegrator.sap.bwc.Transaction?System=SAP_ERP_SSO&TCode=MM03&Technique=SSF&GuiType=WinGui&WinGui_Type=&ApplicationParameter=RMMG1-MATNR%3D60004499

 

 

The result is a small scriptfile which starts the MM03.

 

The opening SAP-window is very small and id doesn't keep it's size when you're adjusting it.

 

The solution is a parameter in a configuration file. In this file you can customize how to call the transaction.

 

The path to this file is very long and it depends on the hardware an on the Java-Version.

 

Filepath on our IBM I-series maschine is currently:

 

\usr\sap\PEI\J44\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.appintegrator.sap\property\Transaction\WinGuiRenderLayer.properties

 

and the filename is

 

WinGuiRenderLayer.properties

 

I modified the following section by adding the parameter <GuiSize=Maximized>

 

SSFCommandTemplate =[System]\r\n\
                    Name=<System.r3name>\r\n\
                    Client=<System.client>\r\n\
                    GuiParm=<ConnectionString><ConnectionParams>\r\n\
                    <Authentication[PROCESS_RECURSIVE]>\r\n\
                    [Function]\r\n\
                    Command=<CommandField>\r\n\
                    Type=Transaction\r\n\
                    [Configuration]\r\n\
                    GuiSize=Maximized
#                   Workplace=true\r\n\
                    [Options]\r\n\
                    Reuse=<ReuseWinguiConnection[01_BOOL]>\r\n

 

It worked after bouncing the system.

 

Hope this was helpful.

Viewing all 103 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>