Script logic in default logic

Hello
How to include script logic in default logic?

There are two ways:
1. Direclty write the script in the default logic and the validate and save.
2. Create a new script and write the scipt code in that and the add that script name in default logic . e.g: * include (your script name).lgf

Similar Messages

  • Multiple script logics in default logic... can you control execution ?

    Hi Gurus,
    My default logic consists of two .LGF files both of which do two different Logics functions e.g. A and B
    For one input template when the user saves the data I would like Logic A be run and not Logic B.
    For the second input template I would like the Logic B to be executed and not Logic A.
    Is there a way to achieve this ?
    thanks

    Hi Daniel,
    The point is that his question not seems related to the data itself but to the screen, maybe a special operation for a screen?
    First scenario where the data itself have the reference of the operation. He might be then be able to distinguish even in a scriptlogic.
    Second scenario: The calculation is driven by the screen itself. Then he have several oportunities.
              1) Add extra information if possible in one unused dimension for the purpose of this calculation and use this information to distinguish the operation
              2) trigger the calculation on the default script logic of another application and bypass the calculation with a change of destination_app
              3) In a routing schema in a BADI you will still need to implement one of the two above points or as you know drive the operations through the dimension file ;).
    Best regards,
    Philippe
    Edited by: Martin, Philippe on Mar 30, 2010 3:45 PM

  • 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

  • Default Logic Script, Appears to Run when It should not

    Hello Experts,
    I need help with something.  When using a Logic Script within the Default Logic in BPC, It runs everytime data is submitted.   I have one logic script that copies a "Full-year" value input to each month.  See below.  So WHEN AuditTrail CC_FY is changed, it copies the value divided by 12 to each month and Audittrail CC.  This works correctly.  However, an issue came up that when a user wants to change the monthly Value, it defaults back to the value written by the CC_FY Logic Script.  I think the Logic script is running again after the user makes a change.  Below is the Logic Script and some other screen shots.
    CC_FY.LGF (Also inside DEFAULT>LGF)
    *XDIM_MEMBERSET AUDITTRAIL = CC_FY
    *XDIM_MEMBERSET RPTCURRENCY = LC
    *XDIM_MEMBERSET RCOST_CENTER = RCCA_NONE
    *XDIM_MEMBERSET TIME = 2015.12
    *XDIM_MEMBERSET COST_CENTER = %COST_CENTER_SET%
    *XDIM_MEMBERSET ACCOUNT = %ACCOUNT_SET%
    *WHEN AUDITTRAIL
    *IS CC_FY
    *WHEN TIME
    *is 2015.12
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.01", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.02", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.03", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.04", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.05", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.06", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.07", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.08", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.09", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.10", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.11", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.12", AUDITTRAIL = "CC")
    *ENDWHEN
    *ENDWHEN
    For Example, I enter $12,000 into December, CC_FY, it puts $1,000 into each month for CC correctly
    So then I try to Change January to $250, Save Data
    The Value then Returns to $1000.  I think its because the CC_FY.LGF is running again, but it shouldn't because there was no Change to the CC_FY AuditTrail Dimension.  On the Backend, you can see the changes, and also the reversal of the change, leaving the starting amount $1000.
    What am I missing?!   Thank you for any input.
    Sean

    The script have to be something like:
    *WHEN RPTCURRENCY
    *IS LC
    *WHEN RCOST_CENTER
    *IS RCCA_NONE
    *WHEN AUDITTRAIL
    *IS CC_FY
    *WHEN TIME
    *is 2015.12
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.01", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.02", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.03", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.04", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.05", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.06", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.07", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.08", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.09", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.10", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.11", AUDITTRAIL = "CC")
    *REC(EXPRESSION=%VALUE%/12, TIME = "2015.12", AUDITTRAIL = "CC")
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    Without any *XDIM_MEMBERSET!
    Vadim

  • Can we run 3 logics at a time through Default logic?

    Hi,
    I would like to run 3 script logics through Default logic at a time.  I mean
    all the 3 logics should run, when I import the data through DM.  Is it possible
    to run 3 logics at a time?
    Thanks in advance.
    Regards,
    B.S.RAGHU

    Hi,
    This is possible. You just have to use the INCLUDE statement in your default logic (INCLUDE FXtrans.lgl for example), and then save and validate both logic scripts.
    If you have to launch a logic in another application, by passing it some parameters for example, you can of course use RUNLOGIC statement, as said in the above thread. But the easiest way is to use INCLUDE.
    Hope this will help.
    Best Regards,
    Patrick

  • Run default Logic to send data from the sheet

    Hi,
    I want to run Default logic by clicking a button, basically i want the data from input schedule to be send to DB and in between i want to massage the data through the script written in default logic and then write it to DB.
    The challenge what i see is unless i change the record in the input shcedule the record is not being picked.
    Basically if a user opens a schedule and if he is OK with the data he will click on a button, which will run a script to massage the data and write to the DB.
    how to achieve this?
    Regards

    Hi Nilanjan,
    Thank you.
    Here is my requirement.
    User A logs in and seeds the data with Status X. (X,Y are the values in a dimension)
    User B logs in and verify the data feed and if he is Ok with the data he will click on a button which will run the script to change the status of the data from status X to status Y.
    I have assigned a package (uses 'Default_Formulas' Process chain) to the button.
    I want to run this button which triggers the package without any user prompts and run the script to manipulate the value.
    how to achieve this?
    Regards

  • Using %DIM_SET% in default logic

    I have the following logic:
    *SELECT(%TIMESTART%,"CURRENT_PERIOD","SCENARIO","ID='%SCENARIO_SET%'")
    *SELECT(%TIMEROLLING%,"ID","TIME","ID in(select top 6 ID from mbrtime where timeid>=(Select timeid from mbrTime where id='%TIMESTART%') order by timeid)")
    *XDIM_MEMBERSET TIME =%TIMEROLLING%
    *WHEN ACCOUNT_GP
    *IS FC_EOT1NN_P
    *REC(FACTOR=1,ACCOUNT_GP=FC_EOT1NN,TIME=%TIMEROLLING%)
    *ENDWHEN
    *COMMIT
    When I run this logic from datamanager using SSIS package it works fine.
    When I run this logic using default logic, nothing happens.
    How is it possible to use %SCENARIO_SET% (or any other dimension settings which should be dynamically selected) in default logic?
    Kind regards,
    Tim Vierhout
    Edited by: Tim Vierhout on Jan 5, 2010 12:52 PM

    Tim,
    Those SET variable is generated at Data Manager server DLL so if you run it as a default logic, those varibale will not be generated. That's why it doesn't work.
    Thank you
    Regards,
    James Lim

  • Default logic Execution

    Dear Experts,
    As we know when we input some data via Input Template the Default logic is called, I would like to confirm which file of Default logic is called whether .LGX (the Compiled code) or the .LGF (the UnCompiled code).
    Please Confirm.
    Thanks & Regards,
    Rohit

    Hi Nilanjan,
    Calling with DM package does not fulfill my requirement as I am working on scenario where Default logic is getting called after Data send via Input schedule and one of logic called in Default logic is having Select Instruction like:
    *SELECT (%TIMEIDS%,"[ID]","TIME","CALC='N' AND PERIOD<>'INPUT' AND YEAR IN (SELECT [YEAR] FROM mbrCATEGORY WHERE ID='%CATEGORY_SET%')")
    Now %CATEGORY_SET% variable will only gets processed if I call LGF version and this is why I need to call LGF version of logic in Default Logic.
    Thanks & Regards,
    Rohit

  • Default Logic Optimization

    Hello All,
    I have built a BADI and I am using it in Default logic. I have included scoping statements in my default logic to get all the information for my BADI. If I look at my default log, the total execution of default logic is 3 mins, out of which 165 seconds is in the query read prior to execution of the BADI. BADI executes only for 10 seconds. How can I decrease this query time? I do have employee dimension with 20,000 members. I use
    *XDIM_MEMBERSET EMPLOYEE=<ALL> to get everyone as I am calculating Labor costs at Employee level. Script I have in default logic is:
    *XDIM_MEMBERSET TIME = %YEAR%.INP
    *XDIM_MEMBERSET JOB = <ALL>
    *XDIM_MEMBERSET P_ACCT = FTE,HR_RATE,MNTHLY_PREM_PAY,OT_RATE
    *XDIM_MEMBERSET EMPLOYEE = <ALL>
    *START_BADI LABOR
    QUERY = ON
    WRITE = ON
    *END_BADI
    Any ideas and help is appreciated.
    Thanks!

    Gersh,
    I see drastic performance improvment when I set the QUERY=OFF and read the data in the BADI using UJQ_RUN_RSDRI_QUERY. Is this normal?
    Also, I see that if I run my BADI using START_BADI it executes much faster in UJKT rather than in a BPC package. Any ideas why?
    Also, why is there performance gain when I perform XDIM_MAXMEMBERS on the script scoping? For instance, one of dimension has 20,000 members. When I have the scoping statement for that dimension as *XDIM_MEMBERSET EMPLOYEE=<ALL> it runs for 20 seconds, but when I specify the same statement along with *XDIM_MAXMEMBERS EMPLOYEE=25,000, its down to 8 seconds.
    Thanks.

  • CopyApp and Default logic

    I was wondering when using the CopyApp statement in a script to copy data between a source and a target application, if the default logic on the target application gets executed.
    Thanks.

    Hi Kumar,
    Default logic is not executed in this case in target app.
    Copy used into script is like a DM package which is inserting data into application.
    Default logic is not executed if it is not specified this.
    Default logic is executed by default just when you are doing manual entry.
    Regards
    Sorin Radulescu

  • Work Status and Default Logic

    Hi Experts,
    This query is for BPC 10.0 NW, default logic.
    Can work status be used to control for which region of data (namely which Year) default logic is executed?
    Is Default Logic executed for all data regions falling within the scope of the Logic Script Every Time any data is saved, or is it executed only for the data saved at that instance? 

    Hi Collin
    Work Status and Default logics are 2 Different paths but Default Logic will control whether given a period/Year Combination is Open"  All the Activities for assigned Model" would be performed in terms of Data Load and subsequent Activities that Includes Default Logic.
    Where as Default Logic is used for Calculating Retained Earnings and updating your data base in Balance Sheet Current Retained Earning Account as well as Out side Account from Chart of Account which is Total Sum of Income Statement Items.
    Ex:
    BPC Chart of Accounts/Account Dimension : BPCCOA
                       Total Balance Sheet:TBSACTS
                         Income Statement:INCSACTS (inthis groups Lets say 2199999 CYR)
                        BPC Special Account: 9999999
    When ever you execute Default Logic or Include Default logic into your applicable Script Logics.  BPC Default Logic would UPDATE 2 line Postings in the data base.
                     219999     XXXX
                     999999    XXXXX
    This ensure that your total Current Retained Earnings always match with Sum of Total Income Statement items for a Period/Year.
    Hope this will help you
    Thanks
    Venkat

  • Journal Default Logic

    Hi Guys,
    I know the Journal.lgf logic gets launched when you post a journal, but does the logic get kicked off when you unpost a journal?
    Regards,
    Andries

    Indeed,
    As noted above, you need to revalidate the logic to make it effective during the send. The same applies to default logic, only the compile d(validated) version of the script will be processed.
    Madis

  • Default logic - Clear Destintion

    Hi expert,
    When input is done from the BPC excel, would like to clear the appropriate regin before posting the data. I have placed this in default logic script
    but this does not Clear data from WB tables, Members are all valid.
    *SUB SetTheAppropriateRegionToClear
    *CLEAR_DESTINATION
    *XDIM_MEMBERSET CATEGORY=MAYM
    *XDIM_MEMBERSET TIME=2010.MAY
    *XDIM_MEMBERSET ACCOUNT=x3PSPEND
    *XDIM_MEMBERSET ENTITYCOSTCENTER=CEGB1100230Q01
    *XDIM_MEMBERSET YEAR=2010
    *XDIM_MEMBERSET RPtCurrency=GBP
    *ENDSUB
    SetTheAppropriateRegionToClear()
    Thanks
    Gayu

    In which version? 7.0 or 7.5 .
    Is your goal to CLEAR the region prior to the INPUT being stored? Default logic runs after the data is passed through the Send Governor, so this runs after the posting of data to the WB table.  The clear rule also doesn't clear just WB; clears all data in the region across all 3 tables in MS version, and runs the clear prior to the calculation in the default region.
    Hope this helps.

  • Finding "Default Logical System Name Model Instance" in DC Project

    Hi,
    While Creating an Adaptive RFCModel, one defines the
    Default Logical System Name for Model Instance & the
    Default Logical System Name for RFCMetadata.
    In which file can I find these settings at a later stage in the Project File Structure.
    Ofcourse, I can view them in the WedynproContentAdministrator under the Jco Destinations.
    But is there anyway to access them in the NWDS?
    Regards
    MK

    Hello MK,
    You'll find the Logical System Names of the JCo destinations in the file ".wdproperties" under the project structure.
    Bala

  • Default logical system names for application and metadata in models.

    hi,
    I have a dbt in web dynpro java. When we create a model, we give the logical system names. When our developement is over, do we have to change these names because in test system and subsequently production system, the backends will be oviously different than developement ?
    how do we change them and re import after changing? in abap we cant change our code in test and prod systems right  so how is it in web dynpro java ?
    thanks

    Hi Jeschael,
    thanks for the reponse.
    When I create the model, I give the default logical system names and on the next screen I give the
    ip address of the backend system, client , login, password etc
    Even though the logical system names wud be same in Dev, Test and Prod systems, the ip address, login password is different so how do I give it ?
    thanks
    B

Maybe you are looking for