Pages

Thursday, 28 June 2012

Replacement Path


Replacement path processing type is used in a variable when you wish to get a value from attributes of another character or from a query.

Example:- if you wish to display the age of a customer in your report which will not be in the cube. I mean Age is attribute of customer and not part of the cube. But each transaction record in the cube is assigned with a customer field. So if we want to get this value into our report .. we create a variable on customer with replacement path and use its attribute AGE . So when you use this variable in your query for any thing you get the age of the customer associated with that transaction data.


One use of the Replacement path variable is as highlighted by Riccardo (formula variable).

Other than that Replacement path variables of type Characteristic variable replace the results of a query in the variable ad are used in Result Set scenario queries. So if you have such a variable on material, Query1 will supply a list of Materials to Query2.

Replacement path variables are also used to enhance the column headings as Text variables. Eg, A text variable created that will put the text for each month on the column heading.

Characteristic Variable with Replacement Path on Query
While working for TOP-N Vendor Report I encountered the need of Replacement with Query
We already have Report to Calculate TOP-5 Vendors of the Year, and recently I got new requirement to update this report for analyzing the TOP-5 Vendors of the year over all the months of the given year. I tried simple approach by creating multiple selections for all the months individually in Columns, and created condition of TOP-5 for all the months. But it didn’t work in the way I was expecting. It included TOP-5 Vendors of each month individually, which added some new vendors to analyze in my report. Then I tried the same solution with the Replacement Path on TOP-5 Vendor Query (which I was already having in my system), and finally it worked fine for me.
Below is the detailed explanation of the scenario that I discussed and the problem I faced with the alternative approach, and how it solved with the approach of Replacement Path on Query:

Advantages Of BW Reporting Over R3 Reporting


1. Moves the workload off the R3 system. Most sites are trying to run is little reporting off of R3 to maintain server performance for the OLTP users. R3 is not optimized for reporting - it's a highly normalized DB design.

2. BW - better query performance. It's been optimized for that, the DB design, features like OLAP and web caching, reporting agent, aggregates, etc...

3. Many more formatting and distribution options - Excel, Web. Reports can be scheduled to run off hours and cached for very quick access during business hours or e-mailed to users.

4. Reports (queries) can be easily setup for variables to parameterize the report and users can save their different selection options as variants.

5. User can modify the report with drill downs, drill across, sorting, modifying selection criteria, change display of key, key and text, or just text.

6. Quicker changes to the queries, addition of fields in BW environment, don't need ABAP developer.

SAP BW/BI Interview Questions Part-2


1) How and where can I control whether a repeat delta is requested?
Ans: Via the status of the last delta in the BW Request Monitor. If the request is RED, the next load will be of type 'Repeat'. If you need to repeat the last load for certain reasons, set the request in the monitor to red manually. For the contents of the repeat see Question 14. Delta requests set to red despite of data being already updated lead to duplicate records in a subsequent repeat, if they have not been deleted from the data targets concerned before

2) I would like to display the date the data was uploaded on the report. Usually, we load the
transactional data nightly. Is there any easy way to include this information on the report for users so that they know the validity of the report?
Ans: If I understand your requirement correctly, you want to display the date on which data was loaded into the data target from which the report is being executed. If it is so, configure your workbook to display the text elements in the report. This displays the relevance of data field, which is the date on which the data load has taken place.

3) How many days can we keep the data in PSA?
Ans: In our project we delete the PSA tables and ChangeLog tables excluding recent 10 days tables.

4) How can u get the data from client if u r working on offshore projects? Through which network.
Ans: VPN (Virtual Private Network), VPN is nothing but one sort of network where we can connect to the client systems sitting in offshore through RAS (Remote access server).

5) In BW we need to write abap routines. I wish to know when and what type of abap routines we got to write. Also, are these routines written in update rules? I will be glad, if this is clarified with real-time scenarios and few examples?
Ans: Over here we write our routines in the start routines in the update rules or in the transfer structure (you can choose between writing them in the start routines or directly behind the different characteristics. In the transfer structure you just click on the yellow triangle behind a characteristic and choose "routine". In the update rules you can choose "start routine" or click on the triangle with the green square behind an individual characteristic. Usually we only use start routine when it does not concern one single characteristic (for example when you have to read the same table for 4 characteristics).

We used ABAP Routines for example:

a) To convert to Uppercase (transfer structure)

b)  To convert Values out of a third party tool with different keys into the same keys as our SAP System uses (transfer structure)

c) To select only a part of the data for from an infosource updating the Infocube (Start Routine) etc.

6) What does Infocube contains?
Ans: Each Infocube has a Fact Table and a maximum of 16 (13 userdefined+3 system defined, time, unit & data packet) dimensions.

7) What does FACT Table contain?
Ans: Fact Table consists of Keyfigures which hold the transaction data. Each Fact Table can contain a maximum of 233 key figures.
Note: One Dimension table can be assigned with 248 characteristics.

8) What does SID Table contain?
Ans: SID keys linked with dimension table & master data tables (attributes, texts, hierarchies)

9) What are the different master data tables in BW?
Ans:

10)Differences between STAR Schema & Extended Star Schema?
Ans: In STAR SCHEMA, A FACT Table in center, surrounded by dimensional tables and the dimension tables contains of master data. In Extended Schema the dimension tables does not contain master data, instead they are stored in Master data tables divided into attributes, text & hierarchy. These Master data & dimensional tables are linked with each other with SID keys. Master data tables are independent of Infocube & reusability in other InfoCubes.
 
11) When are Dimension ID's created?
Ans: When Transaction data is loaded into Infocube.

12) When are SID's generated?
Ans: When Master data loaded into Master Tables (Attribute, Text, Hierarchies).

13) How would we delete the data in ODS?
Ans: By request IDs, Selective deletion & change log entry deletion.

14) Partitioning possible for ODS?
Ans:  No, It is possible only for Infocube and PSA in BW

15) Different types of Attributes?
Ans: Navigational attribute, Display attributes, Time dependent attributes, Compounding attributes, Transitive attributes.

16) Transitive Attributes?
Ans: Navigational attributes having navigational attribute, these navigational attributes are called transitive attributes.

17) Compounding attribute?
Ans:

18) Time dependent attributes?
Ans:

19) Steps in LO are Extraction?
Ans:
Maintain extract structures. (R/3)
Maintain DataSources. (R/3)
Replicate DataSource in BW.
Assign InfoSources.
Maintain communication structures/transfer rules.
Maintain InfoCubes & Update rules.
Activate extract structures. (R/3)
Delete setup tables/setup extraction. (R/3)
InfoPackage for the Delta initialization.
Set-up periodic V3 update. (R/3)
InfoPackage for Delta uploads.


20) Different types delta update modes in  LO Extraction?
Ans: Direct Delta, Queued Delta, Serialized V3 update, Unserialized V3 Update.

Direct Delta: - With every document posted in R/3, the extraction data is transferred directly into the BW delta queue. Each document posting with delta extraction becomes exactly one LUW in the corresponding Delta queue.
Queued Delta: - The extraction data from the application is collected in extraction queue instead of as update data and can be transferred to the BW delta queue by an update collection run, as in the V3 update.
Serialized V3 update:-

Unserialized V3 Update:-
 
21) Some important T Codes?
Ans:
  RSA6 -- Post processing of data sources
  RSA7-- Delta Queue (allows you to monitor the current status of the delta attribute)
  RSA3-- Extract checker.
  LBWG -- Delete set-up tables in LO's.
  OLI*BW-- Fill Set-up tables.
  LBWE – T-Code for Logistics extractors.
  RSO2 -- Maintaining Generic DataSources.
  PFCG -- Role maintenance, assign users to these roles.
  RSDCUBEM -- For Delete, Change or Delete the Infocube.
  RSMO -- Monitoring of  Dataloads.
  RSCUSTV6 -- Partitioning of PSA.
  RSRT -- Query monitor.
  RSRV -- Analysis and Repair of BW Objects
  RRMX -- BEx Analyzer
  RSBBS -- Report to Report interface (RRI).
  SPRO -- IMG (To make configurations in BW).
  RSDDV -- Maintaining Aggregates.
  RSKC -- Permit Special characteristics.
  ST22 -- Checking Short Dump.
  SM37 -- Scheduling Background jobs.
  RSBOH1 - Open Hub Service: Create Infospoke.
  ROOSOURCE - Table to find out details of Datasources.
  SMOD - SAP Exits
  CMOD - Customer Exits
  SE11 - ABAP Dictionary – Create tables views and other objects.
  SE16 - To see the data in tables, views and structures.
  SE09 - Transport Organizer (workbench organizer) - Transport requests will be released
  SE10 - Transport Organizer (Extended View)
  SBIW - T-code used in LO Extraction for various aspects

22) What are Process Types & Process variant in process chain maintenance?
Ans: Process types are General services, Load Process & subsequent processing, Data Target
Administration, reporting agent & Other BW services. Process variant (start variant) is the place the process type knows when & where to start.

23) What is the T-Code to delete BEx query in production system?
 Ans: RSZDELETE

24) What is the T-code for Copying Queries from one infoprovider to another infoprovider?
Ans: RSZC

25) How much time does it take to extract 1 million (10 lackhs) of records into an infocube?
Ans: This depends, if you have complex coding in update rules it will take longer time, or else it will take less than 30 minutes.

66) How to know in which table (SAP BW) contains Technical Name / Description and creation data of a particular Reports. Reports that are created using BEx Analyzer?
Ans: There is no such table in BW if you want to know such details while you are opening a particular query press properties button you will come to know all the details that you wanted. You will find your information about technical names and description about queries in the following tables. Directory of all reports (Table RSRREPDIR) and Directory of the reporting component elements (Table RSZELTDIR) for workbooks and the connections to queries check Where- used list for reports in workbooks (Table RSRWORKBOOK) Titles of Excel Workbooks in InfoCatalog (Table RSRWBINDEXT)
 
27) What is a LUW in the delta queue?
Ans: A LUW from the point of view of the delta queue can be an individual document, a group of documents from a collective run or a whole data packet of an application extractor.

28) Difference between Calculated Key Figure & Formula?
 Ans: Calculated keyfigure is the virtual keyfigure which is created based on physical keyfigures and some functions.CKF is global across all the queries on the same infoprovider. New same as CKF but its local to the query where it is created.

29) When does a transfer structure contain more fields than the communication structure of an Infosource?
Ans: If we use a routine to enhance a field in the communication from several fields in the transfer structure, the communication structure may contain more fields.

30) Why we use this RSRP0001 Enhancement?
Ans: For enhancing the Customer Exit in reporting.

31) What is the use of Filters?
Ans: It Restricts Data.

32) What is the use of Conditioning?
Ans: To retrieve data based on particular conditions like less than, greater than, less than or equal etc.,

33) What is NODIM?
Ans: For example it converts 5lts + 5kgs = 10. NODIM will be available in the functions set in BEX and this is used to remove the dimensions.

34) Why SAPLRSAP is used?
Ans: We use these function modules for enhancing the datasources in r/3. We have four EXITS –

SAPLRSAP_EXIT_001- Transaction datasources
SAPLRSAP_EXIT_002- Master Data Attribute
SAPLRSAP_EXIT_003- Master Data Text
SAPLRSAP_EXIT_004- Master Data Hierarchy

35) What are workbooks & uses?
Ans: Saved output of a query is called workbook

36) Where are workbooks saved?
Ans: Workbooks are saved in favorites.

37) Can Favorites accessed by other users?
Ans: No, they need authorization.

38) What is Business Content?
Ans: Business Content is the umbrella term for the preconfigured BW objects delivered by SAP. These objects provide ready-made solutions to basic business information requirements and are used to accelerate the implementation of a BW. TCODE RSOR (BW), RSA5(R/3)

Business Content includes:

R/3 extractor programs, DataSources, InfoObjects, InfoSources, InfoCubes, Queries, Roles, and Workbooks. From the Grouping menu, choose the additional Business Content objects that you want to include. Groupings gather together all of the objects from a single area:

Only Necessary Objects: Only those additional objects that are needed to activate the objects that you have selected are included (minimum selection).
In Data Flow Before: All the objects that pass data on to another object are collected.
In Data Flow Afterwards: All the objects that receive data from another object are collected. In Data Flow Before and Afterwards: All the objects that both deliver and receive data are collected.
Backup for System Copy: You use this setting to collect some of the objects into a transport
Request

39) If you update data from ODS to data target. System will generate InfoSource with one prefix name?
Ans: It will generate with prefix name starting with 8 along with InfoSource name.

40) What is an aggregate?
Ans: Aggregates are small or baby cubes. A subset of InfoCube.
Flat Aggregate --when u have more than 15 characteristics for aggregate system will generate that aggregate as flat aggregate to increase performance.
Roll-up--when the data is loaded for second time into cube, we have to roll-up to make that data available in aggregate.

41) What is Line-Item Data, in which scenario u use line item dimension?
Ans: A line item dimension in a fact table does not have the dimension table; it connects directly with the SID table at its sole characteristic. When there is only one characteristic in a dimension, it will eliminate the dimension table. Fact table directly linked to the SID table. When the size of the dimension table is more than 20% size of the fact table we will go for line item dimension

42) You can convert currencies at 2 places?
Ans: One is at update rule level & one at the front-end

43) How can we stop loading data into infocube?
Ans: First you have to find out what is the job name from the monitor screen for this load
In Header Tabstrip in monitor screen. Go to  SM37 (job monitoring) in R/3 select this job and from the menu you can delete the job. Job cancellation is not suggestible for delta load.
 
44) What's the difference between R3 drill down reporting and BW reporting?
These two reporting seem to function similarly with slice and dice. If they function similarly, then that means we don't have to implement BW, just use R3 Drill down reporting tool, am I right?
Ans: The major benefits of reporting with BW over R/3 are in terms of performance and analysis.
1. Performance -- Heavy reporting along with regular OLTP transactions can produce a lot of load both on the R/3 and the database (cpu, memory, disks, etc). Just take a look at the load put on your system during a month end, quarter end, or year-end -- now imagine that occurring even more frequently.
2. Data analysis -- BW uses a Data Warehouse and OLAP concepts for storing and analyzing data, where R/3 was designed for transaction processing. With a lot of work you can get the same analysis out of R/3 but most likely would be easier from a BW

45) What is the Difference between Transfer Rules and Update Rules?
Ans:
Transfer Rules : Which specifies how the mapping between the Data Source fields with the Infosource fields (So called Communication Structure).
Update Rules : Which specifies how data will be updated into the Data Targets (ODS or InfoCube). (Which internally does some techinical name mapping)

46) In update rules for key figures, what are the return table options for?
Ans: Usually the update rule sends one record to the data target; using this option you can send multiple records to the data target eg. If you get 1 record from the
communication structure using this option you can create multiple records into the data target. For exa mple if we are getting total telephone expenses for the cost center, you can use this to return telephone expenses for each employee (by dividing the total expenses by the number of employees in the cost center) and creating cost record for each employee using ABAP code.

Tuesday, 26 June 2012

SAP BW/BI Interview Questions Part-1


1. What are the extractor types?
Ans: There are three types of extractors
 Application Specific - BW Content FI, HR, CO, SAP CRM, LO Cockpit
Customer-Generated Extractors  - FI-SL, CO-PA
Cross Application - Generic Extractors based on Table, View, InfoSet, Function Module

2. What are the steps involved in LO Extraction?
 Ans: The steps are
a)      RSA5 Select the DataSources
b)      LBWE Maintain DataSources and Activate Extract Structures
c)      LBWG Delete Setup Tables
d)      0LI*BW Setup tables
e)      RSA3 Check extraction and the data in Setup tables
f)       LBWQ Check the extraction queue
g)      LBWF Log for LO Extract Structures
h)     RSA7 BW Delta Queue Monitor

3. What is the difference between ODS, InfoCube and MultiProvider?
Ans:
a)      ODS: Provides granular data, allows overwrite and data is in transparent tables and provides operational reports.
b)      CUBE: Follows the star schema, we can only append data i.e. additive property and provides analytical reports.
c)      MultiProvider: It is the logical unification of physical infoproviders. It does not have physical data. There should be one characteristic in common for unifying the physical infoproviders.

4. What are Start routines, Transfer routines and Update routines? 
Ans:
Start Routines: The start routine is run for each DataPackage after the data has been written to the PSA and before the transfer rules have been executed. It allows complex computations for a key figure or a characteristic. It has no return value. Its purpose is to execute preliminary calculations and to store them in global DataStructures. This structure or table can be accessed in the other routines. The entire DataPackage in the transfer structure format is used as a parameter for the routine.

 Transfer / Update Routines: They are defined at the InfoObject level. It is like the Start Routine. It is independent of the DataSource. We can use this to define Global Data and Global Checks.

5. What is the table that is used in start routines?
Ans: Always the table structure will be the structure of an ODS or InfoCube. For example if it is an ODS then active table structure will be the table.

6. Explain how you used Start routines in your project?
Ans: Start routines are used for mass processing of records. In start routine all the records of
DataPackage is available for processing. So we can process all these records together in start routine.
In one of scenario, we wanted to apply size % to the forecast data. For example if material M1 is forecasted to say 100 in May. Then after applying size %(Small 20%, Medium 40%, Large 20%, Extra Large 20%), we wanted to have 4 records against one single record that is coming in the info package. This is achieved in start routine.

7. What are Return Tables?
Ans: When we want to return multiple records, instead of single value, we use the return table in the Update Routine. Example: If we have total telephone expense for a Cost Center, using a return table we can get expense per employee.

8. What is compression? 
Ans: When we perform the compression the data in the infocube moves from F-Fact table to the E-Fact table. The entire request IDs will be deleted and compressed into a single request. When you perform this compression by choosing the check box “with zero elimination” keyfigures with the zero values also will be deleted. As a whole compression saves database size and increases the query performance.

9. What is Rollup? 
Ans: This is used to load new requests (delta records) in the Infocube into the aggregates. If we have not performed a rollup then the current data (which is not rolled up) will not be available for reporting

10. What is table partitioning and what are the benefits of partitioning in an Infocube?
Ans: It is the method of dividing the fact table which would improve the query performance. We can perform partition only when we have either 0CALMONTH or 0FISCPER in the infocube. When we perform partition the E fact table of the infocube will be partitioned and hence we should perform the compression followed by partition in order to get the partition effect. Partitioning helps to run the report faster as data is stored in the relevant partitions.

11. What are the options available in transfer rules for mapping?
Ans: InfoObject, Constant, Routine, Formula

12. How would you optimize the dimensions? 
Ans: We should define as many dimensions as possible and we have to take care that no single dimension crosses more than 20% of the fact table size. If the dimension table crosses more than 20% of the size of the fact table, we should declare the dimension as line item dimension (There should not be more than one characteristic assigned to a dimension in order to declare it as line item dimension)

13. How to find the size of the dimension table?
Ans: With the program SAP_CUBES_DESIGN

14. What are Conversion Routines for units and currencies in the update rule?
Ans: Using this option we can write ABAP code for Units / Currencies conversion. If we enable this flag then unit of Key Figure appears in the ABAP code as an additional parameter. For example, we can convert units in Pounds to Kilos.

15. Can an InfoObject be an InfoProvider, how and why? 
Ans: Yes, when we want to report on Characteristics or Master Data. We have to right click on the InfoArea and select "Insert characteristic as data target". For example, we can make 0CUSTOMER as an InfoProvider and report on it.

16. What is Open Hub Service?
Ans: The Open Hub Service (process) enables us to distribute data from an SAP BW system into external system. In BW 3.5 version an object called Infospoke is used to send data from BW to the external systems. In BI 7 version we use open hub destination (object) for this purpose.

17. What is BW Statistics and what is its use? 
Ans: They are group of Business Content InfoCubes which are used to measure performance for Query and Load Monitoring. It also shows the usage of aggregates, OLAP and Warehouse management. There are some standard reports on these infocubes which provides us the in information about the BW system performance as a whole.

18. What are the delta options available when you load from flat file? 
Ans: The 3 options for Delta Management with Flat Files:
Full Upload
New Status for Changed records (ODS Object only)
Additive Delta (ODS Object & InfoCube


19. Can we make a datasource to support delta?
Ans: If this is a custom (user-defined) datasource you can make the datasource delta enabled. While creating datasource from RSO2, after entering datasource name and pressing create, in the next screen there is one button at the top, which says generic delta. Generic delta can be enabled based-

a)      Time stamp
b)      Calendar day
c)      Numeric pointer, such as document number & counter


20. How much time does it take to extract 1 million (10 lakhs) of records into an infocube?
Ans: This depends, if you have complex coding in update rules it will take longer time, or else it will take less than 30 minutes.

21. What is ASAP Methodologies?
Ans: ASAP stands for Accelerated SAP methodology which is used to implement and deliver the project efficiently.
The five stages of ASAP methodologies are- 

Project plan, Business Blue print, Realization, Final preparation & Go-Live - support. 
1. Project Preparation: In this phase the system landscape will be set up.
2. Business Blueprint: It is a detailed documentation of your company's requirements. (I.e. what are the objects we need to develop are modified depending on the client's requirements).
3. Realization: In this only, the implementation of the project takes place (development of objects etc)
And we are involved in the project from here only.
4. Final Preparation: Final preparation before going live i.e. testing, conducting pre-go-live, end user training etc.
End user training is given that is in the client site you train them how to work with the new environment, as they are new to the technology.
5. Go-Live & support: The project has gone live and it is into production. The Project team will be supporting the end users.

21. Difference between display attributes and navigational attributes?
Ans: Display attribute is one, which is used only for display purpose in the report. Whereas navigational attribute is used for drilling down in the report. We don't need to maintain Navigational attribute in the cube as a characteristic (that is the advantage) to drill down.

22. Some data is uploaded twice into infocube. How to correct it?
Ans: Selective deletion if the data is already compressed otherwise deletes the duplicate request

23. Can number of Datasources have one infosource?
Ans: Yes of course. For example, for loading text and hierarchies we use different data sources but the same Infosource which is already used for attribute

24: Can many infosources assign to one infoprovider?
Ans: Yes

25: Can many transaction Datasources can be assigned to one infosource?
Ans: No, it’s a one to one assignment in this case.

26. Currency conversions can be written in update rules. Why not in transfer rules?
Ans:

27: What are the types of data update we have in BW?
Ans: Full, Initialize delta (init), Delta, Repair full


28: What is early delta?
Ans:

29. When do we go for initialization without data transfer?
Ans:

30. Why we delete the setup tables (LBWG) & fill them (OLI*BW)?
Ans: For the first time when we are loading the historical data in the setup tables as a caution we perform deletion for the setup tables in order to avoid any junk data residing in it. Also when a DataSource is enhanced we will go for deleting the setup tables followed by the statistical setup (filling setup tables)

31. Why do we have set up tables in LO extraction only but not the other extractions?
Ans: As the historical data volume in case of logistics modules (SD, MM, and PP) is high we have setup table which are the intermediate tables of type transparent tables.

31) What Are The Different Variables Used In BEx?
Ans: Different Variable's are Texts, Formulas, Hierarchies, Hierarchy nodes & Characteristic values.

32) What is processing type of a variable?
Ans: The way how the variable gets the input value is called processing type.
We have the following five processing types-

Variable Types are:

a)      Manual entry /default value
b)      Replacement path
c)      SAP exit
d)      Customer exit
e)      Authorization

33) How many Levels we can go In Reporting?
Ans: We can drill down to any level by using Navigational attributes and jump targets (RRI).

34) What are Indexes?
Ans: Indexes are data base indexes, which help in retrieving data faster.

35) What is the significance of KPI's?
Ans: KPI’s (Key Performance indicators) indicate the performance of a company. These are key figures

36) What types of partitioning are there for BW?
Ans: There are two Partitioning Performance aspects for BW (Cube & PSA)

37) How can I compare data in R/3 with data in a BW Cube after the daily delta loads? Are there any standard procedures for checking them or matching the number of records?
Ans: You can go to R/3 T-Code RSA3 and run the extractor. It will give you the number of records extracted. Then go to BW Monitor to check the number of records in the PSA and check to see if it is the same & also in the monitor header tab.

38) What is the difference between writing a routine in transfer rules and writing a routine in update rules?
Ans:  If you are using the same Infosource to update data in more than one data target its better u write in transfer rules because u can assign one InfoSource to more than one data target & and whatever logic we write in update rules it is specific to particular one data target.

39) Can one infosource send data to multiple datatargets?
Ans:Yes

40) What does the number in the 'Total' column in Transaction RSA7 mean?
Ans: The 'Total' column displays the number of LUWs that were written in the delta queue and that have not yet been confirmed. The number includes the LUWs of the last delta request (for repetition of a delta request) and the LUWs for the next delta request. A LUW only disappears from the RSA7 display when it has been transferred to the BW System and a new delta request has been received from the BW System.