Issue With Creating A VO with variables

Hi Guys,
I have a requirement to create a View Object based on the below query:
There is one *:global.sold_to_org_id* which i need to pass at two places.
This VO will be used as a LOV VO..I need to somehow pass this value at run time when the LOV is being prepared.Any help is highly appreciated
select org.name,p.party_name customer_name, org.organization_id, org.location_code, org.address_line_1, org.address_line_2, org.address_line_3, decode(org.town_or_city, null, null, org.town_or_city || ', ') || decode(org.region_1, null, null, org.region_1 || ', ') || decode(org.region_2, null, null, org.region_2 || ', ') || decode(org.region_3, null, null, org.region_3 || ', ') ||decode(org.state, null, null, org.state || ', ') ||
decode(org.postal_code, null, null, org.postal_code || ', ') || decode(org.country, null, null, org.country) address_line_4,
org.address_line_4 address_line_5
from oe_ship_to_orgs_v org, hz_cust_accounts c, hz_parties p
where org.customer_id in (
select to_number( *:global.sold_to_org_id*) customer_id
from dual
union
select cust_account_id from
hz_cust_acct_relate
where related_cust_account_id = *:global.sold_to_org_id*
AND STATUS='A' and ship_to_flag ='Y')
and org.status='A'
and org.customer_id=c.cust_account_id
and c.status='A'
and c.party_id = p.party_id
AND ORG.ADDRESS_STATUS='A'
order by org.name

Hi Ankit,
You can set extra where clause like this...
vo.setWhereClauseParams(null); // Always reset
vo.setWhereClause("TOP_SUPERVISOR= "+userid); //TOP_SUPERVISOR is Column Name of table.
vo.executeQuery();
Search thread like setWhereClause... You will learn more about it.
Thanks
--Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Having issue with variable after upgrade in bi7.0

    Hi,
    I have issue with variable
    For example Plant info object has attributes country, company code, storage location
    etc.
    When I run the report. If I click on plant variable it is showing me the all the data for all country , compony code , storage location. I donot want this.
    I just want only plant input values on variable screen
    Thanks,
    Naman Shah

    Naman,
    What is your SP level ?
    Also the characteristics mentioned - are they compounding attributes ? if yes then tey will come in your variable entry.

  • Issue with @variable('DOCNAME')

    I added a where clause using the BO designer that uses @variable ('DOCNAME') and it work perfect when running webi reports. But I also have some crystal reports that are using the universe and they suddenly stopped working. Does the variable 'DOCNAME' have an issue with cyrstal reports??
    Even if I just create an object that simply displays the @variable ('DOCNAME'), I still run into the same problem.
    I have another query that uses @variable ('BOUSER') and that one works fine on both webi and crystal reports.

    Nevermind, I may have found an answer. Based on what the article below states, it looks like the only variable that is supported in Crystal Reports is 'BOUSER'.
    [https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/20984c2b-17f1-2b10-1091-d18977f7cd8f|https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/20984c2b-17f1-2b10-1091-d18977f7cd8f]

  • Powershell Issue with Variable and Equal Signs

    I should have been using $line.grade, but your syntax worked so thanks!

    I've been running a powershell script to create active directory accounts at our school from a csv file. I'm needing to have users placed in a specific OU based on what grade level they are in, which is a field in the csv file and I have passed into the description field in AD. To keep from writing a bunch of if statements, I thought I might could pass the description variable into my organizational unit path, but I'm having syntax issues.Here is the specific line I have issues with.Powershell'ou' = "OU=$line.description, OU=LESStudents,OU=LES,DC=school,DC=k12,DC=state,DC=us"I've tried the single quote, double quotes, escaping the equal sign and some other methods I've seen online, but haven't quite gotten it right. It just isn't recognizing OU=$line.description as a variable.
    Disclaimer - I'm not a programmer and most of this was built...
    This topic first appeared in the Spiceworks Community

  • Issue with Variable Personalisation in Bex Report

    Hi Gurus,
    I'm facing a typical problem with Variable presonalisation in the Report.
    I've executed a BEX Report and filtered data on some characteristics and used SAVE AS Button on the Portal to save the resultset. When I'm trying to use the variants, again say after  2 or 3 days i couldn't find updated data for particular variants upon using the same variants rather its refelecting the old data. Further more when I execute the report and try filtering on the same criteria altogether, I'm able to see updated result set.
    Is there any setting to be enabled when we personalise variants or variants are dependent on the data or the date on which they are created. Not sure why the reports are behaving this way. Or Do I need to create variants time and again.
    Any pointers would be of great help.
    Regard,
    Yaseen

    Hello,
    In the BEx report, when you get the variable selection screen there input your selection and at the bottom you have the option of saving them as a variant.
    Now in future when you run the report simply use this variant and execute the report. It should work fine.
    Also remember date selection can be tricky. If you input todays date in the variant, it wil consider the same date in further references. So do a check on that too.
    Regards,
    Shashank

  • Issue with Variable Entry in BI 7.0

    Hi,
    I am having an issue with the variable entry in BI 7.0 Version. Here is a brief background.
    --- In BW 3.x, when we define a variable with <b>Single Value Option</b>, you can enter the value manually in the pop-up selection screen or select from the dropdown of possible values.
    ---But in 7.0 when i try to enter the value manually in the selection screen its opening the dropdown list, and is not giving me the option to enter a value manually. I am entering a valid single value in selection.
    Is this a bug or do i have to make any specific settings to correct my issue?

    When the selection screen pops up choose the KEY only function on the TOOLS on the top right corner of the screen. Then you will be able to enter the values manually.
    Hope this helps.

  • Audio sync issues with variable frame rates as well as .ts files

    I'm using Premiere Pro CS6 and CC, in Windows 8.
    I bought an AverMedia Live Gamer HD card to capture 1080p footage with, and the the videos it produces work perfectly during playback. No sync issues whatsoever. I'm saving them as MP4 at 30fps.
    The problem is when I import them into Premiere Pro, the audio loses sync at certain points. After a bit of digging, I've discovered that the videos have a variable frame rate, which Premiere Pro does not support. I don't know why, considering competing products that are significantly cheaper can handle them with a problem, but oh well. The capture card can also save videos in .TS format, which produces a constant frame rate, however when I import them into Premire Pro the sync is immediately off by a second or more. I assume this is for an entirely different reason. Again, they play back normally without a problem. Upon emailing AverMedia, I was told this was Adobe's problem and there was nothing they could do about it.
    What I'm wondering is if there is any sort of realistic solution to this as of now. Is there any way that Premiere can work properly with files that have a variable frame rate? If not, is this being worked on?
    Or maybe there's a way to get the .TS files back in sync, that way the variable frame rate issue doesn't matter anyway.
    Converting the files is not a long term solution. I'm working with hours and hours of HD video, and it would take way too much time to do this.
    Manually resyncing the audio is also not a solution. Again, this would just be way too much wasted time with each project.
    The only solution I see as of now is to switch to Sony Vegas until this problem is resolved in Premiere, if it ever is. I'm really hoping there is some other way, so if anyone has an idea as to how to fix this, I'd really appreciate it.
    Thank you.
    tl/dr:
    Is there any way to get around Premiere Pro not working with variable framerates? My .TS files are also out of sync, is there any way to fix that? Without converting or manually resyncing.

    >If not, is this being worked on?
    Discussed many times before... never a "yes" answer to your question... tell Adobe what YOU want at https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    If enough people make a request, Adobe MAY add the feature (I don't work for Adobe, so no guarantee of anything)

  • Issues With Variables

    First, let me send a thanks to PBrock and Cotton for their help with my last issue I had with a program. You guys helped tremendously!
    Now onto the latest issue with my code I compile this and get two error messages saying that the variables (again) and (exit) cannot be found. I have a sneaky suspicion that once I figure these two errors out that I'm going to get slammed with a bunch more but I do have my fingers crossed on this one.
    Here's the code
    //=====================================
    // OpSpecs5.java    Author: Michael Barry
    //=====================================
    import java.math.*;
    public class OpSpecs5
      //Random generator = new Random (50);
      private int num1, num2;
      public OpSpec5()
        num1 = (int) (Math.random()*50) +1;
        num2 = (int) (Math.random()*50) +1;
      public int ActionPerformed (String sign)
        if (sign equals(a))
          return num1 + num2;
        else if (sign equals(s))
          return num1-num2;
        else if (sign equals(d))
          return num1/num2;
        else (sign equals (p))
          return num1 * num2;
    }  And here is the other file:
    //=====================================
    // OpSpecs5.java    Author: Michael Barry
    //=====================================
    import java.math.*;
    public class OpSpecs5
      //Random generator = new Random (50);
      private int num1, num2;
      public OpSpec5()
        num1 = (int) (Math.random()*50) +1;
        num2 = (int) (Math.random()*50) +1;
      public int ActionPerformed (String sign)
        if (sign equals(a))
          return num1 + num2;
        else if (sign equals(s))
          return num1-num2;
        else if (sign equals(d))
          return num1/num2;
        else (sign equals (p))
          return num1 * num2;
      Thnx in advance!!!!!!!!!

    Sorry about that.
    Here they both are this time
    //===========================
    // ExampleMathOps5.java
    //=========================
    import javax.swing.JOptionPane;
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    public class ExampleMathOps5
    public static void main(String[] args)
         ExampleMathOps5 MyOps;
         String numStr, result;
          int sum;
        int difference;
        int division;
        int product;
        int again;
        int exit;
        MyOps = new ExampleOpSpecs5 (); // Instantiation of OpSpecs5 file.
        do
                     sum = MyOps.ActionPerformed("a"); // "a" represents addition.
                     MyOps = JOptionPane.showInputDialog ("Enter your answer:"); // Prints sum of equation.
            sum = Integer.parseInt(numStr);
          result = "The correct answer is: " + ((num1+num2 == 0) ? "correct" : "incorrect"); 
          JOptionPane.ShowMessageDialog (null, result);
          again = JOptionPane.showConfirmDialog (null, "Try again?");
                     difference = MyOps.ActionPerformed("s"); // "s" represents subtraction.
                     MyOps = JOptionPane.showInputDialog ("Enter your answer:"); // Prints difference of equation.
                     difference = Integer.parseInt(numStr);
          result = "The correct answer is:" + ((num2-num1 == 0) ? "correct" : "incorrect");
          JOptionPane.showMessageDialog (null, result);
          again = JOptionPane.showConfirmDialog (null, "Try again?");
          division = MyOps.ActionPerformed("d"); // "d" represents division.
                     MyOps = JOptionPane.showInputDialog("Enter your answer:"); // Prints result of equation.
                     division = Integer.parseInt(numStr);
          result = "The correct answer is:" + ((num2/num1 == 0) ? "correct" : "incorrect");
          JOptionPane.showMessageDialog (null, result);
          again = JOptionPane.showConfirmDialog (null, "Try Again?");     
                     product = MyOps.ActionPerformed("p");  // "p" represents multiplication.
                     MyOps = JOptionPane.showInputDialog ("Enter your answer:"); // Prints product of equation.
            product = Integer.parseInt(numStr);
          result = "The correct answer is:" + ((num1*num2 == 0) ? "correct" : "incorrect");
          JOptionPane.showMessageDialog (null, result);
          again = JOptionPane.showConfirmDialog (null, "Try again?"); 
                    while (again == JOptionPane.YES_OPTION);
    }And here is the other file:
    //=====================================
    // ExampleOpSpecs5.java    Author:
    //=====================================
    import java.math.*;
    public class ExampleOpSpecs5
      //Random generator = new Random (50);
      private int num1, num2;
      public ExampleOpSpecs5()
        num1 = (int) (Math.random()*50) +1;
        num2 = (int) (Math.random()*50) +1;
      public int ActionPerformed (String sign)
        if (sign == "a")
          return num1 + num2;
        else if (sign == "s")
          return num1-num2;
        else if (sign == "d")
          return num1/num2;
        else if (sign == "p")
          return num1*num2;     
         else if (sign == null)
         return again;
      else
    return exit;
     

  • Issue with Variable on 0FISCPER

    Hi,
    I am using a single value/ mandatory variable on 0FISCPER in my queries. It has been working fine till now but when i click on the drill down of that variable in the selection screen, it gives me a 500 INTERNAL SERVER ERROR (java.lang.NullPointerException). IF i enter a value manually without clicking on the drop down, it is working fine and the query is getting executed. How can i resolve this problem.
    Thanks
    Rashmi.

    Hi,
    Search in SDN, I don't think that is problem with Variable..
    http://help.sap.com/saphelp_nw04s/helpdata/en/7b/f89f3f12e1eb0ce10000000a114084/frameset.htm
    File Sender java.lang.NullPointerException
    Re: File Sender java.lang.NullPointerException
    500 Internal server error
    Thanks
    Reddy

  • Automator : issue with variable and path to folder

    I created a simple Automator Workflow with: A variable "Document Folder" and an action "Run shell script" with this command:
    "rsync -E -a -v -z --delete $@ /Volumes/MyBook/Backup/"
    I tested this command, It works very well in the terminal. But return me an error with Automator.
    "$@" is replaced by the Path when running, I guess my issue is that the content of the variable is " ~/Documents " . When it pass to the script it become "/Users/login/~/Documents".
    That can't works.
    A solution would be to put in the script the full path instead of "$@" but I would liketo understand why this error occur.
    Thanks.

    Automator actions return their results as a list of items. If you want your shell script to use the result of an action (for example Ask for Finder Items) as arguments, you need to set the Pass input: as arguments option, and place your statement in the for loop:
    for f in "$@"
    do
          /usr/bin/rsync -E -a -v -z --delete "$f" /Volumes/MyBook/Backup/
    done

  • Issue with variable, need to remove characters

    Hi Team,
    i have one problem regarding the variable.
    i have some variable for example 'MALT011000012345MTLCAST001SMT84'.
    in the above variable i need to replace the value of M with say 5, value of A with 9 and so on .
    like i want to repalce each character with number field.
    can you please share your ideas that how can i resolve this issue in PL/SQL?

    Hi,
    Here's one way:
    str := TRANSLATE ( str
                     , 'MA'
                     , '59'
                     );where str is any string, such as 'MALT011000012345MTLCAST001SMT84'.
    The 2nd and 3rd arguments to TRANSLATE can be any length (1 or more); I just included the 2 character pairs that you mentioned. The n-th character of the 2nd argument will be replaced with the n-th character of the 3rd argument.
    I hope this answers your question.
    If not, please post a little sample data (that is, strings that contain 'M''s, 'A's, and/or the other characters you need to replace) and what you want all those strings turned into. Post the sample data as CREATE TABLE and INSERT statements so we can test them all in one query.

  • Urgent: Issue with variable exit

    Hi All,
    We are having a requirement where in we need to populate the value of calday as the first day of the month that the user selects in the variable. For that, this is what i did:
    1. Created a variable for 0CALDAY as ZDAT1 and made it as "Processing Type --> SAP exit"
    2. Then i went to transaction SMOD and went to the enhancement RSR00001
    3. And then went to the exit EXIT_SAPLRRS0_001 and wrote the logic for the requirement,in the INCLUDE ZXRSRU01.
    4. Activated the include and exit
    However, after that when i executed the query i got an error saying that the Exit RSVAREXIT_ZDAT1 for variable ZDAT1 either does not exists or is inactive. For this reason I went to se37 and found that RSVAREXIT_ZDAT1 exit was inactive (I didnot manually create RSVAREXIT_ZDAT1, guess it was system created), so i put my piece of coding in it with the mandatory import and export parameters.However,  after that, the code was not getting called after the user enters the input, even if i put I_STEP =2. Can you please point out as to where i went wrong.
    Best Regards,
    Debashree.

    Hi Debashree,
    you should create the variable for processing type as 'customer exit' not SAP exit.
    hope this helps.

  • Issue with variable selection

    Hello friends
                    I have created a sample iView which has a BW query. I have attached a variable form to the input of the Query and a table view to its output. However when I am deploying the iView, I cannot see a selection list for the variable and neither any data in the table

    So you have a form in which the user selects value from a drop-down list and once user submits the table should be populated with appropriate data.
    Steps:
    Start--FormDataServiceTable--
    End
    1.Place a form , next a Data Service and a Table which pulls data from this data service.
    2.Add a Dop-Down control to the form and configure if its a Static or Dynamic as needed
    3. Connect the Form OUT port to DataService IN port(drag and drop) , select the connector/line which was created and click configure.
    4. Map the Drop-Down control to appropriate column (This is available in bottom right of the screen)
    5.Click on the table and select the columns which you would like the Table to have.
    6.Save and Run.
    This should run as desired

  • Issue with Variable

    Hello,
    I have create a optional  variable of type user entry on char 0plant it is a standard variable 0S_PLANT in the report is build on the ODS in 3.5 .
    when the user executing the report without entering any value into this value its trigger a authorization error as below
    You do not have authorization to read object Z:PLANT 'AUTHORIZATION FOR
    PLANT IN BW BROWSER'
         Message no. BRAIN804
    Procedure
        Check your request: Your request was checked against the authorization
        for object 'Z:PLANT' 'AUTHORIZATION FOR PLANT IN BW BROWSER'.
        Request other data if necessary or ask the person responsible for your
        authorization to provide you with sufficient authorization for object
        'Z:PLANT' 'AUTHORIZATION FOR PLANT IN BW BROWSER'.
    if user enter the value  it is executing sucessfully.
    Authorization is given to all info objects in the role.
    pls let me know the reason for this
    Thanks & Regards
    Edited by: priya k on May 11, 2009 7:19 AM

    Hi Priya,
    I think Z:plant is an authorization object created for 0plant and is checked for the underlying infocube.
    Please check if the user is given proper authorization to the required 0plant values.
    And try using a authorization variable instead of the standard variable.
    The authorization variable should bring in the plant values assigned to the user in the role.
    Regards,
    Archana

  • Issue with Variable editor in BI 4.1 Webi

    Hello Team,
    Here i am with another possible bug maybe in BI 4.1 ,SP2.
    In order to avoid the 1.#INF error which is a bug in BI 4,1 SP2, i found the solution of applying the formula If IsError(Measure) then "" else [Measure]  and this seemed to work.
    I now have some measures with complex names and when i try to write a similar formula as above in BI 4.1 based on those measures with complex names, i get the below error but the same works fine in BI 4.0 SP2 and SP5 versions. Below is an example:
    Formula i'm trying to write:
    =If IsError([SDV Cases].[Actual, 3 TY Mar Current Year]) Then "" Else [SDV Cases].[Actual, 3 TY Mar Current Year]
    I'm using a lot of queries in this report and hence the extension "SDV Cases".**
    Formula in BI 4.0:
    Formula in BI 4.1,SP2:
    The same error is seen when i try to just create a variable on top of the existing measures in BI 4.1,SP2 with such complex names and just click on validate without even applying any If then else formulas.It works fine for dimensions though with simpler names. See the screenshot below:
    So is this a possible bug in BI 4.1,Sp2 and is there a resolution to this or is it expected to be resolved in BI 4.1,SP3 like the other bugs?
    Thanks and regards,
    Abhishek

    The following note talks about this as a bug in BI 4.1,SP01,Patch1. 1912975. But wanted a confirmation if its a bug in 4.1,SP02 as well and what is the patch for the guaranteed fix for this?

  • Issue with variables and white space in powershell script that calls a command line command

    Guys,
    I have a question regarding this script. Each time I run it, it creates the share, but with a space after it. Also I need help figuring out how to put in the variable for the folder path.
    Below is the code
    $Users=Import-Csv C:\users2.csv
    foreach($User in $Users){
         $User.SNCORP
         $User.HPB
         $User
         cmd /c "net share "$User.SNCORP"=D:\Users\"$User.HPB" /grant:Everyone,FULL"
    The csv file looks like this
    HPB,SNCORP
    ccarter,carterch$
    This is my output in powershell
    PS C:\> .\shareflip.ps1
    carterch$
    ccarter
    HPB                                                         SNCORP
    ccarter                                                     carterch$
    The syntax of this command is:
    NET SHARE
    sharename
              sharename=drive:path [/GRANT:user,[READ | CHANGE | FULL]]
                                   [/USERS:number | /UNLIMITED]
                                   [/REMARK:"text"]
                                   [/CACHE:Manual | Documents| Programs | BranchCache | None]
              sharename [/USERS:number | /UNLIMITED]
                        [/REMARK:"text"]
                        [/CACHE:Manual | Documents | Programs | BranchCache | None]
              {sharename | devicename | drive:path} /DELETE
              sharename \\computername /DELETE
    Any help is greatly appreciated. 
    Christopher

    There is no need to use cmd /c. You should be able to use:
    net share "$($User.SNCORP)=D:\Users\$($User.HPB)" "/grant:Everyone,Full"
    Use showargs.exe (from the article) at the beginning of this line to see the command line PowerShell is actually running (very useful for troubleshooting).
    -- Bill Stewart [Bill_Stewart]

Maybe you are looking for

  • Error in selecting Date

    Hi, I am not able to select any date except of this month.If I try to select it will give NAN in the date navigator field. Where ever i use Date Navigator in any project I am having the same issue. I am not able to select the date except present mont

  • Unwanted web page appearing. How do I block or delete?

    I web browse with Mozilla Firefox V6.0.1. and my home page is http://www.google.com.au/firefox?client=firefox-a&rls=org.mozilla:en-GB:official. McAfee Virus Scanner is operable and current. My problem is, that after web browsing and having multiple t

  • Zen mp3 having trouble with transferring mu

    hey guys, i just bought a creative zen, and am having alot of rouble figuring out how to put music onto it. i have the music from limewire saved, but now i cnt figur out how to get it onto the zen player. PLEASE HELP ME, IM GETTING VERY FRUASTERATED

  • SERVICE TAX RETURNS --  ST3

    HAI FRIENDS, Can anybody please tell me where the standard service tax ST3 returns are present  in SAP. WE have applied the note 921634 for which we require the standard Returns. Kindly treat this as urgent Thanks & regards, sandeep

  • [SOLVED]Can't startx

    My video card is NVIDIA Corporation GT218 GeForce 405. And the content of /var/log/Xorg.0.log is https://gist.github.com/anonymous/5343337 Forgive my poor English. Last edited by acgtyrant (2013-04-09 11:04:27)