Help on scripts used in bpc

Hi All,
Hope you can help me in know
where to find some help doc's on scripts used in BPC and coding in SSIS packeges.
And does BPC internally convert scripts to SQL script or MDX?
And can i use both SQL and MDX in single logic file?
Any help will be greatly appriceated

The BPC logic engine converts the "SQL-style" script logic syntax into true SQL, that's executed against the data in the fact tables.
MDX script logic is executed against the Analysis Services cubes; I don't believe that much conversion is involved here, but honestly I'm not an MDX expert, so I could be mistaken.
You can mix both in a single logic file, subject to a clear understanding of how *COMMIT and XDIM_Member, etc. work to scope a particular block of code. The BPC Admin guide (also in the online admin help) is the key reference guide for this.
But the most important piece of advice I can give is, don't write MDX logic. Only use it (as sparingly as possible) for raios (division) in member formulas, where you need to evaluate a formula at various points in the hierarchy (not just at base members). For everything else, use business rules or SQL logic.

Similar Messages

  • Help in script logic

    Hi Experts,
    We are using SAP BPC 7.5 NW Version SP08. We are using a script logic that calculates the opening value of inventory(ASSTCAINVAMO) for each month except the 1st month of financial year for which the value is entered from an input schedule. The opening value of inventory of each subsequent months are calculated when the parameters for production(e.g. OSDA) are entered from a separate input schedule. The following script logic is written for the calculation:
    *FOR %TIM_MEM%=%TIME_SET%
    *XDIM_MEMBERSET TIME =%TIM_MEM%
    *WHEN P_ACCT2
    *IS "OSDA",
    REC(EXPRESSION=[P_ACCT2].[ASSTCAINVAMO]+[P_ACCT2].[RDPA][P_ACCT2].[EFFA][P_ACCT2].[OSDA]-[P_ACCT2].[CONVAMUR][P_ACCT2].[RDPU][P_ACCT2].[EFFU][P_ACCT2].[OSDU]-([P_ACCT2].[SALQAMBC]+[P_ACCT2].[SALQAMM]),P_ACCT2="ASSTCAINVAMO",TIME=TIME.NEXT)
    *ENDWHEN
    *COMMIT
    *NEXT
    The loop works fine, but it seems the list of time values are not coming in proper sequence. For example, the loop is running for 2011.NOV before it iterates for 2011.OCT. So when it iterates for 2011.NOV, it is not getting the opening value for the month and consequently 2011.DEC's opening value is calculated assuming 2011.NOV's opening value to be 0. In the input schedule the months are in proper sequence.
    Is there any way out so that the months come in proper sequence in the logic as well?
    Thanks in advance for any help.

    We had similar issue . we changed TIME members from Monthnames to numbers . i.e  changed 2011.JAN to 2011.01 . Then you get correct result  as you are expecting . Issue when using month names in combination of TMVL is that  , instead of getting 2011. MAY for TMVL(1,2011.APR) , it gets 2011.FEB . TMVL function some how takes alphabetical order instead of taking month order . Not sure if this behavior is with service pack . But never saw any thread reporting this issue .
    Anyways ,you can wait for other responses  as i am too curious to know if any one faced this issue and how did they resolve.

  • Script logic problem BPC 7.5

    Hi!
    We have a script logic that worked fine in BPC 5.1 but after our upgrade to BPC 7.5 it doesn´t work anymore.
    I will try to explain the part of or logic that doesn´t work anymore.
    We have 2 lines that will pass through the script, each line creates a temporary value  on KATEGORI ="#avskr1").
    Depending on the value created on  u201C#avskr1" it should do calculation A if the value is negative and calculation B if the value is positive. To do this we the following script logic:
    *WHEN GET(KATEGORI="#avskr1")
           *IS < 0
    *Calculation A
    ELS
    *Calculation B
    And this logic worked fine in BPC 5.1.
    If line X had -50 as a value in  u201C#avskr1"   and line Y had 75 as a value  in u201C#avskr1" , calculation A would be performed on line X and calculation B on line Y
    With the same example as above in BPC 7.5 calculation A will be performed on both lines.
    But if I change the logic to the following script logic in BPC 7.5:
    *WHEN GET(KATEGORI="#avskr1")
           *IS  = -50
    *Calculation A
    ELS
    *Calculation B
    Calculation A would be performed on line X and calculation B on line Y. It seems like the logic can´t handle <> signs in this script logic anymore.
    Regards
    Fredrik

    Hi!
    Unfortunately it didn´t help still the same error.
    And I just got an answer from SAP Support that there are a bug in the use of "Get whith When or lookup" in 7.5 SP03 which we currently are using, but it has been fixed in SP04. They just put up a SAP not 1515973 about the issue.
    Unfortunately they have no work around for this problem so I don´t know how to solve it untill we have installed SP04.
    Regards
    Fredrik

  • Getting the output from a Perl script using Runtime.exec

    I cannot get the output from a perl script using Java. Can someone PLEASE help?
    I used the following code:
    Process p = Runtime.getRuntime().exec("C:\\Perl\\bin\\Perl.exe script.pl) ;
    InputSream in = p.getInputStream();
    b...
    do
    System.out.println(b);
    while ((b = in.read()) > 0)
    But there is no way that I get the output in the inputstream. If I use the command "cmd script.pl", the output is displayed in the Dos box, but also not in the inputstream.
    I will appreciate any help.

    Try this
    Process p = Runtime.getRuntime().exec("C:\\Perl\\bin\\Perl.exe script.pl) ;
    BufferedReader rd = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String str;
    while((str=rd.readLine())!=null){
    System.out.println(str);
    Manu

  • Finished script: Use grep find/change to fill in a supplied table of contents

    This script is now complete, and has been the subject of most of my previous posts. Just in case anyone wanted to know what the finished script ended as, here it is.
    Thanks so much to all. A lot of really helpful folks on this board are very responsible for the success of this task. This script is to be one of hopefully many in the creation of our records. But it's a huge leap forward. Thanks again to everyone that helped.
    Cheers,
    ~Nate
    Task:
    Automatically find town names in listings, and fill in table of contents template on page 2 accordingly.
    Example of page 2 toc, initially:
    Example of a page of content. The town names are what need to be referenced on the TOC:
    Example of page 2 toc once script is finished:
    Because of the need to include the transaction dates on the TOC (comes as a provided, tagged-text file), a simple Indesign-generated TOC can't be used alone.
    This script uses an Indesign-generated TOC that's on a master page called "T-tocGen" ... It then uses grep search and replaces to grab the needed information, and insert it into the page 2 TOC.
    The script will update a generated TOC and then search for an instance of a page number, and town name. The generated toc lists all included towns in the following format:
    (line start)## tab townName(line end)
    In Grep, this would be (please note, extra \ for \d and \t ... javascript needs that for some reason):
    ^\\d+\\t(.*)$
    After the script gets the info it needs from a found instance of the above, it replaces that line with "---", to prevent that line from being picked up once again.
    The script with then place the needed page number in it's rightful place on page 2, replacing the XX.
    A while loop is used to repeat the above process until there are no longer any instances of "^\\d+\\t(.*)$" present.
    Not every town runs every issue, so once the script is done, it removes all remaining instance of "XX" on the page 2 TOC.
    FINAL CODE:
    TOC replace
    This script will use grep find/change methods to apply page numbers in
    tocGen to the XX's on page2TOC.
    // define the text frame of generated TOC
        var tocGenFrame  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
    // udpate generated TOC ... store contents in tocGenStuff
        var tocGenStuff = updateTOCGen();
    // set variable for while loop
    var okGo = "1";
    // while okGo isn't 0
    while(okGo.length!=0)
    // get town info from tocGen
    getCurrentTown();
    // replace XX's with tocGen info
    replaceTown();
    // grep find ... any remaining towns with page numbers in tocGen?
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // set current value of okGo ... with any instances of above grep find in tocGen
    okGo = tocGenFrame.findGrep();   
    // grep find/change all leftover XXs in page2TOC
    app.findGrepPreferences = app.changeGrepPreferences = null;       
    app.findGrepPreferences.findWhat = "^XX\\t";
    app.changeGrepPreferences.changeTo = "\\t";
    app.activeDocument.changeGrep();  
    // clear grep prefs
    app.findGrepPreferences = app.changeGrepPreferences = null;
    //  functions                  //
    function getCurrentTown()
    // grep options   
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // grep find:  startLine anyDigits tab anyCharacters endLine
          app.findGrepPreferences = app.changeGrepPreferences = null;
          app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // get grep find results      
    currentGen = tocGenFrame.findGrep();  
    // store grep results content into currentLine
    currentLine = currentGen[0].contents;
    // match to get array of grep found items
    currentMatch = currentGen[0].contents.match("^\\d+\\t(.*)$");
    // second found item is town name, store as currentTown
    currentTown = currentMatch[1];
    // change current line to --- now that data has been grabbed
    // this is because loop will continue as long as the above grep find yields a result
           app.findGrepPreferences.findWhat = "^\\d+\\t"+currentTown+"$";
                  app.changeGrepPreferences.changeTo = "---";
                tocGenFrame.changeGrep(); 
    function replaceTown()
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // find: XX currentTown .... replace with: currentLine
        app.findGrepPreferences = app.changeGrepPreferences = null;
        app.findGrepPreferences.findWhat = "^XX\\t"+currentTown+" \\(";
        app.changeGrepPreferences.changeTo = currentLine+" \(";
    app.activeDocument.changeGrep();   
    function updateTOCGen()
    //set vars ... toc text frame, toc master pag
        var tocGen  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
        var tocGenPage  = document.masterSpreads.item("T-tocGen").pages.item(0);
    //SELECT the text frame generatedTOC on the master TOC
        tocGen.select();
    //Update Table of Contents by script menu action:
        app.scriptMenuActions.itemByID(71442).invoke();
    //Deselect selection of text frame holding your TOC:
        app.select(null);
    //store contents of toc text frame in variable
        var tocGenText = tocGen.contents;
    //return contents of tocGen
        return tocGenText;

    Thanks for the reply.
    You are correct but the problem is there are three rows, One row is 100% black, the second is 60% black and the third is 40% black. I want to change the black to blue, the 60% black to an orange and the 40% black to a light shaded blue. In the find/change option you can select the tint you want to find and replace but yea.. does work on table cells.. oddly enough.

  • ANN: Indesign CS3 JS help to HTML using XSLT

    I felt quite at home with the previous CS's JS Help PDFs, but I'm not too wild about the ExtendScript editor. But if you don't use that, you miss out the online help! Fortunately, in one of the ExtendScript subfolders you can find an XML document with the slightly bizarre name "omv$indesign-5.0-en_us.xml". This contains the
    entire help document, in handy XML format.
    As an exercise, I wrote an extensive XSL stylesheet to convert it to fully cross-referenced HTML. This script is a bit too long to include here, but you can d/l it at
    http://www.jongware.com/binaries/indesign.xsl.
    Run it through your favourite XSL processor, and you get the whole thing in one huge file. Alternatively, you can select either a single class or enumeration (such as "TextFrame") or a single alphabetic letter ("A", just to provide an example, will process all classes and enums from "AlignDistributePreference" to "AutoEnum"). In these cases, the hyperlinks will (obviously/unfortunately) fail.
    It is quite possible to load the 113,000 line XML into InDesign and apply formatting to it, but I think I'll leave it at this.

    I sure had fun 'tokenizing' the "Can accept: xx, yy or zz" remarks for the "any" value into separate entries :) Only for Properties, though, since with most of the Methods you changed the wording. Please, for the next version, a list of these possible elements in the XML!
    Some new items added: a full index (only if you check it in the XSL--it's quite long); more importantly, per class a list of "Element of", "Returned by", and "Used in", all hyperlinked to the extreme -- now you can see at a glance how all elements link together! These lists are not
    entirely complete (that's your (Ole's) fault, because of that "any" notation).
    [PS: there seem to be no explanation of function return values...]
    I understand the idea of the SVG block diagrams, and if I feel the urge (and have an example of what it should look like) I might give that a try -- just for laffs. In the mean time I'm finally gonna upgrade my CS1/2 scripts, using my own HTML to guide me :)
    For the XSLT impaired amongst us, d/l the complete HTML page at jongware.com:
    indesign.zip (3.5MB, zipped to 471Kb). Enjoy!

  • Execute unix shell script using DBMS_SCHEDULER

    Hi,
    I am trying run to shell script using DBMS_SCHEDULER.
    1) I check..nobody user exist on my HP-UX.
    2) I check externaljob.ora on (10.2.0.2.0) also..It has an entry..
    run_user = nobody
    run_group = nobody
    3) I created job successfully and enabled it.
    begin
    DBMS_SCHEDULER.CREATE_JOB
    job_name => 'test_unix_script',
    job_type => 'EXECUTABLE',
    job_action => '/tmp/test.ksh',
    start_date => '08-NOV-2006 04:45:16 PM',
    job_class => 'DEFAULT_JOB_CLASS',
    enabled => TRUE,
    auto_drop => FALSE,
    comments => 'test_unix_script.'
    END;
    EXEC DBMS_SCHEDULER.enable('test_unix_script');
    4) test.ksh script had -r-xr-xr-x permission.
    5) When I checking dba_scheduler_job_run_details view, ADDITIONAL_INFO column display following error messgae.
    ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
    Did I miss anything?
    Any help will be appreciated!!
    Thanks..

    My /tmp/test.ksh trying to find database status.
    . ~oracle/.profile > /dev/null
    db_status=`eval sqlplus -s 'system/passwd@DEV' << EOF
    set pagesize 0 feedback off verify off heading off echo off
    select status from v\\$instance;
    exit
    EOF`
    echo $db_status > /tmp/db_status_out

  • Batch Script using System Varriable for Hostname and FQDN results in large space between

    I have a batch script running on Windows 7 that I've created to help a physical computer, connect to his virtual cousin.  Problem is when I try to make
    it use the FQDN (required by the View Client) it puts a large space between the hostname and the domain.
    Result
    ECHO Connecting View Client to PREFIX-SERIAL .domain.comOR"C:\Program Files\VmWare\View.exe" -Args -serverURL PREFIX-SERIAL       .domain.com
    Our computers are named a combination of a prefix and the serial number.  Our virtual computer names are the same, but with a different prefix.  So my attempt was to make a connection
    script, using the computer serial number.  My Process:
    Setting %serial% variable.
    for /F "skip=1 tokens=*" %%b in ('wmic bios get serialnumber') do if not defined serial set serial=%%b
    Set %hostname% variable.
    set hostname=PREFIX-%serial%
    Installation command line
    "C:\Program Files\VmWare\View.exe" -Args -serverURL %hostname%.domain.com
    That results in the output at the beginning of my post.
    I've also tried
    %hostname%.%userdomain%.com
    PREFIX-%serial%.%userdomain%.com
    PREFIX-%serial%.domain.com
    SET FQDN=.domain.com
    PREFIX-%serial%%FQDN%
    %hostname%%FQDN%
    I also tried carets and quotes on set commands without any improvement.
    I'm sure I'm missing something simple here.  Any advise?
    There's no place like 127.0.0.1

    Will something like this get you what you are looking for?
    (gwmi win32_bios).SerialNumber+(gwmi WIN32_ComputerSystem).Domain
    Or
    $hostname=(gwmi win32_bios).SerialNumber+"."+(gwmi WIN32_ComputerSystem).Domain
    Sorry just realized your looking to do this in a Batch file...so maybe something like this
    @echo off
    for /F "skip=1 delims=" %%j in ('powershell "[System.Net.Dns]::GetHostByName((hostname)).HostName"') do (
    set Host=%%j
    goto :DONE
    :DONE
    echo %HOST%

  • Why MicroSoft 2000 SR needed while running the script using test manager???

    hi all,
    whenever I trying to run a script using test manager,one POP-UP comes which starts installing MICROSOFT 2000 SR.
    and in few seconds it complaining for some missing component,
    can any body tell me why it is happening.
    what is the need of Microsoft 2000 SR while running the script in test manager.
    tnx
    USOni

    USoni
    I have seen that problem happening before, even that i was never able to figure out why, something that you can try is changing the service log in credentials for both:
    Oracle Application Testing Suite Agent Service
    Oracle Application Testing Suite Application Service
    and use a proper user with admin rights.
    let me know if that helped
    Regards
    Alex

  • Hello i need a help about script to export translatable text strings from ai files and import them back

    Hello i need a help about script to export translatable text strings from ai files and import them back after editing, thanks in advance

    Lanny -
    Thank you for taking the time to help with this problem. Can I just say however that as someone who has posted a first comment here and quite clearly never used a forum like this before, your comment unfortunately comes across as very excluding. It makes me feel there are a set of unwritten rules that I should know, and that I don't know them shows that the forum is not for me. In short, it's exactly the kind of response that stops people like me using forums like this.
    I'm sure it's not intended to be received like this and I am sure that the way you have responded is quite normal in the rules of a forum like this. However, it is not normal for those of us who aren't familiar with forums and who only encounter them when they have a genuine problem. This is why I hope it is helpful to respond in full.
    The reason I posted here is as follows. I was directed here by the apple support website. The original comment seemed to be the only one I could find which referred to my issue. As there is no obvious guidance on how to post on a forum like this it seemed perfectly reasonable to try and join in a conversation which might solve more than one problem at once.
    Bee's reply however is both helpful and warm. This could in fact be a template for how new members should be welcomed and inducted into the rules of the forum in a friendly and inclusive way. Thank you very much indeed Bee!

  • Running sql or perl script using DBMS_JOB

    Hi,
    Is there a way to run a sql or perl script using DBMS_JOB procedures? I have a perl script which checks out the table usage and emails the report to specific users. I want to run this script in a job scheduler, where I am using dbms_job to add the job. Please help. Any suggestions are greatly appreciated. Thanks.
    -Kristine

    You cannot run sql or perl scrips using DBMS_JOBS. You can run only Oracle procedures, functions, packages with DBMS_JOBS. They have to be stored in the database. You will have to create a Pro*C program that is listening on the pipe and push data to that pipe by using dbms_pipe. Then you can execute anything you want.

  • Trigger custom powershell scripts using azure xplat-cli module

    I am using ansible hosted on linux to manage both Linux and windows VMs hosted on azure, and use azure xplat-cli commandline to create VMs. When i create windows server 2008, I need to trigger few startup scripts so that those are preconfigured while windows
    server is up. I was able to install CustomScript extension using below command
    # azure vm extension set <vmname> <publisher> <version>
    I have uploaded my scripts to azure blob storage account, and i need to trigger scripts using the extension, and i don't find any proper documentation (documentation was only for powershell). Can you please help

    Hi,
    Based on my experience, you can configure extensions via the Azure Preview Portal. Besides, the article below ay be helpful to you:
    Automate Linux VM Customization Tasks Using CustomScript Extension
    In addition, you are correct, there is no official document for that. You can ask a script in the Azure Script center:
    http://azure.microsoft.com/en-us/documentation/scripts/
    Best regards,
    Susie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • My change to small screen facility has suddenly stopped working. Can anyone help as I use this a lot.

    the change to small screen icon in top right hand corner of screen has stopped working. Can anyone help.

    When you use the maximize/restore button, the window is restored to its last size. Some websites use a script to enlarge the window to its maximum size so when you switch from maximized to restored you hardly notice any change. You may have to manually resize the window by dragging the lower right corner. Does that help, or is the button just completely not working??

  • Issue with calling Shell Script using DBMS_SCHEDULER

    Hi All,
    I am executing a shell script using DBMS_SCHEDULER from APEX web page. Execution part is working fine without any issues.
    In my shell script file (abc.sh) I have few oracle sql procedure calls which connects back to same database and that SQL call is not executing some reason, it not giving any errors.
    Inside my shell script code looks like this.
    sqlplus -silent $USER/$PASSCODE@$SCONNECT > /dev/null <<END
    set pagesize 0 feedback off verify off heading off serveroutput on
    echo off linesize 1000
    WHENEVER SQLERROR EXIT 9
    BEGIN     
    dbms_output.enable(1000000);
    do_enable_cons();
    dbms_output.disable;
    END;
    spool off;
    exit;
    END
    When I run this shell script file from backend it works fine now issues.
    Is there any restrictions in executing sql code using DBMS_SCHEDULER? Any ones help is much appreciated.
    -Regards

    james. wrote:
    Thanks you sb and Sybrand . It is problem with environment variables. After running .bash_profile in the beginning of the shell script, it is working fine.
    One issue is when I check the process it is showing two entries with two different process id's.
    The command I used
    ps -ef | grep <my script> is COPY & PASTE broken for you?
    any reason why you did not show us EXACTLY was produced by OS command above?
    >
    Is it something wrong with my code or is it normal? Is it really executing two times ?
    -Regards
    bcm@bcm-laptop:~$ sqlplus user1/user1
    SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 20 15:14:15 2012
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    15:14:15 SQL> !ps -ef | grep sqlplus
    bcm      24577  1903  1 15:14 pts/0    00:00:00 sqlplus           
    bcm      24579 24577  0 15:14 pts/0    00:00:00 /bin/bash -c ps -ef | grep sqlplus
    bcm      24581 24579  0 15:14 pts/0    00:00:00 grep sqlplus
    15:14:23 SQL> how many different copies of "sqlplus" running on my laptop based upon actual output above?

  • How to execute Remote scripts using OSB or BPEL

    Hi all,
    Can we execute the Remote Scripts from OSB and BPEL ??
    What is best way to invoke the scripts using OSB ?
    Thanks
    Phani

    Sutirtha,
    Thank you very much. I really appreciate all of your responses.
    I have one more question ( Sorry for flooding you with lot of questions :) )
    How to capture the errors which occured inside the SQL Scripts.
    My scenario is like this. I have two sql scripts Script_1.sql and Script2.sql namely. I would like to put dependency on the execution of the scripts.
    If Script_1.sql executes succesfully without any errors, then EXECUTE Script_2.sql
    else if Script_1.sql execution contains errors then DON'T EXECUTE Script_2.sql
    As of now, i observed that the Process flow shows Success State even if there is an error in the sql script execution. Because of which i was not able to put dependency on the execution of the scripts.
    I think i can do it by tweaking(changing) the code inside the SQL Scripts, like logging the errors in some log table and reading it before the next script execution.
    But the restriction is, I Should not touch/change the existing SQL Scripts.
    Do we have any mechanism in the ProcessFlows to identify the SQL Errors that occurred during execution of SQL Scripts ?
    Please suggest any idea on this. It will be great if you can help in this.
    Thanks in advance,
    SriGP.

Maybe you are looking for