Wednesday 16 May 2012

SAP BI interview questions


Read these faq's.more than enough i thnk...ravikiran.(collectd frm my frnds who attended for those interviews)

Accenture:

• What are step in transporting the object? Accenture
• Where you have to done cube testing? Accenture
• WHAT IS OBJECT DOCUMENTATION? WHERE YOU CAN DO IT? WHAT IS THE USE OF THAT? Accenture
• How can partition a cube- Accenture
• What is type of transfer in transfer rules? Accenture
• What is data transformation in BW? Accenture
• Why u go for aggregate? Tell me one example? Accenture
• Usually we mention T or O in CONFIRMATION TYPE. What are T and O stand for? Accenture
• Suppose, you are working on a report, how do you know from which INFOCUBE, report should be generated? Accenture
• what are the extractions made in a sap BW project using lo cockpit- Accenture
• Extraction in mm and SD and FI? What is the requirement and name them? Accenture
• What are the InfoCubes developed in a sap project? Name them and what is the requirement? Accenture
• What are the reports generated in a sap BW project? Name them and what is the requirement? Accenture
• What is the transaction to check delta? Accenture



Bristle-Cone
• Which data you load first (MASTER or TRANSACTIOANAL)? Why?


CS
• Tell me info object errors?

Citigroup

• How do you generate Summary Report? How can i get the Drill down Options in That report? Citigroup
• How is SAP BW different from SAS (Statistical Analytical Software)? Citigroup
• What is the difference between Business warehouse and Data Warehouse? Citigroup


Cap-Gemini
• Where do you find the option "REPAIR REQUEST"? WHAT IS THE USE OF THAT? Cap-Gemini
• How can u correct the error in loading for Delta failure.
• How do u decided to go create Aggregates for cube. What purpose you want to create aggregates?

Curosys
• WHAT IS THE DIFFERENCE BETWEEN WORKBENCH REQUEST AND CUSTOMERIZIED REQUEST-



HCL
• What type of tables join in generic view? HCL
A)TRANSPERENT TABLES.
• What is attribute change run?
A.)MASTER DATA CHANGES THEN WE HAVE TO RUN THIS.
• What is reconciliation? Where can u find the option. cube( f/ e table or ODS or aggregates)?
A.)CUBE.
• What is SID for to transport the object along the land scape.

• What are the parameters? Can u say what type of parameters regularly used?
• What is the difference between formula and calculated key figure? HCL
• What is the safety delta for CO-PA?



IBM
• What Cell formatting? And Advantages? IBM
• What is the ticketing tool for Wipro and ticketing tool depends on company or client? IBM
• What is the main difference between view and the function module? IBM
• If we want to design an info cube, what are the pre-requisites u have to take in real time? IBM
• What is the differences between standard DSO and write optimized DSO and Direct update DSO. IBM
• How can we stop the Collapse process in process chain? IBM
• What is the use of filters in BEx – IBM
• How do you analyse the data loading time ...today the loading time is 15 min. but tomorrow the same type of loading takes 3 hours..How do you analyse? IBM
• Account modeling and key figure modeling IBM
• What is exception aggregation IBM
• How is multi provider different from info set? Typically when do you use it? IBM
• Which R/3 version supports LO extraction? IBM
• How does it do delta? IBM
• What is the difference between Data Target and Info Provider IBM
• What is the RRI? What is the structure of RRI? Any conditions for RRI.



HP
• What is 0unit of measure? HP
• What is alpha conversion? U faced any errors in alpha conversion? HP
• What is variable? Give me one example? I want to display 12 months in a report..? How many variables are used? HP
• How will the setup be in BW in real time scenario how will the setup between r/3 and BW in real time scenario HP
• Can Tell Me difference b/w SAP BW 3.5 & BW 7.0 version in Detail.- HP
• What are the uses of routines, like transfer routine, update routine, start routine. What are the differences? Where we will actually define them?

Infosys
• What is the difference between Z and 0 Tables in SAP BW3.5? Infosys
• How to get the recordmode D or A in changelog table when we delete or add records in DSO? Infosys
• When do we go for generic extraction and why we use time stamp? How long it will run? Explain? Infosys
• What do you understand by Datawarehouse? How is it being used by different organisations?


Igate
• What is LIS, LO and difference between them?

Magnus-Infotech
• Can we make a info object as info provider other than master data.


Infotech
• How do you extract data from R3 to BW for a specific date.? How to filter the data for the period? ITC-Infotech
• How will you schedule the job in background



Wipro

• What is I_step1,I_step2,I_step3 in customer exit –Wipro
• What is occurrence- Wipro
• What is step by step procedure? At what scenario you retrieve the data from sap system to Informatica or say DWH system?


TCS
• How to fetch the data from sap-r/3, sap-BW/BI to Informatica system?
• What is the t-code to create INDEX in SAP BI (7.0)? TCS
• How can we create the index in SAP BW/BI? TCS
• What are variables? TCS
• What is change run? TCS
• What do you do, when you get a GAP? What is FIT-GAP analysis?


Satyam
• What is Cell Definition? Satyam
• What are the reports used from business content in sap BW project? Name
them and what was the requirement? Satyam
• How can we enhance the dataSources, explain me with example? Satyam
• What are the errors in process chain, how can we solve them?




Infoproviders in sap bi


Infoproviders(Physical and Virtual)

DSO:

A Data Store object is used to store consolidated and cleansed data
(transaction data or master data) on a document level(atomic level).
Although Datastore Objects can store master data, and and there are
valid reasons for this, they primarily store detailed transaction data.
They can be used to support detailed operational reporting, or can
be part of the warehouse, where they canbe used to hold years of
"potentially needed" data.

One major difference between Datastore Objects and Infocubes is that
DataStore Objects have the option to overwrite records, where infocubes
do not. This is a huge difference.

In contrast to multidimensional Datastores for Infocubes, data in Data
Store objects is stored in flat, transparent database tables. Fact and
dimension tables are not created.

With Datastore objects, we cannot only update keyfigures cumulatively,
as with Infocubes, but also overwrite data fields. This is especially
important for transaction-level documents that change in the source
sytem. Here, document changes not only involve numerical fields, such
as order quantities, but also non-numerical ones such as ship-to parties,
delivery date, and status. Since the OLTP system overwrites these 
records when changes occur, Datastore objects must often be moceled
to overwrite the corresponding fields and update to the current value
in BI.

The Standard Datastore Object consists of thre tables(activation queue,
active data table, and change log). It is completely integrated in the
staging process. In other words, data can be loaded into and out of the
Datastore Objects during the staging process. Using a change log means
that all changes are also written and are available as delta uploads
for connected data targets.

Write Optimized is a new kind of Datastore Object. It is targeted for
the warehouse level of the architectur, and has the advantage of 
quicker loads.

A direct update Datastore object has only the table with active data.
This means it is not as easily integrated in the staging process.
Instead, this Datastore object type is filled using APIs and can be
read via a BAPI.

The following code is delivered for this purpose.

BAPI BAPI_ODSO_READ_DATA_UC
RSDRI_ODSO_INSERT
RSDRI_ODSO_INSERT_RFC
RSDRI_ODSO_MODIFY
RSDRI_ODSO_MODIFY_RFC
RSDRI_ODSO_UPDATE
RSDRI_ODSO_UPDATE_RFC
RSDRI_ODSO_DELETE_RFC

Direct Update DS Object usage in APD:
The APD is a robust tool set for use by the best analysis. It allows
analysts to manipulate and mine data for specific analysis goals.

Direct Update DS Object usage in SEM Business Consolidation(BCS):
During consolidation of two legal entities, accounting entities are 
made to direct update DS Objects to reflect the elimination of
internal transactions.

The number of Datastore Objects that must be implemented depends
on the complexity of the scenario that is to be implemented. Furthermore,
a Datastore object can also form the end of a staging process. In otherwords,
an Infocube does not necessarily have to be updated from the Datastore
object.

Integrating a New Infocube Into an Existing Into an Existing Data Flow:

1. Create a transformation between the original source and the new
    target objects.
2. Create both a full and delta DTP.
3. Manually execute the full DTP.
4. Create a new process chain to execute the delta DTP.
5. Integrate the new chain into your existing nightly process chains.

Infoproviders are all objects that provide information to queries.
Infoproviders are broken down into two grouping. Infoproviders that
store the data persistently(in database tables) and those that do not
store the data in BI, but rather collect the data when the query is
executed. The former grouping of infoproviders are sometimes called
data targets. The ones that do not store data persistently in BI include
Infosets, Virtual Providers, and multiproviders.

Virtual providers are very special. Like all providers, they feed 
information to queries. However, a virtual provider represents a logical
view. Unlike Infocubes, no data is physically stored in BI. The data is
taken from the source systems only after a query has been executed.
There are three types of Virtual Providers, and each type can be 
distinguished by the way in which it retrives data.

Based on DTP For direct access
Based on a BAPI
Based on a function module.

Direct Access, a Definition:

A BI tool set that allows queries to be executed on temporary Virtual
Providers that are tied directly to the source system.

We require up-to-date data from a SAP source system
Only a small quantity of data is transferred(good query design)
Only a small number of users work with queries in the data 
set at any one time.

There are differences between analysis reporting and operational reporting.
For example, a analysis of why accounts receivable is growing 5% a
year would be a BI Report. On the other hand, a list of unpaid invoices
to support dunning the customer for what they owe would be an
OLTP-based report.

This theory of separtation of duties was completely valid when BI Systems
were first developed, but now the line is blurred. It becomes even more
so with the introduction of Real-Time Data Acquisition(RDA). RDA is a new
SAP Netweaver 2004s tool set to support some limited operational
reporting needs inside BI.

With RDA, data is transferred into BI at regular intervals during the
day and is then updated in the Datastore objects, which are directly
available for reporting Background processes(daemons) in the BI System
initiate the Infopackages and data transfer processes assigned to them
(to update the PSA data in Datastore objects).

Real-Time Data Warehousing(RDA)

RDA is a framework for analyzing information from various sources in
real time as soon as the data becomes available in the source system.

Lower time scale than for schedeuled/batch data acquisition
Stream oriented
Almost immediate availability for reporting(less than 1 minute)

RDA is used in tactical decision making.

Using a Webservice Push:

A web service push can write the data directly from the source to the
PSA. The data transfer is not controlled by BI. An infopackage(for full
upload) is required only to specify request-related settings for RDA;it
is never executed, as the data is pushesd into the BI PSA by a web service.

Using the BI Service API: If the source data is based on a source in an
SAP Source system, the BI Service API is used. Many of the steps are
the same as with normal delta extractions, such as the requirement for
an infopackage to initialize delta. 

With RDA, it is these delta loads that are special. If the Datasource
allows for RDA ( a checkbox on RSA2), we can choose to utilize it in 
this way. This involves the creation of a specific RDA Data Transfer Process.

The RDA processes focuses on obtaining data very frequently from your
source system. Due to the limitations discussed above, many times you
only get to decide if the feed to your targets will be normal, periodically
schedulled infopackage, or if it be RDA. 

Infoproviders exist for Plan and Actual data of cost center transaction.
This separate plan vs actual design suports BI Integrated Planning with
one dedicated cube, and to support the loading of actual data from
SAP Source system. Your users now have requirements for plan add actual
comparision reports. We want to investigate a Multiprovider to solve
this need.

Sap Bi ABAP PROGRAMMES

Frequently used ABAP Programs in SAP BI (NW 2004).

Listed below are some of the frequently used ABAP Programs in SAP BI (NW 2004).
Program name 
RSCDS_NULLELIMDelete fact table rows where all Key Figure values are zero. See Note 619826.
RSDG_CUBE_ACTIVATEActivation of InfoCubes
RSDG_CUBE_COPYMake InfoCube Copies
RSDG_CUBE_DELETEDelete InfoCubes
RSDG_DODS_REPAIRActivation of all ODS Objects with Navigation Attributes
RSDG_ODSO_ACTIVATEActivation of all ODS Objects
RSDG_IOBJ_ACTIVATEActivation of all InfoObjects
RSDG_IOBJ_DELETEDeletion of InfoObjects
RSDG_IOBJ_REORGRepair InfoObjects
RSDG_IOBJ_REORG_TEXTSReorganization of Texts for InfoObjects
RSDG_MPRO_ACTIVATEActivating Multiproviders
RSDG_MPRO_COPYMake Multiprovider Copies
RSDG_MPRO_DELETEDeleting Multiproviders
RS_COMSTRU_ACTIVATE_ALLActivate all inactive Communication Structures
RS_TRANSTRU_ACTIVATE_ALLActivate Transfer Structure
RSAU_UPDR_REACTIVATE_ALLActivate Update Rules
RRHI_HIERARCHY_ACTIVATEActivate Hierarchies
SAP_AGGREGATES_ACTIVATE_FILLActivating and Filling the Aggregates of an InfoCube
SAP_AGGREGATES_DEACTIVATEDeactivating the Aggregates of an InfoCube
RS_PERS_ACTIVATEActivating Personalization in Bex(Inactive are highlighted)
RSSM_SET_REPAIR_FULL_FLAGConvert Full Requests to Repair Full Requests
SAP_INFOCUBE_DESIGNSPrint a List of Cubes in The System and Their Layouts
SAP_ANALYZE_ALL_INFOCUBESCreate DB Statstics for all InfoCubes
SAP_CREATE_E_FACTTABLESCreate Missing E-Fact Tables for InfoCubes and Aggregates
SAP_DROP_EMPTY_FPARTITIONSLocate/Remove Unused or Empty partitions of F-Fact Table
SAP_DROP_TMPTABLESRemove Temperory Database Objects
SAP_RSADMIN_MAINTAINAdd, change, delete RSADMIN table entries
CUBE_SAMPLE_CREATEA fast way to put some "sample" records in a InfoCube. No need to use Flatfiles, 
just enter the value in a ALV-Grid or let fill the Cube with random value.
SAP_CONVERT_NORMAL_TRANSConvert BasisCube to Transactional Cube and the opposite way around.
Listed below are some of the frequently used Function Modules within BW.
Function ModuleDescription (Function Group RRMX)
RRMX_WORKBOOK_DELETEDelete BW Workbooks permanently from Roles & Favourites
RRMX_WORKBOOK_LIST_GETGet list of all Workbooks
RRMX_WORKBOOK_QUERIES_GETGet list of queries in a workbook
RRMX_QUERY_WHERE_USED_GETLists where a query has been used 
RRMX_JUMP_TARGET_GETGet list of all Jump Targets
RRMX_JUMP_TARGET_DELETEDelete Jump Targets
Function ModuleDescription
MONI_TIME_CONVERTUsed for Time Conversions.
CONVERT_TO_LOCAL_CURRENCYConvert Foreign Currency to Local Currecny.
CONVERT_TO_FOREIGN_CURRENCYConvert Local Currency to Foreign Currency.
TERM_TRANSLATE_TO_UPPER_CASEUsed to convert all texts to UPPERCASE
UNIT_CONVERSION_SIMPLEUsed to convert any unit to another unit. (Ref. table : T006)
TZ_GLOBAL_TO_LOCALUsed to convert timestamp to local time
FISCPER_FROM_CALMONTH_CALCConvert 0CALMONTH or 0CALDAY to Financial Year or Period
RSAX_BIW_GET_DATA_SIMPLEGeneric Extraction via Function Module
RSAU_READ_MASTER_DATAUsed in Data Transformations to read master data InfoObjects
RSDRI_INFOPROV_READ 
RSDRI_INFOPROV_READ_DEMO  
RSDRI_INFOPROV_READ_RFC
Used to read Infocube or ODS data through RFC
DATE_COMPUTE_DAY  
DATE_TO_DAY
Returns a number what day of the week the date falls on.
DATE_GET_WEEKWill return a week that the day is in.
RP_CALC_DATE_IN_INTERVALAdd/Subtract Years/Months/Days from a Date.
RP_LAST_DAY_OF_THE_MONTHS  
SLS_MISC_GET_LAST_DAY_OF_MONTH
Determine Last Day of the Month.
RSARCH_DATE_CONVERTUsed for Date Converstions. We can use in Info Package routines.
RSPC_PROCESS_FINISH    To trigger an event in process chain
 DATE_CONVERT_TO_FACTORYDATEReturns factory calendar date for a date
 CONVERSION_EXIT_PDATE_OUTPUTConversion Exit for Domain GBDAT: YYYYMMDD  -> DD/MM/YYYY
 CONVERSION_EXIT_ALPHA_INPUTConversion exit ALPHA, external->internal
CONVERSION_EXIT_ALPHA_OUTPUTConversion exit ALPHA, internal->external
 RSPC_PROCESS_FINISHFinish a process (of a process chain)
RSAOS_METADATA_UPLOADUpload of meta data from R/3
RSDMD_DEL_MASTER_DATADeletion of master data
RSPC_CHAIN_ACTIVATE_REMOTETo activate a process chain after transport
                         

Monday 14 May 2012

V1 V2 V3 updates


Overview
Logistics Extraction Structure Customizing Cockpit (LBWE).
Once the maintenance of Data source with the required update mode in LBWE is completed the data starts to flow into Delta queue via various paths corresponding to the mode selected.
As a BW consultant it’s always good to know the track of data movement, may be in case of any failure it would be easy to locate the problem point.
In this subject I have taken all the three update modes of LO cockpit and described the data flows during delta run with the snap shots.
The three Update mode’s available in LO Cockpit.

Direct Delta

Queued Delta

Unserialized V3 Update
In this entire subject we will be coming across three different updates V1, V2 and V3.

V1 Update (Synchronous)
It’s a time-critical update used for updating the actual transaction tables.

V2 Statistical Update (Asynchronous)
It’s a non-time-critical update used for updating statistics tables related to the transaction tables.
For instance, after a Sales order entry transaction is completed, the corresponding sales order tables would be updated in V1 mode, and the corresponding statistics tables would be updated in V2 mode.

V3 Collective Update (Asynchronous with background scheduling)
V3 update mode (Uses delta queue technology) is similar to the V2 update mode. The main difference is that V2 updates are always triggered by applications, while V3 updates may be scheduled independently. Many extraction programs available for mySAP.com applications today use the delta queue technology to identify deltas.

Sunday 13 May 2012

E vs F table Sap Bi


                       E-Table vs F-Table  
  *******************************************************************


Difference between 'F' fact table & an 'E' Fact table?

A cube has 2 fact tables - E and F. When the requests in the cube are not compressed the data exists in the F fact table and when the requests are compressed the data lies in the E fact table.

When the requests are compressed all the request ids are lost (set to NULL) and you would not be able to select/delete the data by request id. The data in the E fact table is compressed and occupies lesser space than F fact table.

When you load a data target, say a cube, the data is stored in the F fact table. If the cube is compressed, the data in the F fact table is transferred to the E fact table.
 
The F-table uses bitmap indexes the E-Table uses btree. indexes. Index, Primary Index (The primary index is created automatically when the table is created in the database.).  Secondary Index (usually abap tables), Bitmap Index(Bitmap indexes are created by default on each dimension column of a fact table), and B-Tree Index.


Does anybody know what the compression factor is between the F-table and the E-table?
I.e. when you move 100 rows from the F-table, how many rows will be added to the E-table?

There is no conversion factor. All the request id's are deleted when you compress the Cube and the records are aggregated based on the remaining dim id's.

Ex- suppose there is only one customer with C100 is doing Transactions & in 100 requests there are 100 records.
Then when you eliminate the request all records are aggregated to 1 record.

If there are 100 customers and you enterd each customer data in each request. Then when you do compression there will be 100 records still because the customer no. Varies.


Bex access the records from F-table or E- Table of InfoCube?

Bex access both F and E fact tables. If data exists in both tables, it picks from both.

If the cube is not compressed it takes from F table, if fully compressed it takes from E table, partial compression - both F and E.


If Accessing from E- table is true, do we have to move the records from F table to E table in-order to make the records available for reporting?

Data is automatically moved from F to E fact table when you compress the data in the cube. You can do this in the cube manage->collapse tab.

E table will have data once you do compression, and compression is not mandatory for all the cases. try using aggregates for reports.


When we do roll-up in InfoCube maintenance, records are moved to aggregates? or moved from F table to E table?

Roll-up adds the copy of records from F or E table to the aggregate tables. The records are not moved from F or E.



Thursday 10 May 2012

SAP BI INTERVIEW QUESTIONS


SAP BW Tricks and Tips!
Everyday handy list of BW tricks and useful tips. If you have any of your own, please feel free to share….
Table TSTC contains all the t-codes availabe in the system. This even contains the custom (zxxxxx) created ones
To find who has changed an object recently; Tab E071 gives the CRs that changed the object, input this CR info in Tab E070 to find the user name
T-code SE39 can be used to compare programs or update rules across different sytems. This is very useful to match the code between developement and production systems
T-code SM21 can be useful in finding additional information on failures in a system along with ShortDumps(t-code ST22)
Easiest way to get the table name of PSA; go to Tab RSTSODSPART and input the Request number from the load monitor. Field ODSNAME_TECH gives the PSA.

SAP BW Interview Questions!
Differences between an ODS/DSO and an InfoCube
Differences between TransferRules and UpdateRules
What is the role of StartRoutine in TransferRules and UpdateRules
Performance improvement in loading and reporting
Difference between RollUp and Compression
What is the role of ChangeRun
What is a ShortDump
What is the use of NumberRange Buffering
Use of LineItem Dimension and HighCardinality check options in a InfoCube
Use and limitations on Partitioning of an InfoCube.


How to access ABAP-Editor(program) without using SE38 t-code
These steps explain how to access an SE38 ABAP program without using the t-code SE38 Go any of the update rules.   Click on Display activated program Click on others Click on program, enter the program name and continue. Now you will be in the program you wanted to access.
 
Transactional InfoCubes (T-Cubes)

Transactional InfoCubes are used in connection with the entry of planning data. The data from T-Cube is accessed Transactionally, i.e. Data is written to the InfoCube (possibly by several users at the same time). While Standard InfoCubes are used for Read-Only access. Transactional InfoCubes can be filled with data using two different methods: Loading planned data via BW-BPS or via BW Staging, where no planned data can be loaded. Creating a Transactional InfoCube: STEP1: GoTo T-Code RSA1, Creat an InfoArea and then Rt.Click on InfoArea and select Create InfoCube as shown STEP2: Then it popup the new screen, Give name of InfoCube and Description , then Select the Check box Real Time and then Press Create as shown STEP3: Now assign the Characteristics to the Created dimensions & Key Figures to the keyfigs folder same as we normally do for the cube and Activate. This is how we Create a Transaction Cubes, Now we will.

SAP BW Production Support Issues
As we know, the production SAP BW daily batch comprises of extracting data from the source systems like SAP R/3 and other database systems and then loading into corresponding data targets in SAP BW.
Here is the list of of common SAP BW prodcution support issues we encounter in daily BW batch.
Long running BW loads and ultimately leading to max. run time failures
BW loads failing due to lock issues on the objects
Load failures due to duplicate data being extracted from source system
Load failures due to Number range buffering / SID generation errors
ODS activation failures
Fill aggregates / info cube compression step failures
Load failures due to invalid chars in the data
Connection issues between SAP systems and IDOC processing failures
Occasional data source replication issues
Sap landscape:
Landscape is like a server system or like a layout of the servers or some may even call it the architecture of the servers viz. SAP is divided into three different lanscape DEV, QAS and PROD.
-  DEV would have multiple clients for ex: 190- Sandbox, 100- Golden, 180- Unit Test.
-  QAS may again have mutiple clients for ex: 300- Integration Test, 700 to 710 Training.
-  PROD may have something like a 200 Production.

These names and numbers are the implementer's discreet on how they want it or they have been using in their previous implementations or how is the client's business scenario.
Now whatever you do in the Sandbox doesn't affect the other servers or clients. Whenever you think you are satisfied with your configuration and you think you can use it moving forward, you RE-DO it in the golden client (remember, this is a very neat and clean client and you cannot use it for rough usage). As you re-do everything that you had thought was important and usable, you get a transport request pop up upon saving everytime. You save it under a transport request and give your description to it. Thus the configuration is transported to the Unit Test client (180 in this example).
You don't run any transaction or even use the SAP Easy Access screen on the 100 (golden) client. This is a configuration only client. Now upon a successful tranport by the Basis guy, you have all the configuration in the Testing client, just as it is in the Golden client. The configuration remains in sync between these two clients.
But in the Testing client you can not even access SPRO  (Display IMG) screen. It's a transaction only client where you perform the unit test. Upon a satisfactory unit test, you move the good configuration to the next SERVER (DEV). The incorrect or unsatisfactory configuration is corrected in Golden (may again as well be practised in the sandbox prior to Golden) and accordingly transported back to 180 (Unit Test) until the unit test affected by that particular config is satisfactory.
The Golden client remains the 'database' (if you wanna call it that) or you may rather call it the 'ultimate' reference client for all the good, complete and final configuration that is being used in the implementation.






BW Interview Questions questions:-

What is ODS?
It is operational data store. ODS is a BW Architectural component that appears between PSA ( Persistant Staging Area ) and infocubes and that allows Bex ( Business Explorer ) reporting. It is not based on the star schema and is used primarily for details reporting, rather than for dimensional analysis. ODS objects do not aggregate data as infocubes do. Data are loaded into an ODS object by inserting new records, updating existing records, or deleting old records as specified by RECORDMODE value.

Q. How much time does it take to extract 1 million of records from an infocube?
ans. This depends,if you have complex coding in update rules it will take longer time,orelse it will take less than 30 mins.

Q. What are the four ASAP Methodologies?
ans:
Project plan
ReQuirements gathering
Gap Analysis
Project Realization
Q. How do you measure the size of infocube?
ans: In no of records
Q. Difference between infocube and ODS?
ans:
Infocube is structured as star schema(extended) where in a fact table is surrounded by different dim table which connects to sids. And the data wise, you will have aggregated data in the cubes.
ODS is a flat structure(flat table) with no star schema concept and which will have granular data(detailed level).
Q. 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 Nav attribute in the cube as a characteristic (that is the advantage) to drill down.
Q. SOME DATA IS UPLOADED TWICE INTO INFOCUBE. HOW TO CORRECT IT?
ans: But how is it possible?.If you load it manually twice, then you can delete it by request.
Q . CAN U ADD A NEW FIELD AT THE ODS LEVEL?
ans. Sure you can.ODS is nothing but a table.
Q. CAN NUMBER OF DATASOURCE HAS ONE INFOSOURCE?
ans. Yes of course. For example, for loading text and hierarchies we use different data sources but the same info source.
Q. BRIEF THE DATAFLOW IN BW.
ans. Data flows from transactional system to analytical system(BW).DS on the transactional system needs to be replicated on BW side and attached to infosource and update rules respectively.
Q. WHAT IS PROCEDURE TO UPDATE DATA INTO DATA TARGETS?
ans. Full and delta.
Q7. AS WE USE Sbwnn,SBiw1,sbiw2 for delta update in LIS THEN WHAT IS THE PROCEDURE IN LO-COCKPIT?

ans. No lis in lo cokpit. We will have data sources and can be maintained(append fields).Refer white paper on LO- Cokpit extractions.
Q8. SIGNIFICANCE OF ODS.
ans. It holds granular data.
Q9. WHERE THE PSA DATA IS STORED?
ans. In PSA table.
Q10.WHAT IS DATA SIZE?
ans. The volume of data one data target holds(in no.of records)



SAP ABAP for BI PRACTICE -- 2


*&---------------------------------------------------------------------*
*& Report  ZABAP_SQL
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ZABAP_SQL no standard page heading.

******************************************************
*********** SQL Statement - Insert (using WA)
******************************************************

*data : wa type zkna5.
*
*WA-CUSTOMER = '1006'.
*WA-CNAME = 'Ramachandran'.
*WA-CITY = 'Salem'.
*WA-COUNTRY = 'IN'.
*WA-REGION = 'SOUTH'.
*WA-INCOME = '558000'.
*WA-CURRENCY = 'INR'.
*
*INSERT ZKNA5 FROM WA.
*
*
*WA-CUSTOMER = '1007'.
*WA-CNAME = 'Srinivas Naidu'.
*WA-CITY = 'Anantapur'.
*WA-COUNTRY = 'IN'.
*WA-INCOME = '558000'.
*WA-CURRENCY = 'INR'.
*
*INSERT ZKNA5 FROM WA.
*
*IF SY-SUBRC = 0.
*  Write : / 'record inserted successfully' color 4.
*  else.
*    Write : / 'Operation Failed' color 6.
*    endif.


*******************************************************
************ SQL Statement - update (using WA)
*******************************************************
*
*data : wa type zkna5.
*
*WA-CUSTOMER = '1008'.
*WA-CNAME = 'Manivasagan'.
*WA-CITY = 'Chennai'.
*WA-COUNTRY = 'IN'.
*WA-REGION = 'SOUTH'.
*WA-INCOME = '900000'.
*WA-CURRENCY = 'INR'.
*
*Update ZKNA5 FROM WA.
*
*IF SY-SUBRC = 0.
*  Write : / 'record inserted successfully' color 4.
*  else.
*    Write : / 'Operation Failed' color 6.
*    endif.

*Update ZKNA5 set region = 'SOU' where CUSTOMER BETWEEN '1005' AND '1008'.


******************************************************
*********** SQL Statement - Modify (using WA)
******************************************************

*data : wa type zkna5.
*
*WA-CUSTOMER = '1008'.
*WA-CNAME = 'Manivasagan'.
*WA-CITY = 'Chennai'.
*WA-COUNTRY = 'IN'.
*WA-REGION = 'SOUTH'.
*WA-INCOME = '900000'.
*WA-CURRENCY = 'INR'.
*
*Update ZKNA5 FROM WA.
*
*IF SY-SUBRC = 0.
*  Write : / 'record inserted successfully' color 4.
*  else.
*    Write : / 'Operation Failed' color 6.
*    endif.


******************************************************
*********** SQL Statement - Delete USING WHERE Clause
******************************************************

*DELETE FROM ZKNA5 Where customer = '1008'.



*******************************************************
************ SQL Statement - Delete USING WHERE Clause
*******************************************************
*Data : wa type zkna5,
*       itab type table of zkna5.
*
*DELETE FROM ZKNA5 Where city = 'Baroda'.
*
*select *
*from zkna5
*into  table itab.
*
*loop at itab into wa.
*  write : / wa-customer, wa-cname, wa-city, wa-income .
*endloop.
*skip 2.
*write: /5 sy-dbcnt, 'records retrieved' color 7.
*
*skip.
*uline.
*uline.
*
*ROLLBACK WORK.
*
*
*select *
*from zkna5
*into  table itab.
*
*loop at itab into wa.
*  write : / wa-customer, wa-cname, wa-city, wa-income.
*endloop.
*skip 2.
*write: /5 sy-dbcnt, 'records retrieved' color 5.


*******************************************************
************ SQL Statement - Delete WITH COMMIT
*******************************************************
*Data : wa type zkna5,
*       itab type table of zkna5.
*
*DELETE FROM ZKNA5 Where city = 'Baroda'.
*
*select *
*from zkna5
*into  table itab.
*
*loop at itab into wa.
*  write : / wa-customer, wa-cname, wa-city, wa-income .
*endloop.
*skip 2.
*write: /5 sy-dbcnt, 'records retrieved' color 7.
*
*skip.
*uline.
*uline.
*
*COMMIT WORK.
*
*
*select *
*from zkna5
*into  table itab.
*
*loop at itab into wa.
*  write : / wa-customer, wa-cname, wa-city, wa-income.
*endloop.
*skip 2.
*write: /5 sy-dbcnt, 'records retrieved' color 5.


*******************************************************
************** Select - all fields into wa
*******************************************************
*
*data : wa type zkna5.
*
*
*select  *
*from zkna5
*into wa.
*
*Write : / WA-CUSTOMER, WA-CITY, WA-INCOME.
*
*ENDSELECT.


*******************************************************
************** Select single - all fields into wa
*******************************************************
*
*data : wa type zkna5.
*
*
*select  single *
*from zkna5
*into wa
*where region = 'SOU'.
*
*Write : / WA-CUSTOMER, WA-CITY, WA-INCOME.


******************************************************
************* Select single - specific fields
******************************************************
*
*data : wa type zkna5.
*
*
*select  single customer city income
*from zkna5
*into corresponding fields of wa
*where region = 'SOU'.
*
*Write : / WA-CUSTOMER, WA-CITY, WA-INCOME.



******************************************************
************* single column internal table
******************************************************


*data : a type i,
*       b type table of i.
*
*
*a = 2.
*append a to b.
*
*a = 32.
*append a to b.
*
*a = 8.
*append a to b.
*
*a = 109.
*append a to b.
*
*
*clear a.
*
*loop at b into a.
*write : / a color = sy-tabix.
*endloop.




******************************************************
************* Internal table with header  line
******************************************************

*data : begin of itab occurs 0,
*        CUSTOMER type zkna5-CUSTOMER,
*        CNAME type zkna5-CNAME,
*        CITY type zkna5-CITY,
*        COUNTRY type zkna5-COUNTRY,
*        REGION type zkna5-REGION,
*        INCOME type zkna5-INCOME,
*        CURRENCY type zkna5-CURRENCY,
*       end of itab.
*
*
*
*write : /2 'Customer', 14 'City', 35 'Income'.
*
*select *
*from zkna5
*into table itab.
*
*loop at itab .
*write : / itab-customer, itab-city, itab-income.
*endloop.


******************************************************
************* Internal table using types
******************************************************

*
*types : begin of ty_kna5,
*        CUSTOMER type zkna5-CUSTOMER,
*        CNAME type zkna5-CNAME,
*        CITY type zkna5-CITY,
*        COUNTRY type zkna5-COUNTRY,
*        REGION type zkna5-REGION,
*        INCOME type zkna5-INCOME,
*        CURRENCY type zkna5-CURRENCY,
*       end of ty_kna5.
*
*
*data : wa type ty_kna5,
*       itab type table of ty_kna5 ,
*       itab2 type table of ty_kna5.
*
*
*select *
*from zkna5
*into table itab.
*
*loop at itab  .
*write : / itab-customer, itab-city, itab-income.
*endloop.




*******************************************************
************** Internal table
*******************************************************
*
*Parameters : P_ort01  type kna1-ort01.
*
*data : wa type kna1,
*       itab type table of kna1.
*
*DATA : CITY type kna1-ort01.
*
*city = p_ort01.
*translate  city to upper case.
*
*select *
*from kna1
*into table itab
*where ort01  = p_ort01 or
*ort01 = city  .
*
*
*loop at itab into wa.
*
*write: / wa-kunnr, wa-name1, wa-ort01.
*
*endloop.
*
*if sy-subrc = 0.
*write: / sy-dbcnt, 'records retrieved' color 6.
*endif.

*******************************************************
************** Internal table using structure
*******************************************************

*data : wa type zstr_kna5,
*itab1 type table of zstr_kna5,
*itab2 type table of zstr_kna5.
*
*
*select *
*from kna1
*into CORRESPONDING Fields of table itab1
*where ort01 like 'P%' .
*
*itab2[] = itab1[].
*
*clear itab1[].
**move itab1 to itab2.
*
*loop at itab2 into wa.
*
*write: / wa-kunnr, wa-name1, wa-ort01.
*
*endloop.
*
*if sy-subrc = 0.
*write: / sy-dbcnt, 'records retrieved' color 6.
*endif.


*******************************************************
************** Internal table usage
*******************************************************
Tables : vbrk.

types : begin of ty_vbrk,
          kunag type vbrk-kunag,
          ort01 type kna1-ort01,
          vtweg type vbrk-vtweg,
          spart type vbrk-spart,
          netwr type vbrk-netwr,
          waerk type vbrk-waerk,
end of ty_vbrk.


data : wa type ty_vbrk,
      itab type table of ty_vbrk.

Data : city type kna1-ort01.
select-options s_cno for vbrk-kunag.


select kunag vtweg spart netwr waerk
  from vbrk
  into CORRESPONDING FIELDS OF TABLE  itab
  where kunag in s_cno  .


loop at itab into wa.
  select single ort01
    from kna1
    into city
    where kunnr = wa-kunag   .

  wa-ort01 = city.
  modify itab from wa.
endloop.


loop at itab into wa.

  write : / wa-kunag, wa-ort01, wa-netwr.

  endloop.

Sap ABAP for Bi ...for practice


*&---------------------------------------------------------------------*
*& Report  ZABAP_002
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ZABAP_002 NO STANDARD PAGE HEADING.

*
*write : /8(28) 'GOD IS GREAT' COLOR 5 right-justified.
*skip 5.
*write : / 'India is my country' color 7.
*
*skip  3.
*position 28.
*write : 'Third statement' color 3.
*uline.
*
*data type   d. length  d. value
* I - Integer    1         0
* c - char       1         space
*n - numerical   1         0
*d - Date        8         00000000
*t - time        6         000000
*p - Packed decimal
*f - Floating decimal
* String - Allocates memory during run time
* default data type is c
*
* parameters - To receive values during run time
*String functions
*
**** Concatenate
**** split
**** Translate
**** offset
**** search
**** strlen
**** shift
**** condense
**** replace
**** overlay
**** if, nested if, case
*
*Today's topics
*** Do, DONE
*** While  DONE
*** usage of FM in programs - Done
*** system variables
*** Message - dONE
*** radio button - DONE
*** Check box - dONE
*** Selection OPtions - Done
*** Ranges - Done
*
*do 12 times.
*write : / 'Rama' .
*enddo.
*
*****************************************************
*********** first 10 multiples using DO statement
*****************************************************
*
*
*parameters : a type i.
*data : b type i, res type i.
*
*b = 1.
*do 10 times.
*res = a * b.
*write: / a, '*', b, '=', res.
*b = b + 1.
*enddo.
*
*
*b = 1.
*do 10 times.
*res = a * sy-index.
*write: / a, '*', sy-index, '=', res.
*
*enddo.
*
*****************************************************
*********** write a given statement 10 times in alternate colors
*****************************************************
*
*data : a type i, b type i.
*
*a = 1.
*do 10 times.
*
*b = ( a mod 2 ) + 6.
*write : / 'God is great' color = b.
*a = a + 1.
*
*enddo.
*
**data : a type i, b type i.
**
**a = 1.
**do 10 times.
**b = ( a mod 2 ).
**if b = 1.
**write : / 'God is great' color 7.
**else.
**write : / 'God is great' color 4.
**endif.
**a = a + 1.
**
**enddo.
*
*
*****************************************************
*********** While statement
*****************************************************
*
*data : n type i.
*n = 5.
*
*while n < 702.
*  write : / n.
*  n = n + 5.
*endwhile.
*
*
*
*data : n type i.
*
*n = 1.
*
*while n LE 10.
*
*  IF N = 5.
*  N = N + 1.
**    CONTINUE.
**EXIT.
*  ELSE.
*    WRITE: / N.
*  ENDIF.
*  N = N + 1.
*
*ENDWHILE.
*
***************************************************************
*DATA : STR TYPE STRING VALUE 'RAMESH',
*       STR1 TYPE STRING,
*       K TYPE I, n type i.
*
*K = STRLEN( STR ) .
*
*while n le k.
*  str1 = str+0(n).
*  write: / str1.
*  n = n + 1.
*endwhile.
*
* k = k - 1.
*
*WHILE  k GT 0.
*  STR1 = STR+0(K).
*  K = K - 1.
*  WRITE: / STR1.
*ENDWHILE.


*****************************************************
*********** Determine if a given number is prime
*****************************************************

*parameters : num type i.
*
*data : a type i, b type i, res type i.
*
*
*a =  num / 2.
*
*b = 3.
*while b le a.
*
*res = num mod b.
*
*if res = 0.
*write : 'Given number is Not prime'.
*exit.
*else.
*b = b + 1.
*endif.
*
*endwhile.
*
*if res <> 0.
*write : 'Given number is prime'.
*endif.

*parameters : num type i.
*data : a type i.
*
*a = ( num + 5 ) / 10.
*
*write : / a, 'using / as divison operator' .
*
*a = ( num + 5 ) div 10.
*
*write : / a, 'using DIV as divison operator' .
*
*a = ( num + 5 ) div 10 * 10.
*
*WRITE : / A.




*****************************************************
*********** using function modules - Random_I4
*****************************************************

*parameters : p_low type i,
*p_high type i.

*DATA : COL TYPE I, POS TYPE I, ln type i.
*
*DO 60 TIMES.
*CALL FUNCTION 'RANDOM_I4'
* EXPORTING
*   RND_MIN         = 1
*   RND_MAX         = 7
* IMPORTING
*   RND_VALUE       =  COL   .
*
*CALL FUNCTION 'RANDOM_I4'
* EXPORTING
*   RND_MIN         = 1
*   RND_MAX         = 28
* IMPORTING
*   RND_VALUE       =  ln   .
*
*
*CALL FUNCTION 'RANDOM_I4'
* EXPORTING
*   RND_MIN         = 1
*   RND_MAX         = 90
* IMPORTING
*   RND_VALUE       =  pos   .
*
**new-line.
*skip to line ln.
*   WRITE at /pos 'GOD is great' color = col .
*
*ENDDO.



*****************************************************
*********** FM - compute age in yrs, months
******months_between_two_dates
*****************************************************


*Parameters : DOB TYPE D.
*DATA : YEAR TYPE I, B TYPE I, MON TYPE I.
*
*
*CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
*  EXPORTING
*    I_DATUM_BIS         =  SY-DATUM
*    I_DATUM_VON         =  DOB
**   I_KZ_INCL_BIS       = ' '
* IMPORTING
*   E_MONATE            =   MON .
*
*YEAR = MON DIV 12 .
*MON = MON MOD 12.
*
*   WRITE : /2 'you are', year, 'yrs', MON, 'months young' .

*****************************************************
*********** using fuction keys to call FMs
*****************************************************

*START-OF-SELECTION.
*Write : / 'F4 - Calculator',
*        / 'F5 - Date',
*        / 'F6 - Open transaction SE11',
*        / 'F9 - Leave Program'.
*
*end-of-selection.
*at pf4.
*CALL FUNCTION 'FITRV_CALCULATOR' .
*
*AT PF5.
*CALL FUNCTION 'F4_DATE' .
*
*AT PF6.
*CALL TRANSACTION 'SE11'.
*
*AT PF9.
*LEAVE PROGRAM.


*****************************************************
*********** FM - DATE TO PERIOD CONVERT
*****************************************************

*DATA : fPd(3) type n,
*       fyr(4) type n,
*       fiscper(7) type n.
*
*CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
*  EXPORTING
*    I_DATE               = '20110804'
**   I_MONMIT             = 00
*    I_PERIV              = 'V3'
* IMPORTING
*   E_BUPER              = fpd
*   E_GJAHR              = fyr
*          .
*
*concatenate fyr fpd into fiscper.
*
*write: / fiscper.

*write: sy-uline .

******************************************************
************ Using parameters in select statement
******************************************************


Data : wa type kna1,
       itab type table of kna1.

Parameters : P_kunnr type kna1-kunnr.

start-of-selection.

select *
from KNA1
INTO TABLE ITAB
WHERE KUNNR = P_KUNNR.

IF SY-SUBRC = 0.

lOOP AT ITAB INTO WA.
WRITE: / WA-KUNNR, WA-NAME1, WA-ORT01.
ENDLOOP.

ENDIF.

END-OF-SELECTION.

at selection-screen.

select single *
from kna1
into wa WHERE KUNNR = P_KUNNR.

if sy-subrc NE 0.
Message 'Invalid customer. Please recheck' type 'E'.
endif.

******************************************************
************ Using select-options in select statement
******************************************************
*
*
*TABLES : kna1.
*
*data : wa type kna1,
*itab type table of kna1.
*
*SELECT-OPTIONS s_kunnr FOR kna1-kunnr.
*
*Select *
*from kna1
*into table itab
*where kunnr in s_kunnr.
*
*loop at itab into wa.
*write: / wa-kunnr, wa-name1, wa-ort01 .
*endloop.



*****************************************************
*********** Using Ranges
*****************************************************


*TABLES : kna1.
*
*data : wa type kna1,
*itab type table of kna1.
*
*ranges : RN FOR kna1-kunnr.
*
*RN-SIGN = 'I'.
*RN-OPTION = 'BT'.
*RN-LOW = '0000001001'.
*RN-HIGH = '0000005000'.
*
*APPEND RN.
*
*
*Select *
*from kna1
*into table itab
*where kunnr in RN.
*
*loop at itab into wa.
*write: / wa-kunnr, wa-name1, wa-ort01 .
*endloop.

*****************************************************
*********** Radio button
*****************************************************

*
*Parameters : a type i, b type i.
*
*selection-screen begin of block b1 with frame.
*PARAMETERS : rb1 type c radiobutton group RB ,
*             rb2 TYPE C RADIOBUTTON GROUP RB.
*selection-screen end of block b1 .
*
*data : c type i.
*
*IF rb1 = 'X'.
*  c = a + b .
*  Write: / ' sum of a & b is', c color 7.
*else.
*  c = a * b.
*  Write: / ' product of a & b is ', c color 5.
*endif.


*****************************************************
*********** Check box
*****************************************************

*Parameters : a type i, b type i.
*
*selection-screen begin of block b1 with frame.
*PARAMETERS : ch1 type c as checkbox,
*             ch2 type c as checkbox.
*selection-screen end of block b1 .
*
*data : c type i.
*
*IF ch1 = 'X'.
*  c = a + b .
*  Write: / ' sum of a & b is', c color 7.
*  endif.
*IF ch2 = 'X'.
*  c = a * b.
*  Write: / ' product of a & b is ', c color 5.
*endif.


*****************************************************
*********** Syste Variables
*****************************************************


write : sy-uzeit.

SAP ABAP Dynamic Internal Tables


Dynamic Internal Table
This Tutorial details about creation of dynamic internal table with different scenarios
Internal Tables are local tables within a program containing a series of lines having same data type. ABAPTM Open SQL allows single field, range of fields, entire database table or view into an internal table.  
In technical terms Internal table is a dynamic sequential dataset in which all records have the same data structure and a key.  
A static internal table can be declared in an ABAPTM program initially, when the structure of the internal table is fixed and known to the user. 
Dynamic internal table is an extension to internal table concept, used when the number of fields is not known at the design time or until the compile time.
Scenario 1:
Display the table of contents in grid format using the dynamic internal table. 
Creating Dynamic internal table 
  PARAMETERS: p_table (10) TYPE C.
  DATA: w_tabname TYPE w_tabname,            
        W_dref TYPE REF TO data,             
        W_grid TYPE REF TO cl_gui_alv_grid. 
  FIELD-SYMBOLS: <t_itab> TYPE ANY TABLE. 
  w_tabname = p_table. 
  CREATE DATA w_dref TYPE TABLE OF (w_tabname).
  ASSIGN w_dref->* TO <t_itab>.
 Populating Dynamic internal table 
  SELECT *
    FROM (w_tabname) UP TO 20 ROWS
    INTO TABLE <t_itab>.
 Displaying dynamic internal table using Grid. 
  CREATE OBJECT w_grid
    EXPORTING i_parent = cl_gui_container=>screen0. 
  CALL METHOD w_grid->set_table_for_first_display
    EXPORTING
      i_structure_name = w_tabname
    CHANGING
      it_outtab        = <t_itab>. 
  CALL SCREEN 100.
 Scenario 2: 
Create a dynamic internal table with the specified number of columns. 
 Creating Dynamic internal table
TYPE-POOLS: slis.
 FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE,  “ Dynamic internal table name
               <fs_dyntable>,                     “Field symbol to create work area
               <fs_fldval> type any.              “Field symbol to assign values 
PARAMETERS: p_cols (5) TYPE c.                     “Input number of columns
DATA:   t_newtable TYPE REF TO data,
        T_newline TYPE REF TO data,
        T_fldcat   TYPE slis_t_fldcat_alv,
        T_fldcat   TYPE lvc_t_fcat,
        Wa_it_fldcat TYPE lvc_s_fcat,
        wa_colno (2) TYPE n,
        wa_flname (5) TYPE c. 
* Create fields.
  DO p_cols TIMES.
    CLEAR wa_it_fldcat.
    move sy-index to wa_colno.
    concatenate 'COL'
                wa_colno
           into wa_flname.
    wa_it_fldcat-fieldname = wa_flname.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 10.
    APPEND wa_it_fldcat TO t_fldcat.
  ENDDO. 
* Create dynamic internal table and assign to FS
  CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
      it_fieldcatalog = t_fldcat
    IMPORTING
      ep_table        = t_newtable. 
  ASSIGN t_newtable->* TO <t_dyntable>. 
* Create dynamic work area and assign to FS
  CREATE DATA t_newline LIKE LINE OF <t_dyntable>.
  ASSIGN t_newline->* TO <fs_dyntable>.
Populating Dynamic internal table 
  DATA: fieldname(20) TYPE c.
  DATA: fieldvalue(10) TYPE c.
  DATA: index(3) TYPE c. 
  DO p_cols TIMES. 
    index = sy-index.
    MOVE sy-index TO wa_colno.
    CONCATENATE 'COL'
                wa_colno
           INTO wa_flname. 
* Set up fieldvalue
    CONCATENATE 'VALUE' index INTO
                fieldvalue.
    CONDENSE    fieldvalue NO-GAPS. 
    ASSIGN COMPONENT  wa_flname
        OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
    <fs_fldval> =  fieldvalue. 
  ENDDO. 
* Append to the dynamic internal table
  APPEND <fs_dyntable> TO <t_dyntable>.
 Displaying dynamic internal table using Grid. 
DATA: wa_cat LIKE LINE OF fs_fldcat. 
  DO p_cols TIMES.
    CLEAR wa_cat.
    MOVE sy-index TO wa_colno.
    CONCATENATE 'COL'
                wa_colno
           INTO wa_flname. 
    wa_cat-fieldname = wa_flname.
    wa_cat-seltext_s = wa_flname.
    wa_cat-outputlen = '10'.
    APPEND wa_cat TO fs_fldcat.
  ENDDO. 
* Call ABAP List Viewer (ALV)
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      it_fieldcat = fs_fldcat
    TABLES
      t_outtab    = <t_dyntable>.
 
  
What Are Different Types Of Internal Tables and Their Usage
Standard Internal Tables
Standard tables have a linear index. You can access them using either the index or the key. If you use the key, the response time is in linear relationship to the number of table entries. The key of a standard table is always non-unique, and you may not include any specification for the uniqueness in the table definition.
This table type is particularly appropriate if you want to address individual table entries using the index. This is the quickest way to access table entries. To fill a standard table, append lines using the (APPEND) statement. You should read, modify and delete lines by referring to the index (INDEX option with the relevant ABAP command).  The response time for accessing a standard table is in linear relation to the number of table entries. If you need to use key access, standard tables are appropriate if you can fill and process the table in separate steps. For example, you can fill a standard table by appending records and then sort it. If you then use key access with the binary search option (BINARY), the response time is in logarithmic relation to
the number of table entries.
Sorted Internal Tables
Sorted tables are always saved correctly sorted by key. They also have a linear key, and, like standard tables, you can access them using either the table index or the key. When you use the key, the response time is in logarithmic relationship to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique, or non-unique, and you must specify either UNIQUE or NON-UNIQUE in the table definition.  Standard tables and sorted tables both belong to the generic group index tables.
This table type is particularly suitable if you want the table to be sorted while you are still adding entries to it. You fill the table using the (INSERT) statement, according to the sort sequence defined in the table key. Table entries that do not fit are recognised before they are inserted. The response time for access using the key is in logarithmic relation to the number of
table entries, since the system automatically uses a binary search. Sorted tables are appropriate for partially sequential processing in a LOOP, as long as the WHERE condition contains the beginning of the table key.
Hashed Internal Tables
Hashes tables have no internal linear index. You can only access hashed tables by specifying the key. The response time is constant, regardless of the number of table entries, since the search uses a hash algorithm. The key of a hashed table must be unique, and you must specify UNIQUE in the table definition.
This table type is particularly suitable if you want mainly to use key access for table entries. You cannot access hashed tables using the index. When you use key access, the response time remains constant, regardless of the number of table entries. As with database tables, the key of a hashed table is always unique. Hashed tables are therefore a useful way of constructing and
using internal tables that are similar to database tables.
Index Tables
Index table is only used to specify the type of generic parameters in a FORM or FUNCTION. That means that you can't create a table of type INDEX.
Internal tables are not DB tables. Standard and Sorted tables in combined are basically called as Index tables and there nothing else. Here is the hierarchy
                                 ANY TABLE
                                            |
                    ------------------------------------
                     |                                                    |
             Index Tables                                    Hashed Table
                     |          
    ------------------------------------ 
    |                                                     |
Standard Table                      Sorted Table