+ All Categories
Home > Documents > 45188335-ABAP-for-BI-7-0

45188335-ABAP-for-BI-7-0

Date post: 03-Jun-2018
Category:
Upload: zaynab-fadlallah
View: 216 times
Download: 0 times
Share this document with a friend

of 14

Transcript
  • 8/12/2019 45188335-ABAP-for-BI-7-0

    1/14

    ABAP Programming in BW

    ABAP Programming in BW

    ACS/Ver 1.0 Page 1 of 8

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    2/14

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    3/14

    ABAP Programming in BW

    Purpose

    The purpose of this document is to outline and define concepts and strategies that

    constitute best practices regarding the use of ABAP programming in BW.

    It is strongly suggested that all staff (both senior and new hires) follow this

    document closely.

    Objective

    Obecti!e of this document is to de!elop programming process guidelines andde!elopment standards considering the possibilities e"ist for using ABAP to

    customi#e the BW en!ironment to transform the data as re$uirements dictate% as

    well as pro!ide additional processing during e"traction and updates.

    Scope

    ABAP Programming Scope in BW and R/3 etractors

    Tec!nical Area "escription

    B# $ser #it Allows the creation and population of !ariables andcalculations for &ey figures and !ariables on a runtime basis.

    This user e"it is called each time B'" is e"ecuted.

    R/3 $ser #it This user e"it is found in * under +,O- and contains

    additional programming that is needed to fill field additions toe"tract structures. We can also create additional business

    logic against data prior to its transfer to BW.

    BW TransformationRoutines

    Transformation routines are part of transformation ruleswhich are in!o&ed as data is transferred from * to BW-ata targets% or from within BW from one infopro!ider to

    another. Transformation rules are each infoobect specific.

    BW Start Routines tart routines in BW Transformations are used to manage

    whole subsets of source data before Transformation rules aretriggered.

    BW #nd Routines 'nd routines in BW Transformations are used to manage wholesubsets of resulting data from tart routine and

    Transformation ules.

    BW #pert Routines '"pert outine is a new feature in BI /.0 which enables user

    can define e"actly how the Transformation wor&s. '"pertroutines are used only in special scenarios. When an e"pert

    routine is created then all transformations rules along with

    start and end routines will get deleted. ome times e"ert

    routines impro!es the performance of data load e!en further.

    BW "TP Routines -TP outines are used to do some filtering and calculations on

    the selection screen fields depending on the business

    re$uirement.

    ACS/Ver 1.0 Page 3 of 8

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    4/14

    ABAP Programming in BW

    BW %nfopac&age

    Routines

    Infopac&age le!el routines are used to in scenarios li&e if

    source system need to be selected dynamically% selecting file

    name dynamilcally and filtering data coming from source flat

    file.

    Common %mplementation scenarios of ABAP Programming in BW

    1or BI /.0% in data staging% there are many aspects that we can write abap

    code to deal with data.

    '( %nfoPac&age Routine

    The infopac&age routine gi!en below is an e"ample to create dynamic file name.

    ACS/Ver 1.0 Page # of 8

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    5/14

    ABAP Programming in BW

    )( Start Routines

    tart routines are processed2

    333After the data in written into the PA

    333Before the transformation is processed

    Actually% we write ABAP code here is for data cleansing or data consolidation.

    3( Transformation Rules

    It is processed in the transformation and actually this routine is written for some

    particular fields.

    In the transformation% select the particular field and right clic& the rule detail% in the

    rule type% choose 4outine4.

    ACS/Ver 1.0 Page of 8

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    6/14

    ABAP Programming in BW

    *( #nd Routine

    'nd outine is processed after transformation% actually for data cleansing.

    +( #pert Routine

    ACS/Ver 1.0 Page 2 of 8

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    7/14

    ABAP Programming in BW

    This type of routine is only intended for use in special cases. 5ou can use the e"pert routine

    if there are not sufficient functions to perform a transformation. The e"pert routineshould be used as an interim solution until the necessary functions are a!ailable in the

    standard routine.

    While writing routines% in order to dramatically impro!e performance% the following stepsshould be ta&en2

    6se Internal Tables of ,aster -ata (instead of direct read of physical P3Tables)

    ,a&e minimum elect and ead statements.

    7ecessary elect and ead statements should be e"ecuted efficiently by using

    (ort 8 Binary earch).

    '"ample for the '"pert outine

    9:lobal ection

    T5P'2

    B':I7 O1 +6TO,';-ATA%

    +6TO,' +6TA+6TA

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    8/14

    ABAP Programming in BW

    +6TA+6TA+6TA

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    9/14

    ABAP Programming in BW

    '6+6TA+6TA

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    10/14

    ABAP Programming in BW

    APP'7- '6,PO'7O ,P6TAT ,P6TAT T5P'BI0POI;'B',P6TAT%

    BI+>,PO

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    11/14

    ABAP Programming in BW

    ,'FP-:P D

    WA;PO3BI+>,'FP-:P.

    -ATA;PA+=A:'3BI+>,PO,PO,'FP-:P

    D WA;PO3BI+>,'FP-:P.WA;-ATA;PA+=A:'3BI+>,PO,PO

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    12/14

    ABAP Programming in BW

    RSDG_ODSO_ACTIVATE Activatio of all &DS &b'ects

    RSDG_IOB!_ACTIVATE Activatio of all !fo&b'ects

    RSDG_IOB!_DELETE Deletio of !fo&b'ects

    RSDG_IOB!_REORG (e%air !fo&b'ects

    RSDG_IOB!_REORG_TE"TS (eorgaizatio of )e*ts for !fo&b'ects

    RSDG_MPRO_ACTIVATE Activatig #ulti%rovi+ers

    RSDG_MPRO_COP #a$e #ulti%rovi+er "o%ies

    RSDG_MPRO_DELETE Deletig #ulti%rovi+ers

    RS_COMSTRU_ACTIVATE_ALL Activate all iactive "o,,uicatio Structures

    RS_TRANSTRU_ACTIVATE_ALL Activate )rasfer Structure

    RSAU_UPDR_REACTIVATE_ALL Activate -%+ate (ules

    RR#I_#IERARC#_ACTIVATE Activate ierarchies

    SAP_AGGREGATES_ACTIVATE_$I

    LL

    Activatig a+ Fillig the Aggregates of a !fo"ube

    SAP_AGGREGATES_DEACTIVATE Deactivatig the Aggregates of a !fo"ube

    RS_PERS_ACTIVATE Activatig /ersoalizatio i 0e*!active are highlighte+

    RSSM_SET_REPAIR_$ULL_$LAG "overt Full (e3uests to (e%air Full (e3uests

    SAP_IN$OCUBE_DESIGNS /rit a 4ist of "ubes i )he Syste, a+ )heir 4ayouts

    SAP_ANAL%E_ALL_IN$OCUBES "reate D0 Statistics for all !fo"ubes

    SAP_CREATE_E_$ACTTABLES "reate #issig 5Fact )ables for !fo"ubes a+ Aggregates

    SAP_DROP_EMPT_$PARTITIONS 4ocate7(e,ove -use+ or 5,%ty %artitios of FFact )able

    SAP_DROP_TMPTABLES (e,ove )e,%orary Database &b'ects

    SAP_RSADMIN_MAINTAIN A++ chage +elete (SAD#!N table etries

    CUBE_SAMPLE_CREATE A fast way to %ut so,e sa,%le recor+s i a !fo"ube. No ee+

    to use Flat files 'ust eter the value i a A4:;ri+ or let fill the

    "ube with ra+o, value.

    SAP_CONVERT_NORMAL_TRANS "overt 0asic "ube to )rasactioal "ube a+ the o%%osite wayarou+.

    $&nction Mo'&(e Description )$&nction Gro&p RRM"*

    RRM"_+OR,BOO,_DELETE Delete 0<

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    13/14

    ABAP Programming in BW

    RRM"_+OR,BOO,_-UERIES_GET ;et list of 3ueries i a wor$boo$

    RRM"_-UER_+#ERE_USED_GET 4ists where a 3uery has bee use+

    RRM"_!UMP_TARGET_GET ;et list of all >u,% )argets

    RRM"_!UMP_TARGET_DELETE Delete >u,% )argets

    MONI_TIME_CONVERT -se+ for )i,e "oversios.

    CONVERT_TO_LOCAL_CURRENC "overt Foreig "urrecy to 4ocal "urrecy.

    CONVERT_TO_$OREIGN_CURRENC "overt 4ocal "urrecy to Foreig "urrecy.

    TERM_TRANSLATE_TO_UPPER_CASE -se+ to covert all te*ts to -//5("AS5

    UNIT_CONVERSION_SIMPLE -se+ to covert ay uit to aother uit. (ef. table ? )@@6

    T%_GLOBAL_TO_LOCAL -se+ to covert ti,esta,% to local ti,e

    $ISCPER_$ROM_CALMONT#_CALC "overt @"A4#&N) or @"A4DA to Fiacial ear or /erio+

    RSA"_BI+_GET_DATA_SIMPLE ;eeric 5*tractio via Fuctio #o+ule

    RSAU_READ_MASTER_DATA -se+ i Data )rasfor,atios to rea+ ,aster

    +ata !fo&b'ects

    RSDRI_IN$OPROV_READ

    RSDRI_IN$OPROV_READ_DEMO

    RSDRI_IN$OPROV_READ_R$C

    -se+ to rea+ !focube or &DS +ata through (F"

    DATE_COMPUTE_DA

    DATE_TO_DA

    (eturs a u,ber what +ay of the wee$ the +ate falls o.

    DATE_GET_+EE,

  • 8/12/2019 45188335-ABAP-for-BI-7-0

    14/14


Recommended