Formatted Search with multiple conditions

Hi experts,
I am using a formatted search to update the Unit price in Sales Order. Query mentioned below.
Select      T0.ItemCode,
               T0.ItemPrice,
From        ITM1 T0 inner join OPLN T1 on T0.PriceList = T1.ListNum
Where      T0.ItemCode = '[$38.1.0]'
     and     T1.u_location = '$[$38.2000002049.0]'
But while adding Item on Sales Order, it is showing error, Incorrect Syntax near  '$[$38.2000002049.0]'.
Note: I have added an UDF named U_LOCATION( Alphanumeric, 10) in OPLN and selecting location in Price List through another FMS which is working perfectly.
Please help in this regards.
Thanks in Advance.
Nabyendu

Hi Nabyendu Saha..
You said the u_location as alphanumeric the why you have given 0 for the field type in the FMS...
Select      T0.ItemCode,
               T0.ItemPrice,
From        ITM1 T0 inner join OPLN T1 on T0.PriceList = T1.ListNum
Where      T0.ItemCode = '[$38.1.0]'
     and     T1.u_location = '$[$38.2000002049]'
or
Select      T0.ItemCode,
               T0.ItemPrice,
From        ITM1 T0 inner join OPLN T1 on T0.PriceList = T1.ListNum
Where      T0.ItemCode = [$38.1.0]
     and     T1.u_location = $[ordr.u_location]
Try the above , hope helpful
Regards,
Kennedy

Similar Messages

  • MDX Calculated Member With Multiple Conditions

    I need to create a calculated member in my cube that spans multiple dimensions. A current calculated member looks like this:
    [Employee Hours Category].[Utilization Category].[NON-PTO], [Measures].[Employee Hours]
    This calculated member returns all the hours an employee worked that are not PTO.
    I need to select employee hours but with multiple conditions:
    - [DIM BILL STATUS][Bill Status] equals 0
    - [Employee Hours Time Category].[Time Category] equals "Client Facing"
    - [DIM PROJECT].[Client] isn't like "Olson"
    I know this is probably pretty easy, but I'm horrible with MDX!
    Thank you!!
    A. M. Robinson

    Thank you...
    Your answer looks good but I was actually able to figure out most of it, but still looking how to incorporate a FILTER into the MDX. I would like to FILTER like this:
     FILTER ([DIM Project].[Client].[Client].Members , 
                 NOT InStr([DIM Project].[Client].CurrentMember.MEMBER_NAME, "Olson")
    Heres the MDX I have so far that is working fine:
    ([Employee Hours Time Category].[Time Category].&[Client Facing],
       [DIM BILL STATUS].[Bill Status ID].&[1], [Measures].[Employee Hours])
    Do you just wrap the whole MDX in the filter, and if so, how would that be formatted?
    A. M. Robinson

  • Selectively Format Groups with Multiple Columns

    I have a bit of an obscure task I've been trying to hammer out to no avail.  I've searched quite a bit but can't seem to find anyone else who has attempted this.  I have two group by statements, one is a category and the other is a rank.  What I'm trying to do is organize the report so that there are category rows and below each category row is a set of columns for each rank with their associated values as such:
    category1
    rank1     rank2     rank3     rank4
    value1   value1    value1   value1
    value2   value2    value2   value2
    category2
    rank1     rank2     rank3
    value1   value1    value1
    value2   value2    value2
    I've tried using details>Section Expert>>Layout>Format Groups with multiple column.  Unfortunately, this applies to both groups putting the categories into columns instead of rows, making a mess.  Does anyone know of a way to selectively put groups into columns and ensure alignment?  In the above example the user would be able to compare rank values from multiple categories since they all line up.  Any help with this would be very much appreciated.

    Hi,
    Have you tried using a crosstab? Give this a shot:
    1) Group the report on Category
    2) Create a new group header section. Group Header b
    3) Place a crosstab in this section
    4) The columns would be the Rank field, I'm not sure about what you would like to show in the rows
    5) The summarized field would be the Value field ofcourse
    Let me know how this goes.
    -Abhilash

  • I need your expert opinion on how to create a map with multiple conditions.

    Hello.
    I need your expert opinion on how to create a map with multiple conditions.
    I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
    How can i create a cursors within the map?
    My function creates table and cursor.
    Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
    The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
    In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
    I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
    In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
    having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
    I would appreciate any help / advise on this.
    Thank you very much

    thanks a lot for your reply - i will look into this option :-)
    it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
    At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
    Anyway, thank you very much for your suggestion.

  • How to search with multiple constraints in the new java API?

    I'm having a problem using the new MDM API to do searches with multiple constraints.  Here are the classes I'm trying to use, and the scenario I'm trying to implement:
    Classes:
    SearchItem: Interface
    SearchGroup: implements SearchItem, empty constructor,
                 addSearchItem (requires SearchDimension and SearchConstraint, or just a SearchItem),
                 setComparisonOperator
    SearchParameter: implements SearchItem, constructor requires SearchDimension and SearchConstraint objects
    Search: extends SearchGroup, constructor requires TableId object
    RetrieveLimitedRecordsCommand: setSearch method requires Search object
    FieldDimension: constructor requires FieldId object or FieldIds[] fieldPath
    TextSearchConstraint: constructor requires string value and int comparisonOperator(enum)
    BooleanSearchConstraint: constructor requires boolean value
    Scenario:
    Okay, so say we have a main table, Products.  We want to search the table for the following:
    field IsActive = true
    field ProductColor = red or blue or green
    So the question is how to build this search with the above classes?  Everything I've tried so far results in the following error:
    Exception in thread "main" java.lang.UnsupportedOperationException: Search group nesting is currently not supported.
         at com.sap.mdm.search.SearchGroup.addSearchItem(Unknown Source)
    I can do just the ProductColor search like this:
    Search mySearch = new Search(<Products TableId>);
    mySearch.setComparisonOperator(Search.OR_OPERATOR);
    FieldDimension myColorFieldDim = new FieldDimension(<ProductColor FieldId>);
    TextSearchConstraint myTextConRed = new TextSearchConstraint("red",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConBlue = new TextSearchConstraint("blue",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConGreen = new TextSearchConstraint("green",TextSearchConstraint.EQUALS);
    mySearch.addSearchItem(myColorFieldDim,myTextConRed);
    mySearch.addSearchItem(myColorFieldDim,myTextConBlue);
    mySearch.addSearchItem(myColorFieldDim,myTextConGreen);
    the question is how do I add the AND of the BooleanSearchConstraint?
    FieldDimension myActiveFieldDim = new FieldDimension(<IsActive FieldId>);
    BooleanSearchConstraint myBoolCon = new BooleanSearchConstraint(true);
    I can't just add it to mySearch because mySearch is using OR operator, so it would return ALL of the Products records that match IsActive = true.  I tried creating a higher level Search object like this:
    Search topSearch = new Search(<Products TableId>);
    topSearch.setComparisonOperator(Search.AND_OPERATOR);
    topSearch.addSearchItem(mySearch);
    topSearch.addSearchItem(myActiveFieldDim,myBoolCon);
    But when I do this I get the above "Search group nesting is currently not supported" error.  Does that mean this kind of search cannot be done with the new MDM API?

    I'm actually testing a pre-release of SP05 right now, and it still is not functional.  The best that can be done is to use a PickListSearchConstraint to act as an OR within a field.  But PickList is limited to lookup Id values, text attribute values, numeric attribute values and coupled attribute values.  It works for me in some cases where I have lookup Id values, but not in other cases where the users want to search on multiple text values within a single field.

  • Outer Joins with multiple conditions - alternatives to UNION?

    It is my understanding that Oracle 8i does not directly support mutiple conditions for outer joins. For instance, I'm looking for PEOPLE who may, or may not, be on MEDICATIONS.
    All MEDICATIONS are listed with DRUGNAME and DRUGID. There thousand of different drugs. I'm only looking for PEOPLE on either one or two of them (to make it simple) or no drug at all (ignoring all other DRUGS they're on..) IF they are on the DRUG, it's gerts printed.
    I'd ideally do a LEFT OUTER JOIN to do this with multiple conditions:
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    (MEDICATION.DRUGID (+) = 632 OR
    MEDICATION.DRUGID (+) = 956)
    This, of course, is not valid, at least in 8i...
    So I've taken the UNION approach:
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    MEDICATION.DRUGID (+) = 632
    UNION
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    MEDICATION.DRUGID (+) = 956
    This of course, does work, but as I've added more drugs this becomes quite unwieldly and not really sure what this does to performance. (There are also several more joins to other tables, not relevent here.)
    In addition, if I import this into Crystal Reports 8.5 (as opposed to the Crystal Query Designer), it refuses to recognize the UNION.
    -- Any suggestions for alternative syntax ???
    -- Has this been addressed in 9i ???
    Thanks,
    Will

    You could try
    select Distinct Person.Name, Med.DrugName, Med.DrugId
    from Person,
    (select ID, DrugName, DrugId from Medication
    where DrugId in (632, 956) ) Med
    where Person.ID = Med.ID(+)
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    (MEDICATION.DRUGID (+) = 632 OR
    MEDICATION.DRUGID (+) = 956)
    This, of course, is not valid, at least in 8i...
    So I've taken the UNION approach:
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    MEDICATION.DRUGID (+) = 632
    UNION
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    MEDICATION.DRUGID (+) = 956
    This of course, does work, but as I've added more drugs this becomes quite unwieldly and not really sure what this does to performance. (There are also several more joins to other tables, not relevent here.)
    In addition, if I import this into Crystal Reports 8.5 (as opposed to the Crystal Query Designer), it refuses to recognize the UNION.
    -- Any suggestions for alternative syntax ???
    -- Has this been addressed in 9i ???
    Thanks,
    Will

  • Formatted search with Query auto update

    hi all,
    I have created 2 UDF's at title level in marketing document, and assigned Formatted search with query to it with auto refresh when posting date field changes. One UDF gets updated automatically and the other one doesnt.
    any one can guide me on this.
    regards
    salman
    Edited by: Rui Pereira on Aug 8, 2008 11:47 AM

    Hello Salman,
    I took the effort to understand you question but I am not quite sure if I have all the pieces of the puzzle yet.  I can see Jeyakanthan has already grilled you with questions and you have answered all of them.
    UDF1 - is this se to Auto Refresh - Refresh regularly - on Posting Date?
    UDF2 - On which field is this set to Auto refresh?
    UDF3 - On which field is this set to Auto refresh?
    One thing to note when you have two fields with FMS and the second one dependent on the value of the first, the second one does not auto refresh because it cannot detect the Field change on the First UDF.
    This is probably what you are experiencing.
    If you don't mind I would like to understand the business reason for the 3 UDF's and what each one is for. There might be other options to look at to achieve the same result.
    Let me know
    Suda

  • Formatted Search with like

    I'am tring to do a Formatted Search with this: SELECT     DISTINCT T0.Code, T0.Name
    FROM         T0 LEFT OUTER JOIN
                      ORDR ON T0.Name = ORDR.U_PDischar WHERE T0.Name Like '$[ORDR.U_PDISCHAR] %%' ORDER BY T0.Name
    but it not work any help... thanks
    Message was edited by: Juan F Vásquez

    Hi,
    This worked for me:
    SELECT DISTINCT T0.Code, T0.Name
    FROM T0 LEFT OUTER JOIN
    ORDR ON T0.Name = ORDR.U_PDischar WHERE T0.Name
    Like $[ORDR.U_PDISCHAR] + '%%'  ORDER BY T0.Name
    Not whit this same fields, but with others.
    Hope helps,
    Ibai Peñ

  • Create a Formatted Search with SDK?

    Hi,
    Is it possible to create an Formatted Search with the SDK? With which API???
    Thanks for Help
    Thorsten

    Hi Thorsten,
    Nowadays, there is not any standar way to do this. An approach could be to search for the tables where Formatted Searches are stored which are some.
    If you are interested, we have developed a tool that is used to carry personalizations such us Literals, Formatted Searchs, Querys, Document Editings, User Reports, UDF and UDT. It has been very helpfull for us, and we are planning to sell it to other partners. If you are interested send me an email to [email protected]
    Regards,
    Ibai Peñ

  • Table Rows with Multiple Conditions Not Showing Up in RH

    Hi everyone,
    I'm currently evaluating TCS2 (Framemaker 9 and RoboHelp 8 on Windows XP) and have come across the following issue:
    One of our FrameMaker source files contains a table in which one of the rows has multiple conditions applied. When one of the conditions is shown in Framemaker, and the others are hidden, the row is displayed in Framemaker as expected. However, when the file is then imported or linked into Robohelp, the same table row vanishes, even though the Apply FrameMaker Conditional Text Build Expression check box is selected in the Framemaker Conversion Settings > Other Settings screen. This only appears to affect table rows - when paragraph text is tagged with the same conditions, it is imported correctly into RoboHelp.
    For example, when Condition B is shown and Condition A is hidden in the Framemaker file, the content appears like this in Frame:
    Unconditional
    Unconditional
    Condition A and Condition B applied
    Condition A and Condition B applied
    Condition B applied
    Condition B applied
    Paragraph text with Condition A and Condition B applied.
    Paragraph text with Condition B applied.
    When the same file is imported into RoboHelp, the row with both conditions applied is absent from the table:
    Unconditional
    Unconditional
    Condition B applied
    Condition B applied
    Paragraph text with Condition A and Condition B applied.
    Paragraph text with Condition B applied.
    Installing patches 8.0.1 and 8.0.2 did not resolve the issue (and actually caused other, unrelated issues) and I see the same behavior regardless of whether I import or link the FrameMaker document.
    Has anyone else seen this issue? Any help would be much appreciated.
    Thanks
    DaveB

    It just seems that the items I select as align to top in the
    property inspector should force the items to the top of their
    cells, unless I'm missing something.

  • Formatted search with UDF and syntax question

    Can you explain the syntax with when to use the dollar sign and negative in writing a query for a formatted search based on user entry?
    I now want to create a formatted search to pull values based on the user's entry into a UDF on the item master screen.
    User entry into UDF U_Customer Code
    to create Formatted search for UDF U_Rep01
    I tried the following, but it does not work.
    SELECT T0.U_REP01 FROM dbo.OCRD T0
    WHERE T0.CARDCODE = $http://$OITM.U_CUSTOMERCODE
    Thanks.
    Please advise.

    The right syntax would be like this:
    SELECT T0.U_REP01 FROM dbo.OCRD T0
    WHERE T0.CARDCODE = $[OITM.U_CUSTOMERCODE\]
    However, the logic of query may not be correct.  Select something must be already in the system and Where should also be locatable.
    Thanks,
    Gordon

  • APEX Interactive Report Compute Case with multiple conditions to highlight

    My ultimate is to highligt a row in an interactive report based on two conditions. I didn't see a way to use the highligt feature with two conditions. So I thought I would try to create a computation based on the two conditions. Then use that result for the highligting. Though I don't seem to be a be able to use multiple conditions in my computation Case statement. Is there a different syntax?
    Here is what I have:
    Case
      When  C = 'Open' and  I > 15 Then 'True'
      Else 'False'
    End The error I get is: Invalid computation expression. and
    Application Express 4.0.2.00.07
    Thanks!
    Edited by: cjmartin on Jan 10, 2012 10:57 AM

    I'm surprised no one responded to this. What I did to resolve this issue was create a nested case statement. I don't think this was a good solution, but I can't find anyone else giving input. I know I can create another computational column in the select statement for the report, but the 'Interactive Report' part is where this should be. I want my clients to calculate what they want. Kind of hard when you can not use an 'and' for a range criteria.

  • SQL Script - error in executing the select with multiple conditions

    Hi gurus,
    I'm having trouble in the command syntax below:
    SELECT * FROM "TEST_RVS"."VH_TEST"  WHERE   "AUFNR" = 20210807 AND  "BWART" = 101.
    WHAT IS THE CORRECT SYNTAX WHERE TO CONDITION WITH MULTIPLE FIELDS?
    Thanks !

    What is the error you are getting?  Did you try wrapping the values with quotes?
    SELECT * FROM "TEST_RVS"."VH_TEST"  WHERE   "AUFNR" = '20210807' AND  "BWART" = '101'.
    Cheers,
    Rich Heilman

  • Format search with operation (+ - * /)

    HI people, i have this format search working perfectly:
    SELECT DISTINCT
    CASE WHEN (T3.ITEMCODE= $[$38.1.0] AND T3.PRICE > $[$38.14.number] AND $[$38.14.number]>0)
    THEN '1'
    ELSE '0'
    END
    FROM OCRD T1
    INNER JOIN ITM1 T3
    ON T1.LISTNUM = T3.PRICELIST AND T3.ITEMCODE=$[$38.1.0]
    WHERE T1.CARDCODE= $[$4.0.0]
    But i need sum a % in $38.14, so i did the next:
    SELECT DISTINCT
    CASE WHEN (T3.ITEMCODE= $[$38.1.0] AND T3.PRICE > ($[$38.14.number]*1.20) AND $[$38.14.number]>0)
    THEN '1'
    ELSE '0'
    END
    FROM OCRD T1
    INNER JOIN ITM1 T3
    ON T1.LISTNUM = T3.PRICELIST AND T3.ITEMCODE=$[$38.1.0]
    WHERE T1.CARDCODE= $[$4.0.0]
    But this not work......how can i sum a % ???

    Ok, works with this:
    SELECT DISTINCT
    CASE WHEN (T3.ITEMCODE= $[$38.1.0] AND T3.PRICE > ($[$38.14.number]/(0.80)) AND $[$38.14.number]>0)
    THEN '1'
    ELSE '0'
    END
    FROM OCRD T1
    INNER JOIN ITM1 T3
    ON T1.LISTNUM = T3.PRICELIST AND T3.ITEMCODE=$[$38.1.0]
    WHERE T1.CARDCODE= $[$4.0.0]
    My problem was that no quit FS from field, i meaning i must quit and the put again the FS to take the changes.

  • Formatted Search with DI  leads to a very slow performance - HELP....

    Hello There
    I have defined some formatted search in OPCH - everything is working fine.
    I have added some logic to this form via the DI.(handlling 1 item press_event), and I get a very very slow performance - the ADDON-EXE jumps TO 230MEGA of memory, and entering values to each row in the tables/item in the form takes about 15 seconds.
    Any suggestions?
    RGDS
    HAGAI

    Hi Hagai,
    Normally an addon written using the DI would take up 60-80MBs.
    Are you filtering out all events except for the item press event for the form? If you are not filtering events then this can have quite a drastic affect on performance.
    What logic have you got behind the press event? If the addon exe is ballooning out to 230MB then it suggests that there is either a problem with a memory leak or that an error is occuring in the code. I would recommend putting try/catch clauses at suitable places in the code and maybe specifically setting objects to null and calling the .NET garbage collector to try and minimise the potential for memory leaks.
    Are you sure that it is the combination of the formatted search and the addon that is causing the problem, i.e. if you take away the formatted search but leave the addon do you still get poor performance or does everything speed up?
    Hope this helps,
    Owen

Maybe you are looking for

  • Dreamweaver 6 crashing with image tag

    I'm having the weirdest problem. I'm trying to open multiple HTML files in dreamweaver 6 and they crash. They open perfectly fine in Dw5. After much time, I think I have it narrowed down to a specific dynamic image. The image name is:  <img src="http

  • Load Balancing on 2 seperate asdl link

    Dear All, We are having 2 internet link from 2 separate ISP. Please help me in doing load balancing on this 2 ADSL LINK. Thanks/Regards Atul

  • Problem with music streaming

    I have experienced that the music sometimes stops for a sec or. two, when streaming music from the iPad. A friend have also experienced that. But when you stream music from the same app from the iPhone, then there is no problem. Is it a software malf

  • MT2 files in Premiere

    Hi:  I'm in the process of researching a camera upgrade.  I'm currently looking at the Sony HVR-S270U camera.  It records to tape and also compact flash.  Can any one provide some insight on whether my Vista 64 will recognize and read the FAT32 drive

  • Oracle error-parallel query

    Hi Experts, While i'm running a parallel query through a procedure... its throwing the below error..... when others Error ORA-12801: error signaled in parallel query server P006 ORA-01114: IO error writing block to file  (block # ) ORA-01114: IO erro