Problems using a formatted search to link order lines to order header

Hi,
I'm having a nightmare trying to get the main lines table to populate the header within a sales order using a formatted search.
I have created a UDF on the header for total value, and where items entered onto the order are of a certain type I need the header UDF to be sumated.
Basically I have three parts for packaging (PACK1, PACK2 and PACK3), and the header has a UDF called U_TotPack
Someone did sugest the following query, but this doesn't appear to work either:
select sum(t0.linetotal) from rdr1 t0 inner join ordr t1 on t0.docentry = t1.docentry
where t1.docnum = $[ORDR.DocNum] and t0.itemcode in ('PACK1', 'PACK2', 'PACK3')
If it is a problem for me to use the line total field (as it is a variable calculation) I am happy to total the quantities for the items found, but I just can't seem to build any form of relationship between the header and lines.
Hope someone out there is able to help as this one has really got me stumped.
Cheers,
J

Hi Julian,
I'm assuming you are trying to populate the header UDF before the Order is added to the system? If yes then it is not possible to achieve this via a formatted search, only SDK. A header FS cannot properly access line information, it only works the other way around - header info to line level.
I presume the reasoning is that which line should your header FS take a value from? The FS syntax also doesn't allow you to loop throught all lines.
The SQL that someone else suggested would only work for a sales order already added to the database. Hope this helps.
Regards,
Andrew.

Similar Messages

  • Selecting the Description field for a UDF when using a formatted search

    I am trying to pull the Description field from a UDF on CRD1  in a formatted search in marketing documents.
    Here is my current query but I do not know the correct syntax to pull the description instead of the code from the UDF.
    SELECT T1.[U_ISEName]  FROM OCRD T0  INNER JOIN CRD1 T1 ON T0.CardCode = T1.CardCode
    Any help would be appreciated.
    Thanks
    Steve

    Gordon
    I tried your suggestion. On CRD1 I created a FS to pull the name from the OSLP tabel. I then used your query on the sales order to pull the stored value on CRD1.
    but now I am getting this error message
    1). {Microsoft]{SQL NativeClient} ][SQL Server] Invalid column name 'U_ISE'> 2) {Microsoft]{SQL NativeClient][SQL Server] Statement 'Sales Tax Codes' OSTC (s) could not be prepared.
    The name appears to pull
    Any suggestions.
    Thanks
    Steve

  • Using a formatted search which incorporates copying data from base document

    Hi
    I have a user selling tiles.  They sell by sq meter but will only sell whole boxes.  I have a formatted search on the quantity field to calculate the number of sq meters in a box.  They also sell indivudual units and will key this value directly into the quantity field.  All this works fine.
    However if I enter this as a sales order and copy to a delivery, then the formatted search fires and the quantity field gets refreshed.  This results in the incorrect value where the user had keyed data directly into the qty field in the base document.
    Therefore I need to incorporate my base document values into my query where by if there is a base document, the query will pull the quantity data from the base document.  My query so far is as follows
    SELECT (CAST($[$38.U_ActMtr.0] AS DECIMAL(10, 2))*CAST(T0.U_SqmBox AS DECIMAL(10, 2))) FROM OITM T0 WHERE T0.ItemCode = $[$38.1.0]
    Any suggestions?
    David

    If I understand your requirements well, you want to save the base quantity, when the delivery is based upon a SO, and to compute it when the DLN is not copied.
    Try to use this modified FS:
    declare @q dec(19,6)
    set @q=$[$38.11]
    If $[$38.43]<>-1
    Select @q
    Else
    SELECT (CAST($[$38.U_ActMtr.0] AS DECIMAL(10, 2))*CAST(T0.U_SqmBox AS DECIMAL(10, 2)))
    FROM OITM T0 WHERE T0.ItemCode = $[$38.1.0]

  • Problem in implementing formatted search

    Dear All,
    I am using the below code to implement formatted search for item master itemcode textbox. But i am unable to get the formatted search icon for the itemcode text box/ screen. Please correct me where I am going wrong.
    Dim oRs As SAPbobsCOM.Recordset
                                        oRs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                        Dim oQuery As SAPbobsCOM.UserQueries = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserQueries)
                                        oQuery.Query = "SELECT T0.[ItemCode], T0.[ItemName] FROM OITM T0" 'Query
                                        oQuery.QueryCategory = -1
                                        oQuery.QueryDescription = "GetDfltBin"
                                        oQuery.Add()
                                        Dim oFormatted As SAPbobsCOM.FormattedSearches = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oFormattedSearches)
                                        oFormatted.FormID = "150"
                                        oFormatted.ItemID = "5"
                                        oFormatted.Action = SAPbobsCOM.BoFormattedSearchActionEnum.bofsaQuery
                                        oFormatted.FieldID = "ItemCode"
                                        oFormatted.ColumnID = "-1"
                                        oRs.DoQuery("select IntrnalKey from OUQR(nolock) Where QName = 'GetDfltBin'")
                                        oFormatted.QueryID = oRs.Fields.Item("IntrnalKey").Value ''""
                                        oFormatted.Refresh = SAPbobsCOM.BoYesNoEnum.tYES
                                        oFormatted.ForceRefresh = SAPbobsCOM.BoYesNoEnum.tYES
                                        oFormatted.ByField = SAPbobsCOM.BoYesNoEnum.tYES
    Regards,
    Noor hussain
    Edited by: noor_023 on Mar 30, 2010 12:51 PM

    Dear J,
    Thanx for your post. I am gettig this error now.  "The entry already exists in the following tales odbc-2035". I am writing the above code in the page load event of item master form as below.
    If ((pVal.FormType = 150 And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And (pVal.Before_Action = True)) Then
                    '// get the event sending form
                    oForm = oSboApplication.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                    If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then
                        Dim oRs As SAPbobsCOM.Recordset
                        oRs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                        Dim oQuery As SAPbobsCOM.UserQueries = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserQueries)
                        oQuery.Query = "SELECT T0.[ItemCode], T0.[ItemName] FROM OITM T0" 'Query
                        oQuery.QueryCategory = -1
                        oQuery.QueryDescription = "GetDfltBin1"
                        oQuery.Add()
                        Dim oFormatted As SAPbobsCOM.FormattedSearches = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oFormattedSearches)
                        oFormatted.FormID = "150"
                        oFormatted.ItemID = "5"
                        oFormatted.Action = SAPbobsCOM.BoFormattedSearchActionEnum.bofsaQuery  'bofsaQuery  'bofsaQuery
                        oFormatted.FieldID = "5" 'ItemCode
                        oFormatted.ColumnID = "-1"
                        oRs.DoQuery("select IntrnalKey from OUQR(nolock) Where QName = 'GetDfltBin1'")
                        oFormatted.QueryID = oRs.Fields.Item("IntrnalKey").Value ''"" ' oRs.GetField
                        oFormatted.Refresh = SAPbobsCOM.BoYesNoEnum.tYES
                        oFormatted.ForceRefresh = SAPbobsCOM.BoYesNoEnum.tYES
                        oFormatted.ByField = SAPbobsCOM.BoYesNoEnum.tYES
                        oFormatted.Add()
                        If oFormatted.Add() Then ' 0 Then
                            MsgBox(oCompany.GetLastErrorDescription)
                        End If
                    End If
                End If

  • Query using a Formatted Search

    Hi,
    I am trying to do the following but its not working and need a little help please.
    I have a series of UDF's on the Goods Receipt PO screen which I need populating on the batch transactions screen automatically.
    i.e I have a UDF called U_Width on the main Goods Receipt screen (PDN1) and when I click add on a batched item it asked me for the batch details.  I need the UDF in the Batch Screen (OIBT.U_Width) to be automatically populated with this information.
    I thought by using the following simple query and set as a formatted search would work but it doesn't seem to recognised the PDN1 table as a current document
    SELECT $[PDN1.U_Width]
    help please

    $ value will only work for current active form.  It is not possible to get the other form's value.
    Thanks,
    Gordon

  • Mapviewer performance problem using image format FORMAT_RAW_COMPRESSED

    I am using the MapViewer.FORMAT_RAW_COMPRESSED map image in my (java) map application because some features must be clickable and as far as I can work out, this is the only way to achieve this in a Java client. On my local system, running the map server in an oc4j container, this works about as fast as using FORMAT_GIF_URL and loading the image from this url. There also doesn't seem to be much difference in memory and cpu usage.
    When I direct the request to a map server running on a remote Application Server the rendering time grows exponentially. The same maprequest using FORMAT_GIF_URL runs as fast as it does in my local OC4J container. The problem seems to be in "packing time" in RealWorker:
    Remote AS:
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.MapperPool] freeMapper() begins...
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] preparation time: 99ms
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] querying/rendering time: 5560ms
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] packing time: 142605ms
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] --------------- total time: 148264ms
    Local OC4J:
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.MapperPool] freeMapper() begins...
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] preparation time: 540ms
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] querying/rendering time: 2490ms
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] packing time: 120ms
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] --------------- total time: 3150
    The test server is smaller than my local system and more applications are running on the AS, generating the map takes all the available memory and cpu, but the difference between the time it takes generating a GIF image and generating a Java image of almost a factor 50 is puzzling.
    What could cause this enormous difference? Any idea's about how we can analyze or solve this? What could RealWorker be doing in this packing time? Any hints would be greatly appreciated.
    Many thanks,
    Ida

    Thanks for the replies!
    1. Which AS version are you using? -> 10.1.2
    2. Just as a test, if you restart AS (if possible) do you still get the same values? -> yes, we restarted the AS and the results are the same.
    The server is indeed running low in memory. It is a 512MB machine, just big enough to run the AS. The production server will have some more, but not very much. Could I estimate how much extra memory it will need to keep a good performance when generating maps with live features? And maybe I'm wrong, but shouldn't the extra load for the java image only be on the client, since that's where the image is made? On the server it's just the image data, isn't it?
    I tried removing the basemap, but that reduces the loading time just with a few seconds. The live themes are jdbc themes and result in only some 20 to 30 geofeatures. Removing them from the request so only an empty image with a title is retrieved still takes about 117 seconds. Reducing the device size does reduce the loading time, so it does seem to have something to do with the amount of pixels in the image space, not with the data. Could it be that in the "packing" of the image something happens that takes a lot of memory, related to the amount of pixels?
    In my situation it would be handy if the live features were also returned when the image format is not set to FORMAT_RAW_COMPRESSED, it is also possible to draw shapes onto an existing image and this would bypass the memory problems.
    Thanks for any further help.
    Ida

  • Problem using target="_blank" in hbj:link

    Hello,
    we are having some problems when using "link" with the next piece of code:
    <hbj:link id="<%=objAccountStatus.getAccountNo()%>" text="View Inventory" tooltip="Download as an Excel Spreadsheet document" reference="" onClick = "onInventoryLinkClick" target = "_blank">Download Excel</hbj:link>
    The target is set to _blank but the Excel generated by using the link is opened in the same page. This problem occurs by using the Internet Explorer; on the other hand, this works fine in Firefox (in this case is opened in a blank screnn.
    Thanks in advance.
    Regards,
    Raúl.

    Thanks for you reply Pankaj, but the version I am using is IE 6.0.29.
    I have fixed the problem by modifying some code used in the event handled in the JSPDynPage becuase we were doing some things in the HTTP header that could have destroy the effect of the "target" parameter in the link.
    It was solved by other way.
    Thanks a lot for the help.
    Regards,
    Raúl.
    Message was edited by:
            Raul Rodriguez

  • Problem using Apple TV with TP-Link Wifi Extender

    Hi,
    I have been having problems connecting my Macbook Pro to my Apple TV via airplay and I believe it is due to the new wifi extender that I have installed in my home. Basically, the wifi extender uses the powerlines in the walls to extend the connection from my office at one end of the house, to my living room at the other. I am sitting here with my Macbook Pro in front of the TV using Apple TV, both connected to the same wifi SSID but still no option to mirror or extend my desktop onto the Apple TV. Can anyone help? Please? This is also affecting my Homesharing. It's as if the wifi extender is actually technically a second wifi network and my devices are getting confused and not finding each other.
    Joe

    I have the same Activity set up for my Harmony One.  (First, I believe you mean "Devices," not "Components.")  You appear to have some of your buttons customized wrong for the Apple TV Activity, since you said other Activities work fine, like Watch TV, etc.  Within the Harmony software, go to the Activities (NOT Devices) tab, choose Watch Apple TV (or whatever you have named this activity), and then choose Customize Buttons.  Then click the Standard Buttons tab, and then go down the whole list (of dropdown menus) to assign, re-assign, or confirm that all the proper Commands are assigned to all the proper Devices.  For example, to correct your volume control issue, choose your Receiver to control the volume up and down Commands, etc.  If this is done correctly, you won't have to go to Devices (for the receiver) any more on your remote to control the volume. It will all be controlled within the remote's Activity function, as you've requested.  It has to work, since your other Activites are finding your receiver properly.  If not, then Logitech's Harmony support has been helpful to me in the past, assuming you're still in warranty, etc.  I hope this helps.  Good luck!

  • Using generic format for database links in ODI Procedures

    Hi,
    As in procedure we use
    create table <%=odiRef.getSchemaName("Target Schema","D")%>.TABLE2 as
    select * from <%=odiRef.getSchemaName("Staging Schema","D")%>.TABLE1
    where Staging Database and Target Database are logical schemas which will associate to respective physical schema while execution so the above statement will become as
    create table Target_Schema.TABLE2 as
    select * from staging_Schema.TABLE1
    I just wanted to know if there is any way by which i can apply samethings for Database Links also.
    Like if i have statements
    create table TABLE2@Target_Database as
    select * from TABLE1@staging_Database
    can i replace DB links like Target_Database and Staging_Database?
    Help would be appreciated. :)
    Thanks,
    Mahesh

    I am not entirely sure about the exact requirement.
    Any way ..
    1.
    create 2 variable .
    v_get_src_schema : select '<%=odiRef.getSchemaName("<your_src_logical_schema>","D")%>' from dual
    v_get_tgt_schema : select '<%=odiRef.getSchemaName("<your_tgt_logical_schema>","D")%>' from dual
    2.
    2 more variable to get the required DBLink
    v_SRC_DB_LINK: select DB_LINK from all_db_links where owner='#PRJ_CODE.v_get_src_schema'
    v_TGT_DB_LINK: select DB_LINK from all_db_links where owner='#PRJ_CODE.v_get_tgt_schema'
    3.
    create a procedure :
    prc_create_table :
    create table <%=odiRef.getSchemaName("Target Schema","D")%>.TABLE2@'#PRJ_CODE.v_TGT_DB_LINK' as
    select * from <%=odiRef.getSchemaName("Staging Schema","D")%>.TABLE1@'#PRJ_CODE.v_SRC_DB_LINK'
    4.
    Create a package :
    Connect all the steps in serial with OK line.
    Execute and let us know what is the out come .
    Thanks,
    Sutirtha

  • Formatted Search to Multiple Discounts in Sales Order Row

    I created 6 New UDF 3 for the new percentage e 3 for new discount value. Also created their formatted searh and the calculations are ok.
    But when I calculate the total the new value presents the following format -99.999.990,00.
    Bellow follow the querie:
    SELECT  (CAST($[INV1.U_VLRDESC1] AS NUMERIC(19,2)) + CAST($[INV1.U_VLRDESC2] AS NUMERIC(19,2)) +CAST($[INV1.U_VLRDESC3] AS NUMERIC(19,2))) - ($[$38.14.number] * $[$38.11.number] )

    try it as
    SELECT
    convert(numeric(19,2)
    (CAST($http://INV1.U_VLRDESC1 AS NUMERIC(19,2)) + CAST($http://INV1.U_VLRDESC2 AS NUMERIC(19,2)) +CAST($http://INV1.U_VLRDESC3 AS NUMERIC(19,2))) - ($http://$38.14.number * $http://$38.11.number )

  • Problem With Formatted Search.

    Hi to all,
    I have linked a formatted search to a UDF that lies at row level in AP Invoice. This field is used to display the Sales  Order Price. The requirement is that from SO we create a purchase order and subsequently create a goods receipt and AP invoice.. Now in invoice it is showin perfectly fine whether it is copied from goods receipt or purchase order.. But in the purchase order and goods receipt screen this query will not work. And the same query used in AP invoice is being linked to these documents. Is there any work around for this?? Is it possible to run queries based on the form numbers?? If so ho do i pull the form number in the formatted search query??
    Please Help!!!!
    Regards
    Aris

    I recommend creating separate queries for each document.
    ie
    1 formatted search to lookup price on sales order from AP Invoice
    1 formatted search to lookup price on sales order from GRPO
    1 formatted search to lookup price on sales order from PO
    then change the lookup to pull fields from the document that you are using as a reference.
    when you are building the formatted searhes start by returning the values that are you are using as a reference. That way you are sure that you are pulling the correct information.
    Then layer in the lookup to the sales order.
    If you get stuck I recommend that you copy and paste the formatted search in SQL Server management studio and replace the variables refereces with real values.
    In my experience troubleshooting queries is more effective when using SQL Server management studio. (the error reporting is better).

  • Formatted Search - Using field index to refer to UDF in many documents

    I have some UDFs in my marketing documents - say U_VALUE
    I want to write a fairly complicated formatted search and use it for the same thing across all my marketing documents.
    I don't want to use
    $[ORDR.U_VALUE]
    in my formatted search as this will only work in the sales order document.
    I want to use something like
    $[$4.0.0]
    which brings back the cardcode independant of the form we are looking at. However
    $[$U_VALUE.0.0]
    will not work!
    Hoping someone can help!
    Edited by: Daniel Abbatt on Apr 10, 2008 6:16 PM

    Yes you would have to have a UDF called VALUE on the marketing document for this example to run and even then it will error!
    That's the point, the code above will not work, SBO only seems to be able to know about ORDR in a sales order and OINV in an invoice. So if I am in a sales order, it errors on the reference to OINV, even though the code that uses the
    $[OINV.U_VALUE]
    is never actually accessed by the SQL. I guess this is because SBO does the substitutions before it executes the code.
    All I am basically trying to do is create a generic formatted search that will perform an action using the value of a UDF, say some formatting, the problem is I want it to work with any marketing document.
    The only way I can find to access a UDF though is by having to use the
    $[TABLE.U_FIELDNAME]
    way, which seems to mean by definition I can only create a formatted search to access a header UDF for a single type of document. I cannot create a generic formatted search, that reverses the string for example, and use that formatted search across all marketing documents.
    I know you can access normal fields also by their item reference, i.e.
    $[$4.0.0]
    , but this syntax does not seem to work with UDF, even though the system information shows the item reference as U_VALUE, I cannot use the
    $[$U_VALUE.0.0]
    which would be ideal...
    Edited by: Daniel Abbatt on Apr 14, 2008 12:05 PM

  • UDF link type and formatted search

    Dear experts,
    Im trying to use a formatted search to fill a UDF of the link type.
    The plan is to generate a weburl voor googlemaps like the link with business partner addresses. I do this with the following query:
         DECLARE @URLp1 AS VARCHAR(254)
         DECLARE @Adres AS VARCHAR(254)
         DECLARE @Plaats AS VARCHAR(254)
         DECLARE @Postcode AS VARCHAR(254)
         DECLARE @URL AS VARCHAR(254)
         SET @URLp1=('http://maps.google.com/?q=')
         SELECT @Adres=($[$U_Adres.1.0])
         SELECT @Plaats=($[$U_Plaats.1.0])
         IF LEN($[$U_Postcode.1.0])=0
              BEGIN
                   SELECT @URL=(@URLp1+@Adres+'+'+@Plaats)
                   SELECT @URL
              END
         SELECT @Postcode=($[$U_Postcode.1.0])
         SELECT @URL=(@URLp1+@Adres+'+'+@Postcode+'+'+@Plaats)
         SELECT @URL=(SELECT REPLACE (@URL,' ','%20'))
         SELECT @URL
    The select replace doesn't work yet but that's not the real problem.
    I used the following formatted search settings:
    Search in Existing User-Defined Values according to Saved Query
    Auto Refresh When Field Changes -> set to Adres
    Refresh Regularly
    When I try these settings on my UDF link style the field just stays empty.
    When I use this formatted search on a Alphanumeric(100) field it more or less works. I need to manualy refresh the field to execute the query.
    If I simplify the query to insert just one value like 'Opportunity No.' ($[$74.1.0]) it does auto update in both fields.
    Could someone point me in the right direction what I'm missing/forgetting or give me a sollution that might even be better?
    Kind regards
    Edit:
    PS. We are using SAP BO 8.8 PL15

    I've found a topic with a similar problem but there's no solution there either...
    Formatted search with Query auto update

  • Copy CardName into Quotation line by using formatted search

    I'm looking for the right query to copy the CardName from the OCRD table into a quotation line (QUT1) by using a formatted search. The UDF field in the QUT1 is U_Levnaam. In the field U_Levnaam I want to place the formatted search with the query.
    I don't no if this is possible, because the field CardName of the OCRD table doesn't have a direct link to the QUT1 table. There is a link between the OCRD and OITM table.
    This is how far I came. I have tried other solutions as well but without any result. Probably is has to be a complete other query
    +SELECT T0.CardName FROM OCRD T0 INNER JOIN OITM T1 ON T0.CardCode = T1.CardCode Where T0.CardCode = $[OITM.ItemCode]+
    So if anyone has a solution your help will be very appreciated.
    Regards,
    Tim

    Hiho,
    your query does not make sense, look here :
    SELECT T0.CardName
    FROM OCRD T0
    INNER JOIN OITM T1 ON T0.CardCode = T1.CardCode
    Where T0.CardCode = $[OITM.ItemCode]
    What do you do :
    First select T0.CardName...from the Table OCRD with a inner join of OITM (that means you request each
    record from OITM where the CardCode from OCRD is equal to the CardCode from OITM). Ok thats wrong,
    cause you got a CardCode in OCRD, but in OITM is not a CardCode, cause it is the item table.
    Your where clause did not match at all. You want to fetch records where a CardCode is equal to a ItemCode.
    Ok lets see what do you need :
    You want to select a CardName from the OCRD into a line of your quotation. Therefor are 2 possibilities :
    1.If your quotation is already saved:
    SELECT T0.CardName FROM OCRD TO, QUT1 T1 WHERE T0.CardCode = T1.BaseCard
    2.If you creates a new quotation:
    SELECT T0.CardName FROM OCRD T0 FROM T0.CardCode = $[$4.0.0]
    or this works too
    SELECT $[$54.0.0]
    Regards Steffen

  • SQL Query -How2bring multiple results into one field using Formatted Search

    Hi Everyone
    i am trying to bring in the results of the field dbo.Lot_ITEM.LOT using a formatted search into a row level using the following query:
    SELECT     dbo.LOT_ITEM.LOT
    FROM       dbo.DLN1 INNER JOIN dbo.LOT_ITEM ON dbo.DLN1.ItemCode = dbo.LOT_ITEM.ITEM
    WHERE     dbo.LOT_ITEM.ITEM=$[DLN1.ItemCode]
    however the result of the dbo.Lot_ITEM.LOT field could be more then one value depending on how many lots are assigned for that item
    (for example this query would be similar to assigning batch/serial numbers to an item being despatched - as you can choose multiple batches/serials depending on the quantities available and required and then move from the left to the right side of the selection window) if that makes sense!
    is it possible to bring in the multiple results into one field? and how can i amend the above query to include this?
    Thankyou in advance :o)
    Edited by: Asma Bi on Apr 23, 2008 7:22 PM
    Edited by: Asma Bi on Apr 23, 2008 7:24 PM

    Hi Suda
    Thanks for replying :o) but im not sure about the query?
    just to simplify it (as the query im working with is to do with 3rd party addons) i have used the serial/batchs field instead and used standard demo database fields from SBO 2005 sp01:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode='g1000' and dbo.ixvSerialNoFact.SRI1_BaseEntry = '193'
    The above brings me the relevant results but when i change it to be used in a formatted search:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode=$[dln1.itemcode] and dbo.ixvSerialNoFact.SRI1_BaseEntry = $[dln1.DocEntry]
    i cant seem to get it to work - now this may be because the serial number is not allocated until teh record is added to the system, however when this happens i am unable to go back in and manually trigger the query as the delivery note rows cannot be selected!
    i  think as what im originally wanting an answer for is same as this example, im wanting to know if this is even possible?
    Thanks
    Edited by: Asma Bi on Apr 24, 2008 3:53 PM
    Edited by: Asma Bi on Apr 24, 2008 3:55 PM

Maybe you are looking for