jueves, 26 de febrero de 2015

Full/Delta/Initialize delta update methods


Introduction

Update method is used to get the updated data coming from the source system to BI system at Info package level. We can set update methods in the update tab of the info package.

The update methods in the info package are:

1. Full Update
2. Delta Update
3. Initialize Delta Process
    (I) Initialize with data transfer
    (II) Initialize without data transfer
    (III) Early Delta Initialization

1.Full Update

Full update extracts the full data from source system to PSA in BI7 every time. 

2. Delta Update

Delta update extracts delta records only from the BW delta queue in the source system to BI system.

We must initialize the delta in order to get delta records, otherwise it is not possible to load delta records.

The following are the 4 delta types for the data source in the system.

F: Flat file provides the delta
E: Extractor determines the delta, Ex: LIS, COPA
D: Application determines the delta, Ex: LO, FI-AR/AP
A: Use ALE change log delta

Note: We can know the delta properties from ROOSOURCE table in the source system with SE16 transaction code.

3.Initialize Delta Process

To get the delta records, one must initialize the delta process. While initializing the delta process, the system will generate a flag: Initialize option for the source system in (scheduler menu of info package) BI and BW delta queue per the data source in the source system (RSA7). This enables the time stamp mechanism.

Initialize with data transfer

If you select this option, It extracts the init data from source system to BI system and allows delta functionality.

Steps for initialize with data transfer

Lock the users in the source system 
Delete the contents of the setup tables for the specific application component in source system(T code: LBWG). 
Fill the setup tables (SBIW or OLI*BW, use 1,2,3...in place of * according to the application ). 
Run the info package with initialize with data transfer. 
unlock the users in the system 

Note: This is very time consuming process, because we need to lock the users until data reaches to the BI system.This effects the client business.

Initialize without data transfer

In some cases, init is successful but someone has deleted the init flag. In order to set the flag again to perform the delta load without disturbing the data, we execute IP with this option.

Steps for initialize without data transfer

Lock the users in the source system 
Delete the setup tables content for the specific application component. 
Fill the setup tables 
Run the IP with the option: Initialize without data transfer. 
Unlock the users in the source system 
Load data to BI system using repair full request info package 

Note: In this method, after data is loaded to setup tables we can unlock the users in source system. this is better option than initialize with data transfer option.

Early Delta Initialization

In this option, we can do the delta initialization before filling the setup tables.So that users can post the documents when we are filling the setup tables.We will get the posted records in the next delta run

Steps for early delta initialization

Run the Info package with early delta initialization option.This will enable the BW delta queue and setup the time stamp for delta in the source system. 
Delete the setup tables for the application component 
Fill the setup tables 
Load the setup table data using repair full request (scheduler menu option of info package) info package 

How to check whether the data source supports early delta initialization or not?

Go to SE16 in ECC, give table name: ROOSOURCE and enter 
In the next screen give data source like 2lis_02_sdr(purchase document header data source) name and enter 
if field ZDD_ABLE has a value 'X', then the data source supports early delta initialization 
If the filed has space, then the data source does not support early delta initialization.

miércoles, 25 de febrero de 2015

Permisos en BW (como saltar)

RS_HDSYS_CALL_TC_VARIANT, en la se37
Desmarco el Authority Check y coloco el nombre de la TX que necesito
 
 

viernes, 20 de febrero de 2015

TX para Composites


RSDDCOPR - composite provider Directory BW - OLAP Technology


USH04 - Change history for authorizations Basis - User and Authorization Management

RSDICMULTIIOBJ - Multiprovider: Selection/Identification of InfoObjects BW - Data Basis

V_CMP_JOIN - Generierte Tabelle zu einem View BW - End User Technology

MYCOM - Bal. Sheet Valuation: Table of Database Commits Carried Out MM - Balance Sheet Valuation Procedures

MPROV - Generierte Tabelle zu einem View Logistics - Material Master

SMENSAPT - Texts for Menu - SAP Basis - Session Manager


RSDDTREXADMIN - Additional Settings for Indexing an HPA Index BW - OLAP Technology

SSM_RFC - Variables for RFC Destinations in the Workplace Basis - ABAP Authorization and Role Management

T71JPR09 - Survey Job / Internal Job Matching Data Personnel Mgmt - Job Pricing


RSDDTPS - Date and Language for Polestar BW - OLAP Technology

SRMWFPATH - Workflow Process Route Basis - SAP Records Management

USUSER_AGR - GUM: Assignment of Role to User Basis - User and Authorization Management

RSQFOBJ - Field Objects in the InfoSet BW - Metadata (Repository)

AIND_STR5 - AS: Function Modules for Application-Dependent Reporting Basis - Archive Information System

RSDDTREXDIRTABL - Table of an HPA Index BW - OLAP Technology

Rutinas Mes, Año, Día


Rutina para Dia

PROGRAM trans_routine.


*---------------------------------------------------------------------*
*       CLASS routine DEFINITION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform DEFINITION.
  
PUBLIC SECTION.

*  Attributs
    
DATA:
      p_check_master_data_exist
            
TYPE RSODSOCHECKONLY READ-ONLY,
*-    Instance for getting request runtime attributs;
*     Available information: Refer to methods of
*     interface 'if_rsbk_request_admintab_view'
      p_r_request
            
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.

  
PRIVATE SECTION.

    
TYPE-POOLSrsdrstr.

*   Rule specific types
    
TYPES:
      
BEGIN OF _ty_s_SC_1,
*      Field: POSTING_DATE Cronomarcador.
        POSTING_DATE           
TYPE P LENGTH DECIMALS 0,
*      Field: RECORD.
        RECORD           
TYPE RSARECORD,
      
END   OF _ty_s_SC_1.
    
TYPES:
      
BEGIN OF _ty_s_TG_1,
*      InfoObject: ZPDIA Días.
        /BIC/ZPDIA           
TYPE /BIC/OIZPDIA,
      
END   OF _ty_s_TG_1.

*$*$ begin of global - insert your declaration only below this line  *-*
    
... "insert your code here
*$*$ end of global - insert your declaration only before this line   *-*

    
METHODS
      compute_ZPDIA
        
IMPORTING
          request                  
type rsrequest
          datapackid               
type rsdatapid
          SOURCE_FIELDS              
type _ty_s_SC_1
          segid                    
type RSBK_SEGID
        
EXPORTING
          RESULT                   
type _ty_s_TG_1-/BIC/ZPDIA
          monitor                  
type rstr_ty_t_monitor
        
RAISING
          cx_rsrout_abort
          cx_rsrout_skip_record
          cx_rsrout_skip_val
          cx_rsbk_errorcount
.
    
METHODS
      invert_ZPDIA
        
IMPORTING
          i_th_fields_outbound         
TYPE rstran_t_field_inv
          i_r_selset_outbound          
TYPE REF TO cl_rsmds_set
          i_is_main_selection          
TYPE rs_bool
          i_r_selset_outbound_complete 
TYPE REF TO cl_rsmds_set
          i_r_universe_inbound         
TYPE REF TO cl_rsmds_universe
        
CHANGING
          c_th_fields_inbound          
TYPE rstran_t_field_inv
          c_r_selset_inbound           
TYPE REF TO cl_rsmds_set
          c_exact                      
TYPE rs_bool.
ENDCLASS.                    "routine DEFINITION

*$*$ begin of 2nd part global - insert your code only below this line  *
... "insert your code here
*$*$ end of 2nd part global - insert your code only before this line   *

*---------------------------------------------------------------------*
*       CLASS routine IMPLEMENTATION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform IMPLEMENTATION.

*----------------------------------------------------------------------*
*       Method compute_ZPDIA
*----------------------------------------------------------------------*
*       This subroutine allows the mapping from source to target fields
*       of a transformation rule using ABAP for application specific
*       coding.
*----------------------------------------------------------------------*
*       Customer comment:
*----------------------------------------------------------------------*
  
METHOD compute_ZPDIA.

*   IMPORTING
*     request     type rsrequest
*     datapackid  type rsdatapid
*     SOURCE_FIELDS-POSTING_DATE TYPE P LENGTH 000008 DECIMALS 000000
*    EXPORTING
*      RESULT type _ty_s_TG_1-/BIC/ZPDIA

    
DATA:
      MONITOR_REC    
TYPE rsmonitor.

*$*$ begin of routine - insert your code only below this line        *-*
    
... "insert your code here
*--  fill table "MONITOR" with values of structure "MONITOR_REC"
*-   to make monitor entries
    
... "to cancel the update process
*    raise exception type CX_RSROUT_ABORT.
    
... "to skip a record"
*    raise exception type CX_RSROUT_SKIP_RECORD.
    
... "to clear target fields
*    raise exception type CX_RSROUT_SKIP_VAL.

    
data l_datetime(15type c.
    
data :l_date type sy-datum.
    
datadia  type /BI0/OICALMONTH.


    l_datetime 
SOURCE_FIELDS-POSTING_DATE.
    l_date 
l_datetime+00(08).
    dia 
l_date+6(2).

    RESULT 
dia.

*$*$ end of routine - insert your code only before this line         *-*
  
ENDMETHOD.                    "compute_ZPDIA
*----------------------------------------------------------------------*
*       Inverse method invert_ZPDIA
*----------------------------------------------------------------------*
*       This subroutine needs to be implemented only for direct access
*       (for better performance) and for the Report/Report Interface
*       (drill through).
*       The inverse routine should transform a projection and
*       a selection for the target to a projection and a selection
*       for the source, respectively.
*       If the implementation remains empty all fields are filled and
*       all values are selected.
*----------------------------------------------------------------------*
*       Customer comment:
*----------------------------------------------------------------------*
  
METHOD invert_ZPDIA.

*   IMPORTING
*     i_r_selset_outbound          TYPE REF TO cl_rsmds_set
*     i_th_fields_outbound         TYPE HASHED TABLE
*     i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
*     i_r_universe_inbound         TYPE REF TO cl_rsmds_universe
*   CHANGING
*     c_r_selset_inbound           TYPE REF TO cl_rsmds_set
*     c_th_fields_inbound          TYPE HASHED TABLE
*     c_exact                      TYPE rs_bool

*$*$ begin of inverse routine - insert your code only below this line*-*
    
... "insert your code here
*$*$ end of inverse routine - insert your code only before this line *-*

  
ENDMETHOD.                    "invert_ZPDIA
ENDCLASS.                    "routine IMPLEMENTATION


 

Rutina para mes:




PROGRAM trans_routine.


*---------------------------------------------------------------------*
*       CLASS routine DEFINITION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform DEFINITION.
  
PUBLIC SECTION.

*  Attributs
    
DATA:
      p_check_master_data_exist
            
TYPE RSODSOCHECKONLY READ-ONLY,
*-    Instance for getting request runtime attributs;
*     Available information: Refer to methods of
*     interface 'if_rsbk_request_admintab_view'
      p_r_request
            
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.

  
PRIVATE SECTION.

    
TYPE-POOLSrsdrstr.

*   Rule specific types
    
TYPES:
      
BEGIN OF _ty_s_SC_1,
*      Field: POSTING_DATE Cronomarcador.
        POSTING_DATE           
TYPE P LENGTH DECIMALS 0,
*      Field: RECORD.
        RECORD           
TYPE RSARECORD,
      
END   OF _ty_s_SC_1.
    
TYPES:
      
BEGIN OF _ty_s_TG_1,
*      InfoObject: ZPMES Mes.
        /BIC/ZPMES           
TYPE /BIC/OIZPMES,
      
END   OF _ty_s_TG_1.

*$*$ begin of global - insert your declaration only below this line  *-*
    
... "insert your code here
*$*$ end of global - insert your declaration only before this line   *-*

    
METHODS
      compute_ZPMES
        
IMPORTING
          request                  
type rsrequest
          datapackid               
type rsdatapid
          SOURCE_FIELDS              
type _ty_s_SC_1
          segid                    
type RSBK_SEGID
        
EXPORTING
          RESULT                   
type _ty_s_TG_1-/BIC/ZPMES
          monitor                  
type rstr_ty_t_monitor
        
RAISING
          cx_rsrout_abort
          cx_rsrout_skip_record
          cx_rsrout_skip_val
          cx_rsbk_errorcount
.
    
METHODS
      invert_ZPMES
        
IMPORTING
          i_th_fields_outbound         
TYPE rstran_t_field_inv
          i_r_selset_outbound          
TYPE REF TO cl_rsmds_set
          i_is_main_selection          
TYPE rs_bool
          i_r_selset_outbound_complete 
TYPE REF TO cl_rsmds_set
          i_r_universe_inbound         
TYPE REF TO cl_rsmds_universe
        
CHANGING
          c_th_fields_inbound          
TYPE rstran_t_field_inv
          c_r_selset_inbound           
TYPE REF TO cl_rsmds_set
          c_exact                      
TYPE rs_bool.
ENDCLASS.                    "routine DEFINITION

*$*$ begin of 2nd part global - insert your code only below this line  *
... "insert your code here
*$*$ end of 2nd part global - insert your code only before this line   *

*---------------------------------------------------------------------*
*       CLASS routine IMPLEMENTATION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform IMPLEMENTATION.

*----------------------------------------------------------------------*
*       Method compute_ZPMES
*----------------------------------------------------------------------*
*       This subroutine allows the mapping from source to target fields
*       of a transformation rule using ABAP for application specific
*       coding.
*----------------------------------------------------------------------*
*       Customer comment:
*----------------------------------------------------------------------*
  
METHOD compute_ZPMES.

*   IMPORTING
*     request     type rsrequest
*     datapackid  type rsdatapid
*     SOURCE_FIELDS-POSTING_DATE TYPE P LENGTH 000008 DECIMALS 000000
*    EXPORTING
*      RESULT type _ty_s_TG_1-/BIC/ZPMES

    
DATA:
      MONITOR_REC    
TYPE rsmonitor.

*$*$ begin of routine - insert your code only below this line        *-*
    
... "insert your code here
*--  fill table "MONITOR" with values of structure "MONITOR_REC"
*-   to make monitor entries
    
... "to cancel the update process
*    raise exception type CX_RSROUT_ABORT.
    
... "to skip a record"
*    raise exception type CX_RSROUT_SKIP_RECORD.
    
... "to clear target fields
*    raise exception type CX_RSROUT_SKIP_VAL.

    
data l_datetime(15type c.
    
data :l_date type sy-datum.
    
dataanomes  type /BI0/OICALMONTH.


    l_datetime 
SOURCE_FIELDS-POSTING_DATE.
    l_date 
l_datetime+00(08).
    anomes 
l_date+4(2).


    RESULT 
anomes.


*$*$ end of routine - insert your code only before this line         *-*
  
ENDMETHOD.                    "compute_ZPMES
*----------------------------------------------------------------------*
*       Inverse method invert_ZPMES
*----------------------------------------------------------------------*
*       This subroutine needs to be implemented only for direct access
*       (for better performance) and for the Report/Report Interface
*       (drill through).
*       The inverse routine should transform a projection and
*       a selection for the target to a projection and a selection
*       for the source, respectively.
*       If the implementation remains empty all fields are filled and
*       all values are selected.
*----------------------------------------------------------------------*
*       Customer comment:
*----------------------------------------------------------------------*
  
METHOD invert_ZPMES.

*   IMPORTING
*     i_r_selset_outbound          TYPE REF TO cl_rsmds_set
*     i_th_fields_outbound         TYPE HASHED TABLE
*     i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
*     i_r_universe_inbound         TYPE REF TO cl_rsmds_universe
*   CHANGING
*     c_r_selset_inbound           TYPE REF TO cl_rsmds_set
*     c_th_fields_inbound          TYPE HASHED TABLE
*     c_exact                      TYPE rs_bool

*$*$ begin of inverse routine - insert your code only below this line*-*
    
... "insert your code here
*$*$ end of inverse routine - insert your code only before this line *-*

  
ENDMETHOD.                    "invert_ZPMES
ENDCLASS.                    "routine IMPLEMENTATION


 

Rutina para Año


 



PROGRAM trans_routine.


*---------------------------------------------------------------------*
*       CLASS routine DEFINITION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform DEFINITION.
  
PUBLIC SECTION.

*  Attributs
    
DATA:
      p_check_master_data_exist
            
TYPE RSODSOCHECKONLY READ-ONLY,
*-    Instance for getting request runtime attributs;
*     Available information: Refer to methods of
*     interface 'if_rsbk_request_admintab_view'
      p_r_request
            
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.

  
PRIVATE SECTION.

    
TYPE-POOLSrsdrstr.

*   Rule specific types
    
TYPES:
      
BEGIN OF _ty_s_SC_1,
*      Field: POSTING_DATE Cronomarcador.
        POSTING_DATE           
TYPE P LENGTH DECIMALS 0,
*      Field: RECORD.
        RECORD           
TYPE RSARECORD,
      
END   OF _ty_s_SC_1.
    
TYPES:
      
BEGIN OF _ty_s_TG_1,
*      InfoObject: ZPANIO Año.
        /BIC/ZPANIO           
TYPE /BIC/OIZPANIO,
      
END   OF _ty_s_TG_1.

*$*$ begin of global - insert your declaration only below this line  *-*
    
... "insert your code here
*$*$ end of global - insert your declaration only before this line   *-*

    
METHODS
      compute_ZPANIO
        
IMPORTING
          request                  
type rsrequest
          datapackid               
type rsdatapid
          SOURCE_FIELDS              
type _ty_s_SC_1
          segid                    
type RSBK_SEGID
        
EXPORTING
          RESULT                   
type _ty_s_TG_1-/BIC/ZPANIO
          monitor                  
type rstr_ty_t_monitor
        
RAISING
          cx_rsrout_abort
          cx_rsrout_skip_record
          cx_rsrout_skip_val
          cx_rsbk_errorcount
.
    
METHODS
      invert_ZPANIO
        
IMPORTING
          i_th_fields_outbound         
TYPE rstran_t_field_inv
          i_r_selset_outbound          
TYPE REF TO cl_rsmds_set
          i_is_main_selection          
TYPE rs_bool
          i_r_selset_outbound_complete 
TYPE REF TO cl_rsmds_set
          i_r_universe_inbound         
TYPE REF TO cl_rsmds_universe
        
CHANGING
          c_th_fields_inbound          
TYPE rstran_t_field_inv
          c_r_selset_inbound           
TYPE REF TO cl_rsmds_set
          c_exact                      
TYPE rs_bool.
ENDCLASS.                    "routine DEFINITION

*$*$ begin of 2nd part global - insert your code only below this line  *
... "insert your code here
*$*$ end of 2nd part global - insert your code only before this line   *

*---------------------------------------------------------------------*
*       CLASS routine IMPLEMENTATION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform IMPLEMENTATION.

*----------------------------------------------------------------------*
*       Method compute_ZPANIO
*----------------------------------------------------------------------*
*       This subroutine allows the mapping from source to target fields
*       of a transformation rule using ABAP for application specific
*       coding.
*----------------------------------------------------------------------*
*       Customer comment:
*----------------------------------------------------------------------*
  
METHOD compute_ZPANIO.

*   IMPORTING
*     request     type rsrequest
*     datapackid  type rsdatapid
*     SOURCE_FIELDS-POSTING_DATE TYPE P LENGTH 000008 DECIMALS 000000
*    EXPORTING
*      RESULT type _ty_s_TG_1-/BIC/ZPANIO

    
DATA:
      MONITOR_REC    
TYPE rsmonitor.

*$*$ begin of routine - insert your code only below this line        *-*
    
... "insert your code here
*--  fill table "MONITOR" with values of structure "MONITOR_REC"
*-   to make monitor entries
    
... "to cancel the update process
*    raise exception type CX_RSROUT_ABORT.
    
... "to skip a record"
*    raise exception type CX_RSROUT_SKIP_RECORD.
    
... "to clear target fields
*    raise exception type CX_RSROUT_SKIP_VAL.

    
data l_datetime(15type c.
    
data :l_date type sy-datum.
    
dataanio type /BI0/OICALYEAR.

    l_datetime 
SOURCE_FIELDS-POSTING_DATE.
    l_date 
l_datetime+00(08).
    anio 
l_date+0(4).



    RESULT 
anio.


*$*$ end of routine - insert your code only before this line         *-*
  
ENDMETHOD.                    "compute_ZPANIO
*----------------------------------------------------------------------*
*       Inverse method invert_ZPANIO
*----------------------------------------------------------------------*
*       This subroutine needs to be implemented only for direct access
*       (for better performance) and for the Report/Report Interface
*       (drill through).
*       The inverse routine should transform a projection and
*       a selection for the target to a projection and a selection
*       for the source, respectively.
*       If the implementation remains empty all fields are filled and
*       all values are selected.
*----------------------------------------------------------------------*
*       Customer comment:
*----------------------------------------------------------------------*
  
METHOD invert_ZPANIO.

*   IMPORTING
*     i_r_selset_outbound          TYPE REF TO cl_rsmds_set
*     i_th_fields_outbound         TYPE HASHED TABLE
*     i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
*     i_r_universe_inbound         TYPE REF TO cl_rsmds_universe
*   CHANGING
*     c_r_selset_inbound           TYPE REF TO cl_rsmds_set
*     c_th_fields_inbound          TYPE HASHED TABLE
*     c_exact                      TYPE rs_bool

*$*$ begin of inverse routine - insert your code only below this line*-*
    
... "insert your code here
*$*$ end of inverse routine - insert your code only before this line *-*

  
ENDMETHOD.                    "invert_ZPANIO
ENDCLASS.                    "routine IMPLEMENTATION

  SAP BW 4hana DTP ABAP Filter Range using DTP Routine data: lv_date_low TYPE sy-datum, lv_date_high TYPE sy-datum, lv_date TYPE dats, lv_mo...