How to use total elements in a script logic?

Hi All,
I am using BPC 7.0 MS. I need to create a calculation using script logic as follows:
The application name is GYP and it is composed by the following dimensions:
PL (Account type) in this dimension are the units
Time
Category
Entity
Product
RptCurrency
I would like to make a calculation like this:
UNITS of any product (base element) and any entity (base element) for the BUDGET category and LC currency divided by UNITS of TotalEntity.
Also, I would like to check before the calculation if UNITS have any value to proceed with that calculation.
Best Regards,
Luisana

Hi Robert,
Thank you for your reply.
Let me explain better what i would like to do. I have an application called GYP, it is composed for the following dimensions:
PL (Account type)
Time
Category
Entity
Product
RptCurrency
In the PL dimension i have an element called UNITS and another one called UNITSBYX. I would like to get a calculation like this:
For the BUDGET category and LC currency.
UNITSBYX = UNITS for each ENTITY / UNITS for ALL_ENTITIES
Let's say I have three entities:
Units for Entity1 = 50
Units for Entity2 = 100
Units for Entity3 = 300
Units for All_Entities = 450
The calculation should be like this:
UNITSBYX = Units for Entity1 / Units for All_Entities
UNITSBYX = 50 / 450
UNITSBYX = 0.11
UNITSBYX = Units for Entity2 / Units for All_Entities
UNITSBYX = 100 / 450
UNITSBYX = 0.22
I hope you get my point.
Kind regards,
Luisana

Similar Messages

  • How to use the current view in script logic - %DIMENSIONNAME_SET% not work

    Hello,
    I have the requirement to use the values from the current view in the script logic. User would like to use the members which were selected from the current view in the calculation.
    We are using SAP BPC 7.0 SP06
    I have prepared the following scrpit:
    *XDIM_MEMBERSET TIME=$YEARS001$.NA
    *XDIM_MEMBERSET ACCOUNT=BAS(PLVEH_EXP)
    *SELECT(%CBU%,ID,BUSINESSAREA,[ID]='%BUSINESSAREA_SET%'")
    *SELECT(%CIO%,ID,INTERNALORDER,[ID]='%INTERNALORDER_SET%'")
    *RUNALLOCATION
    *FACTOR=USING
    *DIM BUSINESSAREA WHAT=BANA;WHERE=%CBU%;USING=<<<
    *DIM INTERNALORDER WHAT=IONA;WHERE=%CIO%;USING=<<<
    *DIM INDICATORS WHAT=INVEHPRI;WHERE=INPXQ;USING=INVEHQUA
    *ENDALLOCATION
    I have read in the sdn that it is possible to get the current values using %DIMENSIONNAME_SET% variable and use it but it returns all the members that were selected in the datapackage.
    I would like to know if there is any special consideration regarging the use of variable or if there is another way to solve it.
    Thanks in advance.

    Hi,
    If you want the code to be executed for the current view selected, you can place the code in Default logic which executes the logic for what ever current view values you send the data through Input schedule.
    The key word you have mentined is for script running through Data Manager which gets the value selected through user promt.
    Hope this helps,
    Regards,
    G.Vijaya Kumar.

  • How to use IF Conditon in SAP Scripts?

    Hi Guys,
                   I am having adoubt how to use IF conditon with multiple variables in SAp Scripts
    for ex If a>b and a>c and a>d
             Elseif b>a and b>c and b> d.
             Elseif .....
              endif.
              How to use above example in SAP Scripts.
    thanks,
    Gopi.

    hi Gopi,
    it is almost the same as normal ABAP, you only have to use & before and after the variable and the variable has to be in capitals and you have to make the line as command ( /: before the line )
    IF &A& > &B& AND ...
    text to print
    ELSEIF ...
    text to print
    ENDIF.
    hope this helps
    ec

  • How to use perform statements in sap scripts

    how to use perform statements in sap scripts . and pls send me one progam for this
    thnaks
    raja

    Hi Raja,
    <b>PERFORM</b> key work is used to include subroutine in sapscript form...
    But the processing is lttle bit different form the one we use in ABAP.
    Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
    Check out the example below to see how this is used..
    <b>Definition in the SAPscript form:</b>
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    <b>Coding of the calling ABAP program:</b>
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY ‘PAGE’.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY ‘NEXTPAGE’.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY ‘BARCODE’.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = ‘|’. "First page
    ELSE.
    OUT_PAR-VALUE = ‘||’. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = ‘L’. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Hope this is clear to understand...
    Enjoy SAP.
    Pankaj Singh.

  • How to define default element in SAP-Script?

    Hi Guys,
    How to define default element in SAP-Script?
    Can you tell me to do this...is it possible in all the windows or only in main window?
    Regards,
    GURU

    Hi,
    Welcome to SDN
    You can't post ur questions in other's threads .Open a new thread.
    click on post new thread and open new thread.
    Regards

  • How to use perform and endperform in scripts

    Can anybody cleaerly explains me how to use perform and endperform in scripts with an example to add something extra dynamically to the standard script (like rvorder01).
    thanks in advance.
    regards
    anil.

    Check this example:
    In form
    PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
    USING &EKKO-EKORG&
    USING &EKPO-WERKS&
    USING &EKKO-EKGRP&
    USING &EKKO-BSTYP&
    CHANGING &COMPNAME&
    CHANGING &SENDADR&
    CHANGING &INVCADR&
    CHANGING &COMPADR&
    CHANGING &COVERLTR&
    CHANGING &SHIPADR&
    CHANGING &REMINDER&
    CHANGING &REJECTION&
    CHANGING &POSTADR&
    CHANGING &LOGO&
    ENDPERFORM
    In program
    FORM READ_TEXTS TABLES IN_PAR   STRUCTURE ITCSY
                           OUT_PAR  STRUCTURE ITCSY.
      DATA : L_EKORG TYPE EKORG,
             L_WERKS TYPE WERKS_D,
             L_BSTYP TYPE BSTYP,
             L_EKGRP TYPE BKGRP.
      READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
      CHECK SY-SUBRC = 0.
      L_EKORG = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
      CHECK SY-SUBRC = 0.
      L_WERKS = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
      CHECK SY-SUBRC = 0.
      L_EKGRP = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
      CHECK SY-SUBRC = 0.
      L_BSTYP = IN_PAR-VALUE.
      CLEAR Z08M1_ORG_TEXTS.
      SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
                                              AND WERKS = L_WERKS
                                              AND EKGRP = L_EKGRP
                                              AND BSTYP = L_BSTYP.
      IF SY-SUBRC NE 0.
        SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
                                               AND WERKS = L_WERKS
                                               AND EKGRP = L_EKGRP
                                               AND BSTYP = SPACE.
      ENDIF.
      READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'SENDADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'INVCADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'COMPADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'REMINDER'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'REJECTION'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'POSTADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'LOGO'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
      MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Check and let me know if u face any problem.
    Regards

  • How to use SQL() function while writing scripts in BODS 4.0

    How to use SQL() function while writing scripts in BODS 4.0

    Hello,
    I think you want to post your question to the [Data Integration and Data Quality Management|Data Services and Data Quality; forum. This forum is for other BusinessObjects SDK development questions.
    Sincerely,
    Dan Kelleher

  • How to use UI elements in Abstract component  of PORTAL

    HI,
    I want to know how to use UI elements in Abstract components of PORTAL.Since i using only dialog box,i want to use other UI  elements  and images ,so that the application will be easy to do.

    Hi,
    If I have understood correctly your doubt, you want to know how to code jsp's in AbstractPortal Comp.
    Following is sample code of jsp
    <table width="100%">
         <%@ include file="NJ_Header.jsp" %>
         </table>
    <table width="100%" border="0">
    <tr>
    <td align="left">
         <hbj:textView     id="txtPageNumber" design="EMPHASIZED"
              text=" Page Number : 2">
                   </hbj:textView>
              </td>     
         <td align="right">
                   <font color="#FF0000">*
         <hbj:textView
                   id="txtLegend" design="STANDARD" encode="false"
                        text="Indicates mandatory fields">
                   </hbj:textView>
                   </font>
              </td>
         </tr>     
    </table>     
    <!-- Debug / End User Message -->
    <table width="90%">
         <tr>
              <td align="center">
                   <font color="#008000"><i><%=SAPMASTERDATABEAN.getUserMessage()%></i></font>
              </td>
         </tr>
    </table>

  • Where do I find a tutorial on how to use photoshop elements 11 and premier elements 11?

    Where do I find a tutorial on how to use photoshop elements 11 and premier elements 11?

    The tutorial courses that got me going were on lynda.com.   Both the PE and PrE courses are taught by instructors that know the software and how to teach on line. 
    The difference between random turtorials and a course is organization.  A course has a beginning, or foundation and builds skills one at a time.  Random tutorials like on Adobe TV or YouTube can be very good but they don't have the sequential skill building process.
    Many of the Adobe TV tutorials are chapters provided by lynda.com as part of their marketing program.  If you like them, you can pay the $25 a month for the full course work.     

  • How to calc accumulate rate in a script logic?

    Hi experts,
    We are trying to generate a monthly accumulate rate in a script logic. We have a Unit rate in 12 months and we want UnitAccum rate (like YTD) in the same 12 months
    Finally, we need to use this new rate in a multiplication.
    How can we do it with a script logic? Any idea out there?
    Kind regards
    Albert Mas

    Hi Ethan,
    You are understanding ok
    We are working on SAP BPC NW version 7.0, SP05, and at the moment, it's impossible to update to SP08.
    We have done all the following tests, trying to find some solution, under these conditions (we knew that some tests weren't going to work well, but anyway, we had to try them):
    - always for only one product (*XDIM_MEMBERSET PRODUCT=Product1)
    - UNITS and UNITACCUM are ACCOUNT base members
    - UCostVtaAcumDimFor is an ACCOUNT Formula Base Member ([ACCOUNT].[UNITS],[MEASURES].[FYTD])
    - FYTD is a Measures base member for Fiscal Year To Date (we use it because we want to see as Year to Date (YTD) as Fiscal Year To Date (first month of the year is September and the last one is August) (it works well)) (We have also tested on YTD instead of FYTD, with the same results)
    (1)
    *XDIM_MEMBERSET TIEMPO=2010.FEB
    [ACCOUNT].[#UNITACCUM] = ([ACCOUNT].[UNITS],[MEASURES].[FYTD])
    *COMMIT
    Result: MEASURES not specified. Failed
    (2)
    *XDIM_MEMBERSET TIEMPO=2010.FEB
    *WHEN ACCOUNT
    *IS UNITS
    *REC(EXPRESSION=([ACCOUNT].[UNITS],[MEASURES].[FYTD]), ACCOUNT=UNITACCUM)
    *ENDWHEN
    *COMMIT
    Result: MEASURES not specified. Failed
    (3)
    *XDIM_MEMBERSET TIEMPO=2010.FEB
    *WHEN ACCOUNT
    *IS UNITS
    *REC(ACCOUNT=UNITACCUM,MEASURES=FYTD,FACTOR=1)
    *ENDWHEN
    *COMMIT
    Result: Unknown Dimension Name in Keyword "MEASURES". Failed
    (4)
    *XDIM_MEMBERSET TIEMPO=2010.FEB
    *WHEN ACCOUNT
    *IS UNITS
    *REC(ACCOUNT=UNITACCUM,TIEMPO=TIEMPO.NEXTMONTH,FACTOR=1)
    *ENDWHEN
    *COMMIT
    Result: it takes too much time (more than five minutes) without ending the process --> We stop this test
    (for 2010.FEB, TIEMPO.NEXTMONTH=2010.MAR)
    (5)
    *XDIM_MEMBERSET TIEMPO=2010.FEB
    *WHEN ACCOUNT
    *IS UNITS
    *REC(ACCOUNT=UNITACCUM,TIEMPO=TIEMPO.PREVMONTH,FACTOR=1)
    *ENDWHEN
    *COMMIT
    Result: it takes too much time (more than ten minutes) without ending the process --> We stop this test
    (for 2010.FEB, TIEMPO.PREVMONTH=2010.JAN)
    (6)
    *XDIM_MEMBERSET TIEMPO=2010.FEB
    *WHEN ACCOUNT
    *IS UNITS
    *REC(ACCOUNT=UNITACCUM,FACTOR=1)
    *ENDWHEN
    *COMMIT
    Result: Cancelled
    (7)
    *XDIM_MEMBERSET TIEMPO=2010.FEB
    [ACCOUNT].[#UNITACCUM] = [ACCOUNT].[UCostVtaAcumDimFor]
    *COMMIT
    (UCostVtaAcumDimFor is a Formula Base Member ([ACCOUNT].[UNITS],[MEASURES].[FYTD]))
    Result: Cancelled
    Some more ideas?
    Thanks in advance,
    Albert Mas

  • How to get totals at top in script????

    Hello Experts,
    I am developing Account Statement script .
    There are many text elements exist in script like 510, 511, ..............580.
    I want totals of debit, credit, opening and closing balance in first text element i.e 510 and in std it is calculated in 540.
    Can you plz tell me how to get this values in 510?
    Plz help me!!
    Thanks & Regards,
    Manisha
    Edited by: PATIL MANISHA on Jul 19, 2010 12:09 PM

    hi ,
    you can collect the final total value into anthore variable in the driver program ,print that into your text element 510 . if you don't want print actuval text element just you can use condition fo aviod that , try this may be it help you.
    Regards ,
    Nagu

  • How to use the text module in script

    hi,
            i script how to use the text modules and how to write the code  in layout of the script?

    Hi,
    You canr use text modules in script. You have to use standard texts .
    Standard text are maintained in SO10 transaction.
    you can create translation text for other languages also . So based on logon language it will print translation text.
    go to SO10
    give textname it say Ztextname  id as ST and language as EN
    say create, then you will get editor there maintain your text and save it . then come back . Now change language (say for german DE) say create and eneter translation text and save it.
    so now you have created a text called ztextname which you can use in your script.
    Inorder to insert the texts in your script do as below
    go to any window editor and   select path
    Insert->texts->symbols->standard symbols
    then you will get popup  in which you have to mention all the parameters that you have created earlier.
    after inserting just change language EN to sy-langu
    Reward points if useful
    About text elements Sravan already given some informatiomn
    Regards,
    Nageswar

  • How to end text element in sap script

    how to end an text element in sap script
    this is the format.
    /E text element name
    &tablename-fieldname&
    text-text-text-text
    now if i do not end that text element it is not displayiny my below text , so what to do in this case

    Go through the links mentioned below.
    http://www.****************/Tutorials/Smartforms/SFMain.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    http://www.sapmaterial.com/smartform_example.html
    Re: Hands on SAP Smart Forms
    smartforms
    Reward points if useful.

  • How to use List within javaFX(*.fx) script?

    How to use java.util.List within javaFX(*.fx) script?
    The following is my code in Java
    PDBFileReader pdbreader = new PDBFileReader();
              pdbreader.setPath("/Path/To/PDBFiles/");
              pdbreader.setParseSecStruc(true);// parse the secondary structure information from PDB file
              pdbreader.setAlignSeqRes(true);  // align SEQRES and ATOM records
              pdbreader.setAutoFetch(true);    // fetch PDB files from web if they can't be found locally
              try{
                   Structure struc = pdbreader.getStructureById(code);
                   System.out.println("The SEQRES and ATOM information is available via the chains:");
                   int modelnr = 0 ; // also is 0 if structure is an XRAY structure.
                   List<Chain> chains = struc.getChains(modelnr);
                   for (Chain cha:chains){
                        List<Group> agr = cha.getAtomGroups("amino");
                        List<Group> hgr = cha.getAtomGroups("hetatm");
                        List<Group> ngr = cha.getAtomGroups("nucleotide");
                        System.out.print("chain: >"+cha.getName()+"<");
                        System.out.print(" length SEQRES: " +cha.getLengthSeqRes());
                        System.out.print(" length ATOM: " +cha.getAtomLength());
                        System.out.print(" aminos: " +agr.size());
                        System.out.print(" hetatms: "+hgr.size());
                        System.out.println(" nucleotides: "+ngr.size()); 
              } catch (Exception e) {
                   e.printStackTrace();
              }The following is my code in JavaFX(getting errors)
    var loadbtn:SwingButton = SwingButton{
        text:"Load"
        action: function():Void{
            var pdbreader = new PDBFileReader();
            var structure = null;
            try{
                structure = pdbreader.getStructure(filepath.text);
                List<Chain> chains = structure.getChains(0);
                foreach (Chain cha in chains){
                        List < Group > agr = cha.getAtomGroups("amino");
                        List < Group > hgr = cha.getAtomGroups("hetatm");
                        List < Group > ngr = cha.getAtomGroups("nucleotide");
            } catch (e:IOException) {
                e.printStackTrace();
        };I'm using Netbeans 6.5 with JavaFX
    (PDBFileReader, Chain, Structure etc are classes from my own package, already added to the library folder under the project directory)
    Simply put, How to use List and Foreach in JavaFX?

    We can not use Java Generics syntax in JavaFX. But we can use Java Collection classes using the keyword 'as' for type-casting.
    e.g.
    import java.util.LinkedList;
    import java.util.List;
    import javafx.scene.shape.Rectangle;
    var outerlist : List = new LinkedList();
    var innerlist : List = new LinkedList();
    innerlist.add(Rectangle{
        width: 10 height:10});
    innerlist.add(Rectangle{
        width: 20 height:20});
    outerlist.add(innerlist);
    for (inner in outerlist) {
        var list : List = inner as List;
        for (element in list) {
            var rect : Rectangle = element as Rectangle;
            println("(width, height)=({rect.width}, {rect.height})");
    }

  • How to use Text lements(/E) in Scripts and print program

    Hi all,
    I need to use Text elements from print program to Script output.
    I have included the text element name in WRITE_FORM and defined in the script with (/E) also.
    Still the data is not displaying.
    Please let me know how to use the text elements.
    thanks in advance..
    Rakesh
    <removed_by_moderator>
    Edited by: Julius Bussche on Nov 25, 2008 10:08 AM

    For printing the text directly on the formm the text element in form wud be as
    /E   ITEM_HEADER
    MH Quantity,,,,Description,,UOM,,Net Weight,,Gross Weight
    If you have variable define in the driver prog and you want to display,text elt. wud be as
    /E   ITEM LINE
    MH &CONF_OUT-ATBEZ&,,&CONF_OUT-ATWTB&
    where CONF_OUT is a structure with fields ATBEZ and ATWTB
    MH is the paragraph format
    Hope this clears your doubt.
    Regards,
    Prashant

Maybe you are looking for

  • Installation problem with CS4 on Windows 7

    I have been trying to install CS4 to a new HDD. It is from the (licensed) disk. It stops at the Initializing phase: "Checking System Profile", getting stuck at 90%. Here is the screen message: I have turned off any antivirus scanning, even turned off

  • A more Unix-like way to instant message

    I've been using Pidgin for IM'ing and it's working satisfactorily so far. But I want to be able to IM from within a terminal, or from within emacs.   I'm not happy with the emacs jabber client and I do need many more protocls than just that. Is there

  • How do I get the contents of the "note" field to display on the event in day and week modes?

    I am a student and I take the reading and exam schedules from my class syllabi and put them in iCal so I only have to go to one place to see what assignments are due. I put the class name in the event name field, the classroom number in the location

  • Large Pointer size using RDP

    When I am using Microsoft RDP for Mac, I am having a problem with my mouse pointer size. It is HUGE. The resolution is set to 2880x1800 with 200dpi. Now when I use the computer locally it does not occur, when I use it remotely from a Windows machine

  • Item Renderer Display Optimization

    I have pretty basic row item renderer displayed within a data group, it is composed of a few labels and an icon. It has a few nested layouts to display everything properly, but I would not consider it a complicated layout by any means. Whenever I dis