Update rule problem for date in Prod

My scenario is like this:-
ODS 2 is loaded from ODS 1, in ODS 1 there is a data field calendar day (DATS, time characteristic) and there is a data field posting date (DATS, characteristic) in ODS 2. In the update rule, the posting date is updated from calendar day by a formula source. 
The problem is the posting date data field is updated into ODS 2 correctly in development box but it is not updated (blank) in production box.  I can't figure out what is the cause, hopefully someone can give me some help.  Thanks.
Cheers!
Cecil

The only different is the development system is having this part of code in the update rules program compare to production system.  Do I need to compile the update rules formula manually?
*This ABAP Code was generated automatically          *
*Formula Calculator                                  *
*Generated :2008:09:12-10:47
*User: XXX
*Calculation:
result = COMM_STRUCTURE-CALDAY.
  ENDCATCH.
  if sy-subrc <> 0.
    perform error_message using 'RSAU' 'E' '507'
            'ROUTINE_0004' g_s_is-recno
            rs_c_false rs_c_false g_s_is-recno
            changing c_abort.
  endif.
Cheers!

Similar Messages

  • Update rule problem - while data load

    Hi friends,
    I got the following error while doing initialisation for 2lis_02_sgr.
    "ABORT was set in the customer routine 9998
    Error 1 in the update "
    In the forum i searched for this error and this error is something related to the start routine in my update rule.
    But i dont know whats wrong with my routine.
    Im giving the start routine below,pls go through this and give me your suggestions..
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    <i>TABLES /bic/AZMM_PUR100 .
    DATA:  T_PUR1 LIKE /bic/AZMM_PUR100 OCCURS 0 WITH HEADER LINE.</i>
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CS2LIS_02_SGR.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    if abort is not equal zero, the update process will be canceled
      CLEAR: T_PUR1[] ,
             T_PUR1,
             ABORT.
      SELECT * INTO TABLE T_PUR1 FROM /bic/AZMM_PUR100.
      IF SY-SUBRC EQ 0.
        SORT T_PUR1 BY DOC_DATE
                       DOC_ITEM
                        DOC_NUM.
      ELSE.
        MONITOR-msgid = sy-msgid.
        MONITOR-msgty = sy-msgty.
        MONITOR-msgno = sy-msgno.
        MONITOR-msgv1 = sy-msgv1.
        MONITOR-msgv2 = sy-msgv2.
        MONITOR-msgv3 = sy-msgv3.
        MONITOR-msgv4 = sy-msgv4.
        append MONITOR.
      if abort is not equal zero, the update process will be canceled
             ABORT = 1.
      ENDIF.
       ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Thanks & Regards
    Ragu

    thanks gimmo and a.h.p,
    i have done the correction as you said,pls verify that.
    And also kindly explain me what is the reason for this start routine,what exactly it does???
    CLEAR: T_PUR1[] ,
             T_PUR1,
             ABORT.
      SELECT * INTO TABLE T_PUR1 FROM /bic/AZMM_PUR100.
      IF SY-SUBRC EQ 0.
        SORT T_PUR1 BY DOC_DATE
                       DOC_ITEM
                        DOC_NUM.
    abort = 0.    (  added  abort = 0 as per your suggestion )
      ELSE.
        MONITOR-msgid = sy-msgid.
        MONITOR-msgty = sy-msgty.
        MONITOR-msgno = sy-msgno.
        MONITOR-msgv1 = sy-msgv1.
        MONITOR-msgv2 = sy-msgv2.
        MONITOR-msgv3 = sy-msgv3.
        MONITOR-msgv4 = sy-msgv4.
        append MONITOR.
      if abort is not equal zero, the update process will be canceled
             ABORT = 1.
    exit. ( added exit as per your suggestion )
      ENDIF.
       ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Thanks & Regards
    ragu

  • Update Rule Problem for conversion char values

    Hi all,
    I need to implement the following logic into the update rule:
    data: ch1(10) type c,
    ch(8) type c.
    ch = ch1.
    The value in ch1 can be only characters or only numbers. I am facing problem in converting this, as characters are left aligned and the numbers are right-aligned.
    Please guide.
    Thanks

    Another example can be:
    data: ch1(10) type c,
    ch(8) type c,
    ln type n.
    ch1 = '0000000010'.
    condense ch1.
    ch = ch1.
    write:/ ch1, '-----', ch.
    In this case, we get only 0 in ch field.
    Thanks,

  • Update rules only for the keys of a DSO

    Hi everybody,
    We have a problem after our recent migration to BI 7.0.
    In a transfer rule, the 0RECORDMODE is set to 'D' and in the update rules only the keys of the DSO are mapped. It's just for a deletion of data in the DSO.
    In BW 3.5, everything was fine but now it doesn't work anymore. Data are transfered but not inserted in the DSO.
    I've tried to affect a constant to a characteristic which is not a key in the update rules and the data are correctly inserted.
    Is it a normal comportment ?
    Any idea is welcome.
    Thanks in advance

    I think I have a similar problem.  I've got updates for iWork apps available after upgrading to Mavericks.  I've tried both my apple ID and my wife's but I get an error with both saying the software was purchased with a different ID.  I have no idea what ID that would be.  Is there anyway to check the ID the software is licensed to?

  • Update rule problem - validation of "sales/cost w/ tax" keyfigure

    BW Gurus,
        Hi to all, i have this update rule problem at "sales/cost w/tax" keyfigure here is the senario.
        Our Goverment mandatory implemented an additional 2% tax from the original 10%, this will affect our report on sales, and also the BW "sales/cost w/ tax" key figure.
        My question is How can I validated the effectivity of the new tax? i have tax 10% from previous sales and 12% on the current sales. What "date field" can I use to validated this. I am using /BIC/CS2LIS_13_VDITM stucture to get the data i need.
    Thanks in Advance
    Joven

    Hi,
    Till to day how are extracting the data for tax(original 10%) is it available directly in 2LIS_13_VDITM ?
    Usually all taxes( condition types) can be extracted by the data source 2LIS_13_VDKON.Discuss with SD team, they may give the condition type used for different taxes.
    With rgds,
    Anil Kumar sharma .P

  • Update rule/routine for 0PUR_C04

    hi experts,
    can someone give the update rule/routine for uploading 0ORDER_VAL(effective order value) into the cube 0PUR_C04 and the calculations for it?
    and also some explantion on how this effective purchase order value 0ORDER_VAL is calculated*??
    thanks

    Hi Surya,
    If you are using standard content for 0PUR_C04, you can get the update rule in standard update rules, which you can see in Business content on Metadata repository. For standard content four data source used to fill cube. Purchasing Group (2LIS_02_S011 ), Purchasing Data (2LIS_02_HDR), Pur.Data  (2LIS_02_SCL) and Purchasing Data (2LIS_02_ITM). The mapping for different update rules are done as:
    2LIS_02_S011: Direct Mapping
    2LIS_02_HDR: No Update
    2LIS_02_SCL: Routine (mm_convert_effwr)
    fill the internal table "MONITOR", to make monitor ent *ries
    IF ( COMM_STRUCTURE-PROCESSKEY = '001' or "Bestellu *ng
    COMM_STRUCTURE-PROCESSKEY = '011' or
    COMM_STRUCTURE-PROCESSKEY = '021' or
    COMM_STRUCTURE-PROCESSKEY = '004' or "LP
    COMM_STRUCTURE-PROCESSKEY = '014' or
    COMM_STRUCTURE-PROCESSKEY = '024' )
    AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
    AND COMM_STRUCTURE-ORDER_VAL <> 0.
    perFORM LOC_CURR_CONVERT
    USING COMM_STRUCTURE-ORDER_VAL
    COMM_STRUCTURE-DOC_DATE
    COMM_STRUCTURE-ORDER_CURR
    COMM_STRUCTURE-LOC_CURRCY
    COMM_STRUCTURE-EXCHG_RATE
    CHANGING RESULT.
    if the returncode is not equal zero, the result will not be updated
    RETURNCODE = 0.
    else.
    RETURNCODE = 4.
    endif.
    if abort is not equal zero, the update process will be canceled
    ABORT = 0.
    2LIS_02_ITM: No Update
    Hope this will give you some lead.
    Regards,
    Kams

  • 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

  • Simple creation of Update Rule from BW Data Source

    Hi guys,
       Pertaining standard SAP Business Content extractors
       I am referring to <b>InfoCube : 0PA_C01(Headcount and Personnel Actions)</b>
       I am attempting to<u> create </u>an <b>Update Rule</b> from <b>Info Source : 0HR_PA_PA_1(Headcount)</b>
       This <b>Info Source : 0HR_PA_PA_1(Headcount)</b> is connected to <b>BW Data Source</b>(Not R/3!) 0HR_PA_PA_1
       I have created an Info Package for this Info Source and managed to get 15 records{In Contrast to my 68800 Records from Info Source : 0HR_PA_0(Employee)}
       So, when I create an Update Rule to Connect <b>Info Cube: 0PA_C01(Headcount and Personnel Actions)</b> to <b>Info Source to Info Source : 0HR_PA_PA_1(Headcount)</b>, I get the following error
    ERROR : <b>IC=0PA_C01 IS=0HR_PA_PA_1 error when checking the update rules</b>
      Could you please also advice, why do I only get 15 records for Data Source 0HR_PA_PA_1 ?
      P/S : I am on BW 3.5

    Hey Rohini,
       This <b>Data Source: 0HR_PA_PA_1(Headcount)</b> is tricky to me because it`s a BW Data Source.
       Exact Error Message is as follows :-
      "<b>Error Message : RSAU461
        IC=0PA_C01 IS=0HR_PA_PA_1 error when checking the update rules</b> "
       My Exact Problem is that I don`t see any values for the following fields in my Info Cube : 0PA_C01(Headcount and Personnel Actions)
      Country;
      Country Code;
      Gender;
      Nationality;
      Language;
      Postal Code;
      Region;
      Position;
      Job;
      Payroll Area;
      Payroll Group;
      Pay Scale's;
      Pay Grade's
      This is because, this information is supplied by InfoSource : 0HR_PA_PA_1
      But I don`t have an Update Rule for this InfoSource in my InfoCube : 0PA_C01
      So, that's why I am attempting to create this additional Update Rule
    <i>  And also, could someone enlighten me why would SAP not include such a standard Update Rule when they have already idenfied those needed fields in a Cube ? This is suppose to be a STANDARD workable Business Content right ?</i>
      P/S: I have applied Note : 336229

  • Unable to map Update Rule with u201CMaster data attribu201D option

    Hi,
    Does anybody know the reason why sometimes, in update rules to an ODS, I cannot map an InfoObject with the option u201CMaster data attribu201D?
    I have the characteristic in the ODS, and for another update rule, to the same ODS, I am able to map this field correctly, but for a specific rule, the u201CMaster data attribu201D field appears in blank when I press F4.
    Strange this behaviouru2026
    Can anybody help me with this issue?
    Thanks,
    Best Regards,
    Joana

    Hi  Shanthi,
    I didn't insert the InfoObject as an InfoProvider.
    The problem is that I have two update rules for the same ODS object. For one I can map the characteristic correctly, and for the other, when I press F4 in the "Master Data Attrib", no characteristics appear.
    Thanks,
    Joana

  • Update rule problem - Urgent pls???

    Hi friends,
    Below is the code i used in my start routine of the update rule.
    Here im sorting the values and then for calday field im filling with the value if it is empty.
    eg:
    rec1>ord001>25.06.2006-->val1
    rec2>ord001>          -->val1
    in the second record im filling with date of the previous record.
    This logic is working fine.If i give any one order number.
    If i load all the values,it is not updating.
    I think this rule is not getting applied for all the datapackets..(something like that-any problem with looping???)
    Awaiting for your valuable suggestion asap..
    Thanks&Regards
    Ragu
    $$ begin of global - insert your declaration only below this line  -
    TABLES: /BIC/AZPP_O200.
    DATA:   zpp02 like /bic/azpp_O200 occurs 0 with header line,
            mcalday like sy-datum.
    Clear : ZPP02[],
              ZPP02,
              mcalday.
      SORT DATA_PACKAGE BY PRODORDER ASCENDING
                           COMPONENT ASCENDING
                           CALDAY    DESCENDING.
    Loop At DATA_PACKAGE.
             if DATA_PACKAGE-CALDAY ne '00000000'.
                mCalDay = DATA_PACKAGE-CalDay.
             else.
                DATA_PACKAGE-CALDAY = mCALDAY.
                MODIFY DATA_PACKAGE INDEX SY-TABIX.
                clear : mCalday.
             endif.
          EndLoop.

    I think that the metter happens when the first record is in a datapackage and the second in next one.
    In that case you have the matter.
    The only way you can do this right is managing data directly in PSA table befor loading.
    Also if you have two record with DATA_PACKAGE-CALDAY = '00000000' the secon is filled with '' because fo the clear.
    Hope it helps.
    Regards

  • Purchasing cube designing, update rule mapping for 0calday

    Hi All,
       Iam designing cube for Purchasing module in BW. Iam having doubt in mapping for 0calday in update rules, is it with document date or scheduline date. I have searched in SAP cube 0PUR_C01, it is mapped with 0SCHED_DATE( schedule line date). How the difference comes when we choose document date and schedule line date.
      FYI, we are using only schedule line data source, which is giving relevant information.
    Thanks,
    Ram

    Hi Ram,
    Please note:
    0SCHED_DATE: The schedule line date is the day on which the scheduled quantity of the material is to be delivered.
    0DOC_DATE: The date on which document has been craeted.
    Use the first one for purchasing.
    Thanks...
    Shambhu

  • Update rule on master data attribute

    Hi
    In my cube, I have a master data object  0COMP_CODE, which has attribute 0COMPANY.
    Additionally, in the same cube, there's:
    Master data object 0CUST_GROUP, which has attribute ZBUSPART
    Master data object 0CO_AREA, which also has attribute ZBUSPART
    I need to fill a characteristic ZTAXCODE (not a master data object) in the cube, with the following logic:
    If 0COMPANY is between 1 and 30, populate ZTAXCODE with value of ZBUSPART from 0CUST_GROUP
    If 0COMPANY is between 31-9999999, populate ZTAXCODE with value of ZBUS_PART from 0CO_AREA
    I guess this will have to be done in the update rule.  Right now I have 0COMP_CODE in the communication structure. How should the code be written to populate ZTAXCODE, with value of ZBUSPART, based on the value of the attribute of 0COMP_CODE - 0COMPANY?
    Any help with getting me started here would be appreciated...
    Thanks
    Marty

    In the start routine.
    First, for all data package select company code, cust_group and zbuspart from cust_group and store it in the internal table.
    Second for all data package select company code, co_area and zbuspart  from co_area and store it in the second internal table.
    Third for all data package select company and company code from comp_code and store it in the third internal table.
    Now in the update rule routine.
    read the third table and get the company for the company code and if the value which comes from this company is between 31 and 9999999 then read from second internal table otherwise read from the first internal table and update the result.
    hope that is clear.
    thanks.
    Wond

  • Sample code in Update Rule to restrict data selection?

    We used to restrict data selection in InfoPackage data selection, e.g., for company code range when loading data from a source system (e.g. EBP which is similar to R3), but somehow the company code range we set in InfoPackage data selection not working and we found actually it occurs on the source system side when running RSA3 on EBP side and input the company code range in RSA3 selection section, but still it extracts data beyond the company code range.  We don't understand why EBP data selection doesn't work, then we consider in update rule on BW to set the company code range.  We know in update rule, we can select Start Routine, formula, or routine to set the company code range.  But we would be appreciated if experts here can recommend which one is the most efficient to load data fast for data load performance reason and would be appreicated if you can let us know the sample code!
    Thanks in advance!

    hi Hari,
    I copy the whole code of the start routine below:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    Includes to update generic objects
    INCLUDE rsbctgn_top .
    INCLUDE rsbctgn_update_rules .
    INCLUDE rsbctbbp_generic_objects.
      The following section is prepared for you if you compound
      the business partner 0BPARTNER with the
      Source System 0BBP_SYS_BP or if you compound the organizational
      Unit 0ORGUNIT with the source System 0BBP_SYS_BP
    TYPE-POOLS: RRSV.
    Data: L_HLP_CHAVL_CMP       TYPE RSCHAVL.
    DATA:
           L_S_DEP       TYPE RRSV_S_DEP,
           L_T_DEP       TYPE RRSV_T_DEP.
      End of compound
    DATA: l_s_errorlog        TYPE rssm_s_errorlog_int,
          l_hlp_chavl         TYPE rschavl.
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CS0BBP_CONF_TD_1.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    delete data_package where 0comp_code < 'X300' OR 0comp_code > 'X6ZZ'.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.

  • Update Rule problem

    Hi frndz,
    I have one query regarding update rule.
    i want to ask you the question that while defining the routine on particular keyfigure is it requierd to maintain the sequence of the field as it is in cube.
    Like i am facing a starnge problem i have just now updated system to 3.5 now my problem is i have a master data material in that i have wriiten few update rule on specific fields,now when i am loading the data in material master data few of the material having the value others dont have.
    i think some problem lies in update rule i have checked correctly every thing is fine with the update rule,
    can any one suggest me why its behaving strangely.

    i have tried that but no where i am getting the problem.
    like after debugging i got the value correctly till the PSA but its not going correctly in data target.

  • Update rule problem in stock

    Hi
    I am working with inventory managemnt.I am facing few issues in update rules like:-
    1.I am not able to find coressponding source info objects for the customized one .
    2.I am not able to find the some of the charactertics mapped to their info objects in the charactertics tab in the key figures.
    3. I some how activate the update rule, but it is not showing data in the cube contents while the request is there.
    thanx in advance.

    The only different is the development system is having this part of code in the update rules program compare to production system.  Do I need to compile the update rules formula manually?
    *This ABAP Code was generated automatically          *
    *Formula Calculator                                  *
    *Generated :2008:09:12-10:47
    *User: XXX
    *Calculation:
    result = COMM_STRUCTURE-CALDAY.
      ENDCATCH.
      if sy-subrc <> 0.
        perform error_message using 'RSAU' 'E' '507'
                'ROUTINE_0004' g_s_is-recno
                rs_c_false rs_c_false g_s_is-recno
                changing c_abort.
      endif.
    Cheers!

Maybe you are looking for

  • Skipping to a specific place in a recursive function

    I wrote a recursive function that recurses Adding times, then calls go (). The entire function will call go () billions of times. When I call this function, I want to only run go () 5,000,000 times. It should run the first 5,000,000 go's if the Part

  • HOw to create a console in a GUI??

    Hi, i have redirectioned the java outoup to write in a file, it reacts perfectly to the system.out but when the new outpot becomes anything else as a printf nothing happens. Anyone knows if it could be that the console is not "flusing" the messages.

  • Forms60_path problem

    Respected all.. I am running about 8 applications developed in developer 6i and back end is oracle 9i. each applications forms are placed in separate folder. when i give path in register editor more than about 5 to 6 applications then oracle froms ru

  • Program compatibility, flash.ocx, player version 10.0

    Operating System: Windows Vista Home Premium SP2 32-bit Processor: Intel(R) Pentium(R) Dual  CPU  T2330  @ 1.60GHz (2 CPUs), ~1.6GHz Memory: 2038MB RAM Graphics Card: Mobile Intel(R) 965 Express Chipset Family Browser: Flock 2.5.6 Flash:  10.0.42.34

  • X61s color management

    Have just recieved a Thinkpad x61s with Win XP pro SP3,    There is one problem with it however, the screen seems "blueish" and not very varm. Ive read about others who had the same "problem" and fixed it with a color profile. This doesnt work for me