Substring Function in formula builder of transfer rule

Hi Gurus
I want to get the domain name from Email address.
For eg: if the email address is [email protected], i want to display only "yahoo.com" in the report.
For that, shall i use Substring function in transfer rule.
If so, please advice me how i can do this.
Thanks
Sansen

Instead try using a routine using the SPLIT function...
For example if you want to split the value of the field TEST whose value is [email protected] then try writing a code like below in the transfer routine...
DATA: TEST1(30), TEST2(30) TYPE C.
SPLIT TRAN_STRUCTURE-ZEMAILID AT '@' into TEST1 and TEST2.
RESULT = TEST2.
(value of TEST2 would be yahoo.com)
Hope this helps...

Similar Messages

  • Current Date in Transfer Rules Formula Editor

    Hi!
    Anyone aware how to get todays' date in the Transfer Rules Formula Editor?
    Aim is to calculate ones actual age based on a given birthday-month-year using the dateDifference function.
    Cheers

    Hi,
    The summary of both posts:
    Use a formula
    DATE_DIFF( SYST-DATUM, BDAY)
    As you understand, the difference will be in days.
    Best regards,
    Eugene

  • Two formulas for a single field in Transfer Rules ?

    Hi friends ,
    I am learning BW  3.5 . I have got a problem could you please solve it ...
    My flatfile:           Empno     Empfirstname       Emplastname
                               1000         rajiv                     gandhi
    Expected Result: Empno     Empfirstname       Emplastname
                               1000         RAJIV                RAJIVGANDHI
    I need to concatenate and Convert it into capital letters for the same field (Emplastname)
    Points will be rewarded
    Thanking You

    Hi,
    then just create a routine in the transfer rules.
    routine for first name.
    result = tran_structure-empfirstname.
    translate result to upper case.
    routine for last name.
    concatenate tran_structure-empfirstname tran_structure-emplastname into result.
    translate result to upper case.
    kind regards
    Siggi

  • Transfer rules for  Functional Location hierarchy

    Hi
    I am trying to install Transfer rules for 0FUNC_LOC_HIER from BI Content.
    But i could not find any .
    Where do i can find T/Rs or Is there any procedure for that ?
    Regards
    sateesh

    Hi Sateesh,
    I am not sure if the hierarchy datasource 0FUNC_LOC_HIER supports the transfer methog PSA,
    if it only supports IDoc then its will not have transfer rules that you can maintain. You can
    check in table ROOSOURCE in the source system (field transfer method) to see if the datasource supports
    PSA transfer methd. If it does then you could create your own transfer rules.
    Best Regards,
    Des

  • InfoObject not appearing in Formula Builder

    <b><i>I have an active set of ODS update rules, and am trying to use formula builder to "RIGHT 8" the values of one of the source fields. For example, my field is packed with 00000000CUSTNAME, and I want to trim right 8 to CUSTNAME.
    However, when I look at the available fields in the left-hand selection table, all I can see are system fields, and nothing from my transfer structure. How can I actually manipulate my source field if I can't input it into the expression? How do I get the source fields to appear as candidates for manipulation in the formula builder expression? I can find nothing on this issue from help.sap.com itself. Thanks, Doug</i></b>

    Hi Doug,
    Was the update rule created based on the Infosource then you should be able to find it in the formula section. Also if you want your Cust name to appear without the trailing zeroes then you dont need the formula as SAP would take care of it if you have the alpha conv routine checked for custname.
    Bye
    Dinesh

  • Date and Time formats change in transfer rules

    Hello Experts,
    Could someone please help me to fix the following issue with DATE AND TIME format.
    I have two info objects zdate with data type DATS (length 8) and ztime with data types TIMS (length 6).
    The data in the data source (alalertdb table) is in the format of date dd.mm.yyyy and time in hh:mm:ss.
    Now when i am trying to extract the data, the load is failing because the system is taking dd.mm.yyyy length as 10 and hh:mm:ss length as 8. My infoobject
    only alows 8 for date and 6 for time.
    Do I need to write any routines in the transfer rules? If yes please share the code.
    All the inputs are much appreciated.
    Thanks in advance.
    Regards,
    Harish

    Hello ALL,
    Thanks for your inputs.
    Adios, I will try your routine if I am not tru with the formula. Thank you very much for your reply.
    Bjorn, Your formula sounds quite simple. can you please eloberate the information.
    When I used the formula for the date field its giving me an error with message FORMULA ELEMENT IS NOT ALLOWED HERE.
    Formula I used is:
    LEFT( 2, < /BIC/ZOOH_DATE> ) & SUBSTRING( < /BIC/ZOOH_DATE>, 3, 2 ) & RIGHT( 4, < /BIC/ZOOH_DATE> )
    can you also please let me know what results the formula brings.
    Thanks and Regards,
    Harish Mulaka

  • BAdi for Formula Builder (RSAR_CONNECTOR)

    Hi All,
    Has anyone implemented this BAdi? I couldn't find anything in previous posts.
    I understand this only useful for transformation (update & transfer rules) and not for formualas in query?
    Also I couldn't fully comprehend how I am supposed to pass the values to the customer defined function in a seperate class. I implemented the BAdi and a seperate class and expected it to see a User Defined function in transformation library, but couldn't see any.
    Any ideas?
    Thank you.
    Sridhar

    Hi Sridhar,
    I can give you some links, Go through this:
    http://help.sap.com/saphelp_nw04s/helpdata/en/04/f3683c05ea4464e10000000a114084/frameset.htm
    Re: Redefining formulas for BEX queries.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e11994d8b5
    Regards
    Happy Tony

  • Formula Builder

    hai
    what is formula builder and formula collusion wt is the difference between them
    plz give me the answer......
    with regards...
    Raghavendra

    Hi,
    Use
    You can use the Formula Builder to implement methods for Business Add-Ins without writing a single line of ABAP code. The methods are implemented by means of socalled formulas.
    This type of implementation does not require you to have programming knowledge. However, the functions it offers are more restricted than if you implement a method by writing ABAP code. If the range of functions provided by the Formula Builder is not sufficient, you can change the implementation type of the method at any time.
    Features
    A formula can consist of the following steps:
    Condition
    You define a Boolean formula expression whose result can be true or false. This formula expression is a logical condition based on the importing and changing parameters of the method. Depending on whether the condition is true or false, the system triggers different steps. If you do not specify a dependent step for one of these two possibilities, the system continues with the next superior step.
    Substitution
    The system replaces the value of a specific parameter with another value which you define as a constant value or by means of a mathematic formula. Substitution is only possible if the method contains changing, exporting or returning parameters.
    Message
    The system issues a message. All messages issued are collected in a log table. You define the message variables as constant values or by means of mathematic formulas. The system can only issue a message if you created a log table during method definition.
    Exception
    The system exits the method. No further steps are executed, and the application program continues in accordance with the exception defined. You can additionally display a message whose variables you define as constant values or by means of mathematic formulas. An exception can only be triggered if the method contains exceptions.
    A formula editor is available which you can use to enter formula expressions. After starting the formula editor, you can display information on how to use it by choosing the pushbutton next to the status display (traffic light).
    Activities
    You implement the method using the BAdI Builder. For information on this topic, see Implementing Business Add-Ins. To implement a method as a formula, choose the Formula implementation type on the Interface tab. Double-clicking the method name takes to to the Formula Builder: BadI Implementation screen.
    You can change the implementation type of the method on the Interface tab. You can implement a method both using a formula and using ABAP code. At the runtime of the application program, the system executes the implementation type currently chosen.
    You create the necessary steps in the left section of the screen. To do this, choose and then select the appropriate step type from the dropdown list. Using the other icons available or the context menu (which you can call by clicking the right mouse button), you then determine the arrangement and the descriptions of the steps. You can also copy steps to use them as templates for other steps, or you can delete individual steps.
    To specify the parameters for the individual steps, double-click the corresponding entry in the left section of the screen. You then enter the data required in the right section of the screen.
    The formula builder has two modes: Standard and expert mode. In the standard mode, you can only enter the formulas using the pushbuttons and by double clicking on functions and fields. In the expert mode, however, you can enter formulas directly. You can also toggle between the tow modes when entering a formula.
    The company code field (0COMP_CODE) is not included in your data target or InfoSource. However you can determine the company code from the first four character spaces of the cost center (0COSTCENTER).
    You create the following formula for this purpose:
    SUBSTRING( cost center, '0' , '4')
    Syntax:
    SUBSTRING( String, Offset , Länge )
    Step-by-Step Procedure in Standard mode:
    In the transformation library, on the right hand side under Show Me, choose the category Strings. From the list, select the Substring function by double-clicking on it. The syntax of the formula is displayed in the formula window: SUBSTRING( , , )
    The cursor automatically appears over the first parameter that needs to be specified.
    From the list on the left-hand side of the screen, choose the Cost Center field by double-clicking on it.
    Place the cursor where you want to enter the next parameter.
    Enter the number 0 using the Constant button (for the Offset parameter). The commas are added automatically.
    Place the cursor where you want to enter the next parameter.
    Enter the number 4 using the Constant button (for the Length parameter).
    Choose Back. The formula is now checked and saved if it is correct. You receive a message if errors occurred during the check, and the system highlights the erroneous element in color.
    ____For Formula Collision see this link
    http://help.sap.com/saphelp_bw32/helpdata/en/d2/02223c5f00612be10000000a11402f/frameset.htm
    *********Asgin points if usefull*********
    Cheers
    Satya

  • 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

  • Conversion of DATS to DEC in transfer rule

    Dear all,
    I have a requirement to Activate mapping field in Infosource - transfer rule.
    I have to map ZDATE (datatype - DEC) with ZOLDDATE (Datatype - DATS).
    I know it can be directly mapped so DATS field will be automatically converted to DEC like below.
    12.07.2010 will be converted to 20.100.712.xxx.xxx
    But after mapping it, the dataload time has been increased  from 1 hr to 5 hrs.
    Do anyone has faced this issue ? how to bringdown the dataload time.
    I also wrote a simple routine....but again the dataload timin is affected.
    data : l_date type sy-datum,
             tmp TYPE AD_TSTAMP.
    l_date  = TRAN_STRUCTURE-ABRDT.
    CALL FUNCTION 'ADDR_CONVERT_DATE_TO_TIMESTAMP'
      EXPORTING
        IV_DATE            = l_date
      IV_HIGH            = ' '
    IMPORTING
       EV_TIMESTAMP       = tmp.
    RESULT = tmp.
    Pls give a solution for this problem.
    Regards..
    Bala

    thanks..

  • How to debug a transfer rule during data load?

    I am conducting a flat file (excel sheet saved as a CSV file) data load.  The flat file contains a date field and the value is '12/18/1988'.  In transfer rule for this field, I use a function call to transfer this value to '19881218' which corresponds to BW DATS format, but the monitor of the InfoPackage shows red error:
    "Value '1981218' of characteristic 0DATE is not a number with 000008 spaces".
    Somehow, the last digit or character of the year 1988 was cut and the year grabbed is 198 other than 1988.  The function code is (see below in between two * lines):
    FUNCTION ZDM_CONVERT_DATE.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(CHARDATE) TYPE  STRING
    *"  EXPORTING
    *"     REFERENCE(DATE) TYPE  D
    DATA:
    c_date(2) TYPE c,
    c_month(2) TYPE c,
    c_year(4) TYPE c,
    c_date_combined(8) TYPE c.
    data: text(10).
    text = chardate.
    search text for '/'.
    if sy-fdpos = 1.
      concatenate '0' text into text.
    endif.
    c_month = text(2).
    c_date = text+3(2).
    c_year = text+6(4).
    CONCATENATE c_year c_month c_date INTO c_date_combined.
    date = c_date_combined.
    ENDFUNCTION.
    Could experts here tell me what's wrong and also tell me on how to debug a transfer rule during data load?
    Thanks

    hey Bhanu/AHP,
    I find the reason.  Originally, I set the character length for the date InfoObject ZCHARDAT1 to 9, then I find the date field value (12/18/1988)length is 10.  Then I modified the InfoObject ZCHARDAT1 length from 9 to 10 and activated it already.  But when defining the transfer rule for this field, before the code screen, click the radio button "Selected Fields" and pick the filed /BIC/ZCHARDAT1, then continue to go to the transfer rule code screen, but find the declaration lines for the infoObject /BIC/ZCHARDAT1 is as following:
      InfoObject ZCHARDAT1: CHAR - 000009
        /BIC/ZCHARDAT1(000009) TYPE C,
    That means even if I've modified the length to 10 for the InfoObject and activated it, but somehow the transfer rule code screen always takes the old length 9.  Any idea to have it fixed to take the length 10 in the transfer rule code screen defination?
    Thanks

  • BI Content Error when activating transfer rule / SAPSQL_ARRAY_INSERT_DUPREC

    Hello Experts,
    when i want to iinstall the transfer rule /CRMBW/OLTP_OPPORTUNITY_ITEM
    from Data Source /CRMBW/OLTP_OPPORTUNITY_ITEM to InfoSource
    /CRMBW/OPPORTUNITY_I  (all Business Content Objects) Iam facing the following situation:
    1. When I use "Simulate Installation" i get the warning for all of the fields: Field APP_SERVER is not supported by DataSource /CRMBW/OLTP_OPPORTUNITY_ITEM in source system SLOGICOCRM. Transfer rules were deleted however, delivered.
    2. When I use "Installation" i get a  dump of the following type:
        Runtime Errors         SAPSQL_ARRAY_INSERT_DUPREC
        Except.                     CX_SY_OPEN_SQL_DB
        Error in the ABAP Application Program
        The current ABAP program "CL_RSAR_FORMULAS==============CP" had to be
         terminated because it had come across a statement that unfortunately cannot be executed.
        More details of the dump are:
        Trigger Location of Exception
        Program                                 CL_RSAR_FORMULAS==============CP
        Include                                 CL_RSAR_FORMULAS==============CM00E
        Row                                     40
        Module type                         (METHOD)
        Module Name                       GENERATE_ACTIVE_VERSION
    The problem is, i can not map the transfer rule by myself because the the transfer structure contains some important Routines and Formulas which are missing in thereports and i dont know the source code they are using.
    Can anybody help me?
    Greetings from Barcelona
    Oliver
    Edited by: STRATESYS CONSULTING on Jul 23, 2009 2:35 PM

    Hi Oliver,
    Can you please check if you can use the SAP notes 1263075 and 985052 to resolve the problem?
    Best Regards,
    Des

  • 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.

  • Migration of Transfer Rules ( Create Transformation)

    Iam loading master data using direct update through 3.5 datasource. Now i want to migrate the data-source as well as the transfer rules.
    First thing i do is right click on the transfer rules Additional Functions--> Create transformation
    I get the following message
    " Initial error occurred during generation of the transformation "
                      Message no. RSTRAN667
    I tried deleting the transfer rules and recreating it, i get the same problem. I think first i need to create transformation against the transfer rules then i need to migrate the datasource.
    I also tried just migrating the datasource and the transfer rules are gone.
    The same procedure i tried with Business Content master data datasource and that one works.
    Note: we are on Suport pack 12.
    Please let me know if iam missing anything.
    Your suggestions are highly appreciated..
    Thanks

    Thanks for your message..
    But the thing iam doing is Iam migrating 3.5 stuff to 7.0 iam not creating transformations on the datasource.
    In order to attain that migration ,first iam migrating the transfer rules as iam using direct update for master data. While iam doing that Iam getting the error message.
    Voodi I'll look at that option and see if i can accomplish my migration by first migrating DS and then transfer rules....
    But did u get this message for direct update of the master data...
    I tried creating a generic master datasource even for that one also iam getting the same message ...while migrating the transfer rules....

  • 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

Maybe you are looking for

  • Copy and paste has stopped working in all applications.

    It looks as if the text is being copied, and it looks as if there is somwething to paste in the Edit dropdown window - but nothing appears when you do paste.   Also, the 'Undo' button appears in the edit window, as if it has pasted...

  • How to Create a Session variable in JSP?

    How to create a session variable and add attributes to it? For example i want to create a session variable called "name" and add value "user" to it? if i try to do it with setAttribute(), it is giving error as both is of type string? how to do it? ki

  • HT4009 I can't get my updates on my ipad ?

    I can't get up updates to work, everything else is working.  I'm using an ipad 3 ,  can someone help me please?

  • Moving a Selection a specific point distance

    I need to move areas of an image that I have selected using the unit of points. For example, I get corrections in our copy where I need to move certain parts of the image 8 points up or over 3 points. Is there any way to easily do this? I can use the

  • Credit card error

    I recently began to get a message in the desktop app on Win7 saying "The payment card you're currently using expires in a few days." My credit card doesn't expire until 03/2016 though. I clicked the link to update payment details but my card isn't li