Key Figues - SUMMATION in Expert Routine

Hi All,
Is there any to way to have to aggregation of Key Figures as "Summation" in Expert Routine??
Please let me know if there is any work around for this..
Thanks,
Kapil

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.
Hi Kapil,
      You can use expert routine to program the transformation yourself without using the available rule types. You must implement the message transfer to the monitor yourself.
     If you have already created transformation rules, the system deletes them once you have created an expert routine.
     If the target of the transformation is a DataStore object, key figures are updated by default with the aggregation behavior Overwrite (MOVE). So i think expert routine aggregation does not work for transformation to the standard DSO.
For more details:
[https://forums.sdn.sap.com/click.jspa?searchID=13078965&messageID=2823817]
   Hope it helps you.
Regards,
Yokesh

Similar Messages

  • Sample source code for fields mapping in expert routine

    Hi All
    Iam writing the expert routine from dso to cube for example I have two fields in dso FLD1,FLD2
    same fields in infocube also ,can any body provide me sample abap code to map source fields to target fields in expert routine,your help will be heighly appreciatble,it's an argent.
    regards
    eliaz

    Basic would be ;
    RESULT_FIELDS -xxx = <SOURCE_FIELDS> -xxx
    you have the source fields as source, and result fields for as the target. In between you can check some conditions as in other routines of transformation.
    BEGIN OF tys_SC_1, shows your source fields ( in your case DSO chars and key figures)
    BEGIN OF tys_TG_1, , shows your result fields ( in your case Cube characteristics)
    Hope this helps
    Derya

  • Error Stack in Expert Routine, Infos about Object Log

    Hi all,
    currently I try to find some information about using the error stack in combination with an expert routine. So far I know that I have to use the Object Log, which is already in place in my code for monitor messages.
    LOOP AT itab_input INTO wa_input.
    IF sy-subrc <> 0.
            CLEAR msg.
            msg-msgid = 'MY_CLASS'.
            msg-msgty = 'E'.
            msg-msgno = '002'.
            msg-msgv1 = v1.
            msg-msgv2 = v2.
            msg-msgv3 = v3.
            APPEND msg TO t_msg.
            " ??? Write wa_input to error stack???
            CONTINUE.
          ENDIF.
    ENDLOOP.
    Does somebody know how I could append wa_input to the error stack? Or does somebody have a good documentation about Object log?
    Thanks a lot!
    Nita

    Good Morning,
    thanks a lot for your input. I tried to implement this function, but I do not know where I could get the Segment Id from.
    Do you know what i_use_crosstab is used for? I think i_with_message should be set to 'X' if I want to write wa_input-record it to the error stack.
    CALL METHOD log->verify_record
              EXPORTING
                i_use_crosstab  = ''
                i_segid         = lv_segid
                i_record        = wa_input-record
                i_with_message  = 'X'
              RECEIVING
                r_skip          = lv_skip
              EXCEPTIONS
                too_many_errors = 1
                not_in_crosstab = 2
                OTHERS          = 3.
    From semantic point of view the coding should do following:
    - To avoid a second loop in my expert routine it should only check the current src record. If this is wrong, which I already determine in my coding, it should write the record in the error stack. If it is correct, it should check whether there are already records with the same semantic key in the error stack and if yes, add it also to it.
    - I assume that I have to delete this record manually from my src. package than.
    Cheers
    Nita

  • Coding Help in Expert Routine

    Dear Guru's
    We have a Expert Routine to Fill Data from a ODS to CUBE.
    i am facing problem in selection of DTP, When i mention CALDAY as eg:01.03.2009 - 31.03.2009.
    i Dont get only MARCH data in Cube but all the complete Data which is in ODS . i mean my Expert Routine  does not recognise my selection.
    Here is the Code
        DATA:
        BEGIN OF ls_ztwr_o13comp,
          calday          TYPE     /bi0/oicalday,
          co_area         TYPE     /bi0/oico_area,
          /bic/zcostcent  TYPE     /bic/oizcostcent,
          UNIT            TYPE     /bi0/oiunit,
          /bic/zacthours  TYPE     /bic/oizacthours,
          /bic/ztarhours  TYPE     /bic/oiztarhours,
          /bic/zprodvity  TYPE     /bic/oizprodvity,
          /bic/zcumachrs  TYPE     /bic/oizcumachrs,
          /bic/zcumbuhrs  TYPE     /bic/oizcumbuhrs,
          /bic/zprodcum   TYPE      /bic/oizprodcum,
        END OF ls_ztwr_o13comp,
        lt_ztwr_o13comp   LIKE TABLE OF ls_ztwr_o13comp
          WITH KEY co_area /bic/zcostcent calday UNIT,
        lt_ztwr_o13comp1  LIKE TABLE OF ls_ztwr_o13comp
          WITH KEY co_area /bic/zcostcent calday UNIT,
          wa_year TYPE n LENGTH 4,
          wa_month TYPE n LENGTH 2,
          wa_calmonth TYPE n LENGTH 6.
    $$ begin of routine - insert your code only below this line        -
        ... "insert your code here
        SELECT *
          FROM /bic/aztwr_o1300(ods)
          INTO CORRESPONDING FIELDS OF ls_ztwr_o13comp.
          COLLECT ls_ztwr_o13comp INTO lt_ztwr_o13comp.
        ENDSELECT.
        CLEAR ls_ztwr_o13comp.
        LOOP AT lt_ztwr_o13comp
         INTO ls_ztwr_o13comp.
          IF ls_ztwr_o13comp-/bic/zcumachrs = 0.
            ls_ztwr_o13comp-/bic/zprodcum = 0.
          ELSE.
            ls_ztwr_o13comp-/bic/zprodcum = ls_ztwr_o13comp-/bic/zcumbuhrs /
            ls_ztwr_o13comp-/bic/zcumachrs * 100.
          ENDIF.
          CLEAR:
          ls_ztwr_o13comp-unit,
          ls_ztwr_o13comp-/bic/ztarhours,
          ls_ztwr_o13comp-/bic/zacthours,
          ls_ztwr_o13comp-/bic/zcumbuhrs,
          ls_ztwr_o13comp-/bic/zcumachrs,
          ls_ztwr_o13comp-/bic/zprodvity.
          APPEND ls_ztwr_o13comp TO lt_ztwr_o13comp1.
        ENDLOOP.
        CLEAR ls_ztwr_o13comp.
        LOOP AT lt_ztwr_o13comp1
         INTO ls_ztwr_o13comp.
          COLLECT ls_ztwr_o13comp INTO lt_ztwr_o13comp.
        ENDLOOP.
        CLEAR:
        ls_ztwr_o13comp,
        lt_ztwr_o13comp1.
        LOOP AT lt_ztwr_o13comp
         INTO ls_ztwr_o13comp.
          wa_year = ls_ztwr_o13comp-calday(4).
          wa_month = ls_ztwr_o13comp-calday+4(2).
          CONCATENATE wa_year wa_month INTO wa_calmonth.
          MOVE-CORRESPONDING ls_ztwr_o13comp TO RESULT_FIELDS.
          RESULT_FIELDS-calmonth = wa_calmonth.
          RESULT_FIELDS-calyear = wa_year.
          APPEND RESULT_FIELDS TO RESULT_PACKAGE.
        ENDLOOP.
    Can any one please tell me where i should change the code, So that i get data for only those month which is mentioned in my DTP.
    Thanks in adv,
    Dev

    Hi Srinivas,
    You are selecting data from your DSO and then processsing it and then appending it in RESULT_PACKAGE.
    Now the data which will be selected because of the filter in the DTP will be in the internal table SOURCE_PACKAGE.
    So you should base your select on the DSO for all entries in Source_package. This will ensure you process only those records which are selected with the filter.
    Regards,
    Mansi

  • Currency Conversion in Expert Routine

    Hi
    We have written a expert routine for calculating some amount fields. Now these amount fields get local currency from the source. We need to change it to USD using a standard conversion type. This conversion type already exists. Now how can this be done in expert routine?
    Regards
    Merlin

    Hi Merlin,
    You could use Currency Translation with in BEx Query (It is available on conversion tab of the key figure properties) and use conversion type of USD on the key figure for Amout/Value
    regards
    Kulmohan

  • Special chs in DSO expert routine

    Hello All,
    Data is being pulled from Transfer order DSO to GR DSO. The transformation uses a expert routine which pulls a field 'Requisitiner' from another DSO i.e. Purchase DSO.
    This expert routine brings invalid characters i.e. the field value which is in small letters.
    If I delete the request in GR DSO, I cannot edit the PSA and get the correct data, because basically the incorrect entries are coming from the expert routine.
    The real problem occurs when I try to activate data in GR DSO. The activation fails because of the requisitioner field value is in small letters.
    Do I have to make changes in the expert routine? OR is there another way to solve this.
    The loads are delta loads and requests from last 3-4 days have been failing to activate.
    Kindly inform.
    Regards,
    NK

    hi,
    use the ABAP statement convert to Upper case, or you can change the settings for the target infoobject (check the lowercase letter) in the Dev and transport it to the target system.
    Check with the users to see if they are ok with seeing lower case letters in the report, if yes then transporting the info object is a better option.
    regards,
    Arvind.

  • Error in Expert Routine

    Hello Please I need help, I applied expert routine in my transformation in BI 7.0 and i get error, this is the code i used
    Data : wa_SOURCE_PACKAGE  type tys_SC_1.
        data : wa_RESULT_PACKAGE  type tys_TG_1.
        loop at SOURCE_PACKAGE into wa_SOURCE_PACKAGE .
          move wa_SOURCE_PACKAGE-/BIC/ER_ENUM to wa_RESULT_PACKAGE-/BIC/ER_ENUM.
          move wa_SOURCE_PACKAGE-/BIC/ER_EAGE to wa_RESULT_PACKAGE-/BIC/ER_EAGE.
          move wa_SOURCE_PACKAGE-/BIC/ER_ENAME to wa_RESULT_PACKAGE-/BIC/ER_ENAME.
          move wa_SOURCE_PACKAGE-/BIC/ER_ESEX to  wa_RESULT_PACKAGE-/BIC/ER_ESEX.
          wa_RESULT_PACKAGE-/BIC/ER_ESAL = '2000'.
          append RESULT_PACKAGE to wa_RESULT_PACKAGE.
        endloop.
    Error Message that i get :
    E:"WA_RESULT_PACKAGE" is not an internal table - the "OCCURS n"
    specification is missing.
    Please can someone assist me with a solution to this.

    ERROR IN APPEND STATEMENT .
    CHANGE IT TO
    append WA_ RESULT_PACKAGE  to RESULT_PACKAGE.
    WORK AREA SHOULD BE APPENDED TO RESULT_PACKAGE

  • Technical fields in Expert Routine

    Hi,
    I need to write an Expert Transformation Routine to upload data into a DSO from a Generic Data Source.
    The Result Package has the following technical fields:
         Field: SID SID.
            SID           TYPE RSSID,
         Field: DATAPAKID Data packet number.
            DATAPAKID           TYPE RSDATAPID,
         Field: RECORD Data record number.
            RECORD           TYPE RSARECORD,
         InfoObject: 0RECORDMODE BW Delta Process: Update Mode.
            RECORDMODE           TYPE RODMUPDMOD,
    Can you please let me know what/ how should these fields be updated?
    Thanks,
    Sri.

    Hi,
    Check the below link for expert routine 
    http://wiki.sdn.sap.com/wiki/display/BI/ExpertRoutineinBI7Transformations
    Regards,
    Satya

  • How to get technical name (ID) of expert routine

    Hi,
    how I can get the technical name (ID) of an expert routine inside my transformation?  I have to verify if the expert routine is in an old transport order.
    Any help will be appreciated.
    Thanks,
    detlef

    Hi,
    Just copy the techical name of transformation in which you have written the expert routine.
    Then go to se11 enter table name as RSTRAN and put the technical name of transformation.
    This will provide you the technical name of all the routimes written in transformation.
    Hope it helps.
    Regards,
    AL

  • Is there a way to abort transformation from an Expert Routine?

    I need to abort processing on a load if a certian condition is hit.  I have figured out how to populate the monitor entries from the expert routine, but not how to halt execution.  The effect I'm looking for is the same as raising exception CX_RSROUT_ABORT in a start or end routine.
    Thanks,
    Scott

    I found  Note 1227667 - Guidelines for expert routine: Design rules which shows method CALL METHOD cl_rstran_expert_rout_srv=>send_message
    Unfortunalty you must be at Support package 18 or use note Note 1165167 - Message interface for expert routine to expose the feature.
    This can be used to send a message to the DTP monitor.  I have not been able to test it to see if it will actually abort or not.

  • Q: Where can I find example for expert routine

    Hi, Experts,
    I would like to use expert routine but I can't find any exmaple, especially on RECORDMODE setting.
    Can any body tell me the resource?
    Thanks a lot!
    Best Regards
    Yuedong

    Hi,
    The document doesn't help, it contains examples only for start/end routine.
    The reason I choose expert routine is to improve performance and implement some complex logics. The data seems correct in New data table(as I compared it with another update without using expert routine, they are exactly the same), but after it's activated, the result is completely wrong in active table. So I wonder whether RECORDMOE brings the problem (but even the RECORDMODE value is exactly same when I did the comparison, strange!)
    The transformation is used between DSO and DSO, supporting delta transfer.
    Thanks, Raj!
    B.R.
    Yuedong

  • How to get exact user input in inverse expert routine?

    Hi
    I have created an inverse expert routine on a virtual provider with DTP for transformation from an infocube. The virtual provider is part of a Multiprovider. I have a query which fetches data from the virtual cube.
    I have the hierarchy enabled for the Iobj 0cust_sales in the query and the user inputs the values during execution of the query. Is there a way by which i can get the exact input given by the user in the selection screen in the inverse expert routine?
    I also have some variables on nav attribs of some fields these restrictions are not avaible in the dimensions list. Is there a method by which i can get these variable entries as well in the inverse expert routine?
    Regards,
    Sujai

    please refer to this SAP Help and hope it can solve your question.
    http://help.sap.com/saphelp_nw70/helpdata/en/45/f1f9b861c706f9e10000000a155369/content.htm

  • How to create multiple DTP REQUESTs with expert routine  ?

    Anyone know if it's posible to create new dtp request's manually from an expert routine, i want to write manually to 2 different ODS in the same expert routine the first is for success records and the second is for rejected records, the problem is that the routine only writes a new request for the succeed record and the rejected records are writed with abap to the other ODS manually without request ID

    hi,
    Just create a direct update DSO for collecting the rejected records.
    Use the function module RSDRI_ODSO_MODIFY for populating this DSo from the transformation ABAP coding.
    The direct update DSO will be having the rejected records after execution of the DTP and the correct records will be processed to the target DSO (correct records)
    Prathish

  • Start,end and expert routine in Bi7.0

    Hi,
    Can anyone give real time examples or what you have done in your projects examples to start routine,end routine and expert routine.If possible give example with ABAP code.
    Sridhar

    Hi Sridhar,
    The basic difference between these routines is.
    Start routine: Here you will access to the source package, but not to the target package. Here you will have the code to filter unwanted records to the target.
    End routine: Here you will not have access to source package but you will have access to the target package. Here you can do the lookups based on the values you receive from the transformations.
    Expert routine: Here you will have access to both Source and Target. Here you can combine the advantages of both.
    The below code is for Start Routine. To send only the record satisfying the below criteria.
    u2022     For Currency Type = u2018B0u2019 and Transaction Type = u2018Bu2019 or u2018Cu2019 or u2018Fu2019
    This is a scenario where data is going from one info provider to another info provider.
        DATA:  wa_srcpkg TYPE tys_sc_1..
        DATA: i_t_srcpkg TYPE STANDARD TABLE OF tys_sc_1.
        LOOP AT SOURCE_PACKAGE INTO wa_srcpkg.
          IF wa_srcpkg-curtype = 'B0' AND ( wa_srcpkg-rec_type = 'B' OR
                  wa_srcpkg-rec_type = 'C' OR wa_srcpkg-rec_type = 'F').
            INSERT wa_srcpkg INTO TABLE i_t_srcpkg.
          ENDIF.
        ENDLOOP.
        SOURCE_PACKAGE []  = 
                                             I_T_SRCPKG[] .
    Hope this is of some help...
    Regards,
    CK
    Edited by: Krishna on Jul 15, 2008 3:06 AM
    Edited by: Krishna on Jul 15, 2008 3:07 AM
    Edited by: Krishna on Jul 15, 2008 3:07 AM
    Edited by: Krishna on Jul 15, 2008 3:08 AM
    Edited by: Krishna on Jul 15, 2008 3:09 AM

  • Start/end/expert routines

    Hi,
    please can any boby one Explain start/end/expert routines with examples?
    Thanks,

    Hi,
    This has alredy been discussed a lot of time and u can search the forum for your answer.
    A brief desc abt them.
    1. start routine :-  Mainly used to reduce the hits on database tables and for pre processing the data.
    2. End routine :-  Used for post processing of Data.
                               For eg after all the transformations are over, you need to delete certain requests.
    3. Expert Routine ;- Used inspecial scenarios where start and end routine might not suffice the need.
                                For Eg:- Transposing rown into coloumns
    Regards,
    Rahul

Maybe you are looking for

  • How to install adobe flash player?

    HOW TO INSTALL ADOBE FLASH PLAYER?

  • HELP - How to Convert Date in GMT to Local time in Applet

    Hi All Is there a way to convert a date from GMT format into a local time say IST in my Java applet, this GMT date is coming from a postgresql database. Thanks in advance Swaraj

  • Can't update album info with Get Info

    Hi While I am new to the Mac world I have used iTunes on the PC. My problem is that I have some random tracks from various albums that I want to group as one album in iTunes. So I've highlighted an item and hit Get Info and none of the fields are edi

  • Connecting audigy 2 ZS to Onkyo TX-NR1

    Hi All, I just purchased a computer with a Audigy 2 ZS card in it and I want to connect it to my receiver. When I connect it I used the digital out but only get hissing and static. Can someone help me out. I tried playing with the hz but still no sou

  • STK: max length for initDisplayText ?

    Hi, where can I find information on the max possible length of a text string in the source buffer, when using sim.toolkit.ProactiveHandler.initDisplayText command ? For example, the following command works well (buffer size is 512): proHdlr.initDispl