Query on OM to tie SV # (warranty items) to their relative part numbers

Query on Order Management that joins the warranty part number ties it to the warrantied part
Problem Description:     Using Apps 11.5.9
Need to take the attached code, add the fullfillment set from OM/Line Items/ Shipping tab, and tie the Warranty Part #, (identified by first two characters SV) to the part number (identified as FGA, TLA, etc...) it is associated with and return this on one line. I would need to do this for each item that has shipped and is under warranty, and exclud non-warranty items. I believe I would use Union to create a place holder for the SV #, but not sure how I would associate the SV to the FGA etc... using the fullfillment set and not get all lines of the order returned. Currently the code returns the shippable items, our FGA, TLA etc... and the SV-. SV is not a shippable item which do not ship off but have a fullfillment date rather then a shipment date.
Best guess that I have to write this is to say in second part of Union is where fullfillment set not null select ordered item where ordered item like SV- . And on first part of Union ignore lines where ordered item <> SV- to prevent SV lines from being returned, but wrapping them into the same line as the part number they are related to and under warranty. I am attaching the code I am going to use to create a union from, I have not written the select for the Fullfillment set.
SELECT OOH.ORDER_NUMBER
     ,ool.cust_model_serial_number CONTRACT_NUMBER
     ,ool.cust_po_number
     ,RACUS.CUSTOMER_NAME
     ,ool.CUSTOMER_DOCK_CODE SITE_NUMBER
     ,oefvoh.ship_to_address1
     ,oefvoh.ship_to_cty_st_zip_ctry
     ,oefvoh.bill_to_address1
     ,oefvoh.bill_to_cty_st_zip_ctry
     ,DELIV_SU.LOCATION DELIVER_TO
     , DELIV_SU.LOCATION DELIVER_TO_LOCATION
     , DELIV_LOC.ADDRESS1 DELIVER_TO_ADDRESS1
     , DELIV_LOC.ADDRESS2 DELIVER_TO_ADDRESS2
     ,to_char(ool.line_number)||'.'||to_char(oolb.line_number) subline_number
     ,ool.ordered_item
     ,DECODE(OOL.SHIPPED_QUANTITY,NULL, OOL.ORDERED_QUANTITY,OOL.SHIPPED_QUANTITY) SHIPPED_QTY
     ,TO_CHAR (OOL.ACTUAL_SHIPMENT_DATE, 'DD-MON-YYYY')
     ,TO_CHAR (ool.fulfillment_date, 'DD-MON-YYYY')
     ,ool.accounting_rule_id
     ,rr.name ACCOUNTING_RULE
--      DECODE (OOL.ACTUAL_SHIPMENT_DATE,NULL, OOL.FULFILLMENT_DATE, OOL.ACTUAL_SHIPMENT_DATE) SHIPMENT_DATE
-- OOH.SHIP_FROM_ORG_ID
     FROM           ONT.OE_ORDER_HEADERS_ALL OOH,
               ONT.OE_ORDER_LINES_ALL OOL,
ont.oe_order_lines_all oolb,
          AR.HZ_CUST_SITE_USES_ALL SITE,
               AR.HZ_LOCATIONS DELIV_LOC,
               AR.HZ_PARTY_SITES DELIV_PS,
               AR.HZ_CUST_SITE_USES_ALL DELIV_SU,
          APPS.RA_ADDRESSES_ALL ADDR,
          APPS.RA_CUSTOMERS RACUS,
OEFV_ORDER_HEADERS OEFVOH,
AR.RA_RULES RR
WHERE OOH.ORDER_NUMBER = '1000000' and
OOH.HEADER_ID = OOL.HEADER_ID
-- AND TRUNC(OOL.FULFILLMENT_DATE) BETWEEN V_BEG_DATE AND V_END_DATE
AND OOL.DELIVER_TO_ORG_ID = SITE.SITE_USE_ID (+)
--and ool.invoice_to_org_id = oefvoh.ship_to_org_id (+)
AND ooh.order_number = oefvoh.order_number
AND SITE.CUST_ACCT_SITE_ID = ADDR.ADDRESS_ID
AND DELIV_LOC.LOCATION_ID(+) = DELIV_PS.LOCATION_ID
AND DELIV_SU.SITE_USE_CODE = 'DELIVER_TO'
AND OOH.SOLD_TO_ORG_ID = RACUS.CUSTOMER_ID
and ool.line_type_id = oolb.line_id (+)
and rr.rule_id = ool.accounting_rule_id
AND NVL(OOL.SHIPPABLE_FLAG,'Y') = 'N'  Non Shippable Item at line level
--AND OOL.FLOW_STATUS_CODE IN ('FULLFILLED','CLOSED')
--ool.fulfillment_date between '20-OCT-2008' and '25-NOV-2008'
order by ooh.order_number;

I guess the way order entered goes like this:
1. You enter an order line for the part number (FGA). This is shippable
2. You enter another line for warranty item..This is not shippable but only fulfilled. Since the first line is tied to this line, you are using fulfillment sets to satisfy the fact that only when part line is shipped you want to close this line.
3. And you are looking for a query to join these two lines and show them in online.
Is that correct?
First in your query, found this:
and ool.line_type_id = oolb.line_id. Guess this (sorry to Say) wrong.
you can get the links for lines and fulfllment sets from oe_sets and oe_line_sets to get the link between two.
Please revert if you need clarification.
Thanks
Nagamohan

Similar Messages

  • Error in sales order when selecting a warranty item in configurator 'Please enter required information - Service Reference Type Code'

    Error in sales order when selecting a warranty item in configurator 'Please enter required information - Service Reference Type Code'
    Not able to book the sales order because of this issue

    Order Management does not support the inclusion of optional service items in a configured Model BOM (see Support article #1296751.1 for more detail).  Allowing for such would therefore require customization.
    As you've found, there's no modeling restriction that prevents you from creating a Model BOM that includes optional service items, nor is there any problem with creating a Configurator Model for it.  And required service items (such as a warranty item that is a required child of an optional BOM component) do not present a problem; they have nothing to do with Configurator, and would never appear as sub-lines in OM.  The problem arises in OM, which requires that any service item be "associated" to the item it's "servicing".  OM does not automatically make such an association with service sub-lines, even though it might be argued that an association may be inferred by the BOM structure (i.e., OM does not assume that an optional service sub-line is necessarily associated, from a service standpoint, with its BOM parent).  OM customization is therefore required in order to hook any service item up to its corresponding product item.  Many customers who configure service along with product have implemented such a customization.
    (Another gap in such a solution that may be relevant to you is that for an included optional service item requiring recurring billing, Order Management does not create the requisite Service Contract.  Customers have likewise developed customizations to address this, as well.)
    As this is not specifically a Configurator matter (you could have created your order without using Configurator at all, and you would have experienced the exact same behavior), please do not take my explanation as being either authoritative or comprehensive (I am a Configurator expert, and only knowledgeable enough about Order Management to be dangerous).  It would be advisable for you to seek more detailed information/recommendations from the Order Management forum.
    Eogan

  • Query for last 5 Purchase Price for items

    Dear All
    I was trying to write a query in which
    i want to display Items with last 5 purchase price
    itemcode     UOM      Last Purchase Price        II Last Pur Price       III Last Pur Price        IV Last Pur Price         V Last Pur Price
    but not getting right result because of future posting and post date entries as I am considering Max(DocNum) for Query.
    SELECT distinct a.ItemCode, a.invntryUom
    , (select Price from PCH1 where itemcode=a.itemcode and
    docentry=(select max(docentry) from PCH1 where itemcode=a.ItemCode)) as 'II Pur. Price'
    , (select Price from PCH1 where itemcode=a.itemcode and
    docentry=(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode))) as 'II Pur. Price'
    , (select Price from PCH1 where itemcode=a.itemcode and
    docentry=(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode)))) as 'III Pur. Price'
    , (select Price from PCH1 where itemcode=a.itemcode and
    docentry=(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode))))) as 'IV Pur. Price'
    , (select Price from PCH1 where itemcode=a.itemcode and
    docentry=(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode)))))) as 'V Pur. Price'
    , Max(b.docentry) as 'MaxDocEntry'
    FROM OPCH INNER JOIN
    PCH1 b ON OPCH.DocEntry = b.DocEntry INNER JOIN
    OITM a ON b.ItemCode = a.ItemCode
    group by a.ItemCode, a.invntryUom
    order by a.ItemCode
    Please help me on this.
    Regards
    Anubha Paliwal

    Hi........
    Try this......
    SELECT Top 5 T0.[DocNum], T1.[ItemCode], T1.[Dscription], T1.[Price], T3.[ItmsGrpCod],
    T3.[ItmsGrpNam] FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON
    T2.ItmsGrpCod = T3.ItmsGrpCod WHERE T3.[ItmsGrpNam] ='[%0]' ORDER BY T0.[DocDate] desc
    Regards,
    Rahul

  • Querying a Form/Tab Page Change/Applicaiton Items

    Hi,
    I have what I think should be a fairly simple thing to do but am struggling. I have an application item that is set when the user logs on. I have several tabs that open various reports/forms. All I want is that when the user clicks on one tab a form is opened but with a record queried back ready for update with the query being restricted with the value of the application item (application item contains primary key). I have tried setting the default value of the primary key to the application item but no luck. If I manually call the form with primary key column argument:value set in the url the record is queried fine, but you cannot set these items on a tab page change, any help greatly appreciated
    Chris

    Hello
    For each form page you could
    Define an unconditional before header page process or a before-header page computation
    Set the page-item corresponding to the PK of the form's base table to have the value contained in the application item
    Varad

  • How to reference the output of a repeat item action in relation to the repeated inputs?

    For example; I have 3 actions:
    Action 1: output produces 6 entries in a list (with unique IDs)
    Action 2: repeats over action 1's output, produces a list of 'results' for each as an output list of 6 entries.
    I now want to use Action 3 to update the items using their ID output from Action1 with the relevant result from Action2.
    In psuedocode; I'd do something like this to set the 6 results iteratively : MyItems( action1.outputs[x].id ) . results = Action2.outputs[x]
    I'm unsure of the syntax in Logic Apps to achieve this, any help appreciated!
    Cheers!

    Currently there is no build in solution to support such a scenario. You would need to set up an ApiApp that applies the assignment and returns the new object. In order to access the corresponding outputs of action1 and action2 you can repeat over the range
    of indices -- that is, assuming you don't know then numbers of entries in advance, let action3 (that consumes the new custom ApiApp) repeat over
    @range(0, length(outputs('action1').repeatItems))
    you can then pass the data as inputs to action3 using
    @outputs('action1').repeatItems[repeatItem()]
    @outputs('action2').repeatItems[repeatItem()]
    Hope this helps

  • Capturing Detail Items for a Related List in a New Item Form

    I have a simple (ha!) requirement to capture Purchase Requests with the individual line items being captured in a separate List.  I have been using InfoPath, but will consider ANY solution at this point.
    If I have an Edit Item Form, I can have a Data View (LIst View Web part) that will display all related items in my Details List (using a filter on the Parent ID).  I can even add a Data Form Web Part below this to allow for the entry of a single itme
    at a time, and make the lookup field of the new item default to the ID of the parent item.
    All well and good for the Edit Item.  But if I want to do the same on my New Item Form, I am up the proverbial without a paddle because I do not have access to the ID of the Parent List Item (that is still being captured).
    So, using any of the standard SharePoint technologies (except Visual Studio), how can I create a New Item Form, in which I can enter items for a related details List and see those detail items already entered, all while capturing the original form?

    Hi Mike,
    According to your description, my understanding is that you want to get the details of the related items in New Item form.
    I recommend to edit the new item form in InfoPath and use repeating table to display the related items based on the value in the lookup column.
    Here are the detailed steps:
    Edit the new item form(listB for example) in InfoPath and then add the related list(listA for example) including all the details you need as external data source to the form.
    Choose the secondary data source added in step1 in Fields panel and then expand dataFields, then right click d:SharePointListItem_RW and select Repeating Table to insert the secondary data source added in step1 as repeating table to the form.
    Right click d:SharePointListItem_RW in the Fields panel and select Rules, then click New and select Formatting in Rules panel.
    Click None under Condition in Rules panel, then select ID field in the repeating table in the first box, select is not equal to in the second box, then choose Select a field or group in the third box and select Main under Fields, then click the lookup field
    in the form and then click OK.
    Select Hide this control under Formatting in Rules panel.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • [SQL QUERY] Select TCP Port Monitors and their related Watcher Node

    Hi everybody,
    I'm working on a SSRS report and SQL Query, I have no problem to find all my TCP Port Monitor (SCOM 2012 R2) based on the DisplayName, but I can't figure out how to get their related watcher nodes (in my case only 1 computer is a watcher node).
    I can't find which table, which field, contains this information..?
    Here is the query i started to write (i select * since i still searching for the right column):
    SELECT
    FROM StateView s
    INNER JOIN BaseManagedEntity me on me.BaseManagedEntityId=s.BaseManagedEntityId
    INNER JOIN MonitorView mv on mv.Id=s.MonitorId
    INNER JOIN ManagedTypeView mtv on mtv.Id=s.TargetManagedEntityType
    --where mv.DisplayName like 'Ping Target Status Check%'
    AND me.IsDeleted = '0'
    where mv.DisplayName like '%tcpmon%'
    and mv.LanguageCode = 'ENU'
    --and s.HealthState in (@state)
    ORDER BY s.Lastmodified DESC
    It would be great if someone can help me !
    Thanks,
    Julien

    Hi,
    After creating a TCP port monitor, we can find a table for this monitor under operationsmanager database :
    SELECT *
    FROM [OperationsManager].[dbo].[MT_TCPPortCheck_******WatcherComputersGroup]
    You will find the warcher computer group.
    Regards,
    Yan Li
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Order related item and delivery related item in one billing document

    Hi Experts,
    how can we include order related item and delivery related item in one billing document .
    Please give me the configuration logic .

    Hello,
    1)Reference Document Number VBRK-XBLNR.
    In transaction VTFA and VTFL at header level setup the field 'Reference number' so that it is the same (example 'E')
    2) Payment Reference VBRK-KIDNO
    It should be a consequence of the split, and not a cause. So you can ignore it
    3) Billing date for billing index VBRK-FKDAT
    In sales order and delivery you should set the same billing date. Alternatively, the the first screen of VF01 please set a Defailt billing date
    4) Customer purchase order number VBRK-BSTNK_VF
    It is necessary that sales order to be billed and sales order referenced to delivery to be billed have the same purchase order number. There is not other way.
    5) Assignment number VBRK-ZUONR
    In transaction VTFA and VTFL at header level setup the field 'Assignment number' so that it is the same (example 'E')
    6) Translation Date
    Same solution of point 3.
    Best regards,
    Ivano.

  • Additonal Text for Part Numbered Items

    Hello,
    My problem is we have standard descriptions for part numbered items. I want to be able to add additional lines to explain to a buyer what the part is. Maybe one or two lines.
    MM02 provides kind of what I'm looking for, though this text only appears in the Material Sales Text.
    I'm looking for something which will appear in Item Note, Packing Note & Delivery Text.
    Thanks you in advance,
    Karl

    For this you can refer & explore standard functionality [ Text Determination |http://www.magnatraining.com/text-determination-in-sap-sd/]
    By that, one the text type: Material Sales Text is maintain in Material can be referred to your desired level like Item Note, Packing Note & Delivery Text.
    Regards
    JP

  • How to print SO line item seperately on four part of paper

    Hi all,
    My client has following requierment.
    if we take A4 size paper and make four equal part  then we will have four part as follows
    part1 (top left),part2(top right),part3(bottom left) and part4(bottom right)*
    In sales order if there are 4 line item then i want to print
    1st line item,desc,qty,whs code,so number,cust name  on part1
    similarly for
    2nd line item,desc,qty,whs code,so number,cust name on part2
    3 line item,desc,qty,whs code,so number,cust name  on part3
    4th line item,desc,qty,whs code,so number,cust name  on part4
    order of printing is as follows
    following is A4 size  paper ,which is divided in to four parts   first line item will be printed on first part
    second line item will be printed on second part
    third line item will be printed on third part
    fourth line item will be printed on fourth part
    and so on 
    printer automaticaly print this  in there customised old ERP now they want this in the SAp B1..
    they tear this paper in four part and while despatching the item they attach this to the Item
    hope i have given proper information about my question..
    Can any body have idea how to print this in above format....
    thanx in advance.
    regards,
    Chetan.

    Hi chetan,
    I tried your require PLD but did not display the Sales Order line item seperately on four part of paper.
    Try this,
    ->> Open the PLD.
    ->> Create 1 Database field on the top Left half of page and 1 Database field on the top Right half of page in Page Header.
    ->> Create 1 Database field on the Bottom Left half of page and 1 Database field on the bottom Right half of page in
    End of Report.
    Result:
    Top Left half of page ->> 1st Row Item Description
    Top Right half of page ->> 1st Row Item Description
    Bottom Left half of page ->> (Last)4th Row Item Description
    Bottom Right half of page ->> (Last)4th Row Item Description
    Because First 2(Left & Right)Database Fields are in Page Header and both 2 fields are in page header so it will be display only the First Row Item Descrition.
    Second 2(Left & Right)Database Fields are in End of Report and both 2 fields are in End of Report so it will be display only the Last Row Item Descrition.
    so, Try this.
    ->> Create 1 Database field on the top Left (or) Right half of page in Page Header.(Display the 1st row Item Description )
    ->> Create 1 Database Field and Assign the Item Description then Create 1 formula field put formula ( LineNum()==2 )field in Repetetive Area0.
    ->> (Item Description)DB field is Link to Formula field ID.(Display the 2nd row Item Description )
    ->> Top of the menu Clcik the Print Layout Designer -> Repetetive Area -> Add.
    ->> Create 2 Database Field and Assign the Item Description then Create 1 formula field put formula ( LineNum()==3 )field in Repetetive Area1.
    ->> 1st (Item Description)DB Field put hide and 2nd DB field is Link to Formula field ID.(Display the 3rd row Item Description )
    ->> Create 1 Formula field and Paste the Item Discription (Hide) Field ID on the Bottom Left (or) Right half of page in End of Report.(Display the Last(4th) row Item Description )
    Regards,
    Madhan.

  • Re:Query for Stock Statement for a particular item..!!!!

    Dear SAP Experts,
    I need a stock statement query  for a particular item which contains:
    1.ItemCode
    2.Item Description
    3.Item Price
    4.Opening
    5.Receipts
    6.Issues
    7.Closing
    8. Value
    The selection criteria are:
    1.Warehouse code
    2.Item Name
    3.Posting Date
    Plz give me a good solution for this issue.
    With Regards,
    Revathy

    Check this
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    set @FromDate =
        (Select min(S0.Docdate) from OINM S0 where S0.Docdate >='[%0]')
    set @ToDate =
        (Select max(S1.Docdate) from OINM S1 where S1.Docdate <='[%1]')
    select * from
        SELECT T0.itemcode,
        min(T0.Dscription) as 'Item Description',
        min(B1.ItmsGrpNam) as 'Item Group', W1.Whscode, C1.Location,
        (isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate ),0)-
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate),0)
        ) as [Opening Stock],
        isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate
            and O1.docdate<=@ToDate and O1.inqty>0
            and O1.transtype in (20,18)),0
        ) as [Purchase Quantity],
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate
            and O1.outqty>0 and O1.transtype in (21,19)),0
        ) as [Purchase Return Quantity],
       isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.outqty>0
            and O1.transtype in (13,15)),0
        ) as [sale Quatity],
        (isnull
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate<=@ToDate),0
            isnull((
                Select sum(isnull(outqty,0))
                from OINM O1
                where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
                and O1.docdate<=@ToDate),0)
        ) as [Closing Stock]
        FROM OINM T0
        INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
        INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode
        INNER JOIN OITB B1 ON T1.ItmsGrpCod=B1.ItmsGrpCod
        INNER JOIN OWHS W1 ON T2.WhsCode = W1.WhsCode
        INNER JOIN OLCT C1 ON W1.Location=C1.Code
        Group by T1.itemcode, T0.Itemcode, W1.WhsCode, C1.Location
    ) a
    where (a.[Opening Stock]
            +a.[Purchase Quantity]
            + a.[Purchase Return Quantity]
            +a.[sale Quatity]+a.[Closing Stock]
           ) !=0
    Regards,
    Bala

  • SQL Report query with condition (multiple parameters) in apex item?

    Hello all,
    I have a little problem and can't find a solution.
    I need to create reports based on a SQL query or I.R. Nothing hard there.
    Then I need to add the WHERE clause dynamically with javascript from an Apex item.
    Again not very hard. I defined an Apex item, set my query like this "SELECT * FROM MYTAB WHERE COL1 = :P1_SEARCH" and then I call the page setting the P1_SEARCH value. For instance COL1 is rowid. It works fine.
    But here is my problem. Let's consider that P1_SEARCH will contain several rowids and that I don't know the number of those values,
    (no I won't create a lot of items and build a query with so many OR!), I would like sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (:P1_SEARCH) with something like : ROWID1,ROWID2 in P1_SEARCH.
    I also tried : 'ROWID1,ROWID2' and 'ROWID1','ROWID2'
    but I can't get anything else than filter error. It works with IN with one value but as soon as there are two values or more, it seems than Apex can't read the string.
    How could I do that, please?
    Thanks for your help.
    Max

    mnoscars wrote:
    But here is my problem. Let's consider that P1_SEARCH will contain several rowids and that I don't know the number of those values,
    (no I won't create a lot of items and build a query with so many OR!), I would like sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (:P1_SEARCH) with something like : ROWID1,ROWID2 in P1_SEARCH.
    I also tried : 'ROWID1,ROWID2' and 'ROWID1','ROWID2'
    but I can't get anything else than filter error. It works with IN with one value but as soon as there are two values or more, it seems than Apex can't read the string.For a standard report, see +{message:id=9609120}+
    For an IR&mdash;and improved security avoiding the risk of SQL Injection&mdash;use a <a href="http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_collection.htm#CACFAICJ">collection</a> containing the values in a column instead of a CSV list:
    {code}
    SELECT * FROM MYTAB WHERE ROWID IN (SELECT c001 FROM apex_collections WHERE collection_name = 'P1_SEARCH')
    {code}
    (Please close duplicate threads spawned by your original question.)

  • Forming a report query dynamically with the value of an item

    Hi Gurus,
    We wanted to create a report based on the value of an item in the page.
    For example
    There is a text box named p1_table depending on the value of this item the query of the report should change
    1) when p1_table = emp then report query should be select * from emp
    2) when p1_table = dept then report query should be select * from dept
    I tried doing this using
    select * from :p1_table and select * from v('p1_table') , it is not working.
    Kindly help me in achieving the requirement.
    Thanks & Regards,
    Vikas Krishna

    Hi Vikas,
    You have to do this as a report based on a function that returns the query as a string. You build up the string dynamically in the function.
    Regards
    Andre

  • Querying Exchange 2013 Mail server for email items using c# and Exchange Web Services

    I am trying to upgrade an existing application that reads Exchange 2003 using WebDAV. The mail server is to be upgraded to Exchange 2013, so I am checking how I can use EWS.
    I have a problem in that although I know the inbox has unread items with attachments, the query I am running against the
    FindItems object is returning empty (results.totalCount=0)
    Here is my code snippet:
    private static void GetAttachments(ExchangeService service)
    // Return a single item.
    ItemView view = new ItemView(100);
    ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);// .Exchange2007_SP1);
    service.UseDefaultCredentials = true;
    service.AutodiscoverUrl("[email protected]", RedirectionUrlValidationCallback);
    ItemView view = new ItemView(1);
    string querystring = "HasAttachments:true Subject:'ATTACHMENT TEST' Kind:email";
    // Find the first email message in the Inbox that has attachments.
    // This results in a FindItem operation call to EWS.
    FindItemsResults<Item> results = service.FindItems(WellKnownFolderName.Inbox, querystring, view);
    //FindItemsResults<Item> results = service.FindItems(WellKnownFolderName.Inbox, new ItemView(50));
    if (results.TotalCount > 0)
    // looping through all the emails
    for (Int16 iDx = 0; iDx < results.TotalCount-1; iDx++)
    EmailMessage email = results.Items[iDx] as EmailMessage;
    if (email.IsRead == false) {
    // Request all the attachments on the email message. This results in a GetItem operation call to EWS.
    email.Load(new PropertySet(EmailMessageSchema.Attachments));
    foreach (Attachment attachment in email.Attachments)
    if (attachment is FileAttachment)
    FileAttachment fileAttachment = attachment as FileAttachment;
    What I am supposed to be doing is reading all the unread emails in the target inbox (only one Exchange server) and taking the attachments on disk so I can then add them as attachments as new cases on SalesForce.
    Where am I going wrong?
    Also, this line:
    ItemView view = new ItemView(100);
    was:
    ItemView view = new ItemView(1);
    Surely that will only look for one email item, right?

    thanks, do you know why I would be getting an error message like 'The specified object was not found in the store'
    here is my code:
    ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);// .Exchange2007_SP1);
    service.Url = new Uri("https://sgexc.bocuk.local/EWS/Exchange.asmx");
    //creates an object that will represent the desired mailbox
    Mailbox mb = new Mailbox(@"[email protected]");
    //creates a folder object that will point to inbox folder
    FolderId fid = new FolderId(WellKnownFolderName.Inbox, mb);
    //this will bind the mailbox you're looking for using your service instance
    Folder inbox = Folder.Bind(service, fid);
    FindItemsResults<Item> findResults = service.FindItems(new FolderId(WellKnownFolderName.Inbox, new Mailbox("[email protected]")),new ItemView(10));
    it's happening on this line:
    Folder inbox = Folder.Bind(service, fid);
    and if I try to use AutoDiscoverURL then I just see my own inbox.

  • Query to find all text attachments for items

    I am using the query below to try to find all active items for my org that have an attachment of type 33 (something we have defined I believe) and contain specific text. Some of the items appear to meet all criteria (active, right category, etc) but do not show up in my results. Can someone please take a look and see if there is a join missing, an outer join that should be used, or an overall easier way to do this query and get the text information?
    SELECT i.segment1 "Item Number",
    i.description "Item Description",
    u.user_name || ' (' || ppx.first_name || ' ' || ppx.last_name || ')' "Created By",
    i.creation_date "Created Date",
    to_number(r.revision) "Revision",
    to_char(r.effectivity_date, 'MM/DD/YYYY') "Effectivity Date",
    nvl(tx.short_text, '<No Drawing Info>') "Drawing Info / Attachment"
    FROM apps.mtl_system_items_b i,
    apps.mtl_item_revisions_b r,
    apps.fnd_user u,
    apps.per_people_x ppx,
    apps.fnd_attached_documents ad,
    apps.fnd_documents d,
    apps.fnd_documents_tl t,
    apps.fnd_documents_short_text tx
    WHERE i.organization_id = 90 AND -- for MBE only
    r.organization_id = 90 AND -- for MBE only
    ad.pk1_value = 90 AND -- for MBE only
    ad.entity_name = 'MTL_SYSTEM_ITEMS' AND
    (upper(tx.short_text) LIKE '%DWG%' OR
    upper(tx.short_text) LIKE '%SIZE%' OR
    upper(tx.short_text) LIKE '%DRAW%') AND
    tx.short_text != 'DWG NONE' AND
    d.document_id = t.document_id AND
    t.source_lang = 'US' AND
    t.LANGUAGE = 'E' AND
    to_number(ad.pk2_value) = i.inventory_item_id AND
    t.document_id = ad.document_id AND
    tx.media_id = t.media_id AND
    d.category_id = 33 AND
    i.inventory_item_status_code = 'Active' AND
    i.inventory_item_id = r.inventory_item_id AND
    u.employee_id = ppx.person_id AND
    u.user_id = i.created_by AND
    to_number(r.revision) =
    (SELECT MAX(to_number(r2.revision))
    FROM apps.mtl_item_revisions_b r2
    WHERE r2.inventory_item_id = i.inventory_item_id) AND
    r.effectivity_date =
    (SELECT MAX(r3.effectivity_date)
    FROM mtl_item_revisions_b r3
    WHERE r3.inventory_item_id = i.inventory_item_id)
    GROUP BY i.segment1,
    r.revision,
    i.description,
    u.user_name,
    ppx.first_name,
    ppx.last_name,
    i.creation_date,
    r.effectivity_date,
    tx.short_text
    ORDER BY i.segment1 ASC;
    Thank you!
    Message was edited by:
    matt.schutz

    There is no workbook/worksheet linkage to a business area. So you cannot search for a business area and find all the workbooks "attached" to that business area. The attachment of workbooks is at the folder level. It is actually possible, if you are sharing folders among business areas, to create a workbook with data from 2 or more business areas. I have tested that and it is indeed possible. In Discoverer Administrator you can check on folder dependencies to see what workbooks use the folder. Though in my version of Discoverer, there is a problem with Discoverer Plus, such that the workbook save in Plus is not creating this dependency information like it should. At least I have not found any way to take a business area and determine what workbooks would fall under it. Maybe someone else has found a way.
    John Dickey

Maybe you are looking for

  • How to make a copy of DefaultStyledDocument Object for RTF text ?

    Hi All, In my application, I need to copy RTF text from Org_Default_Styled_Document to New_Default_Styled_Document (both are independent objects.) For this I wrote the below method : public DefaultStyledDocument copyRTFStyledDocument(DefaultStyledDoc

  • Iwork'09 crashes after deletion of caches

    I deleted my whole user caches folder by mistake and now iwork won't load. I tried re-installing it, then I tried reinstalling OS Lion, then checked software update and it still gives me the following error: Process:         Pages [2688] Path:       

  • 3.3.8 Create a Business Scenario Configuration (Developer Guide)

    Hi guys, I am using the 13 step wizard installation tool to set up Duet Enterprise. I have the SCL on 1 box - NW1 and the backend system on 1 box - ER4. I have completed all the step correctly and found no errors until I reached the Starter Services

  • Production order number in BATMAS03 idoc??

    Dear all, I am working with IDOCs and i require to have the link between a production order and its batch. We have configured LOIPRO and BATMAS (BATMAS03) but i dont see in LOIPRO the batch number or in BATMAS the production order number. Is there a

  • Ebay Wall + Car Chargers + AV Ca

    For under 20 bucks total. Is that credible and?can anyone who tried that product let me know if they work for ZVM?