SAP Personas  - Use of variable in IF statement

Hope someone can assist with this script
I am storing a value from a dropdown box in a variable so this can be used latter when I am in a different screen within same script.
But the problem I am facing is if i perform a if statment against a variable , it does not work
What I do in test script
1) copy value from drop down into varable
2) paste value to textbox to test value
3) if check is equal for value (N506) in variable "site"
4) if true, put "tested ok" in text box.
if perofrm the test on the dropdown box directly...  it works
if perform the test on the textbox i copied variable to... it works.
if perform test on variable directly...it fails...
Doing the test in the first two cases, will not work , as the textbox and dropdown box will not be on screen , when i need to perofm the if statement.
I am suspecting the if statement is interpurting the word site, as a text rather then a varaible name, so how can  read a variable and use it in a if statement, without using a box on the screen itself.
Any help is appreciated.

thanks Tamas....   i knew it was something simple...  code works great now.

Similar Messages

  • Using bind variables with sql statements

    We connect from a VB 6.0 program via OO4O to an Oracle 8.1.7 database, using bind variables in connection with select statements. Running ok, but performance again by using bind vars not as good as expected!
    When looking into the table v$sqlarea, we were able to detect the reason. We expected that our program submits the sql statement with bind vars, Oracle parses this once, and with each select statement again, we do not have a reparse. But: It seems that with each new session Oracle reparses the sql statement, that is, Oracle is not able to memorize or cache bind vars and statements. Even more worrying, this kind of behaviour was visible with each new dynaset, but the same database/session.
    Is there anybody our there with an idea of what is happening here?
    Code snippet:
    Dim OraSession As OracleInProcServer.OraSessionClass
    Dim OraDatabase As OracleInProcServer.OraDatabase
    Set OraSession = CreateObject("OracleInProcServer.XOraSession")
    Set OraDatabase = OraSession.OpenDatabase(my database", "my connect", 0&)
    OraDatabase.Parameters.Add "my_bind", 0, ORAPARM_INPUT
    OraDatabase.Parameters("my_bind").DynasetOption = ORADYN_NOCACHE
    OraDatabase.Parameters("my_bind").serverType = ORATYPE_NUMBER ' Bind Var Type
    Dim RS As OracleInProcServer.OraDynaset
    strSQLstatement= "Select * from my_table where igz= [my_bind] "
    Set RS = OraDatabase.CreateDynaset(strSQLstatement, &H4)
    OraDatabase.Parameters("my_bind").Value = myValue
    RS.Refresh
    Cheers and thanks a lot :)
    Michael Sonntag

    We connect from a VB 6.0 program via OO4O to an Oracle 8.1.7 database, using bind variables in connection with select statements. Running ok, but performance again by using bind vars not as good as expected!
    When looking into the table v$sqlarea, we were able to detect the reason. We expected that our program submits the sql statement with bind vars, Oracle parses this once, and with each select statement again, we do not have a reparse. But: It seems that with each new session Oracle reparses the sql statement, that is, Oracle is not able to memorize or cache bind vars and statements. Even more worrying, this kind of behaviour was visible with each new dynaset, but the same database/session.
    Is there anybody our there with an idea of what is happening here?
    Code snippet:
    Dim OraSession As OracleInProcServer.OraSessionClass
    Dim OraDatabase As OracleInProcServer.OraDatabase
    Set OraSession = CreateObject("OracleInProcServer.XOraSession")
    Set OraDatabase = OraSession.OpenDatabase(my database", "my connect", 0&)
    OraDatabase.Parameters.Add "my_bind", 0, ORAPARM_INPUT
    OraDatabase.Parameters("my_bind").DynasetOption = ORADYN_NOCACHE
    OraDatabase.Parameters("my_bind").serverType = ORATYPE_NUMBER ' Bind Var Type
    Dim RS As OracleInProcServer.OraDynaset
    strSQLstatement= "Select * from my_table where igz= [my_bind] "
    Set RS = OraDatabase.CreateDynaset(strSQLstatement, &H4)
    OraDatabase.Parameters("my_bind").Value = myValue
    RS.Refresh
    Cheers and thanks a lot :)
    Michael Sonntag

  • Give me details about  customer exit, sap exit using characterstics variabl

    give me details about  customer exit, sap exit using characterstics variable

    Hi,
    Customer Exit:
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/content.htm
    SAP Exit:
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm
    Characteristic Variables:
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/8db07d555411d189660000e829fbbd/frameset.htm
    SAP and Customer Exit:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    Some Imp Docs:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/650ee690-0201-0010-4bb7-83c3e2a74039
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/009819ab-c96e-2910-bbb2-c85f7bdec04a
    Assign points if these are helpful.
    Rgs,
    I.R.K

  • SAP Personas using SSO to connect SAP ECC

    Hi,
    We configured SAP Screen Personas test landscape.
    When I launch the mainapp page, the system is prompting for user credentials.
    Then I get "System Selection" screen where the system I have configured  (SAP ECC).
    When I click on system backend, an new popup ask for user and password (SAP ECC credentials).
    We are trying to understand if it is possible configure SSO to access ECC backend.
    So, the ECC backend credentials will not be required anymore.
    I am not sure if it is possible this configuration.
    According SAP note 1684886 - License conditions of SNC Client Encryption, I think this scenario requires additional license.
    Any help to resolve this is highly appreciated.
    Best Regards,
    Leonardo.

    The project requirement is avoid the user can log in with SAPGUI and run the standard transaction.
    So, the user can log in only with SAP personas user/password and run the transaction on backend with a modified screen with the restrictions of authorization roles.
    Regards,

  • Use of variables in SQL statements

    Hi,
    I am looking for for a way to set a variable which will be referenced several times within a UNION query.
    Something like:
    Var=3
    SELECT * FROM VIEW_1 WHERE FIELD_1 = Var
    UNION
    SELECT * FROM VIEW_2 WHERE FIELD_1 = Var
    UNION
    SELECT * FROM VIEW_3 WHERE FIELD_1 = Var
    Instead of something like:
    SELECT * FROM VIEW_1 WHERE FIELD_1 = 3
    UNION
    SELECT * FROM VIEW_2 WHERE FIELD_1 = 3
    UNION
    SELECT * FROM VIEW_3 WHERE FIELD_1 = 3

    I'm sure that for this you were requiring a database solution and not a sqlplus solution ? If so, then you have a couple of options:-
    1) change the Var to a function call and have the function return a packaged variable or value in a lookup table that you can set as you require [ i.e. WHERE FIELD_1 = your_function ].
    2) use an application context, such that you set an attribute within the context and use it within the view [ i.e. WHERE FIELD_1 = SYS_CONTEXT( 'your_context', 'your_attribute' ) ].
    In both methods, you will need to set the value of your variable before referencing the view. The view therefore becomes "parameterised" in this sense.
    It might be possible that your view is mergeable. By this I mean that Oracle might be able to push a predicate against the view inside it instead, such that Oracle rewrites this:-
    SELECT <cols>
    FROM your_union_view
    WHERE field_1 = 3;
    ...and takes that value of field_1 = 3 and "pushes" it into your_union_view itself, in which case you will not need to worry about any of the above solutions. You can test this out by removing the where clauses from your view definition and running an explain plan against a query of the form above. If you see a "VIEW" step in the results, then the view is not mergeable in its current form and you should revert to the methods I listed.
    Regards
    Adrian
    For this you can use application contexts

  • Can we use repository variables in SQL statement of column prompt?

    Hi Dudes,
    Below is the query
    SELECT "- End Date"."End Fiscal Year" FROM "Consumer Sector" WHERE ("- End Date"."End Fiscal Year" = valueof (current_year)) or ("- End Date"."End Fiscal Year" = valueof (current_year) -1)
    when use this sql in criteria prompt getting error.
    Please suggest .
    thanks.sri

    Make sure your syntax is correct it should be like VALUEOF("CURRENT_YEAR")-1
    If you still have issues then VALUEOF("CURRENT_YEAR")-1 cast it to int before you subtract.
    If helps pls mark as correct else let share error message

  • How to use escape character in update statement.

    Hi All,
    I'm trying to update table using following sql update statement, but everytime it's asking me for the input due to the '&' value in below sql.
    UPDATE xyz_xyz
       SET NAME = 'ABC & PQR'
    WHERE ID = (SELECT ID
                   FROM abc_abc
                  WHERE NAME = 'C & PQR');Please let me know how to use escape character syntax or let me know if there is any alternative solution.
    Thanks,
    Vishwas

    Hi,
    By default, & marks a substitution variable name.
    If you're not using substitution variables in that statement (or, if this is in PL/SQL, in that entire package or procedure) then the easiest thing to do is just diable substitution variables; then & will be a normal character:
    SELECT  DEFINE  OFF
    UPDATE xyz_xyz
       SET NAME = 'ABC & PQR'
    WHERE ID = (SELECT ID
                   FROM abc_abc
                  WHERE NAME = 'C & PQR');
    SET  DEFINE  ONIf you can't do that, then & is always taken literally if it comes right before a single-quote, so you could say:
    UPDATE xyz_xyz
       SET NAME = 'ABC &' || ' PQR'
    WHERE ID = (SELECT ID
                   FROM abc_abc
                  WHERE NAME = 'C &' || ' PQR');There is a SQL*Plus "SET ESCAPE" command, too, but if you use it, you have to worry about whether the escape character is to be taken literally or not.
    SET   ESCAPE  \Yet another alternative is to make some other character, such as ~, mark the substitution variables:
    SET  DEFINE  ~Read all about them in the SQL*Plus manual.
    http://download.oracle.com/docs/cd/B28359_01/server.111/b31189/ch2.htm#sthref103

  • PL SQL using bind variables

    I am very much new to PL/SQL to pardon my neivte.
    I would like to have some PL/SQL code that uses
    bind variables for insert statements and than issue
    commit's after a specific number of inserts.
    For example.
    desc xxx.taba
    a number
    b varchar2(20)
    I want to do someting like this:
    declare
    l_start number default dbms_utility.get_time;
    create or replace procedure insert_xxx(commit in number)
    begin
    for i in 1 .. 1000
    loop
    :a:=i;
    :b:=dbms_random.string('P', 20);
    intert into xxx :a :b;
    if i/mod=(number passed into to proc)
    commit
    end loop;
    dbms_output.put_line
    (round((dbms_utility.get_time-l_start)/100, 2) ||
    ' Seconds...' );
    end;
    end;
    Can somebody help me out with the correct syntax
    as I know it's incorrect.

    A few remarks
    - procedures don't have hidden variables defined in the outside world, as procedures are black boxes, which communicate only with the outside world
    using the actual parameter list
    - procedures don't commit. The caller should always commit!!!
    - procedures don't commit every <n> records. A commit finalizes a logical unit of work, not a technical one.
    If I would have been your supervisor and you would have presented this code, I would have fired you on the spot.
    Committing inside a loop also increases the likelihood of ora-1555 errors.
    So: remove the current parameter
    a and b should be formal parameters of the procedure
    Inside the procedure it should read
    insert into xxx values (a, b)
    Sybrand Bakker
    Senior Oracle DBA

  • Session variables in sap personas 2.0

    Hi ,
    Is there any way i can able to store values to a variable as global and use the same variable in different tcodes for sap personas flavors?
    Regards,
    Sivaganesh

    The technique Tamas Hoznek is referring to is described in this blog - Data caching in Personas scripts.
    Essentially you use "Calculate in JavaScript" actions to store data "globally", in other words in the browser window object. Those values persist between scripts and even between transactions. The disappear when the browser page is refreshed. I think this is what you are looking for.
    Be aware that this technique does still work in Personas 3 when run in a browser. However, Personas 3 is also supported in the native Windows and Java versions of SAPgui, and there this technique doesn't work. There is no "window" JavaScript object in the Windows SAPgui. There is a new mechanism supported in Personas 3 for storing data more persistently, so if you are building flavours that you want to be usable in the GUIs as well as in a browser, you'll need to plan to convert to this standard technique when you upgrade to Personas 3.
    Steve.

  • How do I use a variable within a sql statement

    I am trying to use a local variable within an open SQL step but I keep getting an error.
    My sql command looks like this "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  locals.CurrentSerialNo
    If I replace the locals.CurrentSerialNo with an actual value such as below the statement works fine.
    "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  " 'ABC001' " 
    Can someone tell me how to correctly format the statement to use a variable?

    Hi,
    Thanks for the reply. I have changed the required variable to a string, but with no success. I have reattached my updated sequence file and an image of the error.
    When looking at the Data operation step I see that the sql statement is missing everything after the last quotation mark.
    Thanks again,
    Stuart
    Attachments:
    Database Test Sequence.seq ‏10 KB
    TestStand error.JPG ‏37 KB

  • How to use a table name in the select statement using a variable?

    Hi Everybody,
                       I got a internal table which has a field or a variable that gets me some tables names. Now I need to retrieve the data from all these tables in that field dynamically at runtime. So could you suggest me a way out to use the select query which uses this variable as a table ?
    Regards,
    Mallik.

    Hi all,
    Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
    for ex : select * from (tab_name) where....?
    Can we do inner join on such select statements? If so how?
    Thanks & Regards,
    Mallik.

  • Using variable in select statement (php)

    I am having difficulty using a variable in a select
    statement.
    The following manual query (using a static date) works fine:
    $query_Recordset1 = "SELECT * FROM academyClasses WHERE
    classDate > '2006-06-01' ";
    However, If I use the following:
    $dateVar = date('Y-m-d');
    mysql_select_db($database_mw, $mw);
    $query_Recordset1 = "SELECT * FROM academyClasses WHERE
    classDate > $dateVar ";
    ALL records are returned, which means the $dateVar variable
    is not being recognized. I have compared the $dateVar values
    <?php echo $datetime; ?> against the actual value of my date
    field <?php echo $row_Recordset1['classDate']; ?> in my
    results table and it seems that the values are indeed accurate in
    terms of a date 2006-06-04 for example.
    My date field "classDate" is of a "date" type within the
    mysql database. I'm using Dreamweaver MX 2004 with Mac OSX 10.3.9.
    I'm sure this is just a syntax problem, at least I hope it
    is.
    Any help is greatly appreciated.

    On Wed, 7 Jun 2006 04:49:57 +0000 (UTC), "mgwaters"
    <[email protected]> wrote:
    >Thanks Gary. That did seem to get the select statement
    working, but I had to
    >enter a manual date as before $dateVar = '2006-06-01'; on
    the previous line of
    >code to actually get it to filter my records. So... it
    looks like my setting of
    >the date variable:
    > $dateVar = date('Y-m-d');
    > does not seem to be recognized within the SELECT
    statement.
    Try this:
    $query_Recordset1 = "SELECT * FROM academyClasses WHERE
    classDate>'$dateVar'";
    print $query_Recordset1;
    See what is in the SQL statement.
    Gary

  • How to make use of variable present in sap standard FM to custom badi.

    Hi All,
    Scenario: I am using a transaction which makes use of SAP standard FM. Also I have used a zbadi to achieve my requirement. While debugging, I found that when the control goes to zbadi, i am unable to make use of the variables which are defined in standard FM.
    Now my requirement is to make use of variables present in standard FM into zbadi. Can anyone suggest me how to achieve this?
    Thanks in Advance......[:)]
    Regards,
    Vinit

    if your system is NetWeaver 7.0 (ECC 6...), then you can use enhancement framework to add your code to the function module.
    Otherwise, you can only access them if they have global scope, using ASSIGN ('(SAPLfunction group name)GLOBALVARNAME') TO <fieldsymbol> (be careful, you could change variable value, so make sure you don't)

  • SAP Personas - Performance Testing using LR

    Hi,
    We are attempting to do Performance Testing on SAP Personas. For that end, we are trying to create some script using LR. However, there is a parameter which seems to contain some session information and we have been unable to locate it on the server response in order to correlate it.
    This is the parameter I am referring to which appears on the LR recording:
    web_custom_request
    ("xml",
      "URL=http://myserver:8001/sap(cz1TSUQlM2FBTk9OJTNhc2FweHJhX1hSQV8wMSUzYTRvUElUSmNyX2x3VmhwRkJ2aHhMT1RDQzVsbGxOZFZULS1JZjBIUVktQVR)/restgui/batch/xml",
    At this point, the script fails with a HTTP 400 message.
    I found certain similarity between the string above and the one on included on a cookie, almost at the start of the recording:
    set-cookie: sap-appcontext=c2FwLXNlc3Npb25pZD1TSUQlM2FBTk9OJTNhc2FweHJhX1hSQV8wMSUzYTRvUElZNER1YnB6Wk9mNlV2dExtbDJTOWwxbGxOZFZUOXZKQjBXckItQVRU; path=/sap(bD1lbiZjPTEwMA==)/bc/bsp/persos/mainapp
    Notice how from the strings match on 40+ characters...
    As for the other part of the sting, it does not appear anywhere on the server response.
    Any ideas would be greatly appreciated!
    BTW, we are using LR 11.00

    Hi Ricardo,
    I have never worked with LR but I can help you understanding the sequence of requests.
    Before the first post request ending with restgui/batch/xml is sent, there should be a get request ending with /restgui/newsession?sap-client=XXX. The response to this request contains the session ID you are looking for in its body.
    Cheers,
    Tobias.

  • Using Presentation variables..along with case statements..

    Hi All.
    I have a issue using presentation variable along with CASE statements. My approach is
    1) I have a dashboard prompt, which is being set as Presentation variable.
    Based on the value selected in prompt, for ex the values of prompt can be 'ABC' and 'DEF'.
    I have a calculated column, the calculation goes this way...
    The forumal is
    CASE WHEN @{Presentation Variable Name} = 'ABC' THEN xxxxxxxxxx ELSE IF @{Presentation Variable Name} = 'DEF' END. It gives error of "no table being referenced"..
    Is this is the right approach??
    Can i get the values of variable in a column formula, so that a column can have values selected in prompt?
    Can anybody pls help me here..
    Thanks in advance...

    Hi
    Thanks for the quick response..
    I agree to ur point..
    But the requirement is
    Based on the value of the prompt I need to switch the calculation in one of the formula area of one column..
    If Prompt value is ABC then one kind of calculation in Fx and If the prompt value is DEF then one kind of calculation in the same Fx..
    How can I acheive this?
    Thanks in advance..

Maybe you are looking for

  • How to create new java objects in native methods?

    Hello, Is it possible to create java objects and return the same to the java code from a native method? Also is it possible to pass java objects other than String objects (for example, Vector objects) as parameters to native methods and is it possibl

  • IMac to Win7 PC -- Help please!

    Hello to all, I have iTunes 11.0.1.12 (x64) on my iMac and iTunes 11.0.1.12 (x86) on my Win7 PC and i am trying to setup Home Sharing...the problem is that my Mac's iTunes can see the WinPC's Library, both in normal sharing and Home Sharing but the W

  • OMF Export Hangs

    I imported a FCP XML project and it seems to be just fine.  But now I'd like to export my project to OMF to go to Pro Tools.  The export process hangs (so does AAF)...any idea what could be causing this???  I have even tried to cut everything from th

  • IOS4 Excel Spreadsheet crashes in mail

    I have a person who I am supporting, when he goes to open an .xlsx document in his email, it goes to a gray screen for 1/2 a second then Crashes out to the main apple icons menu. He took his phone to the genius bar and was advised to Restore his phon

  • "Can't Mount iPod" Error

    I read that this could be because Windows is not installed on the C Drive. However, I can't install Windows on the C-drive, it's a network computer. Is there any way I can use my ipod on this machine? It can charge on this computer and when I plug it