Calling script logic

Hey guys, I know how to create a custom script logic but lets say i have abcd.lgf file. Now can someone please tell me how to have the user run this script logic? I know that if i do #include abcd.lgf in default.lgf it will run automatically anytime user sends data. what about other ways?
Thanks.
Zack

Hi,
The script logic need to be linked to a SSIS package and this will be linked to the DM package.
You need not create a SSIS package from scratch. You can create a copy of an existing one (may be fx retatement). These SSIS packages are available in the server with the extension as DTSX. Create a copy of this SSIS package. Now in BPC excel, create a new DM package and link this to the copied SSIS package. Now go to the advanced script of the DM package. There you will be able to see a statement for logic. Maintain it as your script name.
Hope this helps.

Similar Messages

  • Calling  multiple  script  logics from  a  single  package

    Team- How  do i  call multiple  script  logics  from a   single  DM  package...?
    I   know  its  possible  and  have seen  a  prototype  but  cant  recollect  or  find  it on sdn...
    Thanks  for  your  time.
    Vishal.

    Hi,
    You can create a master script logic which will include all the other script logics using the *INCLUDE command and call this master script through your DM package.
    Another way is to have multiple tasks in the process chain which is calling a script logic. You can pass separate script logics to each of the tasks.
    I would prefer the first option
    Hope this helps.

  • Calling a script logic through Excel Formulas/Macro

    Hi All,
    Can anyone suggest how to execite a script logic directly from excel without users requiring to make any further selections
    Our business scenario is as follows:
    We need to run a script logic everytime, when data is saved from a particular template(Not from all the templates).
    Hence we cannot use the default logic. When the user clicks on the save button(it is a macro which sends the data to the server) it should also execute  that particular script logic without any further selections.
    Please suggest on this . Let me know incase any furher information is required on this.
    Thanks in Advance.
    Regards,
    Chandra

    Hi VinooGAN,
    Yes, I need to run the script logic for a specific set of accounts for which data is entered from a specific tenmplate.
    In other words, that scriptlogic has to be executed only when the data is sent from that particular template.
    We have a save button(Excel TAB) in the template which is  the macro to send the data after the user enters data in the sheet.
    So the macro lines should be such that, once the user clicks on that save button of that particular sheet, the script logic should also run(Without users having to make any further selections) automatically.
    Regards,
    chandra

  • Logical Error in Script Logic

    Hello Experts,
    Please provide your guidance for the following scenario.
    I need to calculate the 'Accumulated Depreciation' for every month, based on the amounts in the 'AccumDep' and the 'Depreciation' accounts.
    In other words, the value of the Accumulated Depreciation for the month of Feb should be equal to (Accumulated Depreciation in Jan + Depreciation in Jan), and so on.
    To accomplish this, I have written the following script logic.
    *WHEN ACCOUNT
    *IS AccumDep, Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(FACTOR=1, ACCOUNT=AccumDep, TIME=%MON%)
         *NEXT
    *ENDWHEN
    *COMMIT
    The above logic was validated without any 'syntax' errors.  However, I do not see the desired results, as the Accumulated Depreciation is not getting updated every month.  The amount from FEB appears for MAR & APR also.
    Therefore, could you please review the above script and let me know if there are any 'logical' errors?
    All your guidance is greatly appreciated.  Thanks...

    Hi,
    You are not getting the desired result because you are trying to aggregate the depreciation and the accumulated depreciation of the same month and post the result again in the same month. Lets say the code is working for 2009.MAR. You are trying to add the depreciation and accumulated depreciation of 2009.MAR. However, you still dont have the acc depreciation of 2009.MAR. You basically need to take the acc depreciation of the previous month.
    You can try something like:
    *WHEN ACCOUNT
    *IS Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(EXPRESSION = %VALUE% + ([ACCOUNT].[AccumDep],[TIME].Previous), ACCOUNT=AccumDep)
         *NEXT
    *ENDWHEN
    *COMMIT
    You can have a property called Previous to store the previous month of each period in the time dimension.
    Hope you got the idea.

  • Conditional Checking in Script Logic

    Could anyone please kindly enlightened me how I could code the following in the script logic?
    Scenario:
    IF A > 0, THEN B = C * D
    I have tried with SELECTCASE statement statement but all wouldn't work, I keep getting errors...
    SELECTCASE:
    *SELECTCASE [P_ACCT].[0005]
    *CASE > 0
             *REC(EXPRESSION= ([P_ACCT].[0004] * [P_ACCT].[0003]), P_ACCT=0001)
    *ENDSELECT
    Error:
    UJK_VALIDATION_EXCEPTION:Unknown or unimplemented keyword "*REC(EXPRESSION=IIF([MATERIAL].[LDG0005]=>0,([MATE"...
    Thank you very much in all advances.
    Best regards,
    Yen Li

    Hi Yen Li,
    Applying SELECTCASE - ENDCASE combination would not produce the desired results. Instead, use Validation Business Rules - by setting up Validation Rules and Validation Rules Details and run the Stored Procedure SPRUNVALID from the Default Logic to execute these validation rules. Call the Stored Procedure by the following syntax:
    RUN_STORED_PROCEDURE=SPRUNVALID(u2018applicationu2019,u2019categoryu2019,u2019currencyu2019,u2019%SCOPETABLE%u2019,u2019%LOGTABLE%u2019)
    Your command: u201CIf P_ACCT.0005 is > 0, multiply P_ACCT.0004 by P_ACCT.0005 and post the product in P_ACCT.0001. Otherwise do not do anything.u201D will be shown in result!
    Regards.
    Chakrapani

  • Substring in script logic

    Hi,
    We have a customer dimension, where we can extract a lot of information. However the information depends on the sales organization.
    Since the client currently have 30 sales organization and we can deduct information like: billing currency, sold-to-country and profitcenter from the combination of sales organization and customer this means I have to create 90 properties to hold this information (30 salesorg * 3 informations pr salesorg).
    Therefore I would like to concatenate the information in 1 property per sales organization. This however means I have to be able to make a substring on the property, e.g. in a select statement to retreive the relevant information (it is not possible to do it in the report, since the properties hold information I need to save the data).
    Does anyone know if this is possible?
    Thanks,
    Lars

    Hi Lars -
    Sorry, string manipulation commands are not available in script Logic.  You will need to call a BAdI from script logic and use the rich string manipulation tools available in ABAP.
    Regards,
    Sheldon

  • Concatenation in script logic

    Hi,
      I am using BPC 7.0 MS and i have a problem with the script logic.
      I have a combination of dimension, i.e. account=price, entity=big_state; and i have another combination of dimension, i.e. account=unit,sales , entity=country. The 'country' entity has a property called 'property1', and assuming one of the property member is 'state'.
      in a nutshell, i need to do a unit*price=sales, but they have different entities which are related through the property.
      below is what i have tried, and it's unsuccessful, i.e.my input schedule will always include combination of account=price,unit ; entity=big_state,country
    *xdim_memberset account=price,unit
    *when account
    *is unit
      rec(expression=%value%get(account=price,entity= big_ + entity.property1), account=sales)
    *endwhen
      i think it's the concatenation, i.e. entity=big_+entity.property1 that's making my script logic fail.
      any suggestions?
    Cheers

    Hi,
    You can try using something like:
    *WHEN CATEGORY
    *IS FACT
       *REC(FACTOR = 20, CATEGORY = FORECAST)
    *ENDWHEN
    Hope this helps.

  • Use of prompted hierarchy's base members in Script Logic

    Hello all,
    I have a data manager package which prompts the user for a dimension called P_BUDGET_MODEL. The prompt is SELECT hence the user selects a hierarchy node on this dimension.
    In the relevant Script Logic I have a variable %P_BUDGET_MODEL_SET%, which is automatically created by the system. I would like to run the logic for the basemembers of the hierarchy node.
    Please note - the basemembers are not direct children of the selected hierarchy node (i.e. the selected node is the "grandparent" of the basemembers).
    I tried the following simple logic command:
    *XDIM_MEMBERSET P_BUDGET_MODEL = BAS(%P_BUDGET_MODEL_SET%)
    It yielded a message that "Member BAS() does not exist".
    I have also noticed the following thread:
    [BPC 7.5 NW - HIER NODE in PROMPT using Formule in Package ?;
    If I understood properly it is not relevant to my case because the hierarchy is more that 2 levels deep.
    Any ideas?
    TIA
    Avihay

    Hi,
    As it seems after further investigation the problem is that I use "_" in the dimension names and variable names. This creates a problem to BPC in some cases.
    For example here there is no problem:
    *SELECT(%MODEL%,ID,P_BUDGET_MODEL,ID="%P_BUDGET_MODEL_SET%")
    Here there is a problem hence the use of [ ]
    *XDIM_MEMBERSET P_MONTH = BAS([%P_VERSION_SET%.YEAR].TOTAL)
    Here there is not "_" so the code is fine:
    *XDIM_MEMBERSET P_BUDGET_MODEL = BAS(%MODEL%)
    Strange yet seems that this was the problem...
    Avihay

  • 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

  • Script logic from BPC 5 in BPC 7.5

    Hi,
    I am trying to use some script logic from an appset in BPC 5 in BPC 7.5. When I validate the logic in 5 it works fine but in 7.5 I get validation errors.
    They relate to properties of dimension elements that are not currently used (neither in 5 nor in 7.5) but could well be used in the future. As an example, this bit generates an error
    *WHEN ACCOUNTL.RATETYPE
    *IS END,ENDFLOW
    I currently do not have an account defined with ratetype END but it is quite possible that there will be one in the future. And END is defined as an element in the RATE dimension.
    So, why did BPC 5 accept this and BPC 7.5 does not? And, is there a way around other than defining a dummy element in ACCOUNTL that used ratetype END?
    Thanks
    Edited by: ArnoldWarhonowicz on Aug 5, 2010 4:06 PM

    What I havenoticed is that with the new7.5 Script logic, there are more checks and balances performed during the validation.  So, if you have only AVG, ENDRATE on RATETYPE property and no END for any member, yet your logic is calling a set of members with this parameter, the logic fails to validate. I assume the process is checking for a set of END members based on the request. Since they don't exist, the error occurs.  But I would request that BPC Support verify the behavior as well.
    If you remove END, does the logic validate?
    Hope this helps.

  • Script Logic like a function

    Hi all,
    I want to execute a load of data from a year and actual version to year + 1 and budget version based in some assumptions filled in another input schedule. I thought that is possible using a script logic, so i create the script and i don´t know how to call it, Just from de the DEFAULT.LGF but is not my idea for this, cause every change in the data will execute this calculation....  Thats is the scenario:
    Input Schedule
    Time 2011.JAN
    ========== Budget
    Account%        5%
    Real data Query
    Time 2010.JAN
    ==========Actual
    Account1____100
    What i want
    Time 2011.JAN
    ============BUDGET
    ACCOUNT1        105
    There is another way to do that? I
    Thanks

    Hi,
    For executing a script logic, you need to follow few steps.
    1. Create an SSIS package to call your script logic in business intelligence development studio (BIDS) - (please refer to the SSIS package for currency conversion)
    2. Create a DM package to call the above SSIS package (please refer to the DM package for currency conversion)
    You can run the above DM package to execute your script.
    Hope this helps.

  • 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

  • How to run stored procedure IC Data / to define according script logic file

    We want to execute the stored procedure IC Data before the IC Booking. Could anybody tell me, how we have to define the script logic file in detail?
    We try it with this code (that runs without any error, but 0 rows are calculated, 0 rows are updated)
    *Run_stored_procedure=spicdata('%App%','%C_Category_Set%','%time_set%','','%entity_set%','','','Input','I','%logtable%','%scopetable%')
    *commit
    We also had tried with this code:
    *Run_stored_procedure=spicdata('%App%','%C_Category_Set%','%time_set%','','%entity_set%','','','','','%logtable%','%scopetable%')
    *commit

    step 1.
    Create a store procedure in back end.
    step2.
    Create a ssis package to execute the store procdure.
    step3.
    call this ssis pacakge in the data manager package and run the package.

  • 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

  • From where i can run script logic file.

    Dear All,
    I am new to BPC.
    I have a code for currency translation in my Script logic (Default.lgf).
    From where i should run this file. Can any help me.
    thanks a lot in advance,
    Regards,
    Satish.

    Typically the Currency rates are stored in the "RATE" application. This application is what the script logic or Business rule will call during the conversion process.  The rates are only stored by MONTH and by TYPE in a typical planning application.  If you need more granular rate details, then you may need to make you time dimension by weeks or days, or add more "TYPES" that are assigned to ACCOUNTs in th ecorressponding account dimension.
    But in a simple planning world, most companies will use a monthly rate, one for an AVG and one for END account types, enter this into the RATE application, and run the Defualt logic on submission of data to compile the FX value.  Whne you wish to view the results, make certain that you select the correct REPORTING CURRENCY in the report. Many time users forget that data is "normally" entered to an ENTITY,, the ENTITY defines the currency it assumes data is entered, so the plan is loaded to the "LC" member, and converted to USD; or entered in LC, and converted to RS.
    But the RATE application will store all the rates required and you may need to open the INPUT template in that application to load the data at the correct intersections.
    Hope this helps.

Maybe you are looking for

  • Error while loding intigration scenario from IR

    Hi , I am working with SRM XI MDM configuration with PI7.1 version I have installed the standard Component Called SRM_MDM_Catalog 2.0 in IR . I able to view all the interface and intigration scenario under that. But when I want to Import the same in

  • Error Code 4200

    Lately, when I try to burn a disc froma playlist, it barely burns a sliver and then it says: "Unable to burn disc, an unknown error occured [4200]". I've seen this problem all over the internet and none of the given solutions have worked. I tried to

  • Usage of Altova XML Spy

    Hi, My Scenario is IDOC-XI-SOAP Is there any chance to use the XML Spy here, What are all the possibilities to use the XML Spy and in which scenario's Regards Suman

  • Replacing Quicken

    I currently use a MacBook Pro with Parallels and Quicken for my financial data.  I am tired of having to upgrade both Parallels and Quicken and I feel like I'm being held hostage.  The problem is that I have used Quicken now for almost 15 years.  Whe

  • How can I find the "Accept" button to download Adobe Reader? I've downloaded it, installed it, can't find the 'accept button'. am using a Mac.

    need help in finding the 'accept button for downloading adobe reader. I'm using a Mac.