Buy

Buy

List of Posts

Get this widget
To get notifications, Please like our Facebook Page >>>>>>

Use Search box to find a topic in this Blog!!!

FI-AR Line Item Data Extraction to BW using 0FI_AR_4 DataSource


Scope
As part of your requirement it was identified that you would need to extract the FI-AR Line Items data from your SAP ERP system to your SAP BW system. The standard datasource 0FI_AR_4 was identified which could address the basic extraction need. 

R/3 DataSource Customization
Applicable SAP Notes 

Customizations were carried out based on the following SAP Notes.
Customizations were carried out based on the following SAP Notes.

1. Note 410797 - FI line item extraction transfer to new DataSources:

If using earlier versions of FI-AR Line Item DataSources like 0FI_AR_3, this note has to be applied.

2. Note 410799 - Enhancement of line item extraction FI-GL, FI-CIS, FI-CIS

Implemented for 0FI_AR_4 DataSource customization.

3. Note 551044 - Detaching the extractors for the InfoSources 0FI_xx_4.pdf

Already available as part of BI 7.0

4. Note 991429 - Minute Based extraction enhancement for 0FI_xx_4 extractors

Implemented to enable Minute Based Extraction. Changes are already available as part of BI 7.0, only need to enable flag and modify table Index.
0FI_AR_4 Customization
0FI_AR_4 extracts data from the underlying tables BSID (Open Items) and BSAD (Cleared Items). The Extract structure for the same is DTFIAR_3. If you want to enhance your DataSource with additional fields, unlike using Append Structure, you would need to create the structure CI_BSID in SE11 and include the additional fields. On activation, the structure will get automatically appended to the main structure DTFIAR_3.





Now for additional fields there can be 2 scenarios

1. All the fields of the customer enhancement in the customer include are available in the read structure BSID
Then no additional action is required. The fields of the customer enhancement are filled automatically by the datasource from the assigned read structure via "move-corresponding".

2. Fields of the customer enhancement in the customer include are not contained in the read structure BSID

In this case you have to program a function module to fill the field of the customer enhancement. To do this, there is a Business Transaction Event available (open FI interface for process 00005021). Create any function module you like and use function module SAMPLE_PROCESS_00005021 as a template for the interface (input parameter, changing parameter).
In our case we created the function module ZBWFI_FILL_CI_00005021 to fill the additional fields required from the Customer Master table KNA1.
While creating the function you would need to assign it to a Function Group. You can use the default one from the Sample or create your own function group. However check whether the type pool SBIWA is declared in the TOP include of the function group. If not, add it with the statement TYPE-POOLS: SBIWA. 

The code is as below. 

FUNCTION ZBWFI_FILL_CI_00005021.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_OLTPSOURCE) TYPE SBIWA_S_INTERFACE-ISOURCE
*" CHANGING
*" REFERENCE(C_STRUCTURE)
*"----------------------------------------------------------------------
*"DATA Definitions
CASE I_OLTPSOURCE.
WHEN '0FI_AR_4'. "Customers: Line Items with Delta Extraction
FIELD-SYMBOLS: <FS_DTFIAR_3> TYPE DTFIAR_3.
ASSIGN C_STRUCTURE TO <FS_DTFIAR_3>.
"Details from KNA1:General Data in Customer Master
SELECT SINGLE KONZS KUKLA NIELS BRAN1
INTO CORRESPONDING FIELDS OF <FS_DTFIAR_3>
FROM KNA1
WHERE KUNNR = <FS_DTFIAR_3>-KUNNR.
WHEN OTHERS.
ENDCASE.
UNASSIGN <FS_DTFIAR_3>.
ENDFUNCTION. 

Following this an addition has to be made to the table TPS31 using Transaction SM30.

 PROCS: 00005021

 LAND: Blank

 APPLK: Blank

 FUNCT: ZBWFI_FILL_CI_00005021

Note: Parked Documents & Noted Items are not extracted by 0FI_AR_4 DataSource. Noted Items can be extracted by further implementing SAP Note 411758.

Settings in R/3 

Following are the settings that are maintained in R/3 for the Extraction to work properly.

 

If you delete the last initialization selection in the source system for the InfoSources 0FI_*_4 in the BW system Administrator Workbench, the entry from table TPS31 is also removed. This stops recording of changed line items in table BWFI_AEDAT. Existing data in table BWFI_AEDAT is also deleted. Before a new data request can be made in the update mode initialization of the delta method, the entry must be added again to table TPS31.

Recording of the changed line items must be started a reasonable amount of time before the first data request in update mode initialization of the data method. For this purpose, add the entry in table TPS31 using transaction SM30.

 


SAP recommends that you do not change the standard value.
 

 

R/3 Tables Used 

The following R/3 tables can be typically used for the FI-AR extraction enhancements.

 

 
BW Customization 

InfoProviders
The following InfoProviders along with the 3.5 DataFlow elements are available as part of Business Content which can be installed to start with.

 InfoSource: [0FI_AR_4] Accounts Receivable: Line Items

 DSO: [0FIAR_O03] Accounts Receivable: Line Items

 InfoCube: [0FIAR_C03] Accounts Receivable: Line Items

Using the above as templates we created the necessary dataflow in BI 7.0 as below




 
Routines for the following InfoObjects were applied in the Transformation of Data between DSO and InfoCube based on the routines available in the Update Rule in 3.5 Dataflow.

 Transformation: ODSO ZFIAR_O3 -> CUBE ZFIAR_C03

 InfoObjects: 0NETTAKEN, 0INT_CALC_1, 0INT_CALC_2, 0INT_CALC_N, 0INT_CALCT1, 0INT_CALCT2, 0INT_CALCTN

No comments:

Post a Comment

Note

This blog is solely for the purpose of getting educated in SAP. This blog does not encourage distribution of SAP hold copyright and any other publication and/or materials bearing SAP mark. If you find any copyright materials, please mail me so I can remove them. This blog is not in association with SAP.

ALL Posts

Get this widget