Headstart Business Rule IN parameter changes value

I've created a Business Rule (CEV rule � triggered by create) with following code:
IN parameters: p_datum_van, p_cat and p_prest
cursor c_cap is select datum_tot
from cew_cat_prest
where . . .
and p_datum_van between datum_van and datum_tot
and datum_tot is not null;
l_datum_tot cew_cat_prest.datum_tot%type;
begin
dbms_output.put_line('BR5 p_datum_van '||p_datum_van);
open c_cap;
fetch c_cap into l_datum_tot;
if c_cap%found then
dbms_output.put_line('BR5 eerste controle p_datum_van '||p_datum_van);
update cew_cat_prest
set datum_tot = p_datum_van - 1
where cat = p_cat
and prest = p_prest
and datum_tot = l_datum_tot;
dbms_output.put_line('BR5 tweede controle p_datum_van '||p_datum_van);
update cew_cat_prest
set datum_tot = l_datum_tot
where cat = p_cat
and prest = p_prest
and datum_van = p_datum_van;
dbms_output.put_line('BR5 derde controle p_datum_van '||p_datum_van);
The updates are not executed correctly since p_datum_van changes !!!
Eerste controle: p_datum is correct
Tweede controle: p_datum has changed its value
What we do:
Record 1: van (from) 01/01/2003 tot (to) 31/01/2003
Record 2: van 01/02/2003 tot <null>
Add new record: van 15/01/2003
What we want:
Record 1: van 01/01/2003 tot 14/01/2003
Record 3: van 15/01/2003 tot 31/01/2003
Record 2: van 01/02/2003 tot <null>
Eerste controle: parameter p_datum_van = 15/01/2003
Tweede controle: parameter p_datum_van = 01/01/2003
Remark: if we use the TAPI procedure ups instead of updates, we have the same problem
How is it possible that an IN parameter changes its value during execution of a procedure ???

Tim,
Headstart should be able to check out any tables you need.
We think we have the user settings
done correctly, but there may be something that we
have missed. How can we get Headstart to
automatically check-out the table(s) for which we
want to run the Business Rules design transformer?The user settings you need are (see also pages 5-7 and 5-10 in the Headstart User's Guide):
- Under 'Process the following objects', choose 'Checked out by anyone'
- Also check the check box '... also Checked In objects'
- Choose whether you want to automatically check out with or without lock
If this does not help, please run the utility with log level 'Debug Detailed' (can also be set in the User Preferences) and report the last few lines of the log messages. They should give an indication of why the check out does not succeed.
Hope this helps,
Sandra Muller

Similar Messages

  • Headstart Business Rule Design Xformer utility

    When using the Headstart Business Rule Design Transformer to generate Business Rules, the table is required to be checked out. In previous releases, we have been told that an automatic check-out is performed on the table(s), but ours forces us to manually check-out the table definition, or it does not continue. We think we have the user settings done correctly, but there may be something that we have missed. How can we get Headstart to automatically check-out the table(s) for which we want to run the Business Rules design transformer? Or is this a bug in the current release? We are using Headstart release v6.5.2.3 (HSU_BRTR). Thanks.

    Tim,
    Headstart should be able to check out any tables you need.
    We think we have the user settings
    done correctly, but there may be something that we
    have missed. How can we get Headstart to
    automatically check-out the table(s) for which we
    want to run the Business Rules design transformer?The user settings you need are (see also pages 5-7 and 5-10 in the Headstart User's Guide):
    - Under 'Process the following objects', choose 'Checked out by anyone'
    - Also check the check box '... also Checked In objects'
    - Choose whether you want to automatically check out with or without lock
    If this does not help, please run the utility with log level 'Debug Detailed' (can also be set in the User Preferences) and report the last few lines of the log messages. They should give an indication of why the check out does not succeed.
    Hope this helps,
    Sandra Muller

  • Business Rule err The following value is not valid for the run time prompt.

    Hyperion Planning v 9.3.3
    I have created a new BR with 2 local variables (created at the time of the BR), Variables are set as run time prompts. They are created as "Member" (not Members). The BR basically does a calc dim on dense and Agg on Sparce other than the prompt on Entity and Version dimensions. The entity variable has a limit on level 0 of the dimension. The Version variable limits to the input (Submit and Sandboxes)
    The BR is associated in Planning with an input web form. Entity and Version are in the page. Is set to Run on Save and Use members on form.
    If the run time prompts Hide boxes are checked, an empty Prompt pops up with only a Submit button. Click the button and an error comes up: "The following value is not valid for the run time prompt it was entered for:. But it does not indicate what member - just ends in the :.
    The BR will run sucessfully only if the Run-time prompt is not hidden - "Hide" in the BR is unchecked. So the syntax and logic of the BR is correct and security should not be an issue.
    The client wants no prompt. In production we have similar situations in which the BR works with the Web Forms without a prompt.
    What am I doing wrong - I have tried restarting the Planning service and the EAS service.

    My preferred method of doing this is:
    1. In business rule, do not hide the run-time prompts. This makes it easy to validate the business rule as you are building it. I only use Global Variables.
    2. On the form, have business rule set to run on save, use members on data form and hide prompt.
    Check that in the business rule, for the variables (Run-Time prompts), that they are all in use. If not, delete them from the business rule. Are all your variables global? Are some local and some global? This could be the issue.
    Deanna

  • Changes to business rules in EAS not reflecting in planning

    Hi Friends,
    One of my client is facing the issue issue.Could anyone help on the issue.
    When a new business rule is created or changed in EAS, the changes are not reflected in Planning. A stop and restart of the service is required to see the new business rule or a change to a calculation.
    This is a consistent error we are having in development.
    Thanks in advance.
    Regards.

    Hi,
    First I would check to see if any patches relate to the issue you are having.
    I would then log the issue with Oracle to see if they can help any further and it could be a bug.
    It sounds like the cache may not be getting updated so planning doesn't see any changes, restarting clears the cache and objects are read directly from the database tables so you can the changes, that is just a guess though.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Multiple row update; CEV business rule parameters are not refreshed

    During a multiple row update, a business rule is fired for each row.
    This change event business rule must update the value of another column in the same table (and same row).
    Unfortunately, the parameters of the BR are keeping the values of the first row that has been checked. Since my parameter p_id always keeps the same value, I always update the same row.
    Does somebody have a hint on how to solve this problem ?
    I'm using Headstart R6i and Forms6i with Oracle9i DB.
    Thanks in advance for your help,
    Denis.

    I think that's how it works. I tried that with a variable where type is Members.
    It is not showing me a prompt when i select multiple rows. However works only for first row. (even if the menu is initiated from second row).
    Multiple rows selected, variable type is members. works only for first row in selection. (in 11.1.2.2) You can try log an SR and see what Oracle has to say.
    Regards
    Celvin
    http://www.orahyplabs.com

  • Business Rule in BPC 5.1

    Dear all,
    I got 2 questions regarding business rule:
    1. There are 2 types of business rule.
    Script-based = You write your own script ( MdX or SQL logic)?
    Table-based = The table is more like a parameter table. You configure the parameters in the business rule tables and use corresponding store procedure in some logic file to trigger the function.
    ex:
    You must setup the currency translation rule table and call SPRUNCONVERSION to execute currency translation function.
    Is this correct?
    2. According to the SAP BPC admin guide, the rule files will be converted to LGL file, is this still the same in BPC 5.1? I can't find any related LGL in the system.
    Best Regards,
    Jeff

    You're mixing termology and functionality.
    Business rules are configured under the application/business rule tab in administration.  They are SQL stored procecures that cannot be modified and are seutp using the business rules tables.  The values in the table are passed into the SP's as parameters.  SPRunConversion is an example of a business rules stored procedure.
    Separately, there is script based logic.  This is setup under the Applicaton/Script Logic tab in administration.  These are calculations that are written by the application administrator (a number of examples are provided) to peform calculations.  There is a script logic example (FXTrans) which perfroms the same process as SPRunConversion.  They are text based files which get "compiled" into executed code.  The file you write to is the LGF file.  This contains the source code along with comments and spacing for readability.  The compiled file has an LGX extension and is a text file which has extra spacing and comments removed and any *INCLUDE statements replaced with the underlying coce.

  • Hiding the business partner search parameter from search criteria

    Hi,
    I have business partner search parameter whose value is hardcoded in the lead search..
    I would like to hide the business partner search parameter from displaying only..
    I need to achieve it programatically and not in configuration and all.
    Do I need to write the code in P method or which method?
    Thanks
    Madhukar

    Hi,
    The code is as below and I just need to have the functionality of BP search field intact but hide it from display in web UI..if any correction is required let me know..
    ***current date is populated into LV_DATE
      DATA lv_date TYPE string.
      lv_date = sy-datum.
    ***current user login name is populated into LV_SUNAME
      DATA lv_suname TYPE string.
      lv_suname = sy-uname.
    ***Fetching the BP ID of the current user who logged into L_PARTNER
      DATA:l_partner TYPE bu_partner.
      CALL FUNCTION 'CRM_ERMS_FIND_BP_FOR_USER'
        EXPORTING
          iv_user_id = sy-uname
        IMPORTING
          ev_bupa_no = l_partner.
    ***structure for BUT051
      TYPES : BEGIN OF ty_data,
               relnr    TYPE bu_relnr,
               partner1 TYPE bu_partner,
               partner2 TYPE bu_partner,
               date_to  TYPE bu_datto,
             END OF ty_data.
    ***work area for BUT051
      DATA wa_but051 TYPE ty_data.
    ***Fetching Dealer BP ID which is 'PARTNER1' field in BUT051
      SELECT relnr
             partner1
             partner2
             date_to
      FROM but051
      INTO wa_but051
      UP TO 1 ROWS
      WHERE partner2 = l_partner.
      ENDSELECT.
    ***Geting the dealer BP ID into LV_DEALER
      DATA lv_dealer TYPE string.
      lv_dealer = wa_but051-partner1.
      DATA: lr_qs          TYPE REF TO cl_crm_bol_dquery_service,
            lr_search_node TYPE REF TO cl_bsp_wd_context_node_asp,
            lr_col         TYPE REF TO if_bol_bo_col ,
            lr_iterator    TYPE REF TO if_bol_bo_col_iterator ,
            lr_param       TYPE REF TO if_bol_bo_property_access,
            ls_selection   TYPE genilt_selection_parameter,
            lv_low         TYPE sy-datum,
            lv_attr_name   TYPE name_komp ,
            lv_value_set   TYPE abap_bool .
      IF iv_first_time EQ abap_true.
    * to initialize the search view.
        CALL METHOD super->do_prepare_output
          EXPORTING
            iv_first_time = iv_first_time.
    * fetch the search node and its content.
        lr_qs = me->get_current_dquery( ).
        lr_col = lr_qs->get_selection_params( ).
    * check the currently visible search attributes.
        lr_iterator = lr_col->get_iterator( ).
        lr_param    = lr_iterator->get_first( ).
        WHILE lr_param IS BOUND.
    * get the parameters
          lr_param->get_properties( IMPORTING es_attributes = ls_selection ).
          IF ls_selection-attr_name = 'VALID_FROM'.
    * SET_PROPERTIES
            ls_selection-low = lv_date.
            CALL METHOD lr_param->set_properties
              EXPORTING
                is_attributes = ls_selection.
            lv_value_set = abap_true .
            EXIT.
          ENDIF.
          IF ls_selection-attr_name = 'BU_PARTNER'.
    * SET_PROPERTIES
            ls_selection-low = lv_suname.
            CALL METHOD lr_param->set_properties
              EXPORTING
                is_attributes = ls_selection.
                lv_value_set = abap_true .
            EXIT.
          ENDIF.
          lr_param = lr_iterator->get_next( ).
        ENDWHILE.
        IF lv_value_set EQ abap_false .
    * it was not part of the visible attributes, then add it at the end.
          CALL METHOD lr_qs->add_selection_param
            EXPORTING
              iv_attr_name = 'VALID_FROM'
              iv_sign      = 'I'
              iv_option    = 'EQ'
              iv_low       = lv_date.
          CALL METHOD lr_qs->add_selection_param
            EXPORTING
              iv_attr_name = 'BU_PARTNER'
              iv_sign      = 'I'
              iv_option    = 'EQ'
              iv_low       = lv_dealer.
        ENDIF.
    * for a proper display of the added / changed attribute.
        lr_search_node = get_dquery_cnode( ).
        lr_search_node->build_parameter_tab( ).
      ELSE.
    * non first time call - just delegate to superclass.
        CALL METHOD super->do_prepare_output
          EXPORTING
            iv_first_time = iv_first_time.
      ENDIF.

  • User Variable Options: How can I use them in a Business Rule?

    How can I use a "User Variable" set in File / Preferences in a Business Rule? It doesn't seem to appear as an Essbase Substitution Variable or as a Global Variable of Business Rules. The only way I know how to use it is to place the dimension on the POV or Page dimension of a data form, then use a Global Variable in a run time prompt to pick the member and run a BR against it, or some function of it.
    What do I do if I want to have that dimension in Columns or Rows? How can I set a BR to directly reference the member chosen under User Variable Options?
    J

    Thanks Alp, but I can't seem to reproduce what you are writing below. I want to refer my Business Rule to address the value set in File / Preferences / User Variable Options; no matter what members I show elsewhere in the data form.
    My other workaround is through a run time prompt and hope the user selects the appropriate user variable at the very bottom of the selection list in order to calculate the appropriate list of members.
    J

  • BPC 10.0 NW - How do I make Business Rules run one Period at a time

    I was wondering if anyone has a way to make business rules run one period at a time before moving on to the next to the next time period (i.e. January 2014 calc prior to moving on to February 2014).  In past SQL this could be achieved with a piece of script *CALC_EACH_PERIOD.  Is there anything like this that can be applied in the NW platform for Business Rules?  I have some logic that I want to run through a package on multiple periods at once.  Part of this logic contains a Business Rule that uses a value from the preceding period.  the Business rule appears to be calculating all time periods selected in the package at once so it is missing the piece that is supposed to come from the prior month unless the package is run one period at a time.  I need the logic to run sequentially by time period (oldest first) when more than one time period is selected.
    thanks,
    Keith

    Hi Vadim,
    Script for the business rule is below, it runs along with the FX_Trans rule in the same package  ( I have also attached a screen shot of the actual Business rule its self)
    *RUN_PROGRAM CALC_ACCOUNT CATEGORY = %CATEGORY_SET% ENTITY = %ENTITY_SET% CURRENCY = USD //GROUPS = %GROUPS_SET% TID_RA = %TIME_SET% //OTHER = [AUDITTRAIL=%AUDITTRAIL_SET%] CALC = CALC_HIST_USD *ENDRUN_PROGRAM
    Thanks, Keith Carlson

  • XMLDuration (Interval) in Business Rules

    Hello,
    Has anyone used the type XMLDuration in Oracle Business rules before? Basically I am trying to set an Interval in business rules and pass the value to a BPM process. How can i assert the value of an XMLDuration type in Business rules?
    thanks,
    Vikram

    Hi,
    thanks for your answers.
    But without variables I don't know if it's possible to do the following:
    I have a member dimension (that is from text type) and I want to access to it's content and, with some string treatment, reach to a member that I will FIX.
    How can I access to the content of the text dimension member?
    I give you the example:
    Let's supose that the name of the text dimension member is TEXTMEMBER.
    For Example if I use @SUBSTRING("TEXTMEMBER", 0, 3).
    If I write the member like the above I'm not reaching to the content of dimension member....
    Do you know how to do this?
    Regards,
    Rodrigo

  • User Variable in Business Rule or Global Variable

    I wanted to call the User Variable value of Planning application under the Globel Variable of Default Value. Example I have created one Globel variable under the Default value the user varible value need to pickup so any thought how I can do this.
    I know in the Form if you use &UsrVar this will show the user variable value in the Data form but it is not showing the User Variable value in global variable or inside the Business rule.It is giving an error message there is no substitution variable has been defined. Please explain.
    Thanks in Advance,
    Irsh
    Edited by: 818693 on 17 May, 2011 7:22 AM

    Hi,
    User variables are meant to be used in web forms and web forms only. You can certainly pass their values to business rules when you used them in POV or page section of the form during save. All you need to do is to create another business rule (local or global) variable in business rule on the corresponding dimension and use it in your business rule. If you enable running the business rule on save and using the form values for variables options in form properties, business rules would replace the values of business rule variables with the values that are set in user variables.
    Cheers,
    Alp

  • How to read Business Rule

    Hello Experts,
    Could you please help me in reading the Business rule:
    Here, how the values are getting calculated and getting flowed in FXImpact_AVG_P1 flow member?
    Please help.
    Regards,
    Apoorva

    Hi,
    this rule is applied to all members of your account dimension that have a RATETYPE property of END. The data is then converted by flow.
    The first line defines that all flows are converted at the END rate, which is stored in your rates cube. The converted amount is written to the source flow.
    The second row applies to either the flow with ID FCLO or with a DIMLIST property FCLO, which of these is true cannot be determined from looking at the rule. This (or these) flow(s) is (are) converted at the END rate as well, but the result is written to the FXImpact_AVG_P1 flow.
    The third row applies to either the flow with ID FOPE or with a DIMLIST property FOPE. The flow is converted at the AVG and the result is written to the FXImpact_AVG_P1 flow.
    The fourth row applies to either the flow with ID ID FOPE or with a DIMLIST property FOPE. The flow is not as such converted but any amount already in group currency is kept (rule [AS_IS]) but multiplied with a factor of -1. The result is written to the FXImpact_AVG_P1 flow.
    The fifth row applies to either the flow with ID FCLO or with a DIMLIST property FCLO. The flow is converted with the negative of the AVG rate. The result is written to the FXImpact_AVG_P1 flow.
    So, the FXImpact_AVG_P1 flow is calculated as:
    FCLO at END rate + FOPE at AVG rate - FOPE as already in the system times minus 1 - FCLO at AVG rate.
    BR,
    Arnold

  • Validate message multiple records in Business Rule

    I have Order message as below:
    <Orders>
    <Order>
    <Header>
    <BillToID>001</BillToID>
    <ShipToID>002</ShipToID>
    <Id>Order001</Id>
    </Header>
    <OrderLine>
    <Id>Line001</Id>
    <Date>2015-01-01T00:00:00</Date>
    <Qty>10</Qty>
    <Status></Status>
    </OrderLine>
    <OrderLine>
    <Id>Line002</Id>
    <Date>2015-01-01T00:00:00</Date>
    <Qty>15</Qty>
    <Status></Status>
    </OrderLine>
    </Order>
    <Order>
    <Header>
    <BillToID>002</BillToID>
    <ShipToID>003</ShipToID>
    <Id>Order002</Id>
    </Header>
    <OrderLine>
    <Id>Line003</Id>
    <Date>2015-01-01T00:00:00</Date>
    <Qty>5</Qty>
    <Status></Status>
    </OrderLine>
    <OrderLine>
    <Id>Line004</Id>
    <Date>2015-01-01T00:00:00</Date>
    <Qty>65</Qty>
    <Status></Status>
    </OrderLine>
    </Order
    </Orders>
    I want to use Business rule to check Quantity value and update status for the order line, that if quantity < 10 set the status to Approved, if quantity between 10 to 50 then set status to Pending, if quantity > 50 need to set the status to Reject.
    The business is simple, if the Order message just have one record, but when the Order message that contain multiple record the business rule just get the first quantity and set the status value. 
    Anyone have any idea to implement with that requirement?
    Thanks in advance!

    Have a look into the below articles and let us know if you face any further issue.
    They are addressing a similar issue
    http://www.neudesic.com/blog/apply-bre-rules-looping-data-dynamic-policy-execution/
    How to construct BRE "Condition" on multiple repeating record
    Thanks,
    Prashant
    Please mark this post accordingly if it answers your query or is helpful.

  • How to Change Value set Dynamically for a Parameter in Apps?

    Hi All,
    I have a requirement where i need to change the value set dynamically for a given Parameter. This goes as, I have a Concurrent Program with 4 parameters. First Parameter is mandatory Business group.Second Parameter is Warehouse. Based up on the First parameter the second parameters LoV's are displayed, the third and fourth parameters value sets are dependent up on the Second parameter value. Parameter 2,3,4 Value sets are Table type. So i Used .$FLEX$.Value_setname to retrive the LOV's
    The Requirment now is that if the User doesn't enter the Parameter 2 than the Third Parameter field must be Open and he must be able to enter the Free text. In my case it is an Order Number. If the User enters the paramter 2 value than LOV's for ORder number pertaining to that Warehouse must get displayed. I've figured that this can be possible only if i change the Valuesets Dyanamically. I'm not sure if that is possible or not.
    I have tried :
    Using a Dummy Parameter with a new valueset(Transactable Independent) and giving Y and N based up on Warehouse parameter input.
    SELECT (DECODE ( :$FLEX$.WAREHOUSE_NAMES,NULL,'Y','N')) from dual;
    The default type was SQL.
    Then in the 3rd Parameter i have used Case function to differentiate Y or N. The third parameter being ORder number, is a table type and derived from Oe_order_headers_all.
    In the Query section i tried using dummy parameter value set to retreive the values. I was terribly Unsuccessful in doing so.
    Does the above Case exists or is Doable? Please, Help me out if somone had worked on Similar thing or have any idea of standard report/program using it in Oracle.
    Thanks alot for the Help!

    You will probably have better luck on the eBusinesSuite forum. This is more of a setup issue when defining your LOV and program parameters than it is a SQL or PL/SQL issue.
    http://forums.oracle.com/forums/category.jspa?categoryID=3
    Good luck - this is an aggravating issue to work with and I wish I did have the answer for you!

  • Reverse Sign in Business rule Parameter

    Hi Guys,
    Can anyone give me some scenario where we can use reverse sign in  the business rule (Checked). Why we change the sign of the account.
    Source Account                      Destination Account                        Reverse Sign
    1030200000                             1030200000
    Thanks...

    Hi,
    This helps you to adjust the signs when you are posting values from one ACCTYPE account to another.

Maybe you are looking for

  • How to Create a Page LOV Template and a Region LOV Report Template in APEX

    Hi All, Thanks in advance .. I am new to APEX , Currently working in APEX 3.2 Can any one please guide me How to Create a Page LOV Template and a Region LOV Report Template in APEX So that I can create dynamic Multi column LOV in APEX Cheers Sachin

  • Creation of BDC for a part of process.

    Hi, We are creating a BDC for PA40 action. It has a series of Info Types which come one by one. Now our requirement is to skip the last Info Type and create a recording for the process. is this possible. We require this as the last Info type is Pensi

  • Bridge CS4 won't open .NEF file in camera raw

    It says because photoshop CS4 does not recognize this type of file. I've opened plenty of Nikon .NEF files in Bridge. The difference is this is a D90 file and I've been getting D80 files. Is there a patch for newer camera models?

  • How to debug idoc?

    I want to find the additional custom developments done to send a sales order idoc via i-003 and not any other interface.can u suggest how to find it easily by debugging?

  • To restrict overdelivery tolerance up to a certain limit while creating PO

    Dear friends, How to restrict overdelivery tolerance up to a certain limit (e.g. 5 or 10%) in delivery tab while PO creation? Any idea? Regds Amitava