Formatted Search query on Sales Order Lines

Hi Experts,
I have a client that needs a Formatted Search that will bring back values according to the following Scenario:
The Formatted search will be placed on the Sales Order Lines RDR1.U_UPC field.
On a Sales Order I have created UDFs: RDR1.U_Label and RDR1.U_UPC
On the BP Master Data I have created the UDFs: OCRD.U_UPCChoice
On the Item Master Data I have created the UDFs: OITM.UPCRetail and OITM.UPCLoc and OITM.UPCItem and
OITM,UPCOther
When the RDR1.U_Label field is '1', I need the RDR1.U_UPC to be the text 'not Applicable'
When the RDR1.U_Label field is '2', I need it to look at the OCRD.U_UPCChoice.
     If that value is '1' then it must bring back the OITM.UPCRetail Value back in the RDR1_UPC field,
     If that value is '2' then it must bring back the OITM.UPCLoc Value back in the RDR1_UPC field,
     If that value is '3' then it must bring back the OITM.UPCItem Value back in the RDR1_UPC field,
     If that value is '4' then it must bring back the text 'Look at Attachment'
Any help would be greatly appreciated.
Thanks,
Marli
Edited by: Marli Schutte on Aug 31, 2009 6:29 PM

Hi Marli,
Try this:
IF $[RDR1.U_Label] = '2'
SELECT Case T0.U_UPCChoice
When 1 THEN T1.U_UPCRetail
WHEN 2 THEN T1.U_UPCLoc
WHEN 3 THEN T1.U_UPCItem
WHEN 4 THEN 'Look at Attachment'
END
FROM dbo.OCRD T0, dbo.OITM T1
WHERE T0.CardCode = $[$4.0.0] AND T1.ItemCode = $[$38.1.0]
Thanks,
Gordon

Similar Messages

  • Formatted Search to pull Sales Order Remarks field onto Purchase Order

    Hi Guys,
    I need a formatted search for a Purchase Order remarks field, which will pull the remarks field from the linked Sales Order
    (When a PO is done through the logistics tab of the Sales Order)
    I have made this query but it is not working:
    SELECT distinct T0.[Comments] FROM ORDR T0 , POR1 T1 WHERE T0.[DocNum] = T1.[BaseRef]
    It is just pulling the remarks for the first sales order - purchase order link.
    Any help will be appreciated.
    Thanks
    Best Regards
    Dario Moutinho

    Hi Dario Moutinho,
    Try:
    SELECT distinct T0.Comments FROM ORDR T0
    WHERE T0.DocEnthy = $[POR1.BaseEntry\]
    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

  • SALES ORDER LINE IS CANCELLED BUT DELIVERY DETAIL IS SHOING AS BACKORDERED

    SALES ORDER LINE IS CANCELLED BUT still the DELIVERY DETAIL IS showing as BACKORDERED it should be in cancelled
    status.The Sales order (only one ex:3904854) is cancelled , however order in shipping transactions screen indicates order is on backorder.
    at that time of order cancellation the line level workflow error out due to the Workflow package is inactive .
    I tried to resubmit the error out workflow using retry option from the responsibility “Workflow Administrator” the workflow is completed with forcible option but still the delivery detail is in back order status not changing it to cancel status.
    Error Name :-4068 [Error Process Error: WF Error Message: ORA-04068: existing state of packages has been discarded  
              ORA-04061: existing state of package body "APPS.XRX_SUPPLIES_NEW_WF_PKG" has been invalidated    
              ORA-04065: not executed, altered or dropped package body "APPS.XRX_SUPPLIES_NEW_WF_PKG"                         
              ORA-06508: PL/SQL: could not find program unit being called: "APPS.XRX_SUPPLIES_NEW_WF_PKG" [Error Process           Error: 3114: Activity 'WFERROR/R_ERROR_RETRY' is not a process.]
    Error Stack: Wf_Engine_Util.Function_Call(XRX_SUPPLIES_NEW_WF_PKG.XRX_CLOSE_LINE_DETAILS, OEOL, 55098479, 195982, RUN)
    [Error Process Error:   Wf_Engine.CreateProcess(WFERROR, WF5147218, R_ERROR_RETRY) ]

    Mohan
    You need a simple script to get the status corrected. Log an SR or search metalink for the script. I am sure there is one out there (if you search with the orphan reservations). This script supported, but not exactly targeted at your problem But it will solve it. You can log an SR and confirm.
    Thanks
    Nagamohan

  • Cancel Sales Order lines that are picked

    Hi
    1. I'm trying to cancel sales order lines through process order api that are picked and delivery status is Staged/Pick Confirmed. The error is
    You are not allowed to cancel Order Line because:
    Line has been pick confirmed/staged.
    I'm unable to perform by below means
    1.There is a processing constraint on the field SCHEDULE_ARRIVAL_DATE.
    Delete the processing constraint and retry the cancel line process - Processing constraint form the fields are protected against update
    2.Navigate to the shipping transaction form and query the order. Select the line and enter 0 at shipped quantity.Save the record.Ship confirm the line, this will cause the line to be backordered.Query the order line in the order entry form and cancel this. - Shipping transactions form the fields are protected against update
    2. Is there a way to cancel Internal Sales Order(ISO) lines of one OU and the corresponding internal requisition is another OU
    Thanks
    kumar

    If you are in R12, there are some enhancements from Oracle that allows updating/cancelling certain Internal requistion fields and Internal orders automatically. You may need to disable few processing constraints too.
    As of Now Oracle support change to following attribute at OM side
    1 Order Quantity
    2 Request Date
    3 Schedule date
    4 Arrival date
    Similarly if we make changes in following fields in Approved IR
    1 Quantity
    2 Need by Date
    These changes will got reflected in ISO
    Plus cancel the IR line or ISO line, the other one gets cancelled automaically.
    To cancel the picked line, first undo the pick confirmation process by back ordering. or unassign the delivery details from the delivery (if created already) and cancel the delivery.In either case, you need to manually trasnfer the qty from staging area to original locations. Oracle doesn't automatically move the qty back, (undo move order transaction).
    Ganesan.

  • Copying text from CMIR (KNMT) to the Sales Order Line Item

    We need to copy text from the CMIR (KNMT) to the Sales Order Line Item with two steps in the access sequence. First to look up by the Ship to Partner Function.  If doesn't exist, then look up by Sold to Partner Function.  Have setup a new text id (ZPRN), a new access seq (9011).  The access seq has one seq =5 for KNMT, ZPRN, all languages and that saves fine.  When I set the Partner Function to be SH.  I get the following error msg:
    "The Language does not come from the partner function AG for MVKE".
    Any ideas?  This access seq does not reference MVKE. It only references KNMT.
    Thanks!

    Hi Lisa,
    Just stumbled on this post, as I am searching for something similar.
    What you are attempting to do isn't possible in config.
    This is because as standard Customer Material Info Records are not even considered for ship-to party in the sales order.
    They work for sold-to only.
    Therefore, this funny error message is SAP's way of saying, "Why are you trying to enter a partner here, because the data is determined for sold to only?"
    You can change this with development for other fields (ie, to determine delivery plant, tolerances etc at ship-to) by using
    the exit MV45AFZB with the USEREXIT_CUST_MATERIAL_READ form.
    However, even if you do this, Text Determination is still sold-to only and still doesn't behave.
    I am currently looking myself for a solution for this problem and I will let you know what I find.
    Cheers
    Chris

  • VA01 Sales order (line items) and different Cost center assignment

    Hello gurus,
    im searching for solutions how to assign different cost center to sales order line items, but only thing that i found is the substitution (Using Substitution (GGB1) to change Cost Center assigned in (OKB9))
    Trying to do this i was unable to create something that could work, since there was no Logistic.
    Could somebody explain me the Line item in SO assignment to Different cost centers?
    I know alot about OKB9, VKOA and other transactions, but still cant find anything suitable to solve this issue
    Best regards
    Laurynas

    What i mean is that, on the end of every month we are gathering information for Statistical Key Figures (from Controlling) entering as CO document and then distributing the costs using KSV5 TC on Internal Orders according those entered statistical key figures.
    i.e. we got INCOME 1000000 from 10 internal order, which we distribute on even percentage parts like 10 cost center, each getting 10% of the income.
    I tried to create the SO, but the Profit center field, after i entered a number, was changed automatically into another.
    And the posting didnt reach Controlling and the assigned Cost center. I think it is a lack of configuration.
    Regards
    Laurynas

  • Sales Order Line item characteristics (classes)

    I am not 100% sure what I am talking about but I need to get characteristics for materials on sales orders (line items).  I am told that these characteristics are stored in classes which get assigned to materials via the material master.  I am also told that these characteristics (classes) are created/maintained in transaction CT04.
    My ultimate goal is to create an iDoc similar to LOIPRO01 only include the characteristics for each material.  I imagine that I will be getting the characteristics from a BAPI or FM but I do not know which one.  Also, is there an existing iDoc that contains the fields of LOIPRO01 and also the characteristics?  Right now my plan is to copy LOIPRO01 into a Z iDoc and add the characteristics.
    I did search and I found that people were suggesting BAPI_OBJCL_GETDETAIL and FM CLAF_CLASSIFICATION_OF_OBJECTS.  However, I ran them using the test functionality and they didn't seem to return what I need.
    Regards,
    Davis

    Max,
    Thanks but those give me the details of the characteristics but I need the characteristics of the line items on an order.  I am looking for the way to link up the line item to the characteristics. 
    Davis

  • Formatted search: Query to get Delivery Date +30 in Newly created column

    Hi Experts,
    Becuase my client do not use serial numbers but wants to still see the date the 'Warranty Ending Date' on a Sales Order, I created an extra column in the Sales Order Lines named 'Warranty Ends'.
    Now I want to populate the Delivery Date +30 on the Sales Order.... I'm stumped - I don't know where to begin with this query and I'm sure it is not that complicated.
    Any help would be greatly appreciated.
    Thanks!
    Marli

    Did you try the sql function DATEADD? 
    Here's a link to the MSDN help text on it:
    http://msdn.microsoft.com/en-us/library/aa258267(SQL.80).aspx

  • Can sales order line item text be replicated into production order

    Hi
    Can sales order line item text be replicated to production order through standard PP configuration? If so how can it be done?
    If that is not possible through standard configuration then can it be possible to read both sales order line item information and production order information using a BAPI or a program?
    Please help me, i have been trying hard for this and also searches sdn for relevant posts but could not find any, I thank all people who can help me with some information on this.
    Regards,
    Jessica

    Sample code:
    DATA:
      wa_order_objects    TYPE bapi_pp_order_objects.
    DATA:
      it_order_header     TYPE STANDARD TABLE OF bapi_order_header1.
    *--Setting Flag to get details of BAPI
      wa_order_objects-header         = c_x.
      CALL FUNCTION 'BAPI_PRODORD_GET_DETAIL'
        EXPORTING
          number           =  "Order number"
          order_objects    = wa_order_objects
        TABLES
          header           = it_order_header.

  • Report of Sales Order lines deleted

    Hello all,
    I am hoping someone can provide some assistance with my query below. Thanks in advance:
    I am looking to build a report that lists all deleted Sales Order lines within a given period. I have tried using the sales order tables but cannot see any useful fields/flags here. I have also looked at the ADOC/ADO1 tables but I cannot make sense of the entries on this table from a sequencing point of view.
    Maybe I have to use the SP_transactionnotification stored procedure to write entries to a UDT?
    Any advice would be appreciated.
    Mike.

    Ordering according to the LogInstanc column you can get the consecutive states of an entry inside the archive tables.

  • Order Management Module - Sales Order Lines stuck with the Workflow

    Dear All,
    We are using Orcale E-Business Suite for our organization. Here, We are working Order Management Module. When Sales Executives the creating Sales Order, booked, Released and Shipped. After the Sales Order Line is partially closed,
    but is not closed all the lines. We are facing the problem for receivable transaction. We have two types of scenario the following as
    Scenario 1
    We have Sales Order 4 lines first two lines are closed properly after the third line is AWAITING_FULFILLMENT then the fourth line is Closed. So, the thrid line is not in the RA Interface. Please tell me the solution, how we can closed the sales order third line.
    Scenario 2
    We have Sales Order 3 lines first two lines are closed properly after the third line is FULLFILLED then the fourth line is Closed. So, the thrid line is not in the RA Interface. Please tell me the solution, how we can closed the sales order third line.
    Regards
    Abdul

    Hi,
    Please go through the following documents and see if it helps.
    Note: 238480.1 - In Sales Orders Form, Cannot Remove Fulfilment Set From Line in AWAITING_FULFILLMENT Status
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=238480.1
    Note: 417292.1 - Sales Order Lines On The ATO Model Are Stuck In Awaiting Fulfillment Status
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=417292.1
    Note: 297192.1 - Order Line Workflow Is Not Progressing Beyond Booked Status
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=297192.1
    I would also suggest you search Metalink for "AWAITING_FULFILLMENT" and "FULLFILLED", this should return many hits which may be applicable to the issue you have.
    Regards,
    Hussein

  • Select aentries from table Z-Table for all sales order line items

    Hi friends,
    can anyone please explain me about the "Select entries from table Z-Table for all sales order line items".
    Thanks.

    Moderator message - Welcome to SCN.
    But
    Moderator message - Please search before asking. Press F1 on SELECT and look at the FOR ALL ENTRIES addition. - post locked             
    Rob

  • Query for Sales Order Analysis

    Dear Experts
    I have written a Query for Sales Order Analysis and would like to have help on this.
    The query is used for generating daily report for Sales Order on number of documents (Sales Order), total amount of sales orders and total GP of Sales Order. The query is written as below:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum] ORDER BY T0.[DocNum]
    where U_Total_GP is a UDF for storing the GP of each order.
    After executing the query, a selection criteria of date appears and after a date is selected, the report shown information required. However, the query does not calculate column total for total amount and total GP. Although I know the total for each column can be displayed by pressing "Ctrl" + Click on the column title, it would have to be done from time to time.
    Therefore, I would like to modify my query in order to calculate the column totals when executed. Are there any suggestions for this?
    Thank you
    Regards
    Elton

    Hi Elton,
    Try this:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
    Union ALL
    SELECT '', SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0]
    ORDER BY T0.[DocNum]
    Thanks,
    Gordon

  • Items are not getting displayed in Sales Order Lines 'Ordered Item' field

    Hi All,
    Ordered Item field in Sales Order lines is not getting values When trying to create a Manual Sales Order.
    When clicked on Ordered Item LOV, no values are getting displayed.
    Thanks,
    Chandra.

    879035 wrote:
    Hi,
    I was unable to select any item (nothing is getting displayed in Ordered Item field when the LOV is clicked) in Sales Order Lines.
    The Sales Order header information i was able to enter & generate the Order Number.
    R12.1.3 is the version i am using.
    Thanks,
    Chandra.Have you done all the required setup in OM??
    Like system parameters...Imp one would be Item Validation Organization
    Make sure item is also available in the price list which you are using in order
    Mahendra

Maybe you are looking for

  • Changes in Excel cannot be saved when open from SharePoint 2010

    Hi, I use SharePoint 2010 to access my documents library. When I open an Excel spreadsheet and do some changes, save the changes and everything seems to be fine. I close the Excel file and open it again. Surprise! my changes are gone and even though

  • 2011 MacBook Pro experiencing Kernel Panics when using iPhone 4 as modem

    Recently purchased a custom MacBook Pro 15" with the upgraded 2.3 ghz quad core i7 processor. I immediately installed 8 GB of Ram and a 750GB 7200 speed HD from OWC when the unit arrived. All was well when testing from home, and had zero issues after

  • HT3702 how to cancel the auto renewal

    i just sign up for the free week trail with huluplus and i want to know how can i cancel the AUTO RENOWAL in my acount. thanks

  • My ipod camera screen wont open

    when i click on camera it opens but stays on that page with the camera closed. what should i do???????

  • Shimmering of stills when using Ken Burns

    I know Ken Burns did not invent panning, zooming, and movement in stills, but I think everyone know what I'm referring to. I'm using FCP Studio 1, yes, it's old and not supported by Apple any more, but it is more than enough for me. On the stills tha