Use of comments in script logic / BADI

Hi,
Does anyone knows whether one can read the comments entered in an input schedule in a script logic or BADI? Depending on the text entered in a comment, a certain planfunction has to be executed during save ...
the user should be able to easily change a dimension value in an input schedule:
Product    Product group    Key figure 1     Key figure 2
A             A1                     10                       30
-> the user easily needs to change the product group from A1 into B1 . When doing so the values of key figure 1 and 2 need to be copied to the new product group and the original values on A1 have to be removed. we cannot set up the product group as a propoerty since one should be able to compare multiple versions with different assignments ... So we were thinking to add an additional comment column in which the new value can be assigned to. When save, it should read the comment and perform the planfunction ... Would this be possible?
D

HI D-
Possible, but you would probably need to create a Badi to accomplish all the logic...
For a start, you would need to be able to find the comments...the naming convention for the dynamic comment table is:
/1CPMB/application_set_prefixapplication_prefixCMT
The two character application_set_prefix can be identified from the table UJA_APPSET_INFO, and the two character application_prefix can be identified from the UJA_APPL table.   
Once the comment table is identified you could create a custom Badi to look up comment information to direct processing of specific records.   
Regards,
Sheldon Edelstein

Similar Messages

  • Problems when using RUNLOGIC Keyword in Script Logic

    Hello experts,
    I have a problem using RUNLOGIC keyword within Script logic. Both scripts are mentioned below.
    Following scenario:
    - combination of DESTINATION_APP and LOOKUP to multiply values from two source applications in order to to write results in target application
    - data volume in source application VALCHAIN are approx 187.000 records; source app SALES = 500 records
    - created data records in target application QUANTITIES are approx 204.000 records
    Running LOGIC01_QUANTITIES.LGF without "RUNLOGIC" keyword:
    - time to execute logic and write records: 10-12 minutes
    - created records 204.000
    Running LOGIC01_QUANTITIES.LGF via CALL_RUNLOGIC.LGF
    - script does not finish; system produces dumps
    - Tcode ST22 shows error messages called "TSV_TNEW_PAGE_ALLOC_FAILED" as well as "SYSTEM_NO_ROLL" as well as "CALL_FUNCTION_SEND_ERROR"
    Does anybody have a guess for that? Any answer appreciated.
    Thanks a lot!
    ==================================================
    CALL_RUNLOGIC.LGF
    *START_BADI RUNLOGIC
    QUERY=OFF
    WRITE=ON
    LOGIC=LOGIC01_QUANTITIES.LGF
    APPSET=FINPLAN_PERFORM
    APP=VALCHAIN
    CHANGED=PRODUCT
    DEBUG=OFF
    *END_BADI
    ===========================================
    LOGIC01_QUANTITIES.LGF
    *XDIM_MEMBERSET DATASRC=ITEMIZED
    *XDIM_MEMBERSET VERSION=%VERSION_SET%
    *XDIM_MEMBERSET TIME=%TIME_SET%
    *LOOKUP SALES
    *DIM DATASRC="OUTPUT"
    *DIM ITEM="IM_M02"
    *DIM QUANTU="QU_TO"
    *DIM MEASURES="PERIODIC"
    *FOR %LOOP_CENTER%=PC_1000,PC_2000,PC_3000,PC_4000,PC_5000,PC_6000
    *DIM C_%LOOP_CENTER%:PCENTER=%LOOP_CENTER%
    *NEXT
    *ENDLOOKUP
    *DESTINATION_APP=QUANTITIES
    *ADD_DIM COSELE=CE_NONE
    *WHEN PRODUCT.LG
    *IS "1"
      *WHEN MATERIAL
      *IS "MA_NONE"
        *FOR %LOOP_CENTER%=PC_1000,PC_2000,PC_3000,PC_4000,PC_5000,PC_6000
        REC(EXPRESSION=%VALUE%LOOKUP(C_%LOOP_CENTER%), PCENTER=%LOOP_CENTER%, ITEM="IM_M08", DATASRC="CALCULATED")
        *NEXT
      *ELSE
        *FOR %LOOP_CENTER%=PC_1000,PC_2000,PC_3000,PC_4000,PC_5000,PC_6000
        REC(EXPRESSION=%VALUE%LOOKUP(C_%LOOP_CENTER%), PCENTER=%LOOP_CENTER%, ITEM="IM_M05", DATASRC="CALCULATED")
        *NEXT
      *ENDWHEN
    *IS "1000"
      *WHEN MATERIAL
      *IS "MA_NONE"
        *FOR %LOOP_CENTER%=PC_1000,PC_2000,PC_3000,PC_4000,PC_5000,PC_6000
        REC(EXPRESSION=%VALUE%LOOKUP(C_%LOOP_CENTER%)/1000, PCENTER=%LOOP_CENTER%, ITEM="IM_M08", DATASRC="CALCULATED")
        *NEXT
      *ELSE
        *FOR %LOOP_CENTER%=PC_1000,PC_2000,PC_3000,PC_4000,PC_5000,PC_6000
        REC(EXPRESSION=%VALUE%LOOKUP(C_%LOOP_CENTER%)/1000, PCENTER=%LOOP_CENTER%, ITEM="IM_M05", DATASRC="CALCULATED")
        *NEXT
      *ENDWHEN
    *ENDWHEN
    *COMMIT

    Hello,
    This error comes up when there is no enough memory.
    How many members do you have in PRODUCT and how many parallel processes did you set up in PARALLELSCRIPT?
    Also, I'd suggest to put *XDIM_MEMBERSET PRODUCT = %PRODUCT_SET% in your LOGIC01_QUANTITIES.LGF script.
    Did you get anything in RUNLOGIC log? In UJFS you can find logs for every parallel process ran, name if it is just it's time stamp.
    Can you see from those what scripts ran and with what parameters?
    This should simplify resolution of your issue.
    Regards,
    Gersh

  • Use of Variable in Script Logic

    Dear All,
    We are working on a BPC Script Logic involving depreciation calculation, which calls an implementation of the BAdI BADI_UJ_CUSTOM_LOGIC. We are passing some parameters from the script logic to the BAdI. There are two parameters to be passed: an account number (Account in which the posting will happen), and the rate (rate with which depreciation will be affected). The parameters are stored in the Dimension member of the account dimension and need to be fetched from there. We are using the following piece of code to achieve this:
    *INCLUDE FUNCTIONS.LGF
    [#PERC] = PRO([%ACCOUNT_DIM%].CURRENTMEMBER,DEP_PERCENTAGE)
    [#DEPACCOUNT] = PRO([%ACCOUNT_DIM%].CURRENTMEMBER,DEP_ACCT)
    *START_BADI DEPR
    QUERY = ON
    WRITE = ON
    DEPACCT = [#DEPACCOUNT]
    PERCENTAGE = [#PERC]
    *END_BADI
    Here, FUCNTIONS.LGF contains the PRO function, which fetches the account and percentage properties from the account dimension member. Problem is, when we refer to the temporary variables within our code using the variables [#DEPACCOUNT] and [#PERC], we encounter a short dump for CX_SY_CONVERSION_NO_NUMBER. We suspect that instead of passing the parameter values, the logic is passing the variable name as the value. How do we rectify this? What is the correct syntax for passing such a parameter to the BAdI? Any ideas?
    Thanks in Advance,
    Sid

    Hi Ethan,
    Thanks for the answer. Unfortunately, even after trying out your solution with K2 variables, we are getting the same dump, this time the log says:
    An exception with the type CX_SY_CONVERSION_NO_NUMBER occurred, but was neither handled locally, nor declared in a raising clause
    The argument '%PERC%' cannot be interpreted as a number
    We are starting to think that maybe only substitution variables can be passed as parameter to the BAdI call, because whenever we use a local variable, we end up in passing the variable name to the BAdI, and not the variable value. We digged through the SAP Help, following is the excerpt from there:
    Run the following instruction to call custom ABAP programs: where filter_value_of_your_BADI_implementation is the name of the filter you provided during the BADI implementation of UJ_CUSTOM_LOGIC BADI.
    *START_BADI <filter_value_of_your_BADI_implementation>
    <key1> = <value1>
    <key2> = <value2>
    *END_BADI
    where filter_value_of_your_BADI_implementation is the name of the filter you provided during the BADI implementation of UJ_CUSTOM_LOGIC BADI.
    Does this mean we can only pass <key>:<value> pairs, and not <key>:<variable> pairs? Is there any instance / documentation which points to this (or the contrary)?
    Awaiting answers.
    Thanks and Regards,
    Sid

  • Changing Work Status using data package or script logic

    Is it possible to set Work Status using Script logic, or an SSIS package.
    I know status is kept is an SQL table, is it possible to just update the locking table with a new record, or is there more to changing the work status.
    Thanks for you help

    Thanks for your reply. This would be a nice enhancement.
    Although the work status does help with the audit trail of who and what locks the data, doing it automatically will allow the system to automatically unlock the period when it is opened before auto-loading the current closing balances. It will need to be carefully used in order to maintain proper audit trail of the data. When done automatically, the system userid would be used in the lock table witha  timestamp.
    I am needing to know if there are anyother steps involved in locking data other than writing to the SQL lock table. Is usppose this is especailly relevant when locking a parent and pushing the status to the children.

  • Use of LEFT in Script Logic

    I am having one doubt reagrding usage of excel function like LEFT, MID, RIGHT in script logic of SELECT Statement.
    Let me know with example if its possible.
    I tried the below statement:
    *SELECT(%EQACC%,"ID","ACCOUNT","LEFT(ID,6)='BE9001' AND CALC='N' AND ID<>'BE9001010'")
    But it throw the error as "invalid select statement"
    Anurodh

    Anurodh,
    what you are trying to do is not supported. As a workaround you can try to create a new property in the dimension (for example IDSHORT), putting in this filed just the first 6 characters of the ID and you can filter on it like in the following example:
    *SELECT(%EQACC%,"ID","P_ACCT","IDSHORT='CE0004' AND CALC='N'")
    Regards,
    Simmaco

  • Custom Measure in Script logic

    Hi,
    We have a custom measure created which is more or less the same as the YTD, but it starts not at the beginning of the year, but instead it starts at a given month.
    The measure creation was ok and we can use it perfectly well in reports and input shedules and the cumulation of data is ok.
    However, if we want to use this measure in a script logic it does not work.
    - Validating the script in the admin console goes fine
    - Executing the script gives the error:
             - Root element is missing
    - validating in UJKT gives the erro:
            - UJK_VALIDATION_EXCEPTION:Invalid Measures value: "T_232"
    The script we try to use is below. If we change the LTD (our custom measure) by YTD it works perfectly fine:
    *XDIM_MEMBERSET BUILDSTATE=NABS
    *XDIM_MEMBERSET BUSAREA=V1
    *XDIM_MEMBERSET CATEGORY=FCSTCUR
    *XDIM_MEMBERSET DATASRC=INPUT
    *XDIM_MEMBERSET ENTITY=201
    *XDIM_MEMBERSET MARKSEGM=NAMS
    *XDIM_MEMBERSET ORIGIN=OBOOK
    *XDIM_MEMBERSET PRODUCT=ELEVATORS
    *XDIM_MEMBERSET PROFCENT=201251
    *XDIM_MEMBERSET RPTCURRENCY=LC
    *XDIM_MEMBERSET SALESORG=SO_201
    *XDIM_MEMBERSET TECHPLATF=NATP
    *XDIM_MEMBERSET TIME=2010.OCT
    *XDIM_MEMBERSET TYPE=T_PLAN0
    *XDIM_MEMBERSET NEBACCOUNT =BAS(T_232)
    *XDIM_MEMBERSET MEASURES=PERIODIC
    [NEBACCOUNT].[#A232]=([MEASURES].[LTD],[NEBACCOUNT].[T_232])
    *COMMIT
    Thanks for any input on this. We want to avoid going via a BADI!
    Kind regards,
    Christophe Posson

    Hi Christophe,
    I'm in a similar position to you and wish to avoid use of a BAdI if we can - despite the MDX parser engine being pretty pathetic at handling YTD or custom measures.
    Did you get a resolution to this? If so, could you please share it with everyone?
    As much information as possible would be apprecaited. Our next move is to contact SAP for confirmation that there is no possibility of using custom measures in Script Logic.
    Many thanks,
    Nick

  • Script Logic Keyword in BPC NW 7.0

    Hi All,
    As per the doc in SAP NW 7.0 version the stored procedures will not work and they are to be replaced with some related script logic key word.
    I searched for finding the same but i could not. Can any one help me in providing the equivalent script logic keywords for the stored procedures like SPRUNCONVERSION,SPICDATA,etc used in MS version.
    Is there any file containing the stored procedures and their equivalent script logic keyword or we need to search for it.
    Please Help me in this issue,
    Thanks in Advance,
    Regards,
    G.Vijaya Kumar.

    Vijay,
    Please take a look at the documentation for running business rules in script logic at the help.sap.com site ([link|http://help.sap.com/saphelp_bpc70sp02/helpdata/en/66/ac5f7e0e174c848b0ecffe5a1d7730/frameset.htm]). Every business rule type includes an example of a script logic section that will call the business rules.
    You may also want to do a search for information on programming custom script logic BADIs, which are the equivalent of custom stored procedures in the MS version ([one example|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e04b5d24-085f-2c10-d5a2-c1153a9f9346]).
    Thanks,
    Ethan
    Edited by: Ethan Jewett on Sep 3, 2009 7:27 AM

  • MEASURES in script logic

    Hi All!
    How can I use YTD measures in script logic? My aplication is PERIODIC ( YTDInput set to No) and I need in my script logic to use YTD values for some calculation. I tried following syntax
    *REC(EXPRESSION=([C_ACCT].[PLM],[MEASURES].[YTD]))
    but after validation error appears
    http://screencast.com/t/q2gChPrqbVXy.
    Please help, how to use measures dim in script logic??
    Regards,
    Justyna

    Full script not it is working fine after change *XDIM_MEMBERSET MEASURES=YTD to *XDIM_MEMBERSET MEASURES=PERIODIC
    *XDIM_MEMBERSET C_ACCT = VALCON_EN020
    *XDIM_MEMBERSET MEASURES=PERIODIC
    *WHEN_REF_DATA = MASTER_DATA
    *WHEN C_ACCT
    *IS VALCON_EN020
    *REC(EXPRESSION=([C_ACCT].[PLM],[MEASURES].[YTD]))
    *ENDWHEN
    *COMMIT

  • Multiple Script Logics in Default Logic.. order of execution... Commit

    Hi,
    I have a situation where I need to perform two activities...
    i) Perform a multiplication operation on the data input by the user - Script Logic A
    ii) Send the data at a summary level to another application. - Script Logic B
    Both Script logics are in the Default Logic
    User opens an input template and makes changes to a few Products (more than 1). I want the script logicA to execute completely (i.e. for all the models) and THEN Script Logic B to execute since Script Logic B summarises the data
    It seems like this is not how the system works.. Rather it goes thru Script Logic A and Script LogicB for the 1st Product, then the 2nd Product and so on...
    I tried using a commit after Script Logic A / before Script logic B and a few other options but to no avail... Any suggestions ???
    The other option is not to put Script Logic B in the Default Logic but to execute it separately... Worse case situation I'll use that option..
    thanks

    Hi,
    Have you defined the scope of the product for the two logics independently.
    Try that by including commit after the first logic. This should work.
    *XDIM_MEMBERSET PRODUCT=BAS(ALL)
    Script 1
    *COMMIT
    *XDIM_MEMBERSET PRODUCT=BAS(ALL)
    Script 2
    *COMMIT
    Hope this helps,
    Regards,
    G.Vijaya Kumar

  • Dimension Formula versus Script Logic that runs on default

    Hi Experts,
    Which is better to use dimension formula or script logic that runs on default? We have a lot of dimension formulas and when noticed that it has a huge impact in the performance of our AppSet. When we try to remove them, the performance seems better. We we're thinking of transforming these dimension formulas into script logic which will run by default instead. Right now I'm hesitant with two things, 1.) Will there be improvement in performance if I all these formulas are run at default via script logic? 2.) The maintenance seems to be much more complex for the user if we use script logic.
    Thanks,
    Marvin

    Hi Marvin,
    Actually you pointed very well the advantage and disantavage regarding dimension formula.
    Dimension formula are executed into run time which means that value are not calculated. Of course this will have an impact regarding performances.
    Usually our recommendation is to use dimension formula just when yoiu have KPI's to calculate which will be very difficult to be implemented into SQL scrip logic or when you have very simple calculation like Account A = Account B+ Account C.
    For other calculation we advice our customer to use script logic.
    But attention:
    Default formula should not become very heavy because you will arrive into other issue with performances.
    When you will send data if default formula script will be heavy you will arrive into situation to wait may be minutes just to send one figure and of course this will be not acceptable for users.
    So you have to use script logic but you have to run into batch mode (schedule package) that script logic.
    Into default formula you have to keep just minimum (you have to calculate just figures which have importance for user imediat, real time).
    Also you have to be aware that moving dimension formula into scrip logic actually your fact table will grow a lot because the number of records generated will be probably 3-4 times bigger than number of records from fact table with dimension formula.
    Maintenance of script logic is more complex than dimension formula and you pointed very well this.
    So it is a balance and I tried o provide you suggestions or best practice when you have to use dimesnion formula and you have to avoid dimension formula.
    I hope this will help you to arrive to best combination for your application.
    Kind Regards
    Sorin Radulescu

  • Use BADI or LGF script logic? Which is good in performance

    Hello,
    I have a situation wherein a choice is to be made among the "BADI" or "script logic" having DESTINATION_APP which is along with WHEN clause.
    Below is the code in which WHEN clause is used:
    Code Starts****
    XDIM_MEMBERSET CATEGORY=FC_CUR
    *DESTINATION_APP=GROSSMARGIN
    *SKIP_DIM =WEEK
    *ADD_DIM PLAN_PARTNER = PP_NA, RPTCURRENCY = LC
    *WHEN CATEGORY     
        *IS "FC_CUR"     
                  *REC(EXPRESSION=%VALUE%)
    *ENDWHEN
    *****Code Ends****
    The business requirement could be changing as we are at initial stage, wherein i may have to incorporate some data mapping logic which can also be handled through scripts instead of using BADI.
    The major concern is if BADI would be most prefferable over script logic having WHEN clause to acheive the optimal performance considering large no. of records that needs to be written to the target APPLICATION
    from the source application?
    OR
    The script with WHEN statement is fine if the data mapping is pretty simple and would not have much impact on performance compared to using of BADI even if the records to be moved is huge.

    If data mapping is simple you can opt for script logic . If requirement is complex then you can go for BADI . You can check this [How-to|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70187b3e-d5ce-2d10-d780-bb8b1a5b0bdc?QuickLink=index&overridelayout=true] 6 th page on performance considerations of BADI .
    A well designed BADI implementation is faster than script logic

  • Script Logic: Using a property in MDX *REC statement (BPC NW)

    Hi,
    Is it possible to use a Property in an MDX statement without using  *LOOKUP() function? I have script successfully working but it takes 15 minutes to execute and would like to speed it up.
    I understand that [DIMENSION].[MEMBER].Property is not valid syntax, and do not believe NW has any other functions to resolve the issue, except *LOOKUP which takes a long time.
    Specific Example is below:
    I have a piece of script that successfully splits JV Expense by customers. A Profit Share planning driver determines the percentage that each customer is entitled to. Typically this will be 100%, but could be 50% between two customers.
    The PROFIT SHARE planning drivers records, and PARTNER_INCOME transactional records are below:
    ACCOUNT
    ENTITY
    PARTNER
    SIGNED DATA
    PROFIT_SHARE
    UK_001
    PARTNER_A
    0.5
    PROFIT_SHARE
    UK_001
    PARTNER_B
    0.5
    PROFIT_SHARE
    UK_002_PLANNING_DRIVERS
    PARTNER_B
    1.00
    PARTNER_INCOME
    UK_001
    NO_PARTNER
    $5,000
    PARTNER_INCOME
    UK_002
    NO_PARTNER
    $5,000
    UK_001 has two partners that are each entitled to 50% of the $5,000 NET PROFIT.
    For UK_002, one one single Partner is entitled to 100% of the $5,000 NET PROFIT.
    Using script logic, you can scope the Profit Share account (PROFIT_SHARE) - , and use a *REC statement to multiply this by the driver. It would look like:
    *XDIM_MEMBERSET ACCOUNT = PROFIT_SHARE
    *WHEN ACCOUNT
    IS *
    *REC (EXPRESSION = %VALUE% * ([ACCOUNT].[PROFIT_SHARE],[PARTNER].[NO_PARTNER]), ACCOUNT = PARTNER_PROFIT_SHARE)
    *ENDWHEN
    This wouldn't be a problem if the Planning Driver is always stored on the same Entity that the Income is stored on, but for UK_002, the planning driver is stored on another Entity - which is stored in a the PLAN_DRIVER_REF property of the entity. It should use UK_002_PLAN_DRIVERS
    ID (Entity)
    PLAN_DRIVER_REF
    UK_001
    UK_002
    UK_002_PLAN_DRIVERS
    UK_002_PLANNING_DRIVERS
    In this scenario, we need to switch out the Entity used in the MDX, however I do not believe you can use a property in MDX - can anyone confirm?
    I have currently implemented the *LOOKUP functionality to loop through, changing each *LOOKUP partner for each loop.
    Lookup:
    *LOOKUP PLANNING_JV_US
    *FOR %LOOP_ASLS% = %ASL_LOOKUP_LOOP_VARIABLE%        
      *DIM LOOK_%LOOP_PARTNERS%:ACCOUNT = "PROFIT_SHARE"
      *DIM LOOK_%LOOP_PARTNERS%:PARTNER= %LOOP_PARTNERS%
    *NEXT
    *DIM ENTITY = ENTITY.PLAN_DRIVER_REF                   //   Use PLAN_DRIVER_REF Property of Entity
    *ENDLOOKUP
    Scope and *REC:
    *XDIM_MEMBERSET ACCOUNT = PROFIT_SHARE
    *WHEN ACCOUNT
    IS *
    *FOR %LOOP_PARTNERS% = %PARTNER_LOOKUP_LOOP_VARIABLE%      // 1000 Partners
    *REC(EXPRESSION = %VALUE% * LOOKUP(LOOK_%LOOP_PARTNERS%), PARTNER= %LOOP_PARTNERS%, ACCOUNT = TCOJVSHAR_CALC, AUDIT_ID = PP_EXPENSE_BY_PARTNER)
    *NEXT
    *ENDWHEN
    The problem with the above, is that because the Lookup is being generated for every single Partner, there are significant numbers of loops.
    Does anyone know of another way this can be implemented in Script Logic? Otherwise we'll need to explore BAdI route.
    Thanks,
    Nick

    Hi Nick,
    Use property in LOOKUP - will dramatically speed up the calculation without FOR/NEXT.
    Vadim

  • Referring to SQL comment table in Script Logic

    Dear all,
      If i have the following combination of dimensions, i.e. "DimA, DimB and DimC", and they will point to a comment in the comment table in SQL, how do i grab the [Comment] from the comment table to be used in my script logic.
      I was adviced to use *select statement, but i can't seem to get it to work.
      Any help is much appreciated.
    Cheers,
    Lip Chean

    Hi,
    *Select allows you to retrieve a list of elements from a dimension or table and save it in a user-defined variable for later use anywhere else in the logic.
    For example, with this instruction:
    *SELECT(%REPORTING_CURRENCIES%, u201CIDu201D, u201CCURRENCYu201D, u201C[GROUP] = 'REP'u201D)
    In this case, you retrieve the ID of all members in the CURRENCY dimension where the property GROUP has the value REP. Running this example fills the variable %REPORTING_CURRENCIES% with the list of reporting currencies defined in the current application.
    Important information
    xxx The SELECT statement generates a SQL query, and NOT an MDX query. This implies that it can be executed against any SQL table existing in the application set database, and not just against the properties of a dimension in the cube. The prefix "mbr" is automatically added to any name entered in the table parameter. Otherwise, the name of the table is taken as is. If
    you want to select a list of elements from a dimension using an MDX query use *MEMBERSET statement.
    xxx In case any parameter contains embedded commas the entire parameter must be enclosed in an extra set of double quotes.
    xxx The *SELECT statement is executed at the time the logic is validated, and the expanded result is written in the LGX file. This means that if the related dimension is modified, it may be necessary to re-validate the logic.
    xxx Statements returning no members do not necessarily cause the validation of the logic to fail. In this case a warning is entered in the validation log.
    xxx These instructions are not specific to a given logic section, but they can be written once anywhere in the logic and used across multiple commit sections.
    Hope this helps.
    Badrish

  • Reg: Selectively Commenting Script Logic

    Dear Experts,
    I have a situation where in the Default Logic file comprises of Allocation Logic and Currency Translation Logic, and it works fine.
    But for just one of my reports I have created an Data manager package for Allocation as it uses a different Dimension (Datasource dim instead of Product dim) when compared with the others (which are allocated based on Product).
    The allocation logic works fine if and only if i comment the Allocation Logic present in the Default logic file but this will prohibit the allocation in the remaining reports.
    Is there a way i can restrict the Allocation present in default logic and run only the manually triggered allocation without commenting in default logic so that it works fine for other reports as well.
    Please advice.
    Rgds,
    Rizwan

    I'm a little confused by your use of the word "reports." In BPC, I use the word "report" to mean something very simple -- a view into the data that is stored in the database.
    Any script logic that calculates values (for example, allocations or currency conversion) will post its results to the database. Once those results are in the database, any and all reports which point to those values will retrieve the same result. So it's not possible to have one report retrieve values that are impacted by a data manager package, while other reports ignore that data manager package.
    (However, as soon as I say that, I'll disagree with myself and say, yes of course it's possible -- in the most extreme case, create separate applications for the different business requirements. Or more frequently, use different members in datasrc or some other dimension to isolate the different values.)
    To solve your problem, you need to approach it in terms of the cube (OLAP) data structure, and then your final reports need to either include or exclude, as appropriate, the allocation results. I would recommend you not think in terms of making the code branch in different directions (based on some or other reports). Instead, the logic runs all the time, and the question should be, where do the logic results post to?
    For a very simple example, the currency conversion results always post to USD, EUR, etc. members of the RptCurrency dimension. This logic will never change the original (LC) values.
    For your allocation logic, the same approach can apply. Obviously you wouldn't use the RptCurrency dimension to differentiate the results, but perhaps a datasrc dimension (or something similar) can achieve the result you need.
    For instance think of a datasrc dimension which looks like this, one parent and two children:
    AllDatasrc
    -- InputData
    -- AllocResult
    The allocation logic only considers data in InputData, and posts the results to AllocResult. The other reports (which should not reflect the allocation) are focused on InputData, while the allocation report looks at AllDatasrc, or possibly even all 3 members to show the "before and after"
    Once you make that change, you need to decide how it impacts everything else in the application. The currency conversion logic, perhaps should now include both InputData and AllocResult. That's up to you to decide.

  • How to SIMPLY use the %DIMENSION_TO_SET% variables into logic scripts

    hello,
    I'm using a prompt of type "COPYMOVE" or "COPYMOVEINPUT". In this type of prompt, there are 2 columns of dimension members list, one for defining the "source zone" and one for defining the "target zone" of logics.
    The left colum of the prompt (for source zone) feeds the variables %DIMENSION_SET% : %ACCOUNT_SET%, %ENTITY_SET%, %CATEGORY_SET%, etc...and these variables can be used in the logic scripts in *XDIM_MEMBERSET instructions for example.
    The right colum of the prompt feeds the variables %DIMENSION_TO_SET% : %ACCOUNT_TO_SET%, %ENTITY_TO_SET%, %CATEGORY_TO_SET%, etc...and I don't know how to SIMPLY use these variables in the logic scripts.
    I've found a tricky way to do that but I meet 2 problems :
    - it is complicated
    - the multi-info instruction (BEGININFO/ENDINFO) seems to be bugged as blank lines are added all the time in the code and sometimes I have to wait for minutes when I try to modifiy the package code through BPC for excel eData/modify package menu.
    So the question is how to SIMPLY get the %DIMENSION_TO_SET% variables into logic scripts and use them ? Thanks, R.
    Here is the tricky package code I use at this time (I build one function for each %DIMENSION_TO_SET% variable and I pass these functions to the logic) :
    PROMPT(COPYMOVE,,,,"ACCDETAIL,ACCOUNT,CATEGORY,DATASRC,ENTITY,TIME,YEARS")
    TASK(Execute formulas,USER,WS-WW\PlauchuR)
    TASK(Execute formulas,APPSET,US)
    TASK(Execute formulas,APP,SV)
    TASK(Execute formulas,SELECTION,D:\BPC\Data\WebFolders\US\SV\PrivatePublications\PlauchuR\TempFiles\FROM_1561_.TMP)
    TASK(Execute formulas,TOSELECTION,D:\BPC\Data\WebFolders\US\SV\PrivatePublications\PlauchuR\TempFiles\TO_1561_.TMP)
    BEGININFO(%FSS%)
    *FUNCTION TARGETACCDETAIL=%ACCDETAIL_TO_SET%
    *FUNCTION TARGETACCOUNT=%ACCOUNT_TO_SET%
    *FUNCTION TARGETCATEGORY=%CATEGORY_TO_SET%
    *FUNCTION TARGETDATASRC=%DATASRC_TO_SET%
    *FUNCTION TARGETENTITY=%ENTITY_TO_SET%
    *FUNCTION TARGETTIME=%TIME_TO_SET%
    *FUNCTION TARGETYEARS=%YEARS_TO_SET%
    ENDINFO
    TASK(Execute formulas,FORMULASCRIPT,%FSS%)
    TASK(Execute formulas,LOGICFILE,D:\BPC\Data\WebFolders\US\SV
    ..\AdminApp\SV\_TEST.Lgf)
    TASK(Execute formulas,RUNMODE,1)
    TASK(Execute formulas,LOGICMODE,1)
    Edited by: ALEXANDRE BEDIER on Jun 16, 2010 3:15 PM

    hello,
    finally I've discovered that there is no need of BEGININFO instruction.
    One can pass several functions to a logic with one FORMULASCRIPT task. The functions definitions have to be separated by instructions. See below :
    PROMPT(COPYMOVEINPUT,%FTARGETS%,,"select source and target zone for category and datasource.","ACCDETAIL,ACCOUNT,CATEGORY,DATASRC,ENTITY,TIME,YEARS")
    TASK(Execute formulas,FORMULASCRIPT,*FUNCTION TACCDETAIL=%ACCDETAIL_TO_SET% *FUNCTION TACCOUNT=%ACCOUNT_TO_SET% *FUNCTION TCATEGORY=%CATEGORY_TO_SET% *FUNCTION TDATASRC=%DATASRC_TO_SET% *FUNCTION TENTITY=%ENTITY_TO_SET% *FUNCTION TTIME=%TIME_TO_SET% *FUNCTION TYEARS=%YEARS_TO_SET%)
    TASK(Execute formulas,USER,%USER%)
    TASK(Execute formulas,APPSET,%APPSET%)
    TASK(Execute formulas,APP,%APP%)
    TASK(Execute formulas,SELECTION,%SELECTIONFILE%)
    TASK(Execute formulas,LOGICFILE,%APPPATH%\..\AdminApp\%APP%\_TEST.LGF)
    TASK(Execute formulas,RUNMODE,1)
    TASK(Execute formulas,LOGICMODE,1)
    Then one will be able to use the functions TACCDETAIL, TCATEGORY, TACCOUNT,... in the logic script.
    Edited by: ALEXANDRE BEDIER on Jun 24, 2010 10:31 AM
    Edited by: ALEXANDRE BEDIER on Jun 24, 2010 10:33 AM

Maybe you are looking for