Inverte - Date function in Update Rules

Hi All,
We are writing a code for converting the data into a date field using INVERTE-DATE function.
The field GDATU in the Table TCURR needs to be converted.
GDATU - Date As of Which the Exchange Rate Is Effective. This is not in proper format, hence we used the below code to converte in to a proper one.
TABLES: TCURR.
DATA: tcurr_tab TYPE TABLE OF tcurr.
data: date_normal type sy-datum.
FIELD-SYMBOLS
<tcurr_wa> TYPE tcurr.
SELECT gdatu FROM tcurr INTO corresponding fields of
TABLE tcurr_tab.
SORT tcurr_tab BY gdatu.
LOOP AT tcurr_tab ASSIGNING <tcurr_wa>.
break-point.
CONVERT INVERTED-DATE <tcurr_wa>-gdatu
INTO DATE date_normal.  "move that to normal date field
write:/ date_normal.    "take a normal date field
ENDLOOP.
when I check for this code... it gives us the below error message
E:Variants with INVERTED-DATE are no longer supported in the OO context.
Use TRANSLATE ... USING '1928374664738291' instead
Can anyone suggest me what could be done to solve this issue.
Thanks,
Maddy

Hi Maddy,
If you do F1 help for 'Inverted-Date' you will get the reason as:
Cannot Convert Dates
The statements CONVERT DATE and CONVERT INVERTED DATE are not allowed.
An error message occurs in ABAP Objects if the following syntax is used:
CONVERT DATE f1 INTO INVERTED-DATE f2.
CONVERT INVERTED-DATE f2 INTO DATE f1.
Correct syntax:
CONSTANTS comp_nine(20) TYPE c VALUE '09182736455463728190'.
f2 = f1.
TRANSLATE f2 USING comp_nine.
f1 = f2.
TRANSLATE f1 USING comp_nine.
Reason:
Date conversions are used mainly to influence the sort sequence in in internal tables. This function can be replaced by the additions ASCENDING or DESCENDING of the statement SORT. If required, you can easily program the nines complement yourself using TRANSLATE.
Regards,
Saba

Similar Messages

  • Can routine replace "master data attribute of" update rule for performance?

    Hi all,
    We are working on CRM-BW data modeling, We have to look up agent master data for agent level and position for each transaction data. So now we are using "Master data attribute of" update rule. Can we use routine instead of "Master data Attribute of" ? Will it improve the loading performance? Since we have to load 1 lack transaction records , where as we have 20,000 agent details in agent master data.My understanding is, for each record in data package the system has to go to master data table and bring the agent details & store in cubes. Say one agent created 10 transactions, then this option "master data attribute of" will read the agent master data 10 times even though we are going to pull same details for all 10 transactions from master data. if we use routine, we can pull the agent details& storing in internal table removing all duplicates and in update routine we can read the internal table.
    Will this way improve performance?
    let me know if you need further info?
    Thanks in advance.
    Arun Thangaraj

    Hi,
    your thinking is absolutely right!
    I don't recommend to use the standard attribute derivation since it will perform a SELECT to the database for EACH record.
    Better implement a sorted table in your start routine; fill it with SELECT <fields> FROM <master_data_table> FOR ALL ENTRIES OF datapak WHERE OBJVERS = 'A' etc...
    In your routine perform a READ itab ... BINARY SEARCH.... I believe that you won't be able to go faster...
    hope this helps...
    Olivier.

  • DATA Transformation Vs Update Rules ?

    Hi guys,
          I have a scenerio , where I need to have data from 2 DSOs in to one combined DSO. Lets Says the 2 DSOs as DSO A and DSO B. and the Third as DSO C.
        I want to get DSO C Structure as exactly as DSO A. and DSO B structure is only few fiew fields from DSO A (Key Fields are same). I have loaded the data in to DSO A and DSO B using Transformation and DTP . Now How to load DSO C data I mean combined data of DSO A and B.
    1.If I create update Rules to DSO C using DSO A and DSO B. Iam not getting any data in to DSO C. (Do I need to make any settings in DSOs to update the data of A and B in to C ?).
    2.If I create 2 transformations between DSO A -C  and DSO B-C. I am sure I need to create DTPs to get the corresponding data. When I do that Iam getting 2 separate sets of data for DSO C. But I need data as one set from DSO A & B in to C.
    Please help me ASAP and let me know if you need more information on it.
    Thanks in advance

    Hello Harish,
    I just got confusedwith the requirement. When u r loading from 2 sources (here it is DSO A and DSO B), then obviously u will get 2 rows whne u manage your DSO C.
    But, in case u r referring to data, then there should be some commonality between A, B and C, thenonly it will not come as seperate rows in your report.
    Can u send the details of DSO A, B and C ?
    -- Plz assign points if helpful --
    Regards,
    Mainak

  • Master Data lookup in Update Rule problem

    Hi all,
    I am currently having a problem loading data to an InfoCube using flat files.
    The architecture is as follows:
    1) The source of the data is a flat file
    2) The data is loaded thru an Update Rule and is of type Full-Update
    3) The Update Rules determines the Profit Center using the Master Data of the WBS-Element
    4) The data is written in an InfoCube
    This solution however does not always work as planned. In the following situation a problem occurs:
    1) The flat file contains WBS-element RD.00753.02.01, which has a Profit Center attribute value 8060
    2) When I load the flat file, the PC value 8060 is written into the row in the InfoCube, which is correct
    3) Then I change the master data of the WBS-element by setting the Profit Center attribute value to 8068
    4) I run the Attribute Change Run
    5) Then i load a flat file again, which also contains WBS-element RD.00753.02.01
    6) The master data attribute value should now write the value 8068 into the InfoCube. HOWEVER, this is when the evil occurs. BW does not write a PC value of 8068, but it write the value 8060. This is wrong.
    Why does BW not take the newest version of the Master Data to performe the attribute value look-up? Or why doesn't BW write the correct Profit Center into the cube?
    Thanks,
    Onno

    Hi Ricardo,
    The debug via PSA simulation of the update indicates that the CORRECT Profit Center value is to be written into the InfoCube.
    However, if I check the contents of the cube (after the load has finished) using the request-id the WRONG Profit Center value is shown. This indicates that the correct Master Data is used, however the update of the Cube is wrong. Why does this happen. the load is of type full-update, so should add a new row in the cube using the value in the data from the UR.
    Onno

  • Master data Attribute of ( Update rule)

    Hi SDN,
    I Just want to know the procedure to create update method of Master data Attribute of . coild any one tell me step by step
    Regards
    sujan

    3.     Creation of data targets
    •     In left panel select info provider
    •     Select created info area and right click to select Insert Characteristics as info provider
    •     Select required info object ( Ex : Employee ID)
    •     Under that info object select attributes
    •     Right click on attributes and select create transformation.
    •     In source of transformation , select object type( data  source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
    •     Activate created transformation
    •     Create Data transfer process (DTP) by right clicking the master data attributes
    •     In extraction tab specify extraction mode ( full)
    •     In update tab specify error handling ( request green)
    •     Activate DTP and in execute tab click execute button to load data in data targets.
    cheers
    John

  • Where do I find the SUM & MAX functions under update rule, TYPE: FORMULA

    Hi,
    If I am setting up an update routine
    TYPE: FORMULA
    where do I find the function SUM ?
    I need to take the sum of a particular key figure under certain condition with the statement:
    IF( <condition>, <result when true>, <result when false> )
    i.e.
    IF( field1 > field2, Sum of Field3, Sum of Field3 )
    I canu2019t seem to find the Sum function. I found +, -, / etc under Basic Functions. Even under all u201CAll functionsu201D, I only see u201Csummarizeu201D but not sum.
    --Also where do I find the MAX and MIN functions if I want to use them in FORMULAS?
    Thanks

    Hi......
    Its better you go for calculated keyfigure
    Check this link :
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/56853c08c7aa11e10000000a11405a/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/EN/13/e072abaddb574284d22361f0b824bf/content.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/72f4a790-0201-0010-5b89-a42a32223ffc
    It may help you......
    Regards,
    Debjani......
    Edited by: Debjani  Mukherjee on Sep 28, 2008 6:17 AM
    Edited by: Debjani  Mukherjee on Sep 28, 2008 6:23 AM

  • Function Module where-used list does not find update rule programs

    We have function modules called in update rules. The where-used list in the function builder does not find the update rule programs.
    For example, function DATE_GET_WEEK is called in an update rule to InfoCube YCUBE001. The activated program name for this update rule is GP3PWI6PKM5Y3K75A370DIS8I77. When I goto SE37, enter the function DATE_GET_WEEK, click the where-used button, check the programs option and search. The system does not find the program GP3PWI6PKM5Y3K75A370DIS8I77.
    Without this search capability it is difficult to do an impact analysis of changing function modules. Does anyone know of a solution?

    hi,
    i think the reason is the code of update rules' generated program are stored line by line in table(rsaabap), update rules program itself stored in table rsupdrout, link with field codeid, another useful table is rsupdinfo which store infocube, infosource related.  other info may stored in some other rs* and rsa* tables.
    try to create following program in your system, and run, type in the function module name, and will display out the update rules program id, with additional useful info : which infoprovider, infosource, and detail info of the routine and infoobject in the update rule that using that function module. you may modify the program to have better display out list.
    hope this helps.
    REPORT  Z_FM_UPDRUL_WHEREUSED.
    data : lv_sfm,
           lv_line type string,
           lv_where type string.
    tables : rsaabap,RSUPDROUT,rsupdinfo.
    select-options:
    s_fm for rsaabap-LINE.
    start-of-selection.
      loop at s_fm.
        concatenate s_fm-low ' ' into lv_sfm.
        concatenate '%' s_fm-low into lv_line.
        concatenate lv_line '%' into lv_line.
        write : / 'function module', 'update rule id', 'routine id', 'infoobject', 'infocube', 'infosource'.
        select * from rsaabap
        where line like lv_line and objvers = 'A'.
           select * from rsupdrout
           where codeid = rsaabap-codeid and objvers = 'A'.
             select single * from rsupdinfo
             where updid = rsupdrout-updid and objvers = 'A'.
               write: / lv_sfm, rsupdrout-updid, rsaabap-codeid,
                        rsupdrout-iciobjnm, rsupdinfo-infocube,
                        rsupdinfo-isource.
        endselect.
        endselect.
      endloop.

  • Need help in assigning date to a field in Update Rule.

    Dear all,
    I am stuck with a small problem but could´t find a solution. I need to fill a date field (Last Movement date)  in the update rules. Currently it is being filled correctly. I need to just enhance the code in ELSE part, that is if i don´t find a relevant date in a look up ODS, i need to assign a future date i.e 99991231.(31.12.9999). When i write the same thing in the ELSE, RESULT = 99991231, the date is not filled. it is showing blank.
    Any help would be appreciated.
    Regards,
    Srini

    Hi,
    If you are assigning the value directly, mark it in single quotes.
    For example: Result = '99991231'.
    This will work.
    Regards,
    Yogesh.

  • Update rules for infocube

    hi all,
    i am new to SAP BIW. i am trying to extract transaction data. i have assigned my data source to a certain structure in SAP DR3 500 client. this structure is also replicated in the source sysytems of the BW client. however, when i go to create update rules, it asks me for an infosource. then when i give my data source as my entry, it says that 'the name of my data source is not maintained.
    can you please suggest how to maintain an infosource in such a case???
    regards,
    kaustubh

    Hi Kabre,
    i think u know that the steps to be followed?
    please follow this steps:
    1) replicate the data source( in ur case, replication is already done)
    2) create application component and create infosource under application component and give your infoobjects and activate your communication structure.
    select infosource 3.x, if you are using older versions
    3) right click on infosource, create transfer rules in that map the objects and activate transfer rules.
    if you want to write transfer routine for a particular info object, you write accordingly.
    4)go to ur datatarget(ODS or Infocube) rightclick you will find additional functions, create update rules.
    there you can create ur update rules and activate
    Thanks & Regards
    Swathi

  • Error in Transformation generated by Update rule 0SD_O01 to 0SD_C03

    Hello Friends..
    I created Update rules from 0SD_O01 to 0SD_C03, and then, generated a transformation to do loads.
    But when I do this the following error is happening in my routines
    E:The data object "COMM_STRUCTURE" does not have a component called "RATE_TYPE".
    Could you help me to solve this?
    Thanks and best Regards

    Hi,
    Follow the steps:
    1. Right click on the Cube 0SD_C03 and goto Additional functions->Create update rules.
    This option will create update rules from Cube.
    2. Enter the DSO name 0SD_O01, in the DSO option box.
    This will create your update rules.
    If you want to schedule a load from DSO to cube go to tcode RSA12 and search for your DSO 8SD_O01 and create Info Package.
    Tip: You can use either Transformations or update rules to update to data targets in 3.5 or 7.0 as well.
    If still in doubt just reply.
    Cheers,
    Satisfied!! Please reward.

  • Types of update rules

    Hi experts,
    What are the types of update rules?
    Regards,
    Siva

    Hi......
    Yes either you can say what are the different update types.........that Praveen has already ansered..............or you can say.........
    You can say what are the diffrent types of update routines...then the answer is :
    1) Start Routine in Transfer Rules
    2) Transfer Routine in Transfer Rules.
    3)Start Routine in Update Rules
    4)Update Routine in Update Rules.
    The routines that you write in transfer rules are applicable to all the Data targets that get the data from that particular Infosource, when you are going to write some code in Transfer rules, you have to understand that you are going to manupilate the data that is going to get into BW .
    If you are going to write in Update Rules , then that logic is going to apply only for that particular Data target .
    Eg : Let suppose I have a Flat file that gets data from 3 countries, US, Canada and Mexico.
    Now I have prepared the data source for the same . But I dont want to have the data of Mexico in to BW itself.
    So I will write a Start routine at TR to eliminate the data of Mexico.
    My Next step is I want the data of US into one ODS and Canada data in to another ODS.
    For this I handle the dataflow at Start routine in Update rules, to eliminate Canada data for US ODS and Vice Versa.
    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 ..
    transfer routine
    Date key figure: Convert DATS format to DEC format
    Date Conversion in Flat File
    Transfer Routine ABAP
    conversion exit
    Date Conversion
    Problem with  conversion char to numc in transference rules
    conversion routine..?
    update routine
    How to call a function in Update Rules to reverse a key figure sign
    Need Sample Code for Update Rules
    Date calculation
    Difference between data in PSA and Data in Infocube
    No RETURNCODE <> 0 allowed in update routines in transfer mode
    the diffrerece between DEC and (yyyymmdd) 8 char in Time defination
    Access master data in update rules
    Date key figure: Convert DATS format to DEC format
    start routine in update rules
    Is it possible to read a third ODS in update rules between two ODS?
    update rule coding while loading data from ODS to CUBE
    Start Routine in Update Rules to populate additional fields from ODS
    Coding in Update Rules accessing a Z-Table
    Start routine
    Regards,
    Debjani...........

  • Start routine and update rules

    Hi,
    What is accessed first:-
    Start Routines or Update Rules?
    What is the use of global variables in start routine?
    Please reply.
    Thanks.

    Hi......
    You have different types of Routines in BW .
    1) Start Routine in Transfer Rules
    2) Transfer Routine in Transfer Rules.
    3)Start Routine in Update Rules
    4)Update Routine in Update Rules.
    The routines that you write in transfer rules are applicable to all the Data targets that get the data from that particular Infosource, when you are going to write some code in Transfer rules, you have to understand that you are going to manupilate the data that is going to get into BW .
    If you are going to write in Update Rules , then that logic is going to apply only for that particular Data target .
    Eg : Let suppose I have a Flat file that gets data from 3 countries, US, Canada and Mexico.
    Now I have prepared the data source for the same . But I dont want to have the data of Mexico in to BW itself.
    So I will write a Start routine at TR to eliminate the data of Mexico.
    My Next step is I want the data of US into one ODS and Canada data in to another ODS.
    For this I handle the dataflow at Start routine in Update rules, to eliminate Canada data for US ODS and Vice Versa.
    Global variables in Start routine
    You can have global variables, internal tables populated by the
    startup routine. This data will be available to the field
    routines. Create yourself a start routine, declare some
    variables in the global section, and then create a field
    routine. You will be able to use the globally declared objects
    in the field routine
    Please check below help link for routines in sap netweaver 2004s
    http://help.sap.com/saphelp_sem60/helpdata/en/e3/732c42be6fde2ce10000000a1550b0/frameset.htm
    How to guide "How to transformations routines".Please check the below link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/dc1d9990-0201-0010-16aa-db3c4eb8b642
    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 ..
    transfer routine
    Date key figure: Convert DATS format to DEC format
    Date Conversion in Flat File
    Transfer Routine ABAP
    conversion exit
    Date Conversion
    Problem with  conversion char to numc in transference rules
    conversion routine..?
    update routine
    How to call a function in Update Rules to reverse a key figure sign
    Need Sample Code for Update Rules
    Date calculation
    Difference between data in PSA and Data in Infocube
    No RETURNCODE <> 0 allowed in update routines in transfer mode
    the diffrerece between DEC and (yyyymmdd) 8 char in Time defination
    Access master data in update rules
    Date key figure: Convert DATS format to DEC format
    start routine in update rules
    Is it possible to read a third ODS in update rules between two ODS?
    update rule coding while loading data from ODS to CUBE
    Start Routine in Update Rules to populate additional fields from ODS
    Coding in Update Rules accessing a Z-Table
    Start routine
    Hope this helps you..........
    Regards,
    Debjani.........
    Edited by: Debjani  Mukherjee on Oct 1, 2008 4:58 PM

  • Error while copy of Update Rules from ODS 0SD_O03 to InfoCube 0SD_C13

    Hi all,
    I work on a NW04s SPS9 System I would like to simply copy Update Rules (from an ODS to an InfoCube) from the BCT to the 1:1 Z-Copies of these Objects.
    To do so, I copied the InfoProviders 0SD_O03 and 0SD_C13 to Z-Versions. In SAP BCT the InfoCube is updated from the ODS. The ODS itself is updated from InfoSource.
    After successfully copying the two InfoProviders as next step I tried to copy the Update Rules from the Content version Objects to the Z-Version Objects to link them.
    Similar to copying update rules in 3.5 I tried
    - right click on "ZSD_C13"
    - choose Additional Functions - Create Update Rules"
    - choose DataSource: ODS Object "ZSD_O03"
    - choose Copy from: InfoCube "0SD_C13"
    This result in the error "0SD_C13 is not suitable as a template for copying update rules".
    Some hints that might help:
    1. The very same error occurs if I try to copy the Update Rules from 0SD_O03 to 0SD_C13.
    2. I also tried to copy both Update Rules (to C12 & C13) on a BW 3.5 system where it worked fine: The update rules from both Z-ODSs to both Z-Cubes were copied correctly 1:1 and without any errors.
    3. In the NW04s System I was able to copy the Update Rules from the InfoSource 2LIS_11_VAITM to 0SD_O01 (as well as from 2LIS_11_VAHDR to ODS 0SD_O03). So I only cannot copy Update Rules from ODSs to InfoCubes while it is possible to copy Update Rules from InfoSources to ODSs.
    4. During copy of 0SD_O03 the system warned: "InfoObject 0FISCVARNT needs to be in key for DataStore object ZSD_O03". No matter whether I move this IO to the keys of the Z-ODS, the Update Rules copy does not work.
    - This warning does not show up on BW3.5 when I copy the very same ODS. Can anyone explain this?
    - This warning is not displayed during the copy of ODS 0SD_O01, just for 0SD_O03.
    5. Obviously during a preceding test I actually must have been able to copy the Update Rules for another copy of 0SD_C13 (as I can see the Update Rules in the SAPGUI). I stopped this first test as I was not able to do the Update Rules copy for 0SD_C12.
    Yet as of today I cannot copy Update Rules this for both cubes 0SD_C13 as well as 0SD_C12. So yesterday there was no error on copying the Update Rules to InfoCube ZSD_C13, but today there is. To my knowledge nothing has been changed in the System Setup / Customizing in the mean time.
    6. For both cubes ZSD_C13 as well as ZSD_C12 it is possible to copy Update Rules that map from the BCT ODS to the Z-InfoCbes. So I can copy Update Rules from 0SD_O03 to ZSD_C13 and from 0SD_O01 to ZSD_C12. This would point in the direction that the copied ODSes are the source of this behavior?
    I am not sure whether this is a special NW04s behavior and how to use it correctly so the Update Rules can be copied.
    Please could you help on how to copy these Update Rules in NW04s or share your experience if you had similar?
    Thanks a lot,
    Werner

    Hi Vinod,
    Check the update rules for the original cube. Are they active? It appears that they contain a formula...check this too.
    Hope this helps...

  • Data not loading /updating into cube 0lc_c03

    Dear Friends,
    I extracted data for three data sources i.e. 2lis_03_bx,
    2lis_03_bf,2lis_03_um i got data in BW PSA with out any
    error but that data is not updating in cube 0lc_c03
    i have done settings at r/3 at t.code mcnb,SBIW and I had make NDI flag active at t.code FIBF. do i need to right.
    at SBIW I have done like this settings: Inventory controlling
    1,Determine Industry sector I have selected Standard (core).
    2,Transaction key maintenance for SAP BW I have selected application MM and operat all i.e. 0,1,2,3,4,5,6........all of MM and saved
    3,Then stock initialization.
    and deleted setup table data for inventory controlling
    and after assigning keys I again loaded setuptable.
    I am geting data in r/3 rsa3 and in BW PSA with out errors for all three data sources but not geting in cube
    but at data source 2lis_03_um update rules there are few key figures with out green light i.e. 'x' but update rules are active please guide me do ineed to write
    any update rule level routines please guide me.
    please guide me how to get data into cube.
    Thanks in Advances
    rafeeq ahmed
    <b></b>

    Hi rafeeq,
    Are you using business content update rules or custom.
    check each rule seperately. do a simulation on the data load, if you feel the update rules are correct.
    Check if your validity table is maintained.
    hope it helps.
    kris

  • Update Rule - Logic to lookup

    The daily Inventory Cube stores the values (populate via a routine in the Update Rules) of some key figures
    I want to use those key figure values in another ODS.  Can I carry out a lookup in the UR for these values if so how? Thanks

    hi Niten,
    take a look sample codes
    Is it possible to read a third ODS in update rules between two ODS?
    Restriction of data selection in update rule start routine.
    Start Routine in Update Rules to populate additional fields from ODS
    hope this helps.

Maybe you are looking for

  • Why can't I get instagram on my ipod 5th gen

    I tryed to get instagram on my ipod but it did not work I searched for it and it showed up just wouldn't let me get it

  • Problem setting up an Online Number

    I've tried to order an online number. About 1 hour later I received the message "Unfortunately, we can't set up an Online Number for you in Germany." Since my paypall account has already been charged and the amount has not been yet refunden I dont kn

  • Storing expense report creation date and showing in PDF document

    Hi, We have implemented ESS buisness package 1.0. In travel and expense.. travel expense PDF form is generated..which is PDF form from ECC..form name is PTRV_EXPENSE_FORM.. i want to modify this...this form should store the day  when the expense repo

  • About oracle_home

    Hi, I'm trying to understand something. I have installed the oracle database 11gR2, so I have at HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\, an KeyOraDb11gHome_1 child node.. with many variables. Ok, then I have the Developer Suite 10gR2 installed, with als

  • Which one is the best practice!!

    hi all, i have one doubt with the lov can we show the data in the LOV by decode function or its better to write two LOV's based on the condition. which one is the best practice. right now i am using decode function. according to the condition the dat