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

Variants not possible, as the workbook has not been saved on the server

$
0
0

When locally saved Workbooks are migrated from 3.x to 7.3,

When you open the migrated workbook, click on change variables, save variant option in not enabled and have error message as ‘Variants not possible, as the workbook has not been saved on the server'.


Below is the screen print for error message.

Error message.jpg

Steps to resolve the issue.     

     1. Open BEx Analyzer.

     2. Open locally saved workbook.

Error message 2.jpg

     3. Save workbook in favorites/Roles with the same name in BEx.

     4. Open the saved workbook from favorites, save it locally on the PC.

     5. Now open the locally saved workbook and save variants.

 

Thanks for reading.

Regards,

Emily


Refresh multiple queries individually and give different variable inputs for queries separately

$
0
0

If user wants to refresh the queries individually  in a workbook with multiple queries and give different variable inputs for queries separately.

 

Steps for resolution:

1. Maintain 'X' for ANA_SINGLEDREFRESH in tcode RS_FRONTEND_INIT.

multiple.jpg

2. Check Allow Refresh Function For Individual Queries

2.jpg

3. Uncheck Display Duplicate Variables only Once.

    If the same query is used multiple times and user wants to give different inputs in workbooks, below option should be unchecked.

     save workbook.

3.jpg

Thanks for Reading,

Regards,

Emily.

RS_BADI_CHART Note 1064448 Code Example

$
0
0

Hi,

 

with this blog post I want to share a code example of how to implement Country Settings of SAP Note 1064448 during runtime. The code is a modified copy of Kai Gutenkunst's blog post http://scn.sap.com/people/kai.gutenkunst/blog/2008/10/22/bi-chart-item-modifying-chart-settings-at-runtime.

 

The scenario is simple. A company wants texts to be displayed in one language (for example English for all users) and the number format should follow another country setting (for example Swedish).

 

Without BAdI Implementation (example EN)With BAdI implementation (example SV)
1064448_EN.png1064448_SV.png

 

At the end of Note 1064448 there is an XML snippet that describes how to change Country Settings. Here is how you can change the XML during runtime using BAdI RS_BADI_CHART:

 

Method  if_rs_chart_enhancement~modify_chart_request

 

METHOD if_rs_chart_enhancement~modify_chart_request
*
* Customizing XML   c_customizing_xml = set_xml_language( iv_language = 'SV'  "Swedish                                              iv_xml = c_customizing_xml ).
*
* Delta Customizing XML   c_delta_customizing_xml = set_xml_language( iv_language =  'SV'  "Swedish                                                    iv_xml = c_delta_customizing_xml ).
ENDMETHOD.

 

The determination of what language to set can be made much more sofisticated. For the purpose of simplicity, I have hardcoded the language in the example above.

 

Method  set_xml_language

 

The parameters of the set_xml_language method looks like this:

set_xml_language.png

 

METHOD set_xml_language.
*
 TYPE-POOLS: ixml.
*
 CLASS cl_ixml DEFINITION LOAD.
*   DATA: lr_ixml TYPE REF TO if_ixml.   DATA: lr_streamfactory TYPE REF TO if_ixml_stream_factory.   DATA: lr_xml TYPE REF TO if_ixml_istream.   DATA: lr_xml_ostr TYPE REF TO if_ixml_ostream.   DATA: lr_document TYPE REF TO if_ixml_document.   DATA: lr_parser TYPE REF TO if_ixml_parser.   DATA: lr_global_settings TYPE REF TO if_ixml_node.   DATA: lr_first_child TYPE REF TO if_ixml_node.   DATA: lr_language_node TYPE REF TO if_ixml_node.   DATA: lr_language_element TYPE REF TO if_ixml_element.   DATA: lv_xml TYPE xstring.   DATA: lv_rc TYPE i.
*
* Create iXml factory   lr_ixml = cl_ixml=>create( ).
*
* Create stream factory   lr_streamfactory = lr_ixml->create_stream_factory( ).
*
* Create input stream   lr_xml = lr_streamfactory->create_istream_xstring( iv_xml ).
*
* Create output stream   lr_xml_ostr = lr_streamfactory->create_ostream_xstring( lv_xml ).
*
* Create document   lr_document = lr_ixml->create_document( ).
*
* Parse Xml   lr_parser = lr_ixml->create_parser( stream_factory = lr_streamfactory                                              istream = lr_xml                                             document = lr_document ).
*
* Parsing successful?   IF lr_parser->parse( ) = 0.
*
* Find <Language> element     lr_language_element = lr_document->find_from_name( name = 'Language' ).     IF lr_language_element IS NOT INITIAL.
*
* Set language of the <Language> element       lr_language_element->set_value( iv_language ).     ELSE.
*
* Find <GlobalSettings> element       lr_global_settings = lr_document->find_from_name( name = 'GlobalSettings' ).       lr_first_child = lr_global_settings->get_first_child( ).       lr_language_node = lr_first_child->clone( ).       lr_language_node->set_name( 'Language').       lr_language_node->set_value( 'SV' ).
*
* Insert a <Language> element in the XML       lr_global_settings->insert_child( new_child = lr_language_node ref_child = lr_first_child ).     ENDIF.
*
* Serialize xml     lv_rc = lr_ixml->create_renderer( ostream = lr_xml_ostr document = lr_document )->render( ).
*
* Return xml     rv_xml = lv_xml.   ENDIF.
ENDMETHOD.

 

All strings should of course be externalized, but I excluded that here to enhance the readability.

How to maintain BEx workbook title in multiple languages

$
0
0

Scenerio :

 

When you are working with multilingual client. It is quite obvious that some key user create workbooks and maintain titles only in their log on language.

As we monitor the broadcast queue (RSPRECALCADMIN), we find such entries without titles.

PSA - BE.jpg

It is tough sometimes to catch each workbook created and maintain title in the required languege.

 

Please do not get confused with the translation here. It is just maintaining the same title in another languege. ( It is better to have something than nothing ).

 

Background information :

 

RSRWBINDEXT - Titles of binary objects (Excel workbooks) in InfoCatalog

 

The above table will be updated with title for required languege.

 

Program code :

 

*&---------------------------------------------------------------------*
*& Report  ZBW_WB_DESC_EN_DE
*&
*&---------------------------------------------------------------------*
*&The table RSRWBINDEXT contains the titles of the workbooks created
*&trhough BEx, the program checks the single entries in the said table
*&and maintains the same title in EN or DE vice versa.
*&---------------------------------------------------------------------*
REPORT  ZBW_WB_DESC_EN_DE MESSAGE-ID Zm.
Data :     ZRSRWBINDEXT type TABLE OF RSRWBINDEXT WITH HEADER LINE,              ZRSRWBINDEXTT type TABLE OF RSRWBINDEXT WITH HEADER LINE,              ZRSRWBINDEXT1 type TABLE OF RSRWBINDEXT WITH HEADER LINE,             itab type table of istr WITH HEADER LINE.
types:  BEGIN OF istr,           WORKBOOKID TYPE RSRWBINDEXT-WORKBOOKID,           CNT type i,           END OF istr.
SELECT * FROM RSRWBINDEXT INTO TABLE ZRSRWBINDEXT WHERE OBJVERS = 'A'.
SORT ZRSRWBINDEXT ASCENDING BY WORKBOOKID.
LOOP AT ZRSRWBINDEXT.     READ TABLE ITAB WITH TABLE KEY WORKBOOKID =  ZRSRWBINDEXT-WORKBOOKID.     IF SY-SUBRC = 0.            ITAB-CNT = ITAB-CNT + 1.            modify itab TRANSPORTING CNT where WORKBOOKID = ZRSRWBINDEXT-WORKBOOKID.     ELSE.            ITAB-WORKBOOKID = ZRSRWBINDEXT-WORKBOOKID.            ITAB-CNT = 1.            INSERT TABLE ITAB.      ENDIF.
ENDLOOP.
LOOP AT ITAB WHERE CNT = 1.     READ TABLE ZRSRWBINDEXT WITH KEY WORKBOOKID =  ITAB-WORKBOOKID.     INSERT ZRSRWBINDEXT INTO TABLE ZRSRWBINDEXT1.\
ENDLOOP.
LOOP AT ZRSRWBINDEXT1.     IF ZRSRWBINDEXT1-LANGU = 'E'.          ZRSRWBINDEXT1-LANGU = 'D'.          INSERT ZRSRWBINDEXT1 INTO TABLE ZRSRWBINDEXTT.     ELSEIF ZRSRWBINDEXT1-LANGU = 'D'.         ZRSRWBINDEXT1-LANGU = 'E'.         INSERT ZRSRWBINDEXT1 INTO TABLE ZRSRWBINDEXTT.     ELSE.         ZRSRWBINDEXT1-LANGU = 'D'.         INSERT ZRSRWBINDEXT1 INTO TABLE ZRSRWBINDEXTT.         ZRSRWBINDEXT1-LANGU = 'E'.         INSERT ZRSRWBINDEXT1 INTO TABLE ZRSRWBINDEXTT.      ENDIF.
ENDLOOP.
MODIFY RSRWBINDEXT from TABLE ZRSRWBINDEXTT.
MESSAGE S000 with sy-dbcnt.

 

As I am not an expert in ABAP, you may find the coding as novice.

Hope it helps, do share your suggestions and thoughts about it.

Changes after upgrade SAP GUI 720 to 730 in query designer.

$
0
0

Purpose: Just wanted to share what are the changes after upgrading SAP GUI 720 to 730 in query designer.

 

 

Currently we have upgraded our GUI following are the observations

 

Look and fill of query designer has changed

  1. New check box in extended tab of query properties - Access by OLE DB for OLAP
  2. New check box in extended tab of query properties -  by Easy Query

 

qr1.jpg

 

 

Purpose of these new check boxes in extended tab

 

 

Access by OLE DB for OLAP - If you want to release this query as the data source for external reporting tools that communicate via interface OLE
DB for OLAP, select By OLE DB for OLAP

 

 

Access by Easy Query

a) you can release an existing query for external access as an easy query. Easy queries are static queries without formatting settings. You can use these as SOAP services.

b) To generate the query as an easy query, select By Easy Query

      c) In the BW system, you can manage easy queries using Easy Query Manager (transactionEQMANAGER)

 

 

4) New check box in planning tab - Symmetrical Calculation Mode for Inverse Formulas

 

qr2.jpg

 

 

 

Purpose of this new check box in planning tab.

 

Symmetrical Calculation Mode for Inverse Formulas - Inverse formulas are used to recalculate input-ready formulas in planning applications.You can define here how the system should start calculating inverse formulas Selectthe Symmetrical Calculation Mode for Inverse Formulas checkbox. At query
runtime, the system calculates inverse formulas if at least one element in an input-ready In the default setting, the Symmetrical Calculation Mode for Inverse Formulas checkbox is not selected. At query runtime, the system calculates inverse formulas if at least one value in an input-ready formula has been fixed or changed manually.

 

Hope it will add to your knowledge and thanks for reading.

BEx Query Execution Error

$
0
0

When i was working with BEx Query designer i got errors while opening the BEx queries.

Initially As for client requirement i added all char in free char panel user will drill down based on their requirement after testing the queries they suggested unwanted objects. Then i removed unwanted objects form targets (Info Cube and DSO)

While opening the queries through BEx Analyzer respective info cube we are getting some errors

Characteristics not available in Info provider

Then run the same query in RSRT going to ABAP debug mode.

After saving the query in BEx Query designer level getting errors.

Means initially removed these objects form Target level (Info cube and DSO)

Now see unwanted objects is have capital letters means these are all objects unwanted objects

After removing all objects from BEx query designer level its working fine.

After running the same query in RSRT and BEx Analyzer it is working and now query executed.

 

Thanks,

Phani.

Web Templates Migration from 3.5 to 7.0

$
0
0

Introduction


                   I am going to share my experiences in migrating Web Templates from 3.5 to 7.0 in this blog. There will be some Tips and Tricks as well as Observations too.

 

Strategy

 

  • Anything on lower version will have to be upgraded to latest or at least -1. I mean currently we have BW 7.3/7.4 version. So we should be at least on 7.0 or above.
  • If we are still on 3.5, then we will not be able to upgrade to SAP GUI 7.3. I am making one thing very clear here. I am talking about just GUI 7.3 upgrade. It's not about BW 7.3 upgradation
  • SAP GUI 7.3 is compatible only with 7.0 and above

 

Steps to be carried out for Migration

 

  • Go through all your designs of 3.5 Web templates to observe the usage of 3.X library items. You might have used below 3.X library items. There may be others as well.

               0ADHOC_BAR_CHART

               0ADHOC_COLUMN_STACKED_CHART

               0ADHOC_LINE_CHART

 

  • Important SAP Notes to be followed are Notes: 844012 , 832712 and 832713


  • We need to migrate all observed 3.X library items with a standard SAP Program : RSZW_ITEM_MIGRATION_3X_TO_70


  • Goto SE38 and carefully observe all Selection options( Simulate, Overwrite originals and Role Adjustments etc) in Execute screen. You can take your own call What to choose
  • To migrate above 3.X items, you have to choose first selection like below. Choose Multiple selection and paste all items

         Migr1.JPG

When you execute with above selection, it will ask you to confirm below entries. Say OK

          Migr2.JPG

Migration will be completed and will show us results like below.

          Migr3.JPG

  • WAD 7.0 has given us a nice Migration Tool which can be found below :--

             Migr4.JPG

 

  • Select 3.5 Web Template and continue to migrate. If no errors found , your web templates will be migrated to 7.0. System will ask us to save in new technical names. One good thing here is, migration process does not over write on 3.5 Web templates. I mean you can still access 3.5 templates by logging through WAD 3.5

 

  • Most possible errors could be :--


              It may throw any 3.X library Items to be migrated through SAP standard FM

 

              If any custom Web Items/Templates of 3.5 also have to be migrated

 

  • The most important thing here is,

               All your 3.5 web templates are in HTML code. When we migrate them to 7.0, it gets converted to XML(XHTML) Code with some extra lines of code.     

       Migr5.JPG

  • We need to select that particular code in XML(XHTML) tab. Then all your errors will be vanished.

 

Observations

 

  • Do not expect 100% exact look and feel in 7.0 web templates after migration.

 

  • We need to adjust our new web templates till we get similar layouts like 3.5

 

  • In fact, we can show much better and effective layouts with WAD 7.0

 

  • Alignments will be a headache task and we should make them very carefully in all web templates

 

  • You might have used "Text Elements" in 3.5 templates to show Query Description on top of the Report as Header. The same does not look great after migration to 7.0. To make it more brighter and highlighted, we can simply type the Report name in 7.0 Template in Bold and decent font size.

 

  • No custom XHTML codes are required to show buttons like Export to Excel, CSV, Print, PDF etc..They can be easily achieved in 7.0 by using "Button Group" web items with respective commands

 

Conclusion

 

               We can achieve all our WAD 3.5 requirements with various workarounds in WAD 7.0. It is very effective as far as Portal or Web Analyzer usage is concerned. Hope my experiences will help you mates.

Calculation After and Before Aggregation

$
0
0

     How to calculate the total amount before and after aggregation?

Product name, quantity and amount
defining the formula at local level

Total amount= product quantity x amount

It will give out put like means total amount not yet aggregated it is giving product quantity x product price = total amount

Now report output but achievement total amount should be aggregated value.

Creating global level calculated key figure

Creating KF at Global level

Here not using exception aggregation

This Total amount KF defined at global level

global level calculated KF will appear the calculation after aggregation

Output should be below report

After un check the calculation after aggregation means before aggregation it will give total aggregated total amount value.

Output of the report now showing total amount was aggregated

Now report out put total amount is given aggregated value.

hope it will help beginners.


How to utilize Exception Aggregation using BEx Query Designer.

$
0
0

 

 

How to utilize Exception Aggregation using BEx Query Designer.


Exception  aggregation can be used to derive additional information out of a limited number of Key Figures provided in the InfoCube that is to be analyzed.
Thereby, you can create Calculated Key Figures by using a formula that uses exception aggregation itself (this is a nested exception aggregation). Furthermore, it is possible to use Calculated Key Figures created on cell level (using the cell editor) with the new functions of exception aggregation.

 

Example: If a sales manager wants to analyze the number of materials sold and the average number of different materials sold to different customers for each sales month. In the sales InfoCube, only a Key Figure of the Sales Volume in EUR for the different sold materials is provided.  Using the functions for exception aggregation,  he can derive the additionally required two Key Figures just from the sales volume in EUR for sold materials.

 

Procedure: To define an exception aggregation for the example above, the following steps are performed

1.  You create a Query that contains the Characteristics "Sold-to Party" (Customer) and "Material" in the free Characteristics, the characteristics

      "Cal. year/ month" in the rows and the Key Figure "Sales Volume EUR"

2. In the next step, you define a new formula ("Different materials"), which simply includes the Query Key Figure "Sales Volume in EUR" (no operator       required in this example).

Then you access the properties of this formula and choose the exception aggregation setting "count all values<> 0" for the reference Characteristic "Material".  In this way, you have defined a counter for your sold materials derived from the Key Figure "Sales Volume in EUR". You have simply counted

the number of occurrences of "Sales Volume in EUR" to give you the new Key Figure 'Different Materials'.

 

3. Now you will nest the exceptions: You are now able to count the number of materials sold in each month for all customers using the step above, but you want to know what the average number of materials the customers bought in each month. To achieve this, you must define another formula   ("Avg. sold materials/ customers"), which simply refers to the first formula. Again no other operators are required. You access the properties of the second formula and choose the exception aggregation "Average of all Values" for the reference Characteristic "Sold-to Party". The Key point here is that the results of the first aggregation are further processed by the second aggregation.

 

View.png

 

4. Check your query by performing a validity check to know if your query is correct or not.

 

5. Save your Query with a description and a technical name and then click on execute to see how exception aggregation works.

Restricting a Characteristic With Its Compounding Characteristic.

$
0
0

There are situations when there is a need to make a restriction on a characteristic with its compounding characteristic. I will try to explain the problem with an example, mention about the SAP Note related with this problem and propose a shortcut solution for this problem.

 

Problem Definition:

 

Suppose we have a characteristics ZDUMMY_PA (Personnel Area) and ZDUMMYPSA (Personel Sub Area). ZDUMMY_PA is the compounding characteristic of ZDUMMY_PSA. We have data such as:

24022014_01.JPG

We have an infoprovider using these two characteristics. We have a query where we make a restriction on ZDUMMY_PA. We want to restrict the Sub Areas: 100 from A area and 200 from C area. In the query when we drag A/100 for the restriction, only 100 is dragged and all personnel areas related with 100 are included in the restriction as seen below:

24022014_02.JPG

 

An overview on SAP Note related with this problem:

 

The SAP Note: 541253 describes this situation and proposes a solution. However, this solution is not suitable for the requirement described above. The note suggests restricting the compounded infoobject. When we do that in this case, we have to restrict A and C for personnel area and 100 and 200 for personnel subarea. Then in the report we will see all 100 and 200 subareas belonging to A and C. That is; even if we don’t want to show A/200, it will be shown in the report.

 

Solution approach for the problem:

 

The shortcut solution I suggest will be defining a new attribute to Personnel Subarea characteristic. For this aim, we define a new characteristic with data type char 8 (8 comes from the total number of characters defined in personnel area and personnel subarea. In our example, personnel area is defined as char 4 and personnel subarea is also defined as char 4).

We add this new characteristic as the attribute of personnel sub area: ZDUMMYPSA.

24022014_03.JPG

In the transformation for master data we add personnel area and subarea to source fields list and select rule type as routine:

24022014_04.JPG

We write a small routine to update ZDUMMYCH:

  CONCATENATE SOURCE_FIELDS_RULE-/BIC/ZDUMMY_PA
  SOURCE_FIELDS_RULE
-/BIC/ZDUMMYPSA   INTO RESULT.

After we load and activate master data we see the master data as:

24022014_05.JPG

Now we need to add ZDUMMYCH to the navigation attributes of the infoprovider. Then in the query designer we can add ZDUMMYCH to the characteristic restrictions pane and we can easily select ZDUMMYCH to filter with our desired restrictions:

24022014_06.JPG

As a result, with some modeling changes in both characteristic and the infoprovider, we can achieve to see the desired results. I hope it gives an idea.

 

Yasemin Uluturk

Workaround while Restricting Compounding Attributes at BEx

$
0
0

Hi Friends,

 

Here is the blog which drives to write this blog Restricting a Characteristic With Its Compounding Characteristic.. Thanks Yasemin ULUTURK

 

 

Above blog has greatly explained an approach how to overcome issue which arise while restricting characteristic which is compounded with another characteristic.

 

To do above approach we need to do modelling changes by writing routine at Transformation level and enable navigational attribute at Infocube level. Then transporting whole flow to production system. It may difficult some times to transports in big clients.

 

 

Here I am providing another additional approach to get same results.

 

Let’s see the approach

 

Here I am considering Storage location and Plant as Scenario to explain method.

 

pic 2.PNG

 

Find the data for our scenario:

pic 1.PNG

 

 

Here user wants to exclude Storage location of 0088 of plant 1000. If I simply exclude storage location 0088, then I will lose data of storage location 0088 belongs to  plant 1001 also. This shouldn't happen.

 

To overcome this issue , I am providing another approach which can achieve directly at BEx level  without  doing modelling changes. All we need do some workaround at BEx level by creating Selections and formulas logically.

 

I restricted Closing stock with  Storage location 0088 of plant 1000. (KF2)

 

pic 3.PNG

 

Then created another KF with restricting Closing Stock KF with only Plant 1000.(KF1)

 

pic 4.PNG

 

 

Then create formula by subtracting KF2 from KF1.

 

pic 5.PNG

 

 

Finally we got closing stock of plant 1000, after deducting stock belongs to  Storage location 0088 of plant 1000.

 

 

Here find stock of plant 1001 and user doesn't want to exclude any storage location. So simply restricted Stock with plant 1001.

 

pic 6.PNG

 

Thanks for reading this article and hope it helps you.

 

Best Wishes,

Vijay

How To Find Unused InfoObjects Part - 1.

$
0
0

Purpose: Find unused InfoObjects which are available in any Infoprovider (Multiprovider,InfoCube and DSO),

                 and NOT used in any report which are built on provided infoprovider.


Step 1 : Run Given ABAP program and provide Infoprovider name as shown in below screenshot.



Note: Unused  infoobjects  means,  which are available in infoprovider but not used in any report which are built on given infoprovider.

1.jpg

Step 2 : ABAP program finds the unused InfoObjects and list in ALV output , as shown in below screenshot.

2.jpg


ABAP Code.



Refresh multiple queries individually and give different variable inputs for queries separately

$
0
0

If user wants to refresh the queries individually  in a workbook with multiple queries and give different variable inputs for queries separately.

 

Steps for resolution:

1. Maintain 'X' for ANA_SINGLEDREFRESH in tcode RS_FRONTEND_INIT.

multiple.jpg

2. Check Allow Refresh Function For Individual Queries

2.jpg

3. Uncheck Display Duplicate Variables only Once.

    If the same query is used multiple times and user wants to give different inputs in workbooks, below option should be unchecked.

     save workbook.

3.jpg

Thanks for Reading,

Regards,

Emily.

Critical Issue - java.lang.NoClassDefFoundError: com/sap/tc/ur/browser/BrowserDescriptor

$
0
0

Dear Followers,

 

Over the past weeks we are seeing many incidents being opened by BI Java customers which upgraded their portal systems to Netweaver 7.30 SPS 09, 10 and 11, NW 7.31 SPS 09, 10 and 11 and NW 7.40 SPS 04, 05 and 06.

 

The cause for the issue is a missing .jar file (urbrowser) on EP-BASIS SCA, because of a regression caused by SAP Note 1972506.

 

Our development team has already delivered two notes with the corrections for this:


1995970 - Missing urbrowser.jar caused an exception com.sapportals.portal.useragent.UserAgentSetException
2000082 - Runtime Exception when trying to add new user agent string

 

Please refer to these notes on which patch contains the corrections for the relevant NW Portal version you are using.


We hope with these new patches the issue is completely solved now.

 

Kind Regards,
Marcio

Reporting Authorizations in SAP BW

$
0
0

Creating Authorization in BW System

Steps for creating authorization

RSD1-To maintain info object authorization relevant.

PFCG – To maintain roles

RSECADMIN – To maintain analysis authorization and role assignment to user

1. Make a variable authorization relevant.

2. Create roles.

3. Create BI Analysis Authorization.

1. Make a variable authorization relevant

Go to RSA1 select info object target and go to business Explorer and check the box for authorization relevant 

2. Create BI Analysis Authorization

Use transaction RSECADMIN

Select AUTHORIZATION Tab

Select MAINTENANCE

 

Give the name for the authorization and click create

Give the short text

Below characteristics are mandatory while creating authorization object.

1. 0TCAACTVT: This characteristic handles the general activity like create, change, display etc.

2. 0TCAVALID: This characteristic handles the authorization for Info Provider by default it gives access to all the Info Providers i.e. full access. We can restrict authorizations for particular Info Providers using this characteristic.

3. 0TCAVALID:  This characteristic handles the validity of an authorization. Always valid (*) is set as the default for validity. You can restrict this validity. You can also specify a single value or an interval.

Insert new row and add the dimension and give a value

  1. For giving values double click the intervals cell

 

Add a row and give the value depending upon the requirement

Save the authorization

3. Creating the role

Select user tab

Select Role maintenance

Give the role name and select either single role or composite role (in my case I selected single role)

Select menu tab

Select transaction

Give the transaction to be allowed

Ex- RSRT – Query monitor

Select Authorization Tab

Add the authorization created to S_RS_AUTH

Generate then Save

Select the user tab

Add the users which has the role

Then do user comparison

Creating Authorization variable

Open query designer

Creating authorizing variable

 

In Query Designer Put the authorization variable under filter panel.

Checking the authorization

Go to the analysis tab -> select execute as -> give the user (EX – RETUSER1) -> select with log

Select start transaction -> select the authorization query -> execute

Then run as the user to which role was assign then run the query

Query display as HTML

Now check the below out only for the RUKSHAYA

Thanks,

Phani.


Finding KPI's Where Used in Bex Queries.

$
0
0

To find the KPI's (CKF, RKF,Formula) where used in Bex queries.

 

Access required to SE11/SE16, SE37.

Views - V_COMPDIR_COMPIC

 

Steps to Follow

  1. Go to SE11/SE16
  2. Enter the View Name - V_COMPDIR_COMPIC

 

1.png

3.Select a Definition type of an Element with A version, I am selecting  RKF here.

7.png

4. Execute and get the COMPUID .

 

2.png

5. Go to SE37 , use the FM RSZ_DB_COMP_WHERE_USED

3.png

6.Input the COMPUID  got from STEP 4 into I_COMPUID

4.png

7.After Execution you will get the where used list entries as highlighted5.png

 

8. 9 Entries shown below. Since i have chose RKF, the list shows the RKF's used in CKF's and the query names

6.png


PS : You can get the COMPUID  from the table  RSZELTDIR .By choosing the needed element definitions , input the COMPUID in the FM.


Hope this helps....

Defining Exceptions for Date Key Figures in SAP BEx

$
0
0

Summary:

  The purpose of this document is to illustrate how exceptions can be set for Date key figures in BEx queries. The way BEx handles exceptions creates a challenge when trying to set them for date key figures. This document explains how to overcome these challenges.


Report Requirements:

HR Training Compliance reports generally include the business need of highlighting employee’s training gaps. Training gaps could come in the form of expired qualifications; the skill has to be renewed or updated. Proactively business would like to be aware of these cases before they occur, therefore the need to identify soon-to-expire qualifications too.

A way to identify either expired or expiring soon qualifications is to highlight them with different colors in a qualifications / employee matrix. Comparing qualifications expiry date versus a key date (evaluated date) it is possible to determine their compliance status. In order to fulfill business requirement BEx Query Designer exception feature can be leveraged.


BEx Query Designer Exceptions feature:

Two types of exceptions can be defined in BEx Query Designer: status exceptions or trend exceptions. Status exceptions evaluate the current value of a key figure (KF > $5000), while trend exceptions evaluate key figure changes, such as deviation (σKF > 5%).

For highlighting qualifications’ compliance, status exceptions type are sufficient. These can be defined in the exception editor.

CreateExceptions.png

In this business case the evaluated key figure (expiry date) has data type date (DATS). A date key figure can be either defined directly in the cube or created via a replacement path formula variable referencing a characteristic:

DateKF.png

BEx query designer interprets threshold values defined in exceptions as numbers. This means that is not possible to enter a date directly as a threshold value.

NoDates.png

However, system can be tricked by entering it in SAP date number format: 20,130,731 instead of 31.07.2013


FixDate.png

This trick will do the work for those scenarios where the evaluation date (Value) is static, which is not a very common one.


Exceptions with Formula Variables:

It is possible to specify dynamic values as thresholds by using formula variables with processing type Customer Exit. The formula variable must have the dimension ‘date’. Standard formula variables provided by SAP as business content can also be used, i.e. 0F_ADAY – Formula Variable for Current Calendar Day.

Specify your desired Alert Level and Operator, Click on the Entry Variable icon to select the required formula variable. Then click on Transfer button.

0F_ADAY.png

SAP standard variable 0F_ADAY will be sufficient for scenarios where qualification’s expiry date is evaluated against the current calendar day. Not always the case as some time it is necessary to see how things were in a past date. This past date is usually provided in the form of a Ready for Input Variable, either as a specific calendar day or as a calendar month/year. The later requires the last day of the month to be derived from specified month.

The following steps show how to tackle the scenario where qualification’s expiry date is compared to a calendar date derived from a calendar month/year Ready for input variable. For this purpose standard variable 0CMLMON2 is used.

Filter.PNG



Step 1: Create a Formula Variable with processing type ‘Customer Exit’ and dimension ‘date’.

FVar1.png

A second formula variable could be required when identifying soon-to-expire qualifications. Like qualifications expiring in the next 90 days.

FVar2.png

Step 2: Maintain formula variables ABAP code

In transaction SE38 maintain the following code in ABAP program ZXRSRU01. This code generates the values for both formula variables based on Ready for Input variable 0CMLMON2:

 

when 'ZHR_FVCE_KEYDATE00'.

    if i_step = 2.

      READ TABLE i_t_var_range INTO l_s_var_range

      WITH KEY vnam = '0CMLMON2'.

      if sy-subrc = 0.

         lv_date =  sy-datum.

         if lv_date(6) EQ l_s_var_range-low(6).

           l_s_range-low    = lv_date.

           l_s_range-sign   = 'I'.

           l_s_range-opt    = 'EQ'.

           APPEND l_s_range TO e_t_range.

         else.

           concatenate l_s_var_range-low '01' into lv_datum.

           call function 'SLS_MISC_GET_LAST_DAY_OF_MONTH'

             EXPORTING

               DAY_IN            = lv_datum

             IMPORTING

               LAST_DAY_OF_MONTH = lv_date

             EXCEPTIONS

               DAY_IN_NOT_VALID  = 1

               others            = 2.

           IF SY-SUBRC = 0.

             l_s_range-low    = lv_date.

             l_s_range-sign   = 'I'.

             l_s_range-opt    = 'EQ'.

             APPEND l_s_range TO e_t_range.

           ENDIF.

         endif.

       endif.

    endif.


when 'ZHR_FVCE_KEYDATE90'.

    if i_step = 2.

      READ TABLE i_t_var_range INTO l_s_var_range

      WITH KEY vnam = '0CMLMON2'.

      if sy-subrc = 0.

         lv_date =  sy-datum.

         if lv_date(6) EQ l_s_var_range-low(6).

           lv_date = sy-datum + 90.

           l_s_range-low    = lv_date.

           l_s_range-sign   = 'I'.

           l_s_range-opt    = 'EQ'.

           APPEND l_s_range TO e_t_range.

         else.

           concatenate l_s_var_range-low '01' into lv_datum.

           call function 'SLS_MISC_GET_LAST_DAY_OF_MONTH'

             EXPORTING

               DAY_IN            = lv_datum

             IMPORTING

               LAST_DAY_OF_MONTH = lv_date

             EXCEPTIONS

               DAY_IN_NOT_VALID  = 1

               others            = 2.

           IF SY-SUBRC = 0.

             add 90 to lv_date.

             l_s_range-low    = lv_date.

             l_s_range-sign   = 'I'.

             l_s_range-opt    = 'EQ'.

             APPEND l_s_range TO e_t_range.

           ENDIF.

         endif.

       endif.

    endif.

 

Extra Note: Numbers of days to evaluate soon-to-expire qualifications (90 days) can also be made dynamic by implementing an extra Ready for Input variable to capture the number of days. Not showed in this post.


Step 3: Define exception’s required alert levels.

The system processes alert levels and associated threshold sequentially. When multiple alert levels and thresholds are defined for a single key figure, the system displays the lowest alert level.

NewException.png

Indicate the Key Figure the exception is defined on and what data cells will be affected by the alert.

ExceptionDefOn.png

Make sure the exception is active then run the query to see the result.

Result.png

Additional Considerations:

BEx Query exceptions can only take effect if the key figure the exception is defined on is included in the query output. When the key figure is hidden by either ‘Always Hide’ or ‘Hide (Can be shown)’ display options, the exception won’t take place. It is this tool behavior that rules out the alternative of having the exception defined on other key figure than the expiry date itself, unless additional key figures are allowed in the query result. When additional key figures are allowed in the output a different approach can be followed by choosing to display the exception on an key figure (expiry date) different from the one (compliance status) the exception is defined on.


Business Objects tools like Web Intelligence or Analysis, when available, could save the effort of defining query exceptions by using conditional formatting rules directly in the reporting tool.


Useful Links:

https://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/21b4cd14cd06f4e10000000a422035/content.htm

Coexistence of BAdI RSROA_VARIABLES_EXIT_BADI and Customer-Exit EXIT_SAPLRRS0_001

$
0
0

This blog has beentranslatedwithGoogleTranslate.theoriginalblogcan be found here: ekessler.de

In the blog BAdI RSROA_VARIABLES_EXIT_BADI I have shown how exit variables using the BAdI RSROA_VARIABLES_EXIT_BADI can be processed.

 

Now In this blog I want to deal with the coexistence of BAdI and customer exit. First, you should always consider I need the new technical way the SAP me here provides or can I also use the (customer exit) life?

The customer exit for BEx variables has always been a good candidate for unstructured, extensive and historically (often hysterical) grown Coding. This is due to the fact that the exit (Include ZXRSRU01) usually from many different developers (often short-term purchased external consultants) will be processed with different programming views (functional or Objektorientier). Not infrequently, bring this their procedures and approaches to structuring the customer exit (call dynamic function blocks / methods, nesting Includes, ...) from other projects with a.

Another reason that makes a structuring of the customer exits so complicated is the interleaving of two case distinctions. Firstly, it must be distinguished according to the current process step, the I_STEP, and secondly, by the variable to be processed. This nested branching nearly impossible to exit structuring. For this reason, a lot of different methods have been developed for customers all over how to tackle the problem. The following methods can be found in practice (partly slightly modified):

 

  • Nested Includes
    The implementations of the individual departments are hereby outsourced to include and the include ZXRSRU01 only contains the individual department-specific includes.
  • Dynamic call of function modules
    For each variable, a function block is created. By means of a fixed naming convention can be derived from the name of the variable and thus dynamically invoked the name of the function block.
  • Dynamic invocation of methods of ABAP OO classes
    A method is created for each variable. By means of a fixed naming convention can be derived from the name of the variable and thus dynamically invoked the name of the method. Following the procedure for the function module. In this method the professional belonging together variables / methods are often summarized in a class. This makes the link between the variables with the appropriate method somewhat expensive but has the advantage that helper methods in the class can be reused easily.

 

Often customers have invested a lot of work into the development of such a concept and a migration towards the BAdI RSROA_VARIABLES_EXIT_BADI is made difficult by this method. It is therefore important that is initially clarified whether the use of the new BAdI also brings much added value that the migration effort worthwhile. To understand where the added value of using the BAdI's against the customer exit is I want to describe the use and the internal processing of exit variables and the interaction of the BAdI RSROA_VARIABLES_EXIT_BADI and the customer exit briefly here.

 

1.1 Internal processing of exit variables


To understand the internal processing process, it is first necessary to understand how the BAdI RSROA_VARIABLES_EXIT_BADI works. In the BAdI RSROA_VARIABLES_EXIT_BADI is a "new" BAdI. New BAdI are organized in enhancement spot. As known in the rule of the BAdI name, not the enhancement spots I always climb in through the BAdI Builder (transaction SE18) to edit the BAdI implementations. Furthermore, the BAdI RSROA_VARIABLES_EXIT_BADI is a filter-based BADI. As filter the BAdI uses the info object that forms the basis for the BEx variable. Figure 1.1 shows on the left the SAP code to handle variables. If it is in the current variables to be processed by an exit variable by means

      GET BADI variable_exit
        FILTERS
          iobjnm = i_iobjnm.


tested whether an active BAdI implementation exists in the filter settings to the info object names match. That is the calling process within the SAP standard variable processing, checks whether the BAdI Framework is an active BAdI implementation for a filter value.
If an active BAdI implementation found PROCESS method of the class of the BAdI implementation is called:

      CALL BADI variable_exit->process
        EXPORTING
          i_vnam        = i_vnam
          i_vartyp      = i_vartyp
          i_iobjnm      = i_iobjnm
          i_s_cob_pro  = i_s_cob_pro
          i_s_rkb1d    = i_s_rkb1d
          i_periv      = i_periv
          i_t_var_range = i_t_var_range
          i_step        = i_step
        CHANGING
          c_t_range    = e_t_range
          c_no_screen  = e_no_screen
          c_check_again = e_check_again
          c_s_customer  = c_s_customer.

 

The definition of the BAdIs RSROA_VARIABLES_EXIT_BADI allows more than one active implementation (Multible use) to form a filter value. Find the BAdI framework for a filter value several active implementations are all performed sequentially. Here, the order is indeterminate.

 

RSROA_VARIABLES_EXIT_BADI_04_en.png

Figure 1.1: Processing of exit variables

 

1.2 Default implementation


In addition to the BAdI definition RSROA_VARIABLES_EXIT_BADI were running SAP in the standard of an active BAdI implementation (SMOD_EXIT_CALL). (= IOBJNM <>'' or IOBJNM'') of the filter value of this implementation is defined so that this implementation will always be used as BAdI active implementation.


The BAdI implementation SMOD_EXIT_CALL is characterized in Release 7:30 as the default implementation. As a result, this implementation is called only if no other active implementation is found. It must be noted that the filter value is taken into account when determining the active implementations.
I will illustrate this with a small example. As part of a migration project, we want to change the processing of the exit variables of the processing in the customer exit to the BAdI based variant. The migration project can not be implemented in a Big Bang but due to the scope. So that some variables in the customer exit and some in the BAdI be processed.
Variables and basic information items:

 

  • ZTKE_TODAY (0CALDAY)
  • ZTKE_YESTERDAY (0CALDAY)
  • ZTKE_CURWEEK (0CALWEEK)

 

BAdI implementations for variables and the filter

  • SMOD_EXIT_CALL [default implementation]
    • BAdI Impl. SMOD_EXIT_CALL
    • Filter:  IOBJNM <>'' OR'' = IOBJNM
  • TKE_TODAY
    • BAdI Impl. ZTKE_IMPL_CALDAY
    • Filter: IOBJNM = '0 CALDAY 'OR IOBJNM =''
  • ZTKE_YESTERDAY
    • Processing takes place in the customer exit!

 

Query and variable

 

  • ZTKE_Q_DAY (ZTKE_TODAY)
  • ZTKE_Q_WEEK (ZTKE_CURWEEK)
  • ZTKE_Q_YDAY (ZTKE_YESTERDAY)

 

Query processing ZTKE_Q_DAY

First, we consider the processing in I_STEP = 1
When you call the query ZTKE_Q_DAY the standard SAP processing determines all active Implementation to the filter 0CALDAY that are not marked as a default implementation.

GET BADI variable_exit
  FILTERS
    iobjnm = i_iobjnm.


Here the BAdI Framework will only find the BAdI implementation ZTKE_IMPL_CALDAY (filter  IOBJNM = '0 CALDAY ').
In I_STEP = 3 BAdI BAdI Implementation Framework only ZTKE_IMPL_CALDAY place again (filter  IOBJNM =''). In I_STEP = 3 all variables for validation (i_t_var_range) are available. I_vnam The parameters and i_iobjnm are I_STEP = 3 initial.

 

Query processing ZTKE_Q_YESTERDAY

Again, we first consider the processing in I_STEP = 1
When you call the query ZTKE_Q_YESTERDAY the standard SAP processing determines all active implementation to the filter 0CALDAY that are not marked as a default implementation.

GET BADI variable_exit
  FILTERS
    iobjnm = i_iobjnm.


Here the BAdI Framework will only find the BAdI implementation ZTKE_IMPL_CALDAY (filter  IOBJNM = '0 CALDAY ')! But we want to take advantage of the processing in the customer exit. This can be the case if, as have, the processing for this variable is not yet migrated in our example. Below I show how this can be implemented.
In I_STEP = 3 BAdI BAdI Implementation Framework only ZTKE_IMPL_CALDAY place again (filter  IOBJNM =''). Here the same applies as I_STEP = 1

 

Query processing ZTKE_Q_WEEK

 

Again, we first consider the processing in I_STEP = 1 When you call the query ZTKE_Q_WEEK the standard SAP processing determines all active implementation to the filter 0CALWEEK that are not marked as a default implementation.

GET BADI variable_exit
  FILTERS
    iobjnm = i_iobjnm.


Here you will find the BAdI Framework no active implementation that is not marked as a default implementation!
The default implementation SMOD_EXIT_CALL is used as the active implementation.
In I_STEP = 3 BAdI BAdI Implementation Framework finds the ZTKE_IMPL_CALDAY (filter  IOBJNM ='').

 

1.3 Results

 

The following points should be noted:

 

  • In the various implementations of the I_STEP must be checked and the current variable (Relocated CASE)
    In the example above, the implementation ZTKE_IMPL_CALDAY used as the active implementation for all variables based on the info object 0CALDAY. That within the implementation must be distinguished according to the currently processed variable analogous to the customer exit a case distinction. The case distinction is here implemented instruction usually with the help of CASE.

 

  • I_STEP 0,1,2 and the special case I_STEP = 3
    Similar to the variable name must be distinguished within the implementations of the I_STEP. The I_STEP = 3 provides as a special case here. In I_STEP = 3 all variables are testing and validation, and the parameters I_VNAM and I_IOBJNM are initial. That a case distinction according to the variable name is not possible here. When processing the I_STEP = 3 all BAdI implementations are called as active implementations in the filter IOBJNM = contain''. That it must be here a distinction according to the current query to be processed. The current query can be determined from the component COMPID the structure I_S_RKB1D.

 

  • With Release 7:30 it is not possible without further a BAdI implementation and parallel to use the customer exit.

 

  • From Release 7:40 SPS09 and BAdI customer exit can be used in parallel without further notice. For 7.40er systems from SPS09 the Note 2036773 needs to be implemented

 

2 Coexistence with Release 7:30


In a SAP BW / .3 system of BAdI RSROA_VARIABLES_EXIT_BADI and the customer exit EXIT_SAPLRRS0_001 can not be operated in parallel without further ado, see example above. To ensure that the customer exit is always run, it is necessary to set up your own BAdI implementation to this. For the BAdI implementation, the filter values are defined analogously to the SAP standard implementation.

Figure 2.1 shows a BAdI implementation to call the customer exits.

BAdI-Implementierung.png

Figure 2.1: BAdI definition for Customer Exit

 

Figure 2.2 shows the filter values of the BAdI implementation.

BAdI-Filter.png
Figure 2.2: Filter values of the BAdI implementation


Listing 2.1 shows the implementation of the PROCESS method of BAdI implementation. Within the implementation of the call to the customer exit is passed. It should be noted that it must be ensured not be deleted that may have already been determined value. The parameter E_T_RANGE of the function block is a pure export parameters, ie if the parameter C_T_RANGE was already filled in another BAdI implementation, this value must be saved before calling the exit.

METHOD if_rsroa_variables_exit_badi~process.

  DATA: lt_range_tmp TYPE rsr_t_rangesid.

  IF c_t_range IS NOT INITIAL.
    APPEND LINES OF c_t_range TO lt_range_tmp.
  ENDIF.

  CALL FUNCTION 'EXIT_SAPLRRS0_001'
    EXPORTING
      i_vnam        = i_vnam
      i_vartyp      = i_vartyp
      i_iobjnm      = i_iobjnm
      i_s_cob_pro  = i_s_cob_pro
      i_s_rkb1d    = i_s_rkb1d
      i_periv      = i_periv
      i_t_var_range = i_t_var_range
      i_step        = i_step
    IMPORTING
      e_t_range    = c_t_range
*    E_MEEHT      =
*    E_MEFAC      =
*    E_WAERS      =
*    E_WHFAC      =
      e_no_screen  = c_no_screen
      e_check_again = c_check_again
    CHANGING
      c_s_customer  = c_s_customer.

  IF lt_range_tmp IS NOT INITIAL.
    APPEND LINES OF lt_range_tmp TO c_t_range.
  ENDIF.

ENDMETHOD.


Listing 2.1: Implementation of the PROCESS method

Use the reporting name in Exit-variables for authorization

$
0
0

This blog has been translated with Google Translate. the original blog can be found here: ekessler.de

 

As part of the authorization check for Reporting's permission relevant values​​, among other things with the help of exit variables can be determined. It happens that the requirements of the business require that to be included in the determination of the values ​​within the exit implementation of the report in which the data should be displayed. That if user A, he should look at the data on the X report be eligible for other values ​​than when he looks at the data on Z report.

 

The SAP BW authorization concept is the consideration of the report for the determination of the authorization-relevant data are available. For this reason, the name of the report is not handed over to the Cuxtomer exit interface. That is, the parameter is the report name usually provides the customer exit for exit variables in the processing of exit variables in the context of initial authorization.

 

In the following I want to show the behavior of an example. Furthermore, I would like to show an alternative way how to determine the name of the current report. The feature 0COUNTRY is filtered through an exit variable within the authorization check.

 

Figure 1.1 shows the definition of authorization ZTKE_AUTH01. To determine the appropriate values ​​the exit variable ZTKE_COUNTRY is used.

 

Figure_1_1.jpg

Figure 1.1: Definition of authorization

 

Figure 1.2 shows the use of the authorization in the role.

 

Figure_1_2.jpg

Figure 1.2: Definition of the role

 

In my example, I put the implementation not in the customer exit EXIT_SAPLRRS0_001 (Extension - RSR00001 BI: Enhancements for Global Variables in Reporting) to, but here I use the SAP BW 7.30 newly introduced BAdI RSROA_VARIABLES_EXIT_BADI.

 

For the new implementation of the BAdI RSROA_VARIABLES_EXIT_BADI I define as a filter IODBJNM = 0COUNTRY. The filter combination IOBJNM = '' we do not need here because of us I_STEP 3 = not interested. Only in I_STEP = 3, the parameter IOBJNM is not maintained. Exit variables that will come as part of the authorization to use = 0 processed in I_STEP and the parameter IOBJNM is maintained. Figure 1.3 shows the upper part of the filter combination used.

 

Figure_1_3.jpg

Figure 1.3: BAdI implementation

 

The lower panel in Figure 1.3 shows how the name of the report can be found. When processing in I_STEP 1, 2 and 3, the name of the report is on the COMPID field of the structure I_S_RKB1D. But in I_STEP = 0 the field is empty. With the help of the instruction:

IMPORT compid = l_compid FROM MEMORY ID 'COMPID'.

may the name of the report but are determined at runtime.

ABAP report that only carries texts

$
0
0

I found very interesting report. It has no ABAP code at all. But it has a lot of text in there instead. Name of the report mentioned in here is RSR_BEXANALYZER_TEXT. The texts which it carries are related to BW’s BEx Analyzer. So basically all the texts used within this Windows based tool are stored with the report.


RSR_BEXANALYZER_TEXT.png


The texts are downloaded to user’s folder (%temp%\BW\COMMON\texts\ into the file e.g. BExTexts_EN.xml as per language used for login) when first logon to BEx Analyzer is performed. There are many SAP Notes which deal with the report. Mostly they deliver new or changed texts. So once you are not able to see new/changed text delivered by Note you may want to delete this folder or file to get refreshed texts to your workstation. See SAP Note “1732598 - Text Elements do not appear correctly in BEx Analyzer” for details.


I was curious to know how many texts the report has. So I prepared short ABAP report to count that. Here it is:


DATA: lt_tpool TYPE TABLE OF textpool,
            lv_lin  
TYPE i.

CALL FUNCTION 'RS_TEXTPOOL_READ'
      
EXPORTING  OBJECTNAME = 'RSR_BEXANALYZER_TEXT'
                             ACTION           
= 'DISPLAY'
                           
LANGUAGE      = 'E'
     
TABLES         TPOOL             = lt_tpool
     
EXCEPTIONS  others          = 0.

DESCRIBE TABLE lt_tpool LINES lv_lin.
WRITE: / lv_lin
.


BTW: in my system based on SAP_BW 731 SP 0002 it has 827 texts.


So basically this is how I was playing tonight


The blog is cross posted on my personal blog.

Viewing all 103 articles
Browse latest View live


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