Formatted Search - Sales Order - UDF

Hi, I need to now if is possible, when I create a new Sales Order and I chage the Sales Employee on the drop down list I can catch the new sales employee selected and use it in a formatted search that is attached to a UDF, all this without saving the new created sales order...
Is any way to catch a value in an active window and attach it to a UDF? for example the current selected sales employee?
Thank you!

Hi Gordon, its work's! many Thanks!
Another question... you now if it is possible to update a field that have a FMS attached wen 2 event's happens?
For example, I want to change the value of the commission % column when the user change the sales employee drop down list and when the user add a new line to the sales order... in this moment only works when I change the Sales employee, wen I try to add a new row it dont fill in the right commission %.       
SELECT DISTINCT
CASE
     WHEN $[ORDR.SlpCode]=6 THEN 6
     WHEN $[ORDR.SlpCode]=7 THEN 7
     WHEN $[ORDR.SlpCode]=8 THEN 8
     WHEN $[ORDR.SlpCode]=9 THEN 9
     WHEN $[ORDR.SlpCode]=-1 THEN -1
ELSE 0     
END
FROM RDR1
WHERE RDR1.ItemCode = $[RDR1.ItemCode]
Thank you!

Similar Messages

  • Problem for searching Sales order no. ref. to delivery no. from VBFA

    Hi,
    I want to search Sales order no. ref. to delivery no., as generally ref. to devilery no. as a VBELV filed for Table VBFA , I am selecting  VBFA where VBTYP_N = C that is Order ,  but in my present case when I am looking for the available entry in VBFA ref. to delivery no. I am not getting Any  VBTYP_N = C , insted of this I am getting VBTYP_N = Q, i.e transfer order and also in VBELN  it is just giving the date of delivery , as 20090430,
       Can u help on this ,  I want to get SO no. ref. delivery no. and then want to search customer PO and Date . for that SO.
    regards,
      zafar

    Hi Zafar,
    VBFA is a document flow table. I'll tell you the way to fetch preceding or subsequent document out of this table:
    Document flow for order to delivery is as below:
    Sales order > Delivery>shipment-->billing
    So sales order is preceding document of delivery so put delivery in VBELN(SUBSEQUENT DOCUMENT) and fetch the VBELV i.e. preceding document for the same. Also put document category as 'J' i.e. delivery.
    hope it helps.
    Vivek Gupta

  • How to search sales order

    Hie Guys,
    Can anyone plz help me how to search sales order in SRM.
    I worked on CRM but it looks to be new applcation.. also kindly suggest me sme basic transactions..
    Many thanks!
    Regards,
    Dinesh.

    Hi Dinesh,
    in SRM we don't have sales order, but for the basic transctions please see the thread:
    https://forums.sdn.sap.com/click.jspa?searchID=26421773&messageID=4950023
    Regards,
    Peter

  • Wrong Search result for Employee Resp.lD when searching Sales Order

    Hi All,
    Happy new year first of all,
    I encounter a problem when using search sales order in WebUI. I am using SAP CRM 2007 SP4.
    I notice that the search result by using Employee Responsible ID as criteria, is returning Person Responsible
    instead !
    I entered both partner function in sales order document (Employee Responsible => BP 1234 and
    Person Responsible => BP 4567).
    Although in Search criteria selection I choose Employee Responsible ID, but when I put
    the BP 1234, the search result is blank. And when I change the value to BP 4567, I can see the result
    shows that document. But BP 4567 is Person Responsible, how come it gives the result for Employee
    Responsible??
    This is totally wrong! I couldn't find SAP NOTE or same issue mentioned here in SDN.
    Did I miss it? Please kindly share your find out if you have same case or solution for this.
    Thank you and will be rewarded.
    Cheers,
    Gun

    Hi Robert,
    Which config are you refer to in SPRO ?
    Partner Function Determination ?
    By attention to the Relat. Category change, we can not simply change it (although it can fix this
    problem). I read the field info :
    In many cases this is predefined in the system, based on the partner function category chosen. You can assign the corresponding relationship type freely if:
    - you select the partner function category undefined partneror
    - you have yourself defined the relationship category to
    So did you try it? fixed the problem? or have you encounter further problem?
    Rgds,
    Gun.

  • Exception in Search Sales Order

    Dear Experts,
    Facing a strange issue while loading the Search Sales Order page. The exception I get it is :
    Cannot display view MainWindow of UI Component BT115M_SLSO
    An exception has occurred
    Exception Class     CX_CRM_GENIL_GENERAL_ERROR - Component set ONEORDER cannot be loaded with BT+CTALER+EMPTY+SAVEDSEARCH+WFI since multiple relation definitions exist for component PRIVNO
    Method:     CL_CRM_GENIL_INTERNAL_MODEL=>LOAD_COMPONENT_SET
    Source Text Row:     146
    Error occurred during navigation
    An exception has occurred
    Exception Class     CX_BSP_WD_RUNTIME_ERROR - View CUBTSalesOrderSearch.MainWindow in component BT115M_SLSO could not be bound
    Method:     CL_BSP_WD_VIEW_CONTROLLER=>BIND_VIEW
    Source Text Row:     165
    1. We have already checked the Component Repository and Runtime Repository and all the bindings seem to be correct.
    2. We have not modified  standard SAP code in either of the components BT115M_SLSO or BT115S_SLSO.
    3. Also checked all the relevant customizations for NavBar Profile and Business Role in spro.
    Any idea what could be the cause for the above exception and how to resolve the same?
    Regards,
    Nisha

    Hi Nisha,
    As this is an error occuring during navigation, I would like to know where are you clicking " Search Sales Order" link ? Is it on Home Page ? or the Context Menu of sales work center ?
    Since the message is saying something about the component usage CUBTSalesOrderSearch, I am sure that the problem is in the component/Link/Generic Outbound Plug mapping , where from you are begining the Navigation.
    Did you tried checking the Link settings ? Also you can try to find if its std. SAP link or Some one have customized the Link ( and Navigation ). Is the soruce component ( where the link is hosted ) , a std. SAP component or it is enhanced ?
    One try could be copying the std. SALESPRO role again to a new ZROLE wit std. Navigation bar profile  and try assign that to your user and test.
    Hope this Helps.
    Thanks & Regards
    Suchita

  • Automatic formatted search for row udf item group autofill

    Dear All,
    I have a field udf field in the row of marketing document named u_itemgroupcode. I want that when an item is selected in any marketing document in the above udf automatically the Item Group code should come from the corresponding item OITB table.
    How to achive this through auto refresh formatted search.
    please help....!
    regards
    kamlesh

    Hi Kamlesh,
    ItemGroup code is available in OITM table itself. You could define the formatted search on the udf field
    with this query and define auto refresh with Item No.
    SELECT T0.[ItmsGrpCod] FROM OITM T0 WHERE T0.[ItemCode] =$ $38.1
    Regards,
    Vijay Kumar
    SAP Business One Forums Team

  • Formatted Search - Sales Quote / Order Header

    Dear all,
    I am trying to get the data from the Sales Quote header to a UDF field in the sales order.
    This is the query I am trying to use....
    SELECT Distinct T0.Header FROM OQUT T0, ORDR T1 INNER JOIN RDR1 T2 ON T1.DocEntry = T2.DocEntry WHERE T0.DocNUm = $[$38.44.1]
    Can you see where I am going wrong - as it doesnt return any answer at all ??
    (I have it set up to automatically update after doc total changes...)
    This certainly works for the doc number:
    SELECT Distinct T0.Docnum FROM OQUT T0, ORDR T1 INNER JOIN RDR1 T2 ON T1.DocEntry = T2.DocEntry WHERE T0.DocNUm = $[$38.44.1]
    Thanks in advance...
    Jason.

    HI Jason
    The query:
    SELECT top 1 T0.Header FROM OQUT T0 where T0.DocEntry =$[$38.45.0]
    Use the BaseEntry instead of BaseNum (document numbering can be restarted by year!)
    Regards,
    J
    ps: Do not forget the Asnwered status:)

  • Help with Formatted search involving a UDF

    I have a Formatted search which runns the following code:
    exec xsp_nssItemLookup $[$38.256.0]
    This search is on a udf of the Purchase order screen.  (256 is the item details field in the details.
    The above query runs fine.  What I really want to do is to pass the contents of another UDF to the stored procedure.  The USF is called U_NSSItemID.  If I change my stored procedure to read:
    exec xsp_nssItemLookup $[$38.U_NSSItemID.0] however it does not work.  I get blank results every time. 
    I have also tried exec xsp_nssItemLookup $[POR1.U_NSSItemID.0]  which doesn't work either. 
    I can't figure out what is wrong with my syntax.  I don't get any errors, just a blank value.
    Thanks
    don shields

    Suda,
    Thanks for answering so quickly.  To answer your question the data type is Alphanumber which I just figured out is the save as CHAR() in SQL.  My problem turned out to be that I needed to trim the spaces from my parameter.  I was getting values like "cover                         ", and I needted to get "cover".  Problem solved now.
    Don

  • Formatted Search on Order Grid with Bill of Materials templates

    This is for 2005A SP01 PL45 (latest patch as of now).
    We have a few formatted searches on the order details that trigger automatically when the item code changes.
    These queries work fine if the items are not part of a bill of materials.
    The queries trigger ok when we use the regular item codes for regular customers when monitoring the item code column.
    However, if you have a BP Catalog customer with a BOM then only the last row of the bill of materials fires and the rest of them do not.
    I tried bypassing this problem by making the queries monitor the Item Description.
    This still worked for stand alone items, but didn't work for bill of materials in either of the case.
    Bottom line:
    A. Formatted searched fire ok on either item code or item description if items are not part of a bill of materials.
    B. When they are part of a BOM, then
    - if we monitor the item code then they trigger ok for regular customers but only trigger on the last row if using BP Catalog codes;
    - if we monitor the item description then they do not trigger at all for either of the customers.
    Any suggestion on how to handle formatted searches for Bill of Material Templates with BP Catalogs?
    Thank you!
    Liviu

    Well, it is a Bill Of Materials "Template" type...
    Go to Production, Bill of Materials, select a product, quantity 1, select the BOM Type as Template and add two other items underneath it, each with quantities of 1.
    Save.
    Go to BP Catalogs, select one BP and add some names for these three items. Check the box to use BP Catalogs for that BP.
    Go to sales orders, add the query above to the free text column, set it as per the scenarios to trigger automatically on Item Code.
    Start two sales orders for this BP and for a regular one.
    Load the BOM item and observe the formatted search results.
    Repeat for the second scenario (where the formatted search triggers on the item description).
    Hope this helps.
    Thank you!
    Liviu

  • Faxing PDF format of Sales orders/PO from SAP

    Hi,
    My requirement is, when any sales order/PO is created, I have to automatically fax/email the output in PDF format.How do I do that?
    (a)Do I have any user exit/Badi for these standard transaction where I convert the spool to PDF format?
    (b)Even then, can I use the standard output determination technique to send the PDF format out as email or Fax?
    Regards,
    Bhaskar.

    hi ,
    check this link..
    create the output type and trigger the mail/fax program
    via output type.
    http://www.sap-img.com/abap/sending-mail-with-attachment-report-in-background.htm
    http://www.sap-img.com/abap/sending-fax-from-abap.htm
    thanks
    vijay
    Message was edited by: Vijay Babu Dudla

  • SP Need for sales order UDF

    Hi all,
    I am created UDF attachment link in Sale order once attachment done  it will raise the A/R invoice template.
    Option copy from sale  order to AR invoice should be block in store procedure
    " Without attachment A/R invoice should not raise"
    How to write Store procedure transaction in SQL

    Hi Ranjith,
    try this one...
    for Line UDF
    IF (@object_type = '13') and (@transaction_type IN ('A', 'U'))
    BEGIN
         IF EXISTS (SELECT T0.Docentry from OINV T0 Inner Join INV1 T1 ON T0.Docentry=T1.Docentry where
         T1.DocEntry = @list_of_cols_val_tab_del and (T1.[YOUR_UDF] is null or T1.[YOUR_UDF] ='' ))
         BEGIN
              Select @error = 10, @error_message = 'Sales Invoice cannot be raise W/O sales Order attachement'
         END
    END
    for Header UDF
    IF (@object_type = '13') and (@transaction_type IN ('A', 'U'))
    BEGIN
         IF EXISTS (SELECT T0.Docentry from OINV T0  where
         T0.DocEntry = @list_of_cols_val_tab_del and (T0.[YOUR_UDF] is null or T0.[YOUR_UDF] ='' ))
         BEGIN
              Select @error = 10, @error_message = 'Sales Invoice cannot be raise W/O sales Order attachement'
         END
    END
    regards,
    Fidel

  • Formatted Search - Purchase Order Lines, Price Field

    Hello Experts,
    I have wrote this formatted search for Purchase Order Lines, Price Field
    The problem is that i gets 0...
    What is wrong in it?....
    select
    case
    when T2.[ItemCode] Like N'u05D7u05DC%%' AND U_Thickness >= 1 AND U_Thickness <=3 then U_Contour*2.17
    end
    FROM OITM T0
    INNER JOIN ITM1 T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN POR1 T2 ON T0.ItemCode = T2.ItemCode
    WHERE T2.itemcode = $[$38.1.0[
    Thank You,
    Meital

    Hi.....
    Try this
    select
    case
    when T2.[ItemCode] Like N'u05D7u05DC%%' AND U_Thickness >= 1 AND U_Thickness <=3 then U_Contour*2.17
    end
    FROM OITM T0
    INNER JOIN ITM1 T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN POR1 T2 ON T0.ItemCode = T2.ItemCode
    WHERE T2.itemcode = $[$38.1.0]
    Regards,
    Rahul

  • Formatted Search Querry for UDF

    Dear All,
            My client is using SAP B1 2007 B PL10. Now I am facing a issue like, I have made a UDF in the A/P Invoice Form and hence made it mandatory. But when i make a UDF field as mandatory I have to write a particular default value.  Hence i have written default Value as 0.
          Now whenever i open the A/P Invoice Form,  the mandatory UDF Field is showing default value as 0. But I want to write a Formatted Search Based Querry in a way that the UDF Field should become Nil whenever I Open the A/P Invoice Form.
          Please guide me in writing the Formatted Search Querry by which the UDF Field which is having a Default Value as '0' should become Nil.
        Regards
    Hitesh Parsawala

    Hi Hitesh ,
    You have two option :
    1.Either donot make ur UDF mandatory at the time of creation
    Use sp_transaction notification to validate
    2. Define UDF manadatory at the neginning
    if user donot change the value , triggger approval procedure through FMS
      I think it is
    Select Distinct 'True' from tablename where <userdefined field =''i
    If user donot change, it is going to triger approval procedure
    <You can look for code in forum if that is not working >
    Hope this helps
    Bishal

  • Formatted search on UDF, DIAPI issue

    Hi,
    I have a formatted search on a UDF in the DETAIL of a SALES ORDER
    When I try to set a value on this UDF, the DI API doesn't give any error but the UDF doesn't get the new value.
    but all other UDF works except this one which have a formatted search on it in SAP
    Is there something I don't know ?

    Hi,
    My goal is not to make the formatted search working in DI API, as I said, I'm just trying to set a value in the UDF and because there's a FORMATTED SEARCH on this udf, it keeps the default value instead of the value I'm setting by the DI API
    And yet, I have other UDF that have formatted search, and I'm able to set a value on the UDF anyway.
    What I see different is that this UDF is numeric and the others aren't
    I just don't understand why the DI API reports no error and yet the value I put in it isn't taken but only the formatted search default value for a numeric UDF  Is this a known bug in SAP ?

  • 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).

Maybe you are looking for

  • Circle with a Slash Through it and Non-Mounting Hard Drive

    Hello, So I have a Macbook Pro (Early 2011) and the other day it was installing some update. It turned off, so I went upstairs to plug it in but once I powered it on and logged in it just shows a circle with a slash on it. The guest user account work

  • Function module to update Quality notification

    Dear All, I have two questions. 1) Is there any function / BAPI to change quality notification? 2) Can i use call transaction in function module which is called as Background task? Regards,,, Sunil Joyous

  • Memory leak in OCI Direct Path sample program in threaded mode

    I have a slightly (okay, more than slightly) modified version of the sample program cdemodp.c, which uses OCI to do a Direct Path load. Since my eventual aim is to make a C++ module that loads a table from a file as part of a multithreaded program, I

  • Credit Balance Refund

    Allarmed to see that so many customers are having problem getting refund of their credit balances.  Can anyone one post the Verizon policy on this? I terminated my service last month and have not been able to get an answer when I am going to get back

  • Messaging Server authenticate against directory server

    Just wonder how to make messaging server authenticate against directory server? Basically I created users on the directroy server, and would like to let these users to access messaging server? Thanks for advice!