Substring in Bex

Hi
Is creating substring of a characteristic value possible in BEx. I did check other posts but the answers weren't satisfactory.
Please let me know the process to do the same.
Apart from this, is it possible to identify the number of records in a cube for a particular year.?
Regards
Chitra

Right click on the cube-> Display Data
In Fields Selectn for Output select Year.
In the Selections screen
Give your year in the year field.
Under settings. Check Output number of hits.
Execute.
On the Row Count Column, apply Summation.
The sum is the total no. of records
For the sub string:
Check out this thread. This can help you.
Substring text in Bex
Regards,
Meghana

Similar Messages

  • SubStr function in Universe on BEx Query

    Hi SAP BO experts,
    We have a universe based on SAP BEx Query with an object  "WBS Element",  a 24 Character field from which we need to resolve certain sections as different objects for reporting purpose.  One of the objects required is first 8 chars (WBS Project No.)  Following code is used in object definition. 
    <EXPRESSION>Substr(@Select(WBS Element\WBS Element), 1, 8)</EXPRESSION>
    Parsing is OK at universe level.
    Webi query without "WBS Project No" is running OK but when "WBS Project No" is used, I get an error - invalid MDX command (WIS 10901).
    What is the correct syntax?  Any input will be appreciated.
    Thanks in advance.
    Venkat

    You can-not return characteristics via <EXPRESSION> tag.
    In fact right now it is not possible to do substring and similar operations. You can only create objects which returns numeric
    value.
    Regards,
    Rohit

  • Field Header issue while integrating BO on Bex query

    Hi All
    I have a integration problem of BO on Bex query.Wondering anyone had a similar problem before.
    I have a report which has Grant Description, Grant Key and some measures in the report layout. The report also has some additional available fields like Company Code and Company Code Key which can be dragged and dropped into the report by an end user.
    Free Chars that can be dragged in report
    Grant Description
    Grant
    Measure 1
    Company Code
    Grant 1 for X
    GR001
    1000
    Company Code - key
    Grant 1 for Y
    GR002
    2000
    Grant 1 for Z
    GR003
    5000
    When i include the object in Webi report (using BICS connection) i see fields like "Grant description " and "Grant Description- Key (not compounded)" (clicking on the dimension in the query panel) or Company Code and Company Code - Key. In the report layout headers, i have used substring function to remove the unnecessary part (e.g. for Grant columns)
    The problem is with the objects which is not in the report layout and can be dragged in. For example in the above scenario business users wants the name to be changed to "Company Code" and "company Code -No" when they drag these fields in the report. I can't change the object name if it is not in the report layout (unless i create a variable and 'somehow' hide the original object called "Company Code - Key"). I am also reluctant to create a variable in BO and name it accordingly as this report is a multilingual report (based on BW userid the headers will come in French, English or spanish). I would like to keep the headers same as that in BW for multilingual function to work (which is defined in BW).
    BW developers can probably create new infoobjects and populate the field with company code key data but that is a very big a task considering the so many report we have which needs key for all the objects.
    Is there a way the name can be changed to "Company Code- No" when creating a Webi report using bex query (using BICS connection and not universe) ? Really appreciate if someone can share their views on this issue as it looks like an integration issue to me.
    Sanjit

    Hey Carly,
    thanks for your suggestion.
    I actually search for notes, but found non relevant for our system. The BW notes can actually be implemented as there is an "embedded" BW server, but it's release seems to be high enough.
    I don't think the query is "hanging". The "loading" popup stops after a few minutes and then simply shows the "empty" entry with an updated timestamp under BEx documents. We don't receive any errors.
    Not too familiar with "tracing" within BO, but I'll give it a try (after doing some research and consulting some (ex-)colleagues). I have asked to "update" our front end tools too, as we're rather "low" (and have some Dashboard issues as well). So, since it's already (late) Friday afternoon here, I might just wait on that update (almost time to start my weekend).
    Cheers,
    Raf

  • How to use string functions (substr or ltrim or replace)  in OLAP universe.

    cost element (0COSTELMNT) - 10 CHAR
    Controlling area (0CO_AREA) - 4 CHAR
    [0COSTELMNT].[LEVEL01].[[20COSTELMNT]].[Value]
    cOST ELEMENT is compounded/prefixed with Controlling Area. I just want to see cost element without conrolling area in the BO report.
    Currenlty BO unierse is build based on bex query. I am able to suppress the compounding object in bex query by chaning controlling area to 'No display'. But still BO Webi report displaying compounded values in the report. (Bex report works as expected)
    eg: Current display in reort.
    controlling area/cost element.
    AB00/2222
    AB00/2223
    AB00/2224
    Wanted like  below:
    2222
    2223
    2224
    I think by using string fucntions (substring, ltrim or  replace etc.), I can get the required result. But I am having issues with syntax. I have used like below.
    substr(0COSTELMNT ; 5 ; 10)
    substr(0COSTELMNT; 5 ; Length(0COSTELMNT)-5)
    substr(0COSTELMNT; Pos(0COSTELMNT;"/")+1;10)
    ltrim(0COSTELMNT,'AB00/')
    What is the syntax for substring/replace functions in OLAP universe. Technical name of cost element in OLAP  universe is [0COSTELMNT].[LEVEL01].[[20COSTELMNT]].[Value].
    I want to fix this at universe level not at report level as  i am using cost element in filter/variable section of the report. Please provide me syntax for above example.

    Hi,
    In fact SAP BW MDX supports limited string manipulation and only with NAME and UNIQUENAME attributes.
    Here are some samples that you can use in universes:
    MID([0COSTELMNT].currentmember.NAME,1,4)
    LEFT([0COSTELMNT].currentmember.NAME,2)
    RIGHT([0COSTELMNT].currentmember.NAME,3)
    MID([0COSTELMNT].currentmember.UNIQUENAME ,1,4)
    LEFT([0COSTELMNT].currentmember.UNIQUENAME ,2)
    RIGHT([0COSTELMNT].currentmember.UNIQUENAME ,3)
    Didier

  • Switch between layers in a BEx MAP

    Hi,
       Does anyone have an idea how to switch between layers in a BEx Map? And manipulate the attributes on the MAP in WAD. I ever saw a demo of such a web template which could do that.
    Thanks,
    CK

    Hi,
    here is some javascript which might be useful in your case
    function create_checkbox(mapitem) {
       var prop = SAPBWGetItemProp(mapitem);
       if (prop != null){
          map_panel_html = "<form name="map_panel_input">";
             for(k=1;k<prop.length;k++){
                if (prop[k][0].substr(0,7) == "SUBITEM") {
                              prop2=SAPBWGetItemProp(prop[k][1]);
                              hidden = true;
                              if (prop2 != null) {
                                           for(l=1;l<prop.length;l++){
                                                  if (prop2[l][0] == "HIDDEN") {
                                                        hidden = (prop2[l][1] == "X");
                              map_panel_html = map_panel_html +
                              "<input type="checkbox" name="" +prop[k][1] +
                    "" value="" + prop[k][1] +
                   "" onClick="change_map_layer(this.value, this.checked)"";
                            if (!hidden) {
                                 map_panel_html = map_panel_html + " checked";
                            map_panel_html = map_panel_html + "> "+ prop[k][1] +"<br>"    ;
         map_panel_html = map_panel_html + "</form>";
        document.getElementById("map_panel").innerHTML = map_panel_html;          
    function change_map_layer(maplayer, show) {
       if (show) {
          location.href="<SAP_BW_URL>" + "&item=" + maplayer + "&hidden="
       else {
          location.href="<SAP_BW_URL>" + "&item=" + maplayer + "&hidden=X"
    Just add additional a
    <div id="map_panel"></div>
    <script type="text/javascript">
    <!--
       create_checkbox("MAP_1")
    -->
    </script>
    in your Web Template and  replace MAP_1 with your web item name.
    This code will check the map for its layers and you can show or hide them.
    Heike

  • Webi Drill on a dimension using substring

    Hi,
    I have the webi drill functionality working on dimensions, however I would like to use substring on one of the dimensions, when I do this I loose the ability to drill.  Anyone have a work around?
    The universe is a BEX query so I believe I can't use substring or the "RIGHT" command.  Additionally the field is fiscal period I want to substring,
    Thanks,
    R

    When you are using some formula, you will loose the ability to drill. What you can do is to create an object in the universe itself and use that in the hierarchy. But In case of OLAP universe, I don't think you can use any function to get the substring. So alternatively, you can have a separate detail webi report with similar structure and pass the drilled dimension value from the summary report to the detail report's filter.

  • #unavailable error when using substr() on merged dimension

    Hi, I'm using WEBI on SAP IK SP2 and BO SP 2, and I'm having difficulties with the Substr() function.
    All the dimensions and measures are from SAP Bex Queries. The measures are all set to not delegated in the universe.
    When I merge a 4 dimensions to one (from 4 different subqueries) I can display the merged dimension just fine in a table. Hovwever, when I try substring it - #unavailable appears across all measures in the table.
    #unavavailble appears regardless if I subtr vi variable or directly in a table.
    Please advise.
    BR
    Jess

    Hi,
    This is because your smart measure does not have a value for the defined context.
    When you are using OLAP universe, by default, all your measures will be smart measures (measures with aggregation as database delegated).
    When you are using these smart measures in webi report, you can not apply a formula in the dimentions defining the context of the measure. If you do so, you will get #UNAVAILABLE error.
    I shall suggest to use a different aggregation in the universe for the measure.
    Smart measures are used for measures with non-additive aggregation which can not be handled by webi properly.
    Regards

  • IF and ABS condition statement in BEX query designer

    Hi,
    I would like to ask the best way for me to produce an acceptable result from Excel IF and ABS Condition statement.
    The condition statement that I have on my Excel file is
    =IF((A2-B2)>0,ABS(A2-B2),0)
    I'm trying multiple times to reproduce this in BEX Query designer, unfortunately I'm getting a bad result or unacceptable formula.
    Anyone who could help me with my issue?
    Thanks,
    Arnold

    Hi Arnold,
    Thank you,
    Nanda

  • Inconsistency between Bex and Back end

    Hello, I have a query about bex issue. I have few fields in my DSO/Cube which has data showing correctly in the back end but in Bex it shows partial of those values. like if i have something like this:
    ZField
    000000000000000000008
    It shows correct in DSO table but in Bex it only shows the zeros. do you know why and how to get this to show the whole field value?
    Thanks.
    By the way this is a characteristic and not keyfigure.

    Hi Vekant,
    If you have not did any speecific thing at query level then value should be shown correctly.
    Please try this once and check.
    Create new test query on your data target drag and droup your charecteristic.please execute your test query and see if you are able to see the correct value.
    try this.
    Regards,
    Ganesh Bothe

  • Error while trying to Open and Delete a BEx Query in Query Designer.

    Hi Experts,
    I have been facing this issue with BEx Query in Designer mode for a couple of days now in Development Environment in BI 7.0.
    I would like to Delete an unwanted BEx Query because I need to give it's name to another BEx Query.
    Whenever I try to Open this Query in BEx Query Designer to Delete, it gives out an error saying:
    "An error occurred while communicating with the BI server.
    As a result of this error, the system has been
    disconnected from the BI server.
    Detailed Description:
    STOP: Program error is class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    STOP: System eror in program CL_RSR and form GET_CHANMID-01 - (see long text)"
    Details text is as below:
    Diagnosis
    This internal error is an intended termination resulting from a program state that is not permitted.
    Procedure
    Analyze the situation and inform SAP.
    If the termination occurred when you executed a query or Web template, or during interaction in the planning modeler, and if you can reproduce this termination, record a trace (transaction RSTT).
    For more information about recording a trace, see the documentation for the trace tool environment as well as SAP Note 899572.
    I have tried with SAP Note 899572, but still it's the same.
    Has anyone faced similar issue? Could you please let me know if you have better ideas or solution?
    Your time is much appreciated.
    Thanks,
    Chandu

    Arun - Thanks a million. You saved me Nine. It worked.
    Could you also please tell me how to rename (Technical) a Query or is it still "Save the Query As" the only way...?
    Points already assigned.
    Thanks,
    Chandu

  • Report performance while creating report on BEx

    All all!
    I am creating a report on BOE 4.0 on top of BEx connection as a source. I have developed reports on top of universe in the past and i know that if we keep calculations on reporting end it hampers the report performance. Is this the same case with BEx? if we are following the best practices is it ok to say that we should keep all heavy calculations/ aggregation on BEx or backend for better report performance.
    Can you guys please provide your opinion based on your experiance and knowledge.  Any feedbacks will help! Thanks.

    Hi,
    Definitely  best-practice to delegate a maximum of CKF to the Cube where possilble,  put RKF in the BEx query, and Filters too.
    also, add Default Values to your Variables (this will speed up generation of the bics transient universe)
    also, since Patch2.10, we are seeing some significant performance improvements  reducing 'document initialization' and  'time to prompts'  by up to 50% (step such as these often took 1.5 minutes, even on sized systems)
    Also, make sure you have BW corrections like this implemented:  1593802    Performance optimization when loading query views 
    In the BusinessObjects landscape - especially with BI 4.0 - it's all about Sizing and Tuning . Here is your bible the 'sizing companion' guide : http://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000738725&_OBJECT=011000358700000307202011E
    Pay particular attention to BICSChunkSize registry settings
    Also, the  -Xmx JVM Heap Size for the Adaptive Processing Server  that is running the DSL_Bridge service.
    Regards,
    H

  • Bex-report issue

    Hi
    I created a query in Bex-Query Designer - 3.5.. Then publish that report in the Web by using Bex-Analyzer.
    Suppose i have columns in the report like 'vendor' and 'PO Number'. When the cursor goes to 'vendor' column heading then im getting as <b>"Context Menu for vendor"</b> by default.
    i dont want by default .. I want to make this by custome (like i want Vendor Analysis) . How can i get this
    please let me know
    kumar

    Hi ravi
    Yaa im asking same thing. When i put cursor on the 'vendor' or 'PO number' then im getting "Context Menu for vendor " or "Context Menu for PO Number" by default.
    I dont want this one. I want custom one like "vendor Analysis" or "PO Analysis".
    How can i get this one . pls let me knpw
    i ll assing the points
    kumar

  • How can we remove the commas from the Formula value in SAP BW BEx query

    Hi All,
    How can we remove the commas from the Formula value in SAP BW BEx query
    We are using the formula replacing with characteristic.The characteristic value needs to be display as number with out commas.
    Regards
    Venkat.

    Do you want to remove the commas when you run the query on Bex Web or in RSRT?
    Regards

  • Concatenation of Data from 4 infoobjects into a single cell in Bex Report

    Hi,
    I have loaded ODS with the description data. The source system for loading the ODS is the flat file. The ODS data should be a replica of the flat file.
    In the flat file, there is a description field corresponding to a particular ID. This Description is greater than the standard 60 char length. So, I had to split the description while loading the flat file using single line routine in the Transfer Structure.
    So, while loading different  the data, I split the description field data from the flat file into 4 infoobjects and the flat file data was loaded into the ODS.
    Now, from the reporting point of view, I need to display the entire description data from the 4 info-objects into a single cell in the Bex report.
    Please suggest a solution for this.
    <b>****Points will be awarded***</b>

    Hi Vineet,
    Thanks for the response.
    Could you please help me out with the VBA script(code) that needs to be written in the macro.
    Thanks in Advance.
    <i><b>****Points will be awarded****</b></i>
    Regards,
    Hitesh Shetty.

  • Variable screeen popup with button in bex

    Hi ,
    When I try to display variable screen using a button in bex, I get the following error. has anyone come across this. pls advise.
    BExItemButton.RenderData01: Unable to get the Item property of the OLEObjects classErr: Unable to get the Item property of the OLEObjects class
    Kartheek

    Sounds front end related, are all your Front end patches (FEP) upto date.  Might be worth downloading FEP 11.
    Cheers,
    Pom

Maybe you are looking for