VENKI

SAP BI Reporting



GL Reporting


What is SAP Recommendation to use 0FI_GL_14 (Line Item) and 0FI_GL_10(Summary).


0FL_GI_14 is a delta-enabled DataSource that extracts the general ledger line items for only one ledger, the one that's defined as the 'leading ledger' in your source system. All other ledgers, if you require that data, would require separate DataSources be created for each ledger. These would be named 3FI_GL_XX_SI, where XX would be replaced with the ledger name.


0FI_GL_10 is a delta-enabled DataSource that extracts the general ledger balances for only the defined 'leading ledger' in your source system. All other ledgers, again if required, would require separate DataSources be created for each ledger. These would be named 3FI_GL_XX_TT, where XX would be replaced with the ledger name. This would be the most appropriate DataSource for your Balance Sheet and Income Statement (P&L) reporting requirements, if you only use one ledger. If you have more than one ledger, you can still use this and add the 3FI_GL_XX_TT DataSources. These would then be integrated into one InfoCube for reporting.


Are there any other difference between the 0FI_GL_14/10 and 0FI_GL_20/40/50?


Yes, there are differences between these DataSources:


0FI_GL_10 - Extracts general ledger balances for only the 'leading ledger'

0FI_GL_14 - Extracts general ledger line items for only the 'leading ledger'

0FI_GL_20 - Extracts account activity for all ledgers

0FI_GL_21 - Extracts account accumulated activity, for each Fiscal Year/Period, for all ledgers

0FI_GL_40 - Extracts general ledger line items for all ledgers. It differs also from 0FI_GL_14 in that it pulls from more tables.

0FI_GL_50 - Extracts general ledger planned line items for all ledgers.


- If you have SAP ECC 6.0 EhP 3 or higher, is it required to use the new datasources?


It is not a requirement to use the New GL Reporting DataSources, per se. If your FI functional consultant(s) haven't configured your environment to use this new functionality, there won't be any data to extract using the new DataSources and therefore the old DataSources would still be pertinent.


- What are the main differences between the new and the old flows?



The New GL Reporting functionality in ECC6 EHP3 and beyond provides for the posting of not only business financial transactions (as it always has) but also provides for settlement of internal document postings associated with managerial accounting concepts. It also provides the ability to manage multiple ledgers for different accounting principles, integrates financial and managerial accounting reporting (as eluded to previously), provides for segemented reporting to meet requirements for International Financial Reporting Standards (IFRS) and US Generally Accepted Accounting Principles (GAAP) and Cost of Goods Sold accounting.


As of Plug-In 2002.2, it is no longer necessary to have DataSources linked. This means that you can now load 0FI_GL_4, 0FI_AR_4, 0FI_AP_4, and 0FI_TX_4 in any order. You also have the option of using DataSources 0FI_AR_4, 0FI_AP_4 and 0FI_TX_4 separately without 0FI_GL_4. The DataSources can then be used independently of one another (see note 551044).



- Can you use them simultanously?


I'm not sure that there's any process that would preclude you from executing both the New GL Reporting DataSources and the older ones, but if your ECC environment is configured for the New GL Reporting, I'm not sure that you'd want to execute the old DataSources (not sure if you'd get duplication of data or something worse if you tried).


As of Plug-In 2002.2, it is no longer necessary to have DataSources linked. This means that you can now load 0FI_GL_4, 0FI_AR_4, 0FI_AP_4, and 0FI_TX_4 in any order. You also have the option of using DataSources 0FI_AR_4, 0FI_AP_4 and 0FI_TX_4 separately without 0FI_GL_4. The DataSources can then be used independently of one another (see note 551044).



As of Plug-In 2002.2, it is no longer necessary to have DataSources linked. This means that you can now load 0FI_GL_4, 0FI_AR_4, 0FI_AP_4, and 0FI_TX_4 in any order. You also have the option of using DataSources 0FI_AR_4, 0FI_AP_4 and 0FI_TX_4 separately without 0FI_GL_4. The DataSources can then be used independently of one another (see note 551044).


Recommended as the DSO keys, :


if yu also have the option of using DataSources 0FI_AR_4, 0FI_AP_4 and 0FI_TX_4 separately without 0FI_GL_4. The DataSources can then be used independently of one another (see note 551044).


Recommended as the DSO keys, :


if you require a DSO in between 0FI_GL_20 and 0FIGL_C20:


InfoObject (DataSource Field)

0VERSION (RVERS)

0COMP_CODE (RBUKRS)

0FISCPER (FISCPER)

0CHRT_ACCTS (CHARTACCTS)

0GL_ACCOUNT (RACCT)

0FUNC_AREA (RFAREA

0COSTCENTER (RCNTR

0VTYPE (VALUETYPE

0PROFIT_CTR (PRCTR)

0SEGMENT (SEGMENT)

0FISCVARNT (FISCVAR)

0CURTYPE (CURTYPE)

0VALUATION (VALUTYPE)

0CURKEY_TC (RTCUR)

0UNIT (CURRUNIT)


OSS note 1002272.


Try creating a new doc and check if the table 0BWFIAEDAT gets updated


I had a situation where there was no delta coming into BWFI_AEDA2. I had to regenerate some GL Structures using program RGZZGLUX. I referred to notes:619454 last section and also 656431. I am not sure whether it is pertinent in your case but you might want to check these notes out.


For this 0FI_GL_4 Datsource CI_BSIS included is provided by SAP, also for enhancement purpose. You will see that no matter what fields you add into this include, as long as the field is in table BKPF or BSEG, you won't need any code to fill in data for that field.




However, if the field you want to add is not in BKPF or BSEG, you will need to add an append structure and then code accordingly as per normal.


For 0fi_gl_4 extractor we got 2 Includes and 1 append by sap


INCLUDE CI_BSIS CI_BSIS



Fields:


BKTXT

GLVOR

PERNR


INCLUDE DTFIGL_WF Extraction Structure: GL Work Fields


Fields:
AWTYP

AWKEY

BSTAT

DMBTR


Append Structure Predefined:


AGTR_FIGL_4 Grantor Management: additional fields for extraction


For this datasource, CI_BSIS included is provided by SAP, also for enhancement purpose. You will see that no matter what fields you add into this include, as long as the field is in table BKPF or BSEG, you won't need any code to fill in data for that field.


However, if the field you want to add is not in BKPF or BSEG, you will need to add an append structure and then code accordingly as per normal.



If you are on ECC 6.0 then confirm with the Fi Consultant if the New GL concept has been activated, If so you can make use of the DS 0FI_GL_10, 0FI_GL_14(If you are on EHP3). You can also use 0FI_GL_4 instead of 0FI_GL_14 if you are not on EhP3.


If you are still on the Old GL concept then activate 0FI_GL_4 and 0FI_GL_6.


Old GL: http://help.sap.com/saphelp_nw70/helpdata/en/30/44593167d447198995bed770d70ddf/frameset.htm

NewGL: http://help.sap.com/saphelp_nw2004s/helpdata/en/be/928f40f5767d17e10000000a1550b0/frameset.htm


Financial Accounting: Procedure for Line Item Extraction Locate the document in its SAP Library structure


General Comments on Extraction Procedure


The consistent data extraction in the delta procedure is possible for line items from General Ledger Accounting (FI-GL) and selected subledgers (Accounts Receivable (FI-AR) and Accounts Payable (FI-AP)) and tax reporting with effect from SAP BW 3.1 Content. The extraction procedure delivered with the business content for SAP BW 2.0B, which is based on the DataSources 0FI_AR_3 and 0FI_AP_3, can be replaced. This is described in note 410797.


The decisive advantage of choosing R/3 line item tables as the data source is that additional fields can be transferred to the BW. These are not available for the transaction figures. This provides more extensive and flexible analysis options in BW.


To enter a consistent delta dataset, you can use any of the following InfoSources (with the corresponding DataSources and extractors in SAP R/3):

Application


InfoSource


Name


FI-GL


0FI_GL_4


General ledger: Line Items

FI-AP


0FI_AP_4


Accounts payable: Line Items


FI-AR


0FI_AR_4


Accounts receivable: Line Items


FI-TX

0FI_TAX_4


General ledger: Data for taxes on sales and purchases


For the General Ledger, selection is made from the tables BKPF and BSEG, while selection for the subledgers is made from tables BSID/BSAD (Accounts Receivable) and BSIK/BSAK (Accounts Payable). InfoSource 0FI_GL_4 transfers only those fields that are relevant for General Ledger Accounting from the Financial Accounting document (tables BKPF and BSEG) to the BW system.


The consistent recording of data from General Ledger Accounting and Subledger Accounting is provided by means of coupled delta extraction in the time stamp procedure. General ledger accounting is the main process in delta mode and provides subsidiary ledger extraction with time stamp information (time intervals of previously selected general ledger line items). This time stamp information can also be used for a loading history: this shows which line items have previously been extracted from the SAP R/3 system.


Delta Method


Delta extraction enables you to load into BW only that data that has been added or has changed since the last extraction event. Data that has already been loaded and has not changed is not extracted and does not need to be deleted before a new load. This improves performance compared with periodic extraction of the entire dataset.


Financial Accounting line items are read by extractors directly from the tables in SAP R/3. A time stamp on the line items serves to identify the status of the delta data. Time stamp intervals that have already been read are stored in a time stamp table. The delta dataset is transferred to BW directly, without records being transferred to the delta queue in SAP R/3 (extractor delta method).

The Financial Accounting line items are extracted from SAP R/3 in their most recent status (after-image delta method). This delta procedure is not suitable for filling InfoCubes in BW directly. Therefore, firstly, the line items must be loaded in the BW system in an ODS object that identifies the changes made to individual characteristics and key figures within a delta data record. Other data destinations (InfoCubes, ODS objects) can be provided with data from this ODS object.



If the ODS object permits BEx Reporting, queries can be defined directly there.


Time Stamp Method

With Financial Accounting line items that have been posted in SAP R/3 since the last data request, the extractors identify the following delta dataset using the time stamp in the document header (BKPF-CPUDT).



When a delta dataset has been selected successfully, SAP R/3 logs two time stamps that delimit a selection interval for a DataSource in table BWOM2_TIMEST:

he foll are the settings in my settings table. FYI
BWFILOWLIM 19910101

ABAP - BW

Start Routine:
The start routine is run for each data package at the start of the transformation. The start routine has a table in the format of the source structure as input and output parameters. It is used to perform preliminary calculations and store these in a global data structure or in a table. This structure or table can be accessed from other routines. You can modify or delete data in the data package.

Routine for Key Figures or Characteristics:
This routine is available as a rule type; you can define the routine as a transformation rule for a key figure or a characteristic. The input and output values depend on the selected field in the transformation rule. More information: the Routine section under

End Routine:
An end routine is a routine with a table in the target structure format as input and output parameters. You can use an end routine to postprocess data after transformation on a package-by-package basis. For example, you can delete records that are not to be updated, or perform data checks.

Expert Routine:

This type of routine is only intended for use in special cases. You can use the expert routine if there are not sufficient functions to perform a transformation. The expert routine should be used as an interim solution until the necessary functions are available in the standard routine.


ABAP-BW WIKI LINKS
https://wiki.sdn.sap.com/wiki/display/BI/ABAP+in+BW
https://wiki.sdn.sap.com/wiki/display/BI/ABAP+in+BW
https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=35458
http://wiki.sdn.sap.com/wiki/display/BI/Useful+functions+for+Data+Transformation


Datasources Enhancement

LO Datasource
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0af763b-066e-2910-a784-dc6731660f46?QuickLink=index&overridelayout=true
******************************************************************************
*&---------------------------------------------------------------------*


*& Report ZBI_ACTIVATE_TRANSFORMATION

*&

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*



REPORT zbi_activate_transformation.



TYPES: t_tran TYPE rstran,

i_tran TYPE STANDARD TABLE OF t_tran.



DATA: r_tran_maintain TYPE REF TO cl_rstran_maintain,

lv_subrc TYPE sy-subrc,

lv_output(255) TYPE c,

tab_tran TYPE i_tran,

i_s_source TYPE rstran_s_tlogo,

i_s_target TYPE rstran_s_tlogo.



SELECTION-SCREEN BEGIN OF BLOCK b1.

SELECTION-SCREEN SKIP 1.



PARAMETERS: p_id TYPE char35.



SELECTION-SCREEN END OF BLOCK b1.



START-OF-SELECTION.



FIELD-SYMBOLS: TYPE t_tran.



REFRESH tab_tran.



SELECT * FROM rstran INTO TABLE tab_tran WHERE tranid = p_id

AND objvers = 'A'

AND objstat = 'INA'.

SORT tab_tran.



IF tab_tran IS NOT INITIAL.

LOOP AT tab_tran ASSIGNING .

TRY.

CREATE OBJECT r_tran_maintain

EXPORTING

i_tranid = -tranid

i_s_source = i_s_source

i_s_target = i_s_target

i_expert = rs_c_false

i_mode = rsawc_c_tfc-display

i_with_message = rs_c_true.



CATCH cx_rstran_not_found .

CATCH cx_rstran_input_invalid .

CATCH cx_rstran_cancelled .

CATCH cx_rstran_not_authorized .

CATCH cx_rstran_display_only .

CATCH cx_rstran_already_exist .

CATCH cx_rstran_error_with_message.

ENDTRY.



CALL METHOD r_tran_maintain->check

EXPORTING

i_with_display = rs_c_true

IMPORTING

e_subrc = lv_subrc.



IF lv_subrc = 0.

CONCATENATE 'Activated Transformation : '

-tranid

' : '

-sourcename

'->' -targetname INTO lv_output.

ELSE.

CONCATENATE 'Transformation : '

-tranid

' : '

-sourcename

'->'

-targetname

'Could Not be Activated' INTO lv_output.

ENDIF.



IF lv_subrc = 0.

TRY.

CALL METHOD r_tran_maintain->execute

EXPORTING

i_wrkmode = cl_rstran_stat=>wrkmode_activate

IMPORTING

e_subrc = lv_subrc.



CATCH cx_rstran_cancelled .

CATCH cx_rstran_error_with_message .

CATCH cx_rstran_display_only .

ENDTRY.

ENDIF.

WRITE:/ lv_output.

ENDLOOP.

ELSE.

WRITE:/ 'Transformation is not Inactive'.

ENDIF.

*****************************************************************************


Five Ways to Enhance BI Functionality Using ABAP--Part V--ABAP in Process Chain

http://wiki.sdn.sap.com/wiki/display/BI/Five+Ways+to+Enhance+BI+Functionality+Using+ABAP--Part+V--ABAP+in+Process+Chain?bc=true

SAP BI IP

A filter’s functionality depends on its particular use in either a planning function or a query.
In connection with planning functions, a filter in the characteristic restrictions describes the data that is
used for executing a planning function. Selections in the default values are

You can also use a key date for the filter to determine time-dependent selections.

The values defined in a query’s characteristic restrictions limit the volume of data that is available for
further filtering during a query’s runtime. It is then no longer possible to filter using a characteristic
value outside this value set. The default values determine the query’s initial filter state.
The settings & essentially refer to the use of filters with a
query:
determines whether the selection of values affected by the characteristic
restrictions can be changed when the query is executed. This setting is a prerequisite for the
definition of default values for a characteristic.
· If you select the option to
specify that only a single value can be used for filtering the query.
_ The two functionalities described above are described in more detail in the following units.


*********************************************************************************

Data: h_clean(3),
h_check,
h_off(2) type p.

h_clean = SOURCE_FIELDS-INCO1.
translate h_clean to upper case.

clear h_off.
do 3 times.
* (*****Loop number of times the length of the info object).
move h_clean+h_off(1) to h_check.
* if not h_check ca '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ-'.
if not h_check ca '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZÖÜ-'.

move space to h_clean+h_off(1).
endif.
add 1 to h_off.
enddo.

* result value of the routine
RESULT = h_clean.