Formatted search query for displaying invoice items details

hi all,
i need to display all the items in AP invoice.kindly suggest me a query for that.
in AP invoice
Ex. row items
code--descqtyprice--
total
I0001--XXXXXXX5--
100 -
500
query should display this row as
code--desc--
price
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
=================================
the query should display as the qty is 5 so it will display the same item 5 times
kindly suggest me some query for formatted search
its very urgent
regards
sandip

Hi Sandip,
DoQuery("Select b.ItemCode from OINV a,INV1 b Where a.DocEntry=b.DocEntry")
Hope its help for you
Give me reward points,
Regards,
G.Suresh.

Similar Messages

  • Formatted Search Query for BatchNo

    Dear All,
    I am using the following query as formated search for Identifying the batches availble during the creation of  Delivary document
    in a user defined column at row level. When i click on this field it's showing the Batches for the Item with Zero Qty also.
    I need to display only the batches where the QTY >0. This query displaying even the Zero Qty Batches also. Please help me to modify the below query for getting the above. Below is the  query .
    SELECT distinct  T4.[BatchNum] FROM [dbo].[OIBT]  T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode INNER JOIN DLN1 T2 ON T1.ItemCode = T2.ItemCode INNER JOIN ODLN T3 ON T2.DocEntry = T3.DocEntry INNER JOIN IBT1 T4 ON T0.BatchNum = T4.BatchNum AND T3.DocNum = T4.BaseNum INNER JOIN OWHS T5 ON T0.WhsCode = T5.WhsCode WHERE T0.[ItemCode] = $[$38.1] AND  T4.[WhsCode] = $[$38.24] AND T0.[Quantity]>=$[$38.11]
    Regards
    Srini

    i removed that T5, But It's  showing the  Batches where the qty in the main warehouse for that batch is Zero.That batch was actually present in another warehouse. And also when i am working on other warehouses it's showing the batches in the main warehouse where the qty is present.
    Regards
    Srini
    Edited by: Srini on May 11, 2010 10:24 PM

  • Formatted Search query for Vacation Accrued

    Hi Experts,
    I have a Client who needs to keep tract on the Vacation Accrued on the Employee Master Data. I have created this UDF on the Master Data, but I could not get the query for the Formatted Search right.
    This Formatted search on the UDF ( must look at the OHEM.startDate field and populate the following:
    If it is a still within year of the system date, it must populate 0,
    If it is > 1 year and < 3 years, it must populate 5,
    etc.
    Any help would be greatly appreciated.
    Marli

    Hi Experts,
    Here is what I did for the query mentioned above:
    {SELECT
    CASE
               WHEN (T0.startDate > GETDATE() -356)
                       THEN 0
               WHEN (T0.startDate > GETDATE() - 712)
                       THEN 5
    END
    As 'Vacation Accrued'
    FROM OHEM T0}
    The issue is that if I link this query to the UDF on the EMD, I get a list of 0 and 5 to choose from. I need to populate automatically.
    Thanks.
    Marli

  • Formatted Search Query for Variable field

    Hi Experts,
    I have a client who wants a UDF on the Delivery Document to auto populate wiht a Variable field in the Administration module. This variable field was added by a Add-on.
    The system information is:
    Form: ShipOpt
    Item: Boxes
    Pane: 1
    Column: Box Name
    Row: 0
    Variable: 3
    How do you specify a Variable field in the Query?
    Any help would be appreciated.
    Thanks,
    Marli

    Hi Marli,
    You may only use Current form variable for FMS query.  I believe you need UDF on the Delivery. SO the other form will not be available to your query.
    Thanks,
    Gordon

  • Formatted search query with variable

    Hi
    I am trying to create a formatted search on a purchase order document.The scenario is as follows:
    The issue is that the client will on certain stock records incur a tooling cost when raising a PO. This is a once off cost when they order a particular item. For example the tooling cost on a stock item is u20AC5.50. The cost price on the item is u20AC100. If they order for example 5 of these the total cost is u20AC505.50 i.e. u20AC100*5+tooling cost of u20AC5.50.
    What we are attempting to do is pull through the tooling cost and add this on to the line total using a formatted search.
    -UDF created on item record table. This is set type 'Unit and totals' and structure is 'Price'. This is called ToolingCost
    -UDF created on marketing doc rows for ToolingCost. Again this is set to the same type and structure as the UDF on the item record.
    -We have created a UDF on marketing row for total cost and set a formatted search against this with query attached that is attempting to calculate the total cost. We cannot get this to work and the problem would appear to be that the price field is a variable and this is causing an issue on the query. Can we include a variable field in our query and if so what should the syntax be?
    Our query at the moment is 'SELECT 100*($[POR1.QTY.NUMBER])+($[POR1.U_TOOLINGCOSTS.NUMBER])
    Note 100 in query syntax above to be replaced by price on POR1 table.
    Can anyone provide assistence please.
    Derek Smith

    Hi Derek........
    Try this.....
    declare @var1_Qty as varchar(255)
    declare @var2_Pr as varchar(255)
    declare @var3 as float
    declare @var4 as float
    set @var1_Qty=$[$38.11.0]
    set @var2_Pr=$[$38.14.0]
    Set @var3=$[POR1.U_TOOLINGCOSTS.0]
    set @var4=cast(substring(replace(@var2_Pr,',',''),0,len(replace(@var2_Pr,',',''))-3) as float)
    select (@var1 * @var4)+@var3
    Hope this will help you.......
    Regards,
    Rahul

  • How to club 2 queries in one formatted search query

    Hi All,
    I have inserted a formatted search in the stock transfer for chnaging the 'From warehouse' based on series.
    I have written following query for same,
    SELECT $[$18.1.0]='08' WHERE $[OWTR.series] ='46'
    It is working Fine
    I want ot use same concept for selecting other based on other warehouse
    e.g
    SELECT $[$23.5.1]='02' WHERE $[OWTR.series] ='45'
    But I am not able to club these queries on one formatted search query can anybody help to group it in one formatted search query....
    Thanks and Regards,
    Atul Joshi
    Edited by: Atul Joshi on Dec 23, 2008 5:20 PM

    Hi Atul,
    You could define the quey like this
    SELECT
    CASE
             WHEN $[OWTR.series]='46' THEN '08'
             WHEN $[OWTR.series]='45' then '02'
    end
    from OWTR
    Regards,
    Vijay kumar
    SAP Business One Forums Team

  • Formatted Search query

    Hi all,
    We have the following formatted search defined in OITM under Item Desc (foreign language):
    SELECT T1.DocNum AS 'Doc No', T1.CardCode AS 'BP Code', T1.CardName, T2.ItemCode, T2.OpenQty AS 'Open Qty', T2.WhsCode
    FROM [dbo].[ORDR]  T1 INNER JOIN [dbo].[RDR1]  T2 ON T1.DocEntry = T2.DocEntry INNER JOIN OITM T3 ON T2.ItemCode = T3.ItemCode
    WHERE T2.ItemCode = $[OITM.ItemCode] AND T2.OpenQty > 0
    When run, we get a pop-up window with the relevant information. My question is, is there a way to make the T1.DocNum something which can be drilled down on?
    Thanks alot!!
    Rajiv Agarwalla
    G.Mckenzie & Co

    Hello Rajiv,
    I think only the Choose From List pop-menu is available in SAP.  For me, the Choose From List is a user-friendly feature because you can find or search through codes.

  • Mandatory Input in Formatted Search Query Field

    I have created formatted search query. Which has only one field "Serial Number"?  I have to ensure that, the user has to enter the value in that field.  How to do that?
    I was thinking on implement in stored procedure SBO_TransactionNotification with Object_Type = "219". But I am not sure, how to enforce the validation only for this search query.  Because there are 50+ formatted search queries are available in the system.
    Please help

    Hi Suresh
    Check the below document
    How to SET a UDF field as Mandatory Does TNSP required for It?
    With Regards
    Balaji Sampath

  • Query for multiple invoice numbers.

    Hi,
    My question is if I can add multiple invoice numbers in the search field "invice number"?
    For example when I receive a balance confirmation request from a supplier and their list contains 10 invoices. Can I do a search for all 10 at the same time or I can olny do a search one by one?
    Thank you!
    Angie

    Hi,
    there's no direct possibility to query for multiple Invoice number in terms of entering e.g. 5 number for a query.
    But you can work with placeholders '_' and '%' to find multiple invoices at one time. Underscore sign stands
    for exactly one character which can have multiple value, percentage sign for multiple ones.
    Example (assuming you are using letters and numbers for invoice numbering):
    When entering 'A12_' as search String, invoices from 'A120' to 'A12z' would be found.
    When using 'A12_01_' all invoices from 'A120010' to 'A12z01z' would be found.
    When using 'A12%' all invoices starting with 'A12' - no matter about the rest would be found.
    These are only a few examples but i think when using a clever combination of wildcards and parts of the
    invoices - which often share a common component, if the invoices come from the same vendor - you'll get
    at least a small step farther.
    Regards

  • Serial Number for the invoiced item

    Hi All,
    I need to find out the serial number for the invoiced item. For ex: I have an order with an item with qty 3 and they all the received in the inventory (drop ship case). But I have invoiced only one qty of the item and I need to find out serial number for this specific item.
    I am using the query below but getting the sr no for all the 3 qty of the item.
    SELECT rct.trx_number,rctl.customer_trx_id, rctl.customer_trx_line_id
    ,ii.instance_number
    ,ii.serial_number
    ,ool.ordered_item
    ,ool.inventory_item_id
    FROM csi.csi_item_instances ii,
    apps.oe_order_lines_all ool,
    apps.ra_customer_trx_lines_all rctl,
    apps.ra_customer_trx_all rct
    WHERE ii.last_oe_order_line_id = ool.line_id
    AND ii.inventory_item_id = ool.inventory_item_id
    AND rct.customer_trx_id = rctl.customer_trx_id
    AND rct.org_id = rctl.org_id
    -- AND UPPER( ii.serial_number) NOT LIKE ('PEND%')
    AND rctl.interface_line_context = 'ORDER ENTRY'
    AND rctl.interface_line_attribute6 = TO_CHAR(ool.line_id)
    AND NVL(ool.cancelled_flag,'N')= 'N'
    AND ool.flow_status_code = 'CLOSED'
    AND ool.org_id = rctl.org_id
    AND rct.customer_trx_id = :p_trx_id
    AND rctl.customer_trx_line_id = :p_trx_line_id
    Thanks,
    Rahul

    Hello Sandeep,
    I am looking for any pre-exisitng link between these entities. If it doesn't exist or is not possible at all without any customization, just wanted to confirm it.
    Also, when records are interfaced to the AR and autoinvoicing is run, we may populate any attribute column to capture the sr.# but again, how can we specifically determine the sr. no. for the item being invoiced. I think we'll have to pick anyone out of the 3 generated in the above example. Similarly, if we invoice the rest 2 items later, then we'll have to assign the remaining 2 sr. #s to each of these 2 items in any order.
    Please let me know if this is what you meant.
    Thanks,
    Rahul

  • How to run a search query for a particular folder in KM related to portal

    Hi,
    Can any one tell me the steps for : how to run a search query for a particular folder in knowledge management related to portal.
    Answers will be rewarded.
    Thanks in advance.
    KN
    Edited by: KN on Mar 18, 2008 6:33 AM

    Ok u may not require a coding
    But u req configuration
    U should first make a search option set
    Link: [Search Option set|http://help.sap.com/saphelp_nw04/helpdata/en/cc/f4e77ddef1244380b06fee5f8b892a/frameset.htm]
    Then u need 2 duplicate a KM Command by the name Search From here
    and customize it to include the Search Option that u have created
    Link: [Search from here|http://help.sap.com/saphelp_nw04/helpdata/en/2a/4ff640365d8566e10000000a1550b0/frameset.htm]
    Then in the layout add this command.
    Regards
    BP

  • How to create ABAP Query for vendor open items

    HI,
    My client has requested me to create ABAP Query for vendor open items . So that it will be usefull for the users . Could anyone help me with this. I will assign you points.Thanks in advance.

    Hello,
    Use Table BSIK <Open Items of AP > & BSAK <AP Cleared items>......
    For Query you can use SQ01.
    USE BSID & BSAD for AR open/clear items...
    LFA1, LFB1 are vendor master data tables
    This is FYI
    Hope this helps.
    Rgds
    Rajendra

  • Header Details to be Printed only for the line item details.

    Hi All,
    I have the following requirement.
    I have Page1 with the Logo, Header Window, Vendor Window, Send Invoice To, Delivere Invoice To and Main Window. Main Window Starts from the middle of the page. In the Page2 i have Logo, Header window and Main Window. In the Page3 i have only Main Window.
    In the Footer of the Main Window i have Placed the Terms and conditions which should always be Printed in the New Page. So in the footer i have given a command "Go to New Page " and given the page as Page3.
    The requirement is Logo,and Header Window should appear only for the Line items and not for the Terms and conditions.
    For the Page1 i have given the Next Page as Page2. Suppose if there is only one line item then it Prints in the first Page itslef and the control flows to the Page2 and since in the page2 i have given the condition for the Logo and header window to print only if line item is more than 1 and since Main Window is starting from the middle there is a blank Space appearing in the start of the page.
    The command i have given in the footer to trigger new page that is page3 is not getting triggered. If there are more than one line item then its printing the logo and header window and so there is no blank space appearing and it is working fine.
    Please let me know how to avoid this blank space and move my main window to the start of the Page if there is only one line item.
    Thank you.

    Dear Vasudha,
    I am a little bit confused regarding your query,
    "In the Footer of the Main Window i have Placed the Terms and conditions which should always be Printed in the New Page. So in the footer i have given a command "Go to New Page " and given the page as Page3. "
    When you say footer of main window does it mean , that you are using a table inside your main window and the command node your have inserted is in the footer of the table ?.I hope it is, because my suggestion is based on this assumption.
    Well my suggestion for your issue is,
    1.I  hope you are aware we can trigger a next page in two ways, one by setting the next page static attribute & second using  the command node which you have used.In your case you will have to use a combination of both.
    2.I feel your First page design is ok. Set its static next page attribute to PAGE2. Similarly set the static next page attribute for PAGE2 as PAGE2 itself. This should take care of your table which you have placed in the main window. If the table contains only one lineitem it will get over in the first page itself. If the lineitems are more in the table, it will automatically triggerPAGE2 (since static next page attribute for PAGE1 is PAGE2)  and the remaining line items will be displayed. Now no matter how many lineitems you have ,PAGE2 will be triggered repeatedly(since static next page for PAGE2 is PAGE2 itself) until the entire data in your table is displayed.
    In this way your requirement of printing the logo and header windows for the data lineitems only will be fulfilled.
    3.Now the last catch in your case is the printing of PAGE3(The terms and condition page) on an entirely new blank page.
       In the footer section of the table which you have used,  use a command node set to PAGE3.  After the command node and under the same  footer section now insert your terms and condition lineitem.
    Also Check the "at End of table" checkbox and uncheck " AT PAGE BREAK" under OUTPUT OPTIONS tab for the footer section.
    So now this footer section will be triggered only once after all the data in the table is displayed
    4. So now if there is only one lineitem, before the default second page is triggered the command node will trigger the PAGE3 and the terms and condition will be displayed.Else if there are more lineitems the page2 will be triggered again and again and finally when all the lineitems are over, the footer of the table will get triggered. So the command node will take you to the PAGE3 wherin the terms and condition will only be displayed.
    Hope this helps.
    Regards,
    Riju

  • Help on Formatted search query

    Hello
    I have a formatted search that is the following to select line of marketing documents example
    select [$23.5.NUMBER]
    when the general setting display decimal separator as "," I have no problem but when decimal separator changes to "." then the formatted search is giving me error because result is [number.000000] too many zeros when it is without zeros with decimal separator set to ","
    How can I have the query run without zeros at the end when decimal is set to ","
    Thank you for your help

    Hi,
    Please advice exact field to check.
    Thanks & Regards,
    Nagarajan

  • Query for BOM child items

    Dear Friends,
    This following query,if I will attach it at PO in Item Code with formatted search  , I get result as BOM child items as per project code, here project code is similar to item code.
    But my limitation is that my  item code is more than 8 character ,under accounting TAB BP project  ,project I can define it up to 8 character only.
    My requirement is that if I will put project name (which is 30 characteristic) as like as item code , shall I get child item list.
    If yes , suggest necessary changes in above query.
    Query :
    WITH RECUR ( CODE) AS
    SELECT ITT1.CODE FROM  ITT1 INNER JOIN OITT ON OITT.Code=ITT1.Father WHERE ITT1.Father=$[$157.1.1]
    UNION ALL
    SELECT ITT1.CODE
    FROM ITT1  INNER JOIN  OITT ON OITT.Code=ITT1.Father
    INNER JOIN RECUR ON   RECUR.CODE    =ITT1.Father
    SELECT CODE FROM RECUR inner join OITM on OITM.ItemCode=RECUR.CODE --and OITM.PlaningSys='M' and OITM.PrcrmntMtd='B'
    Thanxs & regards
    Mahesh.

    Dear Mahesh,
    I am not sure about your aim.
    You would like to put a formatted search in the project code field of the sales order in order to get the children of the itemcode of that line in the document. The child codes will become the name of the project.
    Your issue is the following:
    As the project code field in the sales order (field called: rdr1, project) is long 8 characters only and the sum of the children codes will be too long for this field.
    Am I correct?
    If I am not correct, can you please tell me step by step what you are trying to do?
    Thank you.
    Marcella Rivi
    SAP Business One Forums Team

Maybe you are looking for