FMS with query to limit the no. of warehouse seen based on Vendor code

Hi Experts!
I have created the following query:
SELECT T0.[WhsCode], T0.[WhsName] FROM OWHS T0  INNER JOIN POR1 T1 ON T0.WhsCode = T1.WhsCode WHERE substring( T0.[WhsCode] ,1,2) = substring( $[$4.0.0] ,2,2)
I attached this query to a FMS in the Warehouse column during Purchase Order.
The should be function of the FMS should limit the warehouses seen based on the vendor code.
Example:
Vendor Code 1: VBSAN01
Vendor Code 2: VBTAN01
Warehouse Codes: BSFin, BSHR, BTFin, BTHR
So, whenever the vendor VBSAN01 is selected during PO and when a warehouse is chosen through the FMS, the user should only be see the warehouses BSFin and BSHR.  Also, if the vendor VBTAN01 is selected during PO and when a warehouse is chosen through the FMS for the item, the user should see the warehouses BTFin and BTHR.
However, the FMS above does not work. 
Can anyone help me resolve this issue?
Sincerely,
Jen
Edited by: Jennifer Tinagan on Jan 15, 2010 3:57 AM

Jen,
Try this
SELECT T0.[WhsCode], T0.[WhsName]
FROM [dbo].[OWHS] T0
WHERE substring(T0.[WhsCode] ,1,2) = substring($[$4.0.0] ,2,2)
Suda

Similar Messages

  • Count and limit the accesses to a browser based swf

    I have a swf file imbedded in a HTML. Acceess to the file are controlled by passwords, stored in a XML-file
    I want to limit the number of accesses for each visitor to let us say 10 visits. How do I count (and store) the number of logons for each visitor?
    SharedObject works only at clienside, but iI want i serverside. The "easy" way would be to save the number of accesses for each visitor in a text-file but Flash and save... I hvave tried ExternalInterface calls, PHP etc and etc, but cant find a way that works. This is the last obstacle in a huge project. Please help.

    If using a MySQL database is an option, here's a link to a tutorial that deals with all the various aspects of that.
    http://www.gotoandlearn.com/play?id=20

  • Issue with query to find the lag data

    Hello PL/SQL Gurus/Experts,
    I am not able to extract the data with the following table structure -
    drop table T2;
    create table T2(Stream, Trade, Fees) as select
    'MECHNICAL', 'Primary', '5534500' from dual union all select
    'ELECTRICAL', 'Secondary', '5285500' from DUAL union all select
    'MECHNICAL', 'Secondary', '2364535' from dual union all select
    'ELECTRICAL', 'Primary', '1734540' from DUAL union all select
    'MBE', 'Secondary', '3424500' from dual union all select
    'ELECTRONICS', 'Primary', '5004567' from DUAL union all select
    'ELECTRONICS', 'Secondary', '4543200' from DUAL union all select
    'COMPUTERS', 'Secondary', '5534500' from DUAL union all select
    'CIVIL', 'Primary', '2345500' from DUAL union all select
    'CIVIL', 'Secondary', '4456500' from DUAL union all select
    'COMPUTERS', 'Primary', '9542500' from DUAL;I want to extract the data in following format -
    Stream          Trade          Fees
    MECHNICAL     Primary          5534500
              Secondary          2364535
    ELECTRICAL     Primary          1734540
              Secondary       5285500
    ELECTRONICS     Primary          5004567
              Secondary        4543200
    CIVIL          Primary          2345500
              Secondary         4456500
    MBE          Primary     
              Secondary       3424500
    Total                    34693342Now if if i am using the following query -
    SELECT CASE WHEN LAG(Stream||Trade) OVER (ORDER BY Stream, Trade, Fees) = Stream||Trade THEN NULL ELSE Stream END Stream
         , CASE WHEN LAG(Stream||Trade) OVER (ORDER BY Stream, Trade, Fees) = Stream||Trade THEN NULL ELSE Trade END Trade
         , CASE WHEN LAG(Fees) OVER (partition by Stream||Trade ORDER BY Stream, Trade, Fees) = Fees THEN NULL ELSE Fees END Fees
    FROM (     select distinct Stream, Trade, Fees from T2 ORDER BY Stream, Trade, Fees);
    SELECT  NVL2(LAG(Trade) OVER (PARTITION BY Stream, Trade ORDER BY Stream, Trade, Fees),Null,Trade) Trade,
         NVL2(LAG(Stream) OVER (PARTITION BY Stream, Trade ORDER BY Stream, Trade, Fees),Null,Stream) Stream,
         Fees
    from (select distinct Stream, Trade, Fees from T2)Kindly help me ...
    Thank you all for your time and effort in advance.

    This way!!!
    select a.stream2 stream, trade, sum(fees)
      from (
            select case row_number() over(partition by stream order by trade)
            when 1 then stream
            else 'Unknown' end stream2,trade, fees
            from t2
            order by stream, trade
           ) a
    where a.stream2 != 'Unknown'
    group by a.stream2, trade;
    STREAM      TRADE     SUM(FEES)             
    ELECTRICAL  Primary   1734540               
    MECHNICAL   Primary   5534500               
    COMPUTERS   Primary   9542500               
    MBE         Primary                         
    ELECTRONICS Primary   5004567               
    CIVIL       Primary   2345500PS:- Use instead of {CODE}
    Also, use != instead of <> while pasting the code on Forum. <> is converted to NULL or probably ignored.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Report with query form (like the old Webview)

    In the old webview days, you could easily create a report that had query parameters. Is there a wizard or form that makes this easy.
    From what I can tell it looks like I create the report, then create another region and populate it with fields.
    Is this automated in any fashion?

    Daryl,
    While this is not built-in functionality of HTML DB, you can re-use the code from my QBE application, which is hosted on HTML DB Studio:
    http://htmldb.oracle.com/pls/otn/f?p=18326:7:::::P7_ID:1222
    Thanks,
    - Scott -

  • How do i pass a url with query string using the jsp:forward tag

    This snippet of code gives a 403 error
    <jsp:forward page="testpage.jsp?test=1" />
    How do i rectify it?

    Well better way to go about for the job is to use
    setAttribute("name","value");method in the first page
    and then in next page use method
    String s=getAttribute("name");to retreive the value.
    Url rewritting or using Query String has some disadvantages ,which are handled by above mentioned approach.
    Ashish

  • To limit the access of PM data based on the Company Code, Plant & Location

    Hi Experts,
             I have a requirement . Customer wants to Restrict the access of PM data for a user based on the company code,
    Plant & Location.
    Say user : XYZ
    Plant :1000
    CCODE:1000
    Location:0001
    So you can see data of only this Organisation structure .No other data will be visible to him.
    I know we can do it using authorisation object
    Can you Suggest me how can we do this.
    Regards,
    Amar

    Hi,
    You can achieve this by maitaing these values in user authrisations. If you want more info about the objects check SU22 t code under PM.
    For Plant              I_IWERK
    For Location       I_ILOA
    Regards,
    N.Nagaraju

  • File uri with query string can't be propagated by desktop.browse()

    I have been trying to show some help pages using the following command:
    java.awt.Desktop.getDesktop().browse( helpURI);
    while the helpURI.toString() prints out the following:
    file:///C:/Share/Code/phoenix/Install/REDIST/Help_Files/en/wwhelp/wwhimpl/js/html/wwhelp.htm?context=BD&href=Chapter%202%20-%20Configuration.1.14.html
    But when the getDesktop().browse() API is executed it will only propagate the uri-path and not the query string.
    So the browser shows the following url as a result of the browse() call:
    C:\Share\Code\phoenix\Install\REDIST\Help_Files\en\wwhelp\wwhimpl\js\html\wwhelp.htm
    But if I manually copy the string "file:///C:/Share/Code/phoenix/Install/REDIST/Help_Files/en/wwhelp/wwhimpl/js/html/wwhelp.htm?context=BD&href=Chapter%202%20-%20Configuration.1.14.html" to the internet explorer it works fine.
    So can somebody give me any guidance on how I can propagate the file uri with query string through the browse() API or is there a better API for that?
    Sibon.

    The "cmd /S /C" suggestion didn't seem to work. I don't think the problem is in java but how the command line parameter needs to be added from msdos shell to "iexplore.exe"
    When from the command line I enter the following command:
    iexplore.exe file:///C:/Share/Code/phoenix/Install/REDIST/Help_Files/en/wwhelp/wwhimpl/js/html/wwhelp.htm?context=BD&href=Chapter%202%20-%20Configuration.1.14.html
    I get the same result as invoking from java Desktop API --- it truncates everything from question mark. I tried palying around with double quotes, single quotes, escaping and nothing seem to work.
    Any ideas?

  • With query and table access

    I am using WITH query to reduce the scanning the teacher table thrice for the below query
    xe > with q as
      2  (select  teacher_id,subject_1,subject_2,subject_3 from teacher
      3  )
      4  select teacher_id,subject_1 from q
      5  union all
      6  select teacher_id,subject_2 from q
      7  union all
      8  select teacher_id,subject_3 from q
      9  /
    However, the execution plan shows that the table was scanned for twice.
    Execution Plan
    Plan hash value: 91048842
    | Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |         |     6 |   180 |     6  (67)| 00:00:01 |
    |   1 |  UNION-ALL         |         |       |       |            |          |
    |  2 |   TABLE ACCESS FULL| TEACHER |     2 |    60 |     2   (0)| 00:00:01 |
    |   3 |   TABLE ACCESS FULL| TEACHER |     2 |    60 |     2   (0)| 00:00:01 |
    |   4 |   TABLE ACCESS FULL| TEACHER |     2 |    60 |     2   (0)| 00:00:01 |
    Note
       - dynamic sampling used for this statement (level=2)
    Statistics
             10  recursive calls
              0  db block gets
             22  consistent gets
              0  physical reads
              0  redo size
            594  bytes sent via SQL*Net to client
            420  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              6  rows processed
    Why the table was scanned thrice?
    Thanks for your time..

    Hi,
    A SQL query describes the result set you want; it does not show how the system gets those results.  Don't expect how the query code looks to have much to do with what the system will do.  For example, the fact that the code only says "teacher" 1 time doesn't mean that the teacher table will only be scanned 1 time.
    Try
    SELECT    teacher_id, subject
    FROM      teacher
    UNPIVOT   ( subject
              FOR  subject_num IN ( subject_1  AS 1
                                  , subject_2  AS 2
                                  , subject_3  AS 3

  • Needs Query to get the cycle time automatically based on the value provided in the UDF on OWOR  table

    Dear all,
    Need a query to get the Cycle time in hr based on the value provide in the udf on OWOR table.
    Details of UDF:-
    1.Start date =10/07/14  (Field Name U_EA_REST)   
    2.Start time =10:00        (Field Name U_EA_REASTARTTIME)
    3.End date =11/07/14    (Field Name U_EA_REET)
    4.End Time=14:00          (Field Name U_EA_REAENDTIME
    Cycle Time=_______      (Field Name U_EA_REACYCLETIME)
    Regards,
    BanugopanRajendran

    Dear all,
    Need a query to get the Cycle time in hr based on the value provide in the udf on OWOR table.
    Details of UDF:-
    1.Start date =10/07/14  (Field Name U_EA_REST)   -  Date Type
    2.Start time =10:00        (Field Name U_EA_REASTARTTIME) - Hour Type
    3.End date =11/07/14    (Field Name U_EA_REET) - Date Type
    4.End Time=14:00          (Field Name U_EA_REAENDTIME - Hour Type
    Cycle Time=_______      (Field Name U_EA_REACYCLETIME) - Hour Type
    Regards,
    BanugopanRajendran

  • Error: A 'with' action failed because the specified object did not exist.

    The weird thing is when i play the file on my computer it
    gives me the little error but shows up, but when its live on the
    internet it says its not working and doesnt show up. Can anyone
    help me with this error?
    Level #0: Frame=20
    Movie Clip: Frame=1 Target="_level0.instance2"
    Movie Clip: Frame=1 Target="_level0.mc_0"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_1"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_2"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_3"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_4"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_5"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_6"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_7"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_8"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_9"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_10"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_11"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_12"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_13"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_14"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_15"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_16"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_17"
    Shape:
    Movie Clip: Frame=1 Target="_level0.ctrl_mc"
    Movie Clip: Frame=1 Target="_level0.instance1"
    Movie Clip: Frame=1 Target="_level0._root.prev_photo"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_current_photo"
    Shape:
    Movie Clip: Frame=0 Target="_level0.mask_mc"
    Movie Clip: Frame=1 Target="_level0.mask_mc.mask_clip_mc"
    Movie Clip: Frame=0
    Target="_level0.mask_mc.mask_clip_mc.mask2_mc"
    Movie Clip: Frame=1 Target="_level0.soundControl"
    Movie Clip: Frame=1 Target="_level0.soundControl.instance8"
    Shape:
    Movie Clip: Frame=0 Target="_level0.mask_whole_mc"
    Movie Clip: Frame=1 Target="_level0.control"
    Movie Clip: Frame=8 Target="_level0.control.myLoader"
    Shape:
    Movie Clip: Frame=1
    Target="_level0.control.myLoader.instance9"
    Edit Text:
    Target="_level0.control.myLoader.instance9.instance10798" Variable=
    Visible=true Text = loading."
    Movie Clip: Frame=1 Target="_level0.tishi"
    Shape:
    Edit Text: Target="_level0.tishi.instance5" Variable=
    Visible=true Text = CONTROL PANEL"
    Movie Clip: Frame=1 Target="_level0.mc_mouse"
    Shape:
    Movie Clip: Frame=2 Target="_level0.mc"
    Movie Clip: Frame=1 Target="_level0.mc.booor"
    Shape:
    Button: Target="_level0.mc.booor.next"
    Shape:
    Shape:
    Button: Target="_level0.mc.booor.prev"
    Shape:
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc.booor.autoplay"
    Button: Target="_level0.mc.booor.autoplay.instance6"
    Shape:
    Shape:
    Edit Text:
    Target="_level0.mc.booor.autoplay.instance6.instance7" Variable=
    Visible=true Text = PAUSE"
    Text:
    Edit Text: Target="_level0.mc.booor.photo_title" Variable=
    Visible=true Text = exterior18"
    Error: A 'with' action failed because the specified object
    did not exist.
    Error: A 'with' action failed because the specified object
    did not exist.
    Error: A 'with' action failed because the specified object
    did not exist.

    show your code with the trace() function that indicates the
    object is defined (along with the output panel's result).

  • ABAP Query - Want to limit the number of records to 5

    I have a query based on a a table join (MKPF with MSEG) infoset. I want to limit the number of records to first five.
    How to deal with it?

    select data from tables using join and where conditions....into internal table....
    now move the first 5 records to second internal table and use them...
    or else in ur select statement u can use...
    select  data from tables <join condition> upto 5 rows.
    Message was edited by:
            Ramesh Babu Chirumamilla

  • How to globally limit the bandwidth of FMS 3.5

    Hi all,
    Can you give me a hint on how to solve this or confirm me the following ?
        Is it possible to limit globally the bandwidth usage of FMS 3.5 ?
    I don't want FMS  to use all the bandwidth available via our ISP.
    I want my coworkers and other servers to be able to continue using Internet while sending/receiving data from/to FMS
    I know it is possible to limit various bandwidths per Applications, but it seems there is no easy way - using the xml config files - to globally limit the server bandwidth.Ok I could compute a limit per app, but it is not a long terme solution to modify all the config files each time a new applications is to be installed.
    So I think it is not possible to easily limit globally the bandwidth of FMS.
    Do you agree with me ?
    If not, how did you manage this : do you have an example, some code ?
    Thanks for your answers
    Fred

    Thanks for the try, though I'd hope you aimed at a another solution
    I think your proposition is not possible this way, because:
    (It is for streaming only )
    1) say we have a BW of 100 [Mb/s] available for this FMS.
    2) the individual bw needed by the media files (indbw) within an application ranges from 200 [kb/s] to 2000[kb/s] (some files are audio, others medium quality video, some good quality video)
    3) the BandwidthCap (in application.xml) is  per connection within the application. (to simplify the talk we choose a BandwidthCap = indbw )
    4) the MaxConnections (in vhost.xml) is per vhost
    The question is "which indbw one chooses to divide the available 100 [Mb/s] BW" : ( MaxConnections = BW divided by BandwidthCap )
    Two possibilities:
    A) Let's take audio only indbw, that's 200 [kb/s], then FMS can serve 500 connections
    B) Let's take good quality vid indbw, that's 20000 [kb/s], then FMS would be limited to 50 connections.
    Both ways are not good :  in A) we risk jamming the internet link if too many of the connections are in fact streaming video, in B) we can not serve enough people and will likely waste some BW sinc not all clients will stream good quality video.
    Does anyone has another hint about " how to globally limiting the bandwidth of Flash Media Server 3.5" ?

  • Limit the data on a particular column with the corresponding column

    Hi,
    I had a report.
    id   submitdate        informationdate                  information
    10    06/7/10           07/07/10    10.12             submitted
    10     06/07/10        07/11/10    12.12             delivered to highleevel
    10     06/07/10          07/13/10   15.13             Resolved
    I just want to limit the data on a information date with the latest entry and along with its corresponding information.I mean to say only 3rd row  I need.,
    I applied Max( <Inofrmationdate>). Then ok with this function.I am trying to put the information object.Then I am nt geting the relevant data.
    The report contains only one data provider.
    Please can you suggest me with possible solutions.
    Thanks,

    Hi,
    Here you are using max(<Inofrmationdate>) and you will not get relevant result because in the backend at database end the query will be generated with group by clause and the remaining objects as group. Please check the query that is generated at the database end.
    Go to edit query -
    > SQL -->> check SQL query and validate it by running at backend
    Or You can use different functions using Rank, place rank field in information date and make report to populate only with highest or lowest rank (based on the ranking you decide)
    Please let me know if you need more information.
    Regards,
    Chitha.

  • We have multiple users, each with multiple devices, on 1 apple id - as we want to share music and ibooks etc.  We want the children to have access to the store, but with a financial limit. How do we do this?

    We have multiple users, each with multiple devices, on 1 apple id - as we want to share music and ibooks etc.  We want the children to have access to the store, but with a financial limit. How do we do this?

    Welcome to the Apple Community.
    That's simply not possible I'm afraid. You'd need to give them their own account and allowance or make it so you are required to be there to input the password when they wish to make a purchase.

  • When I air print from my iPad, I can't limit the number of pages. It just says print and the number of copies and I end up with way more than I want. How do I set it to limit the pages?

    When I air print using FingerPrint from my ipad, it doesn't let me limit the number of pages, and I end up with more pages than I want. It asks if I want multiple copies, but it doesn't ask me number of pages, or which pages. Is there a way to do this?

    When you use an AirPrint compatible printer, you get this option for page range. You are using your computer as the server in order to print, so you probably have to set the range on the computer. While you can print from your printer with this app, I assume that it doesn't give you the same control that you get directly from the iPad when using an AirPrint printer.
    Read this from the FingerPrint support site. Selecting the page range would be part of the formatting of a print job.
    http://fingerprint-support.collobos.com/knowledgebase/articles/66972-i-can-t-for mat-the-print-job

Maybe you are looking for

  • My iPhone 4s will no longer allow others to send me a text message

    My iPhone 4s will no longer allow others to initiate a text message with me.  I think I have pin pointed the issue, but I don't know how to fix it.  When I go to Settings - Messages - Send & Receive, it has both my phone number and my email but it on

  • PL/SQL usage in Datawarehousing projects

    Hi, In Datawarehousing projects, most of the processing can be done through SQL code directly. I found from few articles that we should strongly avoid PL/SQL Scripts in DWH projects. But, if situation warrants, can we use PL/SQL for processing in D/W

  • Recover deleted document from Oracle content server

    Hi All, I've deleted some of documents from oracle content server mistakenly. I am using oracle ucm11g. I found that we have a feature called "Trash bin". Trash-bin used for recover the deleted document/folder but unluckily settings for "Trash Bin" i

  • Robohelp 8 HTML - VERY basic layout and naming question.

    OK, I'm sure this must be obvious to everyone else because I can't seem to find it in the places I've searched. My personal experience with Help files isn't helping (yeah, I know, bad pun). I'm creating a RoboHelp HTML file from a PDF file. While imp

  • Syntax error with ' ' in param

    Hi, Can anybody can tell me what is wrong with my sytax, I'm using sample kindly provided to me in earlier thread by Tubby(c) like below, which works fine from SQL+ as we can see. But then I tried to apply this approach to code insdie my PACKAGE BODY