Creating a start routine in the transfer rule

I'VE CREATE a start routine, seel bleow.  Now I want to get at one of the fieds for a Key figure.    How do i do that?    do I need to add it to the transfer structure
LOOP AT ROUTEDAY INTO WA_ROUTEDAY.
CALL FUNCTION 'CONVERSION_EXIT_TSTRG_OUTPUT'
EXPORTING
   input = ROUTEDAY-ROUTE_DAYS
IMPORTING
     output = WA_DAYS_OUT.
  WA_ROUTEDAY-ROUTE_DAYS_CONV = WA_DAYS_OUT.
  APPEND WA_ROUTEDAY.
ENDLOOP.

Hi Mick,
check these links
start routine in transfer rules
Look up to load master data
excluding
Start Routine in Transfer Rules
Sample code in Update Rule to restrict data selection?
Append Datapak - transfer start routine
Excluding Blank field in Infopackage Filter
Trans Routine ABAP help ..
Hope this might help you.
****Assign Points If Helpful****
Regards,
Ravikanth

Similar Messages

  • How to get the PSA name in a Start Routine in the Update Rules of a Cube.

    Hi all.
    I have an InfoSource that loads data directly in an Infocube.
    In the Start Routine of the Update Rules I need to retrieve the PSA table name for that InfoSource, to access it and check some data.
    I can't use the PSA name you seen in the DataFlow because it will change once the update rules are transported to another system.
    Please advice.
    Thanks!!!

    Hi,
    we do it as follows:
    first get the request ID:
    DATA: tp_request(30)   VALUE 'REQUEST'.
    FIELD-SYMBOLS: <wa> TYPE ANY, <tp_req> TYPE ANY, <tp_dtp> TYPE ANY.
    READ TABLE datapak ASSIGNING <wa> INDEX 1.
    IF sy-subrc <> 0. ABORT = 4. ENDIF.
    ASSIGN COMPONENT tp_request  OF STRUCTURE <wa> TO <tp_req>.
    IF sy-subrc <> 0. ABORT = 4. ENDIF.
    requnr = <tp_req>.
    then we get the table with
    SELECT odsname_tech FROM rstsodspart WHERE request = requnr.
    you may need to adjust this code, I've just pasted the relevant parts...
    another way is to get this info from RSTSODS where the different versions are maintained...
    let me know if you need further detail about this stuff...
    hope this helps...
    Olivier.
    Message was edited by:
            Olivier Cora

  • Filtering records using a start routine inside the update rules for a dmart

    Hi
    I am using a start routine inside the update rules. I want to filter out all records that have 0 in all three fields. My problem is that it not only filters these records, but also filter records with negative values, which I do not want. Only 1 field has a negative value, the other 2 have 0.
    I have tried:
    DELETE DATA_PACKAGE where  /BIC/ZBILLCONS = 0 and /BIC/ZBREVPRIM = 0  and /BIC/ZBREVSUBO = 0 .
      DELETE DATA_PACKAGE where ( /BIC/ZBILLCONS = 0 and /BIC/ZBREVPRIM = 0  and /BIC/ZBREVSUBO = 0 ).
    also tried:
    delete DATA_PACKAGE where /BIC/ZBILLCONS IS INITIAL and
    /BIC/ZBREVPRIM IS INITIAL and  /BIC/ZBREVSUBO IS INITIAL.
    The records are going to 1 cube and 1 ODS, I only have the start routine in 1 update rule. I  view the filtering in the PSA.
    Has anyone ran into this before?

    Try
    delete data_package where /BIC/ZBILLCONS = '0' and /BIC/ZBREVPRIM = '0' and /BIC/ZBREVSUBO = '0' .
    OR
    delete data_package where /BIC/ZBILLCONS EQ '0' and /BIC/ZBREVPRIM EQ '0' and /BIC/ZBREVSUBO EQ '0' .
    Good luck!

  • How to populate the variable created in start routine to a field.

    Hi
    I have created a variable ZCUST in the Start routine and I have written some code to populate this value. Now there is a field in the update rules, Z_YTCUST. I want to assign the result of the variable created in start routine to this field. How can I go abt doin this? I have tried but for some reason the result shows 0.
    Thank you.

    Hi,
           Make sure the variable used in the start routine is a global variable. then assign the value u get it from the start routine in the update rule result field.

  • Creating an Incremental Unique Key in Transfer Rules Routine

    Hello Experts,
    In my Infosource, I have created a routine in the transfer rules on my infoobject.  I am trying to load my data from a flat file and create a unique key by autonumbering a field in my infosource/datatarget. 
    I am new to ABAP and can not figure out why my code will not return a value...
    Under "Use of Transfer Structure Fields" I chose my field to change only, and entered the following code:
    Under Global Code I declared my counter because I want it to maintain its value during the entire load:
      DATA: COUNTER TYPE I VALUE 0.
    Then in my routine I have the following code:
      COUNTER = COUNTER + 1.
      RESULT = COUNTER.
      RETURNCODE = 0.
      ABORT = 0.
    I expect this to return 1 for the first record, 2 for the second, and so on - therefore giving me a unique key.  Any assistance in my code or other ways to automate this process in BW would be greatly appreciated.
    Thank you.

    Sean,
    It looks like your routine is basically correct.  Have you tried using single quotes around the S instead?  Also - you may want to add a statement to indicate what 0AMOUNT should be in the instance where your condition isn't true.  Something like this:
    IF tran_structure-shkzg  = 'S'.
    RESULT = tran_structure-wrbtr * -1.
    ELSE.
    result = ???
    ENDIF.
    Good luck!  The syntax check in the transfer rules leaves a bit to be desired, doesn't it?

  • How to delete blank space from value of Infoobject in the transfer rule

    does anyboady know how to write a routine in the transfer rule in order to delete ending blank spaces from value of Infoobject 'ORDTEXT'. E.g. value: 'ABM    '?  After routine, the result should be 'ABM'.
    Thanks for any input.

    Deleting 'ending blank spaces' from a character type field (ie info-object or text) in SAP is not meaningful. For all usage, a char type field of length 8 having value  'ABM     '  is same as 'ABM'.
    Ok, HTML is changing the display in the above, so let me restate it
    For all usage, a char type field of length 8 having value  'ABM_____'  is same as 'ABM', take the underscore character (_) in the first string as a placeholder for space character.
    Edited by: Ajay Das on Jul 29, 2009 12:07 PM

  • Strat routine code in transfer rules for the Extractor - 0CO_OM_CCA_1

    Dear SDNers,
    I have a scenario to implement a start rouine code in the transfer rulesfor the Extractor - 0CO_OM_CCA_1 , please give a light on this.
    Scenario:
    The extractor 0C0_OM_CCA_1 brings in Cost Center transactional data for costs and allocation into the SAP BI data warehouse. A cross reference table will be created in SAP BI for Profit Center. These tables will have CRM (CARDIAC RHYTHM MANAGEMENT) Profit Centers stored in them.
    In the transfer rules for 0CO_OM_CCA_1, add ABAP code in the start routine to block CRM (CARDIAC RHYTHM MANAGEMENT) data. The code will have the following logic:
    Check Cost center master data table u2018/BI0/QCOSTCENTERu2019
    This table u2018/BI0/QCOSTCENTERu2019 being time dependent, use the last day of the fiscal period from transactional data as the date to select from u2018/BI0/QCOSTCENTERu2019.
    Go to the Profit center reference table and identify if the data belongs to BSC Boston Scientific/CRM (CARDIAC RHYTHM MANAGEMENT).
    Block CRM (CARDIAC RHYTHM MANAGEMENT) data.
    Best Regards,
    Satya
    Edited by: satya prasad on Sep 8, 2009 8:16 AM

    You could give this a try:
    DATA: wa_qcostcenter TYPE /bi0/qcostcenter,
          wa_ppcxref TYPE /bic/ppcxref,       "Custom Profit Center Cross-Reference table
          l_tabix TYPE sy-tabix,
          l_last_date TYPE d.
    LOOP AT data_package.
      l_tabix = sy-tabix.
      CALL FUNCTION
        'LAST_DAY_IN_PERIOD_GET'
      EXPORTING
        i_gjahr = data_package-fiscper+0(4)
        i_periv = data_package-fiscvarnt
        i_poper = data_package-fiscper+4(3)
      IMPORTING
        e_date = l_last_date.
      SELECT SINGLE
      FROM
        /bi0/qcostcenter
      INTO
        wa_qcostcenter
      WHERE
        costcenter = data_package-kostl
        AND dateto <= l_last_date
        AND datefrom >= l_last_date.
      IF sy-subrc EQ 0.
        SELECT
        FROM
          /bic/ppcxref
        INTO
          wa_ppcxref
        WHERE
          profit_ctr = wa_qcostcenter-profit_ctr.
        IF sy-subrc EQ 0.
          IF wa_ppcxref-data = 'CRM'.
            DELETE
              data_package
            INDEX
              l_tabix.
          ENDIF.
        ENDIF.
    ENDLOOP.
    Edited by: Dennis Scoville on Sep 8, 2009 4:32 PM

  • Copy routines written in transfer rules to other system

    <Moderator Message: Even as a newbie you should be able to copy and paste or read here and write there>
    Hi All,
    In the datasource '0CO_OM_OPA_6' , in the transfer rules for infoobject 0PART_CCTR' , we have a ruotine written 'Fill  Partner Cost Center from Partner Objects'.
    Now I want to write the same routine for same infoobject in another test server for the same data source.
    Can anybody please tell me how to go about from start as I am new in BW.
    Regards,
    Sushmita
    Edited by: Siegfried Szameitat on Jun 8, 2009 3:47 PM

    I think you should check the source system assignment in the transport connection. It might have directed to the old sytem.
    Cheers
    Chanda

  • BW3.5: Error message when trying to activate the transfer rule

    When I was trying to activate the transfer rule for one info object( charateristic with master data) , I got the following error  in [[  ]]
    Error when creating transfer structure /BIC/CCPIZGR00CC_ATTR in source system CI2220
    Diagnosis
    An error occurred when creating transfer structure /BIC/CCPIZGR00CC_ATTR as an IDoc segment in source system CI2220 .
    System response
    The action was terminated. No data was changed.
    Procedure
    Use the generation log in source system CI2220 to identify the error, and remove the cause.
    CI2220 is the backend R/3 system, I had no issue in replicating the data source etc. this error occurred while trying to activate the transfer rule after assigning the info source to the replicated datasource in BW.
    Can anybody tell me how to view( what transaction etc) the generation log to understand the issue?
    Thanks in advance
    Arunabha

    Hi Roberto,
      Thanks for yoyur prompt reply, I would try to follow the instruction, but at the same time please note that previously we had no issue in activating the transfer structure. I would like to see the log in the source system, but don't know how to and which transaction to use etc. any help would be appreciated.
      Thanks
    ARUN

  • Conversion exit error while activating the transfer rules

    Hello gurus,
    We are doing a function module extraction with 3.X data sources.
    On activating the transfer rules , i am getting a conversion exit error for "0fiscyear", but in the infoobject we don't have the conversion exit for it.
    Points will be awarded for any kind of response.
    Thanks and Regards,
    Anu.

    Hi,
    1. Please check in the transformation, its necessary to provide the fiscal variant mapping as well when ur mapping fiscal year object. as on the basis of that value fiscal period will be derived.
    2 I guess ur doing direct mapping (Time conversion) and there is no routine written for that.  if any u can check that as well for any error.
    Thanks
    dipika
    Edited by: Dipika Tyagi on Jun 25, 2008 7:39 AM

  • CLIENT of the source system in the Transfer Rules

    Hi,
    Can I get the CLIENT of the source system dynamically in the Transfer Rules (and assign it to an InfoObject)?
    I have a generic extractor from a R/3 source system. The table in the source system & the extract structure the DataSource both contain MANDT, but its not coming in the RSO2 screen (which, if I'm not wrong, is how it should be).
    I need the CLIENT info. in my BW data targets. I do not want to hardcode this value in Trans Rules as the client in Dev & Prod is different for my R/3 sys.
    If I can't get it directly from the DataSource, is there any way I can get it from any system field using routine?
    If I'm not wrong - SYST-MANDT in the Formulas will give me only my BW CLIENT.
    Thanks in advance for your help.
    Regards,
    Melwyn

    hi,
    i think if your bw dev and prod client is different you can try in transfer rules
    if sy-mandt = xxx. ( bw dev client number)
       result = 'yyy'. (source system dev)
    else.
       result = 'zzz'. (source system prod)
    endif.
    or enhance the extract structure/ append structure with zz field for mandt and field in user exit zxrsau01 with sy-mandt
    or if use infoobject 0LOGSYS, populate in transfer rules with result = g_s_minfo-logsys.
    hope this helps.

  • Unable to find the Transfer Rules in Transport Connection

    Hi Guys,
    I am on BW 3.5.
    I am unable to find the Transfer Rules created in transport Connection. I need to Transport these changes. I was able to Transport Communication structure and the Infosource.
    I tried activating the Transfer Rules and also replicated the datasources but it does'nt prompt me for a Transport request.
    Hence I need to explicitly Transport by going into Transport Connection where I am unable to find the object.
    Please help me on how to include this object in the Transport request created.
    Thanks in advance.
    Regards,
    Tyson

    Another way is to go the transfer rules or update rules or any object which you want to transport->extras on top>Object direct entry>change the package from $temp>rest you know
    Cheers,
    shana
    Assigning pts is the way of saying thanks in SDN

  • Problem in standard routine 0RPM_DSKF in transfer rules 0rpm_role_d

    HI all,
    I am extracting the data from xRPM 4.0 to BW 7.0.Even though i am using BI 7.0 presently we are using 3.5 only.I have installed the transfer rules after that i am trying to activate the transfer rules .But i am getting the error with standard routine ( Syntax error ) written In transfer rules for one key figure 0RPM_DSKF.
    Data source : 0RPM_ROLE_D
    Data Target : 0RPM_C02
    Info Source : 0RPM_SRAR_02
    Routine :
    if TRAN_STRUCTURE-&RU& <> 'FTE'.
    RESULT = TRAN_STRUCTURE-ANUMBER.
      else.
        RESULT = 0.
      endif.
    There is no filed inT.Stru contains RU.
    Please suggest me what would be the solution for this.
    If is there any relavant OSS Note plz provide me that and also provide me the valuable suggestions.
    Thanks & Regards
    Ramakanth

    Hi Rathy!
    Thank you very much for your quick help! Usually I do the same. Now I faced with BI system, where data source were already activated in system A and replicated. I can see all needed active sata source un BI already. But I can not see transfer rules in content!
    What you can advise?
    Reagrds, Iryna.

  • BE3.5 : Error from the source system while activating the transfer rule

    When I was trying to activate the transfer rule for one info object( charateristic with master data) , I got the following error  in [[  ]]
    Error when creating transfer structure /BIC/CCPIZGR00CC_ATTR in source system CI2220
    Diagnosis
    An error occurred when creating transfer structure /BIC/CCPIZGR00CC_ATTR as an IDoc segment in source system CI2220 .
    System response
    The action was terminated. No data was changed.
    Procedure
    Use the generation log in source system CI2220 to identify the error, and remove the cause.
    CI2220 is the backend R/3 system, I had no issue in replicating the data source etc. this error occurred while trying to activate the transfer rule after assigning the info source to the replicated datasource in BW.
    Can anybody tell me how to view( what transaction etc) the generation log to understand the issue?
    Thanks in advance
    Arunabha

    Hi Arunabha,
    I would confrim that there is no issue with the datasource in your r/3 system. Can you run the datasource on your r/3 system with no errors using RSA3?
    If the datasource is ok, then I would check out the error message number in OSS or SDN. I have seen this error before, I just cannot recall what the fix was.
    Cheers!

  • Debug the transfer Rule

    Hi,
    Please let me know how to but the break point in the Transfer Rule to debug it
    Regards,
    Mayank

    Hi Mayank,
    You can simulate debugging in transfer rules or update rules if you have used a PSA.
    To simulate debuggin with selective records, load your data target via PSA.
    Load the info package till PSA.
    In the Details tab, in the monitor of your infopackage/scheduler---> in the details tab-->drill down the messages until you start seeing data package.
    When you right click on the message Proceesing of Data package1/2/...n,  you will find an option to simulate debug.If you select this option it opens a new window where you could mentione---> activate the debugger in the transfer rule or activate the debugger in the update rule...
    Please refer to the SAP help link below for further details or clarification.
    [ Debugging transfer rules|http://help.sap.com/saphelp_nw04/helpdata/en/5c/37e03ba722cb5ae10000000a114084/frameset.htm]
    In DTP, there is one specific processing mode for debugging and you could switch the debugger at particular break points by checking the relevant checkbox.
    Hope this helps,
    Best regards,
    Sunmit.

Maybe you are looking for

  • View of Component Is Not Visible.

    Hi all,     I am new to the wbe dynpro. I have an issue. I am using ALV to Display the selected data. Its displaying Correctly in alv table i have made one field to be link which will navigate to another view. When i click the link i am getting the f

  • Missing bluetooth shortcut

    since i put my standbye to basic  i cant find the bluetooth shortcut can you help please

  • OO ALV - Excluding unwanted custom function buttons

    Hi, I'm using CL_GUI_ALV_GRID class in a ALV program. I have various screens with the same toolbar, and i need to exclude one customer function, one button that i created, from this toolbar. The idea is not showing the same buttons in the various scr

  • Howt to Send XML file to JMS Queue instead of text string.

    HI, I am doing a project on JbossSeam. I am using JMS. I am sending/adding plain text to the JMS queue and geting it back from the JMS queue as I wanted to send/add an xml file to the JMS queue and wanted to recieve the same xml file from the JMS Que

  • Touchpad configuration Ideatab Lynx K3011

    I cant find where to configure the Touchpad on the attachable keyboard for the Ideatab Lynx.  I need to disable tapping or at least lower the sensitivity as I am always accidently opening / closing windows, etc when using the touchpad due to my heavy