Define constant in query 3.5

In the moment I use a hierarchy variable and fill this variable via VBA makro. ( I have 4 different values (hierarchy nodes) for the variable)) But the customer wants to avoid VBA makro.
The variable is used in a row structure different times.
The variable should get a fixed value inside the query at one place. (Use default value is not an option) and then 4 different queries with different values should be stored.
So I want to use a constant instead of a variable. But where to define a constant (as used in a programming language) in the query designer 3.5 ?  Or is there an option in  query designer 7.0 ?
There exits u201Cconstant selectionu201D but this brings no solution here.
In cell definitions there is the possibility to use a help cell (on the low left) and reference on that cell in other cells. But this works only in the cell grid. Outside this help cell canu2019t be referenced.
Hope someone was an idea u2026..

Hello,
if you want the place the constant value as some numeric and use it for your calculations, then u can create a formula/CKF and key the nos e.g 40 and save it.Now u can use it.
else,
you can create a formula variable and populate the required value in it.
Also u can write an exit to populate teh exit variable to the required constant value.
Reg,
Dhanya

Similar Messages

  • Right way of defining constants - Interfaces or Classes?

    Two widely used ways to define constants in java projects are:
    1. Interfaces - Define constants in interfaces, they automatically become static, final and then implement the interface in concrete classes that need those constants.
    2. Classes - Use normal classes and define explicitly as static, final. Use CLASS_NAME.CONSTANT_NAME to access the constant in concrete classes.
    I have gone through the web on Best-practices for defining constants and its strongly recommended for not using Interfaces for defining constants.
    "The constant interface pattern is a poor use of interfaces. That a class uses some constants internally is an implementation detail. Implementing a constant interface causes this implementation detail to leak into the class's exported API. It is of no consequence to the users of a class that the class implements a constant interface. In fact, it may even confuse them. Worse, it represents a commitment: if in a future release the class is modified so that it no longer needs to use the constants, it still must implement the interface to ensure binary compatibility. If a nonfinal class implements a constant interface, all of its subclasses will have their namespaces polluted by the constants in the interface. " from     Effective Java, Joshua Bloch
    What is your take on this?
    Rgds

    I have gone through the web on Best-practices for defining constants and its strongly recommended for not using Interfaces for defining constants.
    "The constant interface pattern is a poor use of interfaces. That a class uses some constants internally is an implementation detail. Implementing a constant interface causes this implementation detail to leak into the class's exported API. It is of no consequence to the users of a class that the class implements a constant interface. In fact, it may even confuse them. Worse, it represents a commitment: if in a future release the class is modified so that it no longer needs to use the constants, it still must implement the interface to ensure binary compatibility. If a nonfinal class implements a constant interface, all of its subclasses will have their namespaces polluted by the constants in the interface. " from     Effective Java, Joshua Bloch
    I don't like grouping constants into an interface. I prefer keeping them closer to the classes that use them.
    %

  • CANT execute query with parameter on user defined tables using query genera

    Dear All,
    I have problem when executing query with parameter on user defined tables using query generator.
    It seems SBO cannot accept parameter to query user defined tables.
    I've tried these:
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = [%0] --- this FAIL
    I try to pass the value directly without using parameter and It works
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = 2 --- this SUCCESS
    This one works
    SELECT * FROM RDOC T0 WHERE T0.width =[%0]  --- this SUCCESS
    and this one works too
    SELECT * FROM RDOC T0 WHERE T0.width = 595  --- this SUCCESS
    Is there anyone can help me ....???
    Thanks,
    Alfa

    I  generated this code using query wizard ....
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = (N'2' )
    and replaced the (N'2' ) with [%0]
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = [%0]
    and It worked ......
    Thanks 4 all .....

  • Can you define constants in Report Painter?

    Hi, I'm new to Report Painter and SAP in general. I was just wondering if it's possible to define constants that are visible across reports. e.g. In the header text for all our reports, we want our company name to be displayed. But instead of hardcoding it, we want to retrieve it from a constant or variable.
    Does anyone know if this is possible?

    Hi Andrew,
    Thanks for the response but this isn't exactly what I was looking for. From my understanding, the "Sel. Parameters" button allows you to access and display values that were entered by the user in the selection screen of the report (correct me if I'm wrong). What I'm aiming for is something like a global variable defined on the backend that all reports can access.
    I've looked at the other buttons that you pointed out, but it seems like I'm only able to use some pre-defined tables and fields. Does this mean that there isn't any way for me to define and use my own customized variables for reports?
    Thanks,
    Carlo
    Edited by: CarloInting on Jul 21, 2009 5:45 AM

  • Unable to run user defined table in Query Generator...

    hi experts,
                         iam unable to run the user defined table in query generator..this is the query iam using...
    Select T0.U_Date from dbo.@ENQHEAD T0 where T0.U_EnqNo='[%0]'
    When i run this query it popups a window & asking EnqNo,when i select any enquiry no it's saying an error like----- Incorrect syntax near '@ENQHEAD'. iam unable to solve the above problem can anybody suggest me sme ideas....
    thanking you,
    shangai.

    Hi Shangai,
    I've just tried to reproduce the issue and found the following query worked correctly for me:
    SELECT T0.[Name] FROM [dbo].[@D01]  T0 WHERE T0.[U_SO]  = '[%0]''
    The only difference I can see is the square brackets [] in my query?
    Regards,
    Niall

  • How to set pre-defined constants via FXML

    Does anymode know how to set a pre-defined constant like javafx.scene.control.Control.USE_PREF_SIZE via FXML when you create a node?
    Instead of using a fixed value like this
       <Label text="Last Name:" minWidth="100" />I would like to use one of the predefined sentinel values like this.
       <Label text="Last Name:" minWidth="USE_PREF_SIZE" />The above example does not seem to work and I have the feeling that this is currently not possible at all.

    How did you get that working? When I use the following file I only get a warning that "javafx" is not defined.
    Defining var A seems to work but it fails on var B. It seems to be impossible to access anything outside the
    java... hierarchy. Is there anything else you have to define?
    <?xml version="1.0" encoding="UTF-8" ?>
    <?language javascript?>
    <?import javafx.scene.*?>
    <?import javafx.scene.layout.*?>
    <?import javafx.scene.control.*?>
    <StackPane xmlns:fx="http://javafx.com/fxml" >
         <fx:script>
              var A = java.awt.Component.BOTTOM_ALIGNMENT;
              var B = javafx.scene.control.Control.USE_PREF_SIZE;
         </fx:script>
    </StackPane >   

  • Defining constants

    I am still completely baffled by my misbehaving tables, so I
    thought I would try
    Murray's suggestion and get rid of the colspans and rowspans.
    While I was about
    it, I thought would be nice to centralise all my magic
    numbers (such as the
    colour of the body of the table, the tables containing the
    images, and so on) in
    the CSS file.
    For example I might wish to define body_colour as #f8f8ff.
    This ought to be
    (and undoubtedly is) dead easy, but, despite all the books on
    CSS I have lying
    around, none list "defining constants", or any equivalent I
    can think of, in the
    index. Nor can I find any examples which demonstrate how to
    do this.
    So the question is
    a. How do I define a constants in the CSS file, and
    b. How do I use it in the HTML?
    [email protected]

    First, please get rid of the spaces in your filenames!
    <img src="Images/Mr Vet.jpg"
    Also, note that any given ID can only be used ONCE on any
    page -
    <table id="pictureframe">
    <table id="pictureframe" align="right">
    If you want to do this kind of thing, make it a custom class
    selector (e.g.,
    <table class="pictureframe">
    , or figure out how to use descendent selectors
    to cascade into each desired element. You double instances of
    #pictureframe
    is most likely the cause of your results.
    Your CSS is way unnecessarily verbose, redundant, and
    cluttered, but I
    suspect that's not what you are looking for right now.
    > The image frames clearly have 2px or 3px of padding, but
    I cannot
    > find out where this value comes from, or how to change
    it.
    Most likely from the text box within which all inline tags
    are rendered.
    Try adding "display:block" to your image CSS to see if that
    would fix this.
    > However the pictures are in the editable region of the
    template, so if I
    > specified the values in the template I would be unable
    to modify the
    > appearance
    > of the images once the pages had been created.
    Sure you can. Just add a little stylesheet to the editable
    region in the
    head of the child page to override the base CSS.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Clancy" <[email protected]> wrote in message
    news:[email protected]...
    > Bonnie <"kroko[Occam]"@pixelplum.com> wrote:
    >
    >>It would be better to post a link to the page;
    otherwise it's still a
    >>bit hard to see what you are trying to do. I assume
    from the above you
    >>are placing all your photos inside single-cell
    tables?
    >
    > Yes; I have put an example of what I am trying to do at
    >
    http://www.cybec.com.au/Test_nstdpage.htm
    >
    > I have got a little further with my experiments. The
    specification for
    > the
    > picture frame is now
    >
    > #pictureframe {width: 5%; background-color: #d8d8f0;
    border: 5px solid
    > #88d8e0;
    > }
    >
    > I have finally got the border to work properly, though I
    had no idea why
    > it
    > wasn't working half an hour ago -- I could have sworn
    that I had exactly
    > the
    > same code that have now. I don't want a border at all; I
    just want to
    > specify
    > some padding. The image frames clearly have 2px or 3px
    of padding, but I
    > cannot
    > find out where this value comes from, or how to change
    it.
    >
    > However, with what I have got working, I can fake the
    result I wants by
    > setting
    > the border colour to be the same as the background
    colour. I guess this
    > will
    > do, unless someone can tell me how to make the padding
    work.
    >
    > And, in case you are wondering why I want to specify
    these values in the
    > CSS
    > file, rather than the template, if they are in the CSS
    file I can change
    > the
    > appearance of every image on the web site by changing
    the specification of
    > the
    > picture frame.
    >
    > However the pictures are in the editable region of the
    template, so if I
    > specified the values in the template I would be unable
    to modify the
    > appearance
    > of the images once the pages had been created.
    >
    > [email protected]

  • Defining constants/enums with const in JavaScript

    Hi folks,
    I like to define constant enums like the InDesign DOM already provides, e.g.:
    SpecialCharacters.FORCED_LINE_BREAK
    StateTypes.DOWN
    etc.
    I like to define such enums too. The only approach I found was:
    const MY_ENUM = {TOP:"top",DOWN:"down"}
    But this is not write-safe. I can add properties/functions to MY_ENUM as well as change the value of TOP. Thats not desirable.
    Whereas the InDesign DOM enums are readonly. The enum object as well as the value/property. How can I define such type with JavaScript?
    Thanks for your comments
    Cheers Tino

    Alternatively, it is sufficient if you create an output terminal named CO in this case. No need to connect it, of course.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    FormulaNode.gif ‏3 KB

  • How many conditions and exceptions  can be defined in a query?

    hi,
    Can any one tell
    How many conditions and exceptions  can be defined in a query?
    i.e
    How many condtion can be defineon an keyf igure with respective to charecteristics?
    Because if we define more conditions on one keyfigure with respective to different chars,there might be some overlap among the conditons andconditions might not work.
    Am i coorect?
    Similary for the exceptions also.
    Simply to be asked aswhat are the limitations of conditons and exceptions?
    Regards
    Naresh

    Hi Naresh,
    In Query we can no limit for creating Condition & Exception
    but Creating Condition : You can create two condition in a single condition it's work 'OR' Condition.
    You can build different condition it will work "AND' Condition.
    Thanks & Regards,
    Venkat.

  • What is the best way to define constants in SOA ?

    Hi,
    What is the best way to define constants in SOA/BPEL ?

    I want to define at composite level. I have several BPELs in my composite. I have lot of Status and some other codes I need to check/compare/assign in assign activity and xslt transformations
    Ii can use BPEL preferences , but they only applies to that particular BPEL. I want to define all my codes in one place at composite level.
    Thanks
    --Sreeny
    Edited by: sreeny on May 29, 2012 8:59 AM

  • Itunes connect test user constant login query

    Hi, I'm currently working and an app in Sandbox mode testing iAP's.  Neither the app nor bundles have ever been released live.
    I've run through my test users making purchases etc. but now I am getting a constant nag/query to login every time I open my app to test.
    I've deleted the test user account from iTunes Connect, restored my device from factory, logged in with different real and test account to no avail.
    How can I get this test user login nag to stop.
    Thanks in advance.

    Same here
    I do get the emails and can verify the accounts but they won't show up under the test accounts

  • How to make user-define value's query

    Dear All,
    In we have 3 user-defined fields in marketing document. When I type in field 1 and field 2, we need line total = field 1 * field 2.
    Would it be possible for me to config it in SAP? I setup a user-define value and have a query for it. Make it updated when field 2 changed. But when I am not clear on how to write the query. I have a query select $[POR1.U_Field1]*$[POR1.U_Field2]
    But I got an error message. It has to be some syn error in my query.
    It is a service type document so that I cannot have a where POR1.Itemcode = ...
    Can anybody help me out? Thanks in advance.
    Regards,
    Yuka
    Edited by: Jie Jin on Mar 23, 2010 7:28 PM

    I use Select $(Por1.Price.number)*$(Por1.U_Numberofunit.number)   //replace ( to [
    The price was been change to null. Then my query is like select *6. Thanks.
    Edited by: Jie Jin on Mar 23, 2010 7:42 PM
    Edited by: Jie Jin on Mar 23, 2010 7:44 PM

  • How to ignore a variable defined in a query when the query gets executed

    Hi SAP guru, I am creating a query, which has a user input variable, say A, and a replacement path variable, say B, Bu2019s value is determined by A and the whole purpose of A is letting user entering an initial value and A must be ignored when the query gets executed. How can I achieve this in query designer?
    Thanks

    Hi, thanks for the reply. Actually this is not my problem. My problem is the query should be filtered by  a variable, say B, but B is not allowed to be entered directly by user (i.e. B could be a replacement path variable or user exit type). So B has to be derived from another user input variable, say A. However if I defined A in the query, A is by default used as one of the filters, which is not desirable because A is a subset of B in my case and should be ignored.
    Is there options (settings) that allow the query ignore a specified variable (A) ? If not is there other ways to get around this?
    Thanks
    MichScott

  • How can I access user defined column(in query) inside the trigger?

    Hi
    I have 3 unions and each query displays different records on some criteria. I also have a column hard-coded
    Ex:
    select a.col1, a.col2,
    add as update
    from table1 a
    where ...
    union
    select a.col1, a.col2,
    change as update
    from table1 a
    where ...
    union
    select a.col1, a.col2,
    del as update
    from table1 a
    where ...
    And I need to display a column in the report only if update is Add. I was thinking of writing a format trigger for that field. But I do not know how can I access this user defined column named update in the trigger?
    Any help?

    Try ":update" minus the double-quotes. Ex:
        IF :update = 'add' THEN
          RETURN(TRUE);
        ELSE
          RETURN FALSE;
        END IF;
    You'll want to place your hard-coded values in single-quotes. Ex:
        select a.col1, a.col2,
        'add' as update
    - Brian

  • Defining constants in formula node

    I apologize for the seemingly elementary level of this question, but nonetheless it continues to puzzle me. I am trying to enter several constants in a formula node and continually get the error message 'undefined variable' for the first defined. An example is shown below for the statement: 'CO = 192600;'
    Error on line 1 is marked by a '#' character: "CO# = 192600;
    I feel there is a problem with the way i am trying to define the constant (CO). Am I missing something? Since there are so many constants, I prefer to define the constants within the node instead of inputing on the border. Thanks in advance.
    Philip

    Alternatively, it is sufficient if you create an output terminal named CO in this case. No need to connect it, of course.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    FormulaNode.gif ‏3 KB

Maybe you are looking for

  • HP U160 not support for Windows 8.1

     i brought the new HP U160 Moniter it's working good in Win 8 but when i upgrade the Windows 8.1 not detacting HP U160 Moniter and i searched for drivers in Web site there are  all so no drivers noly have Windows 8 drivers, there are no drivers for W

  • Muse to Dreamweaver (Social Network capabilities in muse?)

    Hello,     Alright I'm a beginner here with these products so I apologize if any of these questions or statements are a little slow. So right now I'm trying to create my first website, using whatever software is needed (I just purchased creative clou

  • Remove log in password

    I have just updated to yosmite and in the setup it puts a password in to open your mac. I would like to know how to remove this please.

  • FIFA 13

    I have macbook pro 13 mid 2012. Intel hd4000 graphics. 4gb ram what best game settings can i use to play fifa 13 smoothly on my mac.?

  • REG:http to webservice

    Hi , Iam new to XI and had developed a http to webservice scenario.when I send the request through http adapter Ian getting the response as an error <SAP:Error><SAP:Category>XIAdapterFramework</SAP:Category><SAP:Code>MESSAGE.GENERAL</SAP:Code><SAP:Ad