Stored procesdure for UDT linked to UDF in Stage of Sales Opportunity

Dear All,
I have an User Defined Table named 'process' in Sales Opportunity Row Stage Tab with some values as 1.1, 1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0 so on which is connected to a user defined field named 'Reasons'.
Now the user does the sales opportunity entry and in the stage tab selects the process e.g 1.5 in the user defined field. Now I suppose 1.5 has a reason name of lost to others. Now I want to add a stored procedure that if the user selects lost in the Sales Opportunity summary tab and he has not selected the reason which is between 1.5 to 1.9 ( means lost reasons ) the sales opportunity should not get saved. An error message should show as please select proper reason.
Can it be achived through SP. I think we can do it but cannot make the SP could you please guide and help me to resolve this issue..
Appreciate your quick and positive response.
Regards,
Kamlesh

Hi,
I am trying to make the SP for cross checking the Lost reason if it is not put which are between 6.0 to 7.0 when the user selects lost in the summary tab but I am getting an error while executing the SP as - Msg 102, Level 15, State 1, Procedure SBO_SP_TransactionNotification, Line 243 Incorrect syntax near '='.
Note the followings :
In the OPR1 row I have a udf named U_Status
My SP is as under :
IF @transaction_type IN (N'U') AND @object_type = '97'
begin
if exists (SELECT * FROM [dbo].[opor] T0 INNER JOIN [dbo].[opr1] T1 ON T0.OpprId = T1.OpprId where T0.Name ='MACHINE' and T0.Status ='L' and T1 (U_status ='0' or U_Status ='1.1' or U_Status ='1.2' or U_Status ='1.3' or U_Status ='1.4' or U_Status ='1.5' or U_Status ='1.6' or U_Status ='1.7' or U_Status ='1.8' or U_Status ='1.9' or U_Status ='2.1' or U_Status ='2.2' or U_Status ='3.1' or U_Status ='3.2' or U_Status ='3.3' or U_Status ='3.4' or U_Status ='4' or U_Status ='4.1' or U_Status ='4.2' or U_Status ='4.3' or U_Status ='5' or U_Status ='5.1' or U_Status ='5.2' or U_Status ='5.3' or U_Status ='5.4' or U_Status ='5.5' or U_Status ='5.6')and T0.opprid =@list_of_cols_val_tab_del)
begin
SELECT @error = 10, @error_message = N' Please put proper reasons for Losing the Opportunity'
end
end
Would be obliged if you can throw some light in it.
regards,
kamlesh

Similar Messages

  • Stored Procedure for Inventory

    Hi Experts,
    I want a SP for inventory if i choose filler warehouse and To warehouse then there should be an error if both warehouses are not excisable or both should non-excisable .
    In simple i can transfer items only from excisable warehouse to excisable warehouse and non-excisable to non-excisable.
    plz help me..
    Thanks & Regards
    Shiv Sen

    Hi shiv,
       there is a work around for this.Make one udf at header level and pick the value of filler that is exciseable or not(Y or N),
    make one more udf at row level and do same.
    now compare both udf values...
    ********stored procedure************
    if @object_type = '67' and @transaction_type in ('A','U')
    begin
    if exists
    ( SELECT  T0.[DocNum] FROM OWTR T0  INNER JOIN WTR1 T1 ON T0.DocEntry = T1.DocEntry WHERE t0.docnum =@list_of_cols_val_tab_del and T1.[Udf_row] <>   T0.[UDF_header])
    begin
    set @error =1
    set @error_message = 'whse not have same property'
    end
    end
    ***************Fms for header level UDF**************
    SELECT T0.[Excisable] FROM OWHS T0 WHERE T0.[WhsCode] = $[owtr.filler]
    ******************fms for row level**********************
    SELECT T0.[Excisable] FROM OWHS T0 WHERE T0.[WhsCode] = $[wtr1.whscode]
    hope it will solve ur problem

  • Stored Procedure for @Table

    Dear Friends,
    Greetings...
    I am trying to write a stored procedure on a No Object UDT. I am having difficulty in getting the Object Type for it.
    I read in the forum that it can done by using Object_Type = "-3@TableName", but it did not help.
    In the SDK help it says use Object_Type = 153 for UDT , but i have no luck so far.
    Kindly Help.
    Regards
    John

    Hi JohnSmith@B1,
    you try  "-3 @tablename". you must sure it have space between -3 and @tablename.
    thanks,
    H2

  • Stored procedure for arhive

    I created a stored procedure for send data from a source bd to the bd destination with a link between BD
    But it will not work
    CREATE OR REPLACE PROCEDURE archivage ( source IN VARCHAR2, destination IN VARCHAR2)
    BEGIN
    / * - Prepare a cursor to select from the bd_source: * /
    source_cursor: = dbms_sql.open_cursor;
    DBMS_SQL.PARSE (source_cursor,
    'SELECT table_name FROM dba_tables' | | source,DBMS_SQL.NATIVE);
    LOOP i in source_cursor
    /* Or i use this !!!!
    SELECT object_name FROM dba_objects WHERE owner = 'SCOTT' AND object_type = 'TABLE'*/
    DBMS_SQL.DEFINE_COLUMN (source_cursor, i);
    end loop
    ignorer: DBMS_SQL.EXECUTE = (source_cursor);
    / * - Prepare a cursor to insert into the destination db: * /
    destination_cursor: = DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE (destination_cursor,
    'INSERT INTO' | | destination | | DBMS_SQL.NATIVE);
    / * - Fetch a row from the source table and insert it into the destination table: * /
    loop
    if DBMS_SQL.FETCH_ROWS (source_cursor)> 0 ALORS
    - Obtenir des valeurs de colonne de la ligne
    DBMS_SQL.COLUMN_VALUE (source_cursor,i);
    DBMS_SQL.BIND_VARIABLE (destination_cursor,i);
    ignorer: DBMS_SQL.EXECUTE = (destination_cursor);
    ELSE
    EXIT;
    End If;
    END LOOP;
    /*-Close cursor */
    COMMIT;
    DBMS_SQL.CLOSE_CURSOR (source_cursor);
    DBMS_SQL.CLOSE_CURSOR (destination_cursor);
    EXCEPTION
    WHEN OTHERS, THEN
    if
    DBMS_SQL.IS_OPEN (source_cursor)then
    DBMS_SQL.CLOSE_CURSOR (source_cursor);
    End If;
    if DBMS_SQL.IS_OPEN (destination_cursor) then
    DBMS_SQL.CLOSE_CURSOR (destination_cursor);
    End If;
    RAISE;
    END;

    find 10 differences ... :(
    CREATE OR REPLACE PROCEDURE archivage (source        IN VARCHAR2,
                                           destination   IN VARCHAR2)
    IS
       source_cursor        INTEGER;
       destination_cursor   INTEGER;
       ignorer              INTEGER;
    BEGIN
       /* - Prepare a cursor to select from the bd_source: */
       source_cursor := DBMS_SQL.open_cursor;
       DBMS_SQL.
        PARSE (source_cursor,
               'SELECT table_name FROM dba_tables' || source,
               DBMS_SQL.NATIVE);
       FOR i IN source_cursor
       LOOP
          /* Or i use this !!!!
          SELECT object_name FROM dba_objects WHERE owner = 'SCOTT' AND object_type = 'TABLE'*/
          DBMS_SQL.DEFINE_COLUMN (source_cursor, i);
       END LOOP;
       ignorer := DBMS_SQL.EXECUTE (source_cursor);
       /* - Prepare a cursor to insert into the destination db: */
       destination_cursor := DBMS_SQL.OPEN_CURSOR;
       DBMS_SQL.
        PARSE (destination_cursor,
               'INSERT INTO ' || destination,
               DBMS_SQL.NATIVE);
       /* - Fetch a row from the source table and insert it into the destination table: */
       LOOP
          IF DBMS_SQL.FETCH_ROWS (source_cursor) > 0
          THEN
             --ALORS
             -- Obtenir des valeurs de colonne de la ligne
             DBMS_SQL.COLUMN_VALUE (source_cursor, i);
             DBMS_SQL.BIND_VARIABLE (destination_cursor, i);
             ignorer := DBMS_SQL.EXECUTE (destination_cursor);
          ELSE
             EXIT;
          END IF;
       END LOOP;
       /*-Close cursor */
       COMMIT;
       DBMS_SQL.CLOSE_CURSOR (source_cursor);
       DBMS_SQL.CLOSE_CURSOR (destination_cursor);
    EXCEPTION
       WHEN OTHERS
       THEN
          IF DBMS_SQL.IS_OPEN (source_cursor)
          THEN
             DBMS_SQL.CLOSE_CURSOR (source_cursor);
          END IF;
          IF DBMS_SQL.IS_OPEN (destination_cursor)
          THEN
             DBMS_SQL.CLOSE_CURSOR (destination_cursor);
          END IF;
          RAISE;
    END;
    /

  • Find/Change for internet links?

    Is it possible to do a Find/Change for internet links?
    That is, if I have URLs that do not appear in the text of the AppleWorks document, but in the links window, and I want to change all the links beginning with http://us.imdb.com to http://pro.imdb.com
    It seems this is not possible through the Find/Change function under the Edit menu, but perhaps I just don't know the right way. Otherwise, the only way to do it would seem to be to change each one individually in the links window with the edit function.

    Hello
    Alas, the last formula is the right one.
    The URLs are not stored in the body of the document so the Find/Change tool is unable to find them.
    Yvan KOENIG (from FRANCE 17 octobre 2005 21:51:08)

  • Choose from List for UDT

    I have made a UDT
    and I want to create a choose From List  of that table
    I know how to create choose frm list  for system tables
    like making Business partner  choose from list
    but I'm not able to make choose frm list for UDT
    please someone answer my question

    HI Riya,
    You can link a CFL to a User Defined Object but not a plain User Defined Table. A full list of options can be found in the UI help under BoLinkedObject Enumeration.
    Thanks,
    Lisa
    SAP Business One Forums

  • Stored Procedure for Accounts Receivable

    Hi. First off, apologies in advance if I have put this question into the wrong topic. Secondly, I first saw SAP 3 weeks ago when I stared my new job and have had no training so please bear with me if some of what I ask doesn't make much sense.
    OK, the issue is this.  In SAP B1, there is a built in Report called "Customer Receivables Aging" which allows you to see Customer Receivable Accounts by age (e.g 0-30, 31-60, 61-90, 90+) and so on.  The problem with the built in report is that it doesn't show all the fields I want - it only shows the Customer Name, balance, and then the aging balances.  I want to be able to see things like the customer's contact details, etc. I know this makes no sense because the whole point of the report is to be able to drill down into the different rows, but this report needs to be issued in printed form, hence the need for the extra fields.
    Since I can't seen any way from within SAP to change the fields returned by this report, I thought I'd have a stab at writing my own SQL to select out the same data along with the extra fields I wanted.  That's when the problems began...try as I might, I cannot get my figures to tally with the SAP Report.
    They are almost correct, but not quite. I am sure that I am missing a selection or some other element of the logic that B1 uses to create the built in report.
    If you want, I can post the SQL I'm using....I'm not an SQL guru by any means, but I do know my way around it; the biggest problem I have is that I cannot find any documentation as to the 4 letter tables that SAP uses and their relationships except on the most basic level (e.g ORIN is Open Return Invoice [maybe])
    Then I thought maybe it might be possible to edit that report section in B1 using the SDK.  That would be a better solution as I would not have to 'reinvent the wheel', I can just SELECT an extra field or three to include in the report.
    So my question is
    ->Does anyone have a stored procedure for SQL Server that can replicate correctly the SAP B1 "Customer Receivable Aging", even just the process SAP uses to gather this data would be good.
    OR
    is it possible to edit this report in SAP to put in the extra fields I want.
    Or, am I totally barking up the wrong tree? Thanks in advance, I know this is a long post.

    Hi Stephen,
    There should be a print layout attached to the on-screen report. This can be altered to show the additional fields you want without resorting to SDK or SQL development.
    When you have the Customer Receivables Ageing report open on screen, choose Tools-Print Layout Designer or click on the Print Layout Designer icon on the toolbar. When prompted, choose the layout you wish to edit and you'll be taken to the layout design. In the layout, you can add additional fields and should be able to add most business partner fields. As the report is set to portrait by default, I recommend changing it to landscape so you have lots more space to add the extra fields you want. This report writer is fairly intuitive, if a little basic.
    You will need to save this new report design, set it to be the default layout and then when you select to print the Customer Receivables Ageing report (ie Print Preview or Print) you will see the new report.
    Hope this helps,
    Owen

  • Stored Procedure For Web Service in Visual Composer 7.1

    Hello,
    I want to use stored procedure for Webservice in Visual Composer 7.1
    I can find this Web service but not supported. ( ex) prcreleased_test - Not supported )
    Log.
    Message: Error in connection - Can' t execute Web service.
    Date: 2008-07-01
    Time: 16:41:43:906
    Category: com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent
    Location: com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.processExecution: 
    Application: sap.com/test~kmshim_wf_impl
    Thread: HTTP Worker [1]
    Data Source: j2ee\cluster\server0\log\defaultTrace_00.trc
    Correlator ID: 240496500000034715
    Argument Objects: 
    Arguments: 
    DSR Component: n.a.
    DSR Transaction: cb4b3560473711dd9fb4001e4f3b8fcb
    Log2
    Message: Stopped further execution since the interpreter is unusable
    Date: 2008-07-01
    Time: 16:41:43:906
    Category: com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent
    Location: com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.XGLInterpreter
    Application: sap.com/test~kmshim_wf_impl
    Thread: HTTP Worker [1]
    Data Source: j2ee\cluster\server0\log\defaultTrace_00.trc
    Correlator ID: 240496500000034715
    Argument Objects: 
    Arguments: 
    DSR Component: n.a.
    DSR Transaction: cb4b3560473711dd9fb4001e4f3b8fcb '
    Help me^^ plz..

    Hi Tanna.
    Thanks for your reply^^
    I create webservice that access my stored procedure.
    But not supported.
    http://dmp.humaxdigital.com/HumaxCmdwService/Service1.asmx?wsdl
    There are two service. (Hello World - Test, prcrelease_test - Stored Procedure )
    'Hello World' is supported but prcrelease_test is not supported. I can't drag to storyboard.
    Our company's DB is MSSQL2005.
    please help me^^

  • Why files in Lightroom mobile and files in the creative cloud not the same? idea-  one place(stored date) for all application ??????

    Why files in Lightroom mobile and files in the creative cloud not the same? idea- one place(stored date) for all application ??????

    Lightroom Mobile is not a cloud storage service. You shouldn't treat it as a way of backing up your files. You are merely storing Smart Previews of your files in the cloud space, high-quality JPEGs of your files regardless of their original format on your desktop. The point is that they are there so you can continue editing them in a Lightroom-like environment even while away from your desktop/laptop computer. The files in Lightroom Mobile can only be used in Lightroom Mobile.
    This is very different from what is offered by the Creative Cloud storage, which can be used to synchronize your files between any device (that can support the individual files).
    The vast difference in how each service works and its intended use is why they are separate.

  • How to remove bullets and spacing for url links in the Related Links iview?

    I tried to look for a property that I can edit the look-n-feel of the url links in the Related Link iView using "Theme Editor".
    All I need is to remove the bullets and increase some vertical spacing between the links.
    Currently, it looks like this:
    URL iView A
    URL Iview B
    I go through the whole section of Related Links properties, none of them seems to do what I want.
    Here are the list of properties in Related Link section (of Navigation Panel):
    Link Color
    Text Decoration of Link
    Hover Color
    Text Decoration of Hovered Link
    Initially, I thought "Text Decoration of Link" should be the right property I should look at. But there are a drop-down with 5 options: None, Underline, Blinking, Overline and Line-Through, which really can't achieve what I want.
    Thanks for advice.
    Kent
    Post with Diagram Illustration:
    <a href="http://sapnetweaverforum.blogspot.com/2006/11/how-to-remove-bullets-and-spacing-for.html">How to remove bullets and spacing for url links in the Related Links iview?</a>
    Message was edited by: Kent C.

    Hi, Kai.
    I checked the Related iView properties (URL Template), I don't see what layoutset it is really using. I am not sure, is that a layout set apply to the Related Link Iview?
    For the regular KM iView, I will see what Layout Set I want to apply, then I can go and change the properties (of layout coontroller, collection renderer & resource renderer)you mentioned. But for this Related Link iView, I really don't know. I guess it may be in the code itself.
    If there is a layout set for Related Link iView (or the place to apply layout set to it), can you point to me which one is that? (I did a search through the layout set names, I only find the AppQuicklinkExplorer (I used this for Dynamic Nav. Link iView before), if I can aply this layout set to Related Link iView, my problem will be solved.)
    Thanks for help.
    Kent

  • Conditional option for Action link in OBIEE 11G

    Hi
    I am unable to select the conditional option for action links on a column(s) in 11g. Please help me with a solution to this or information on this.
    Thanks

    Hi,
    What error are you getting? Or the conditional option is invisible?
    Regards,
    Arul

  • I need to go back to Firefox 3.5-3.6 because 90% of my extension do not work. Where can I find the download to Firefox 3.5-3.6? Thank you for the link.

    I need to go back to Firefox 3.5-3.6 because 90% of my extension do not work. Where can I find the download to Firefox 3.5-3.6? Thank you for the link.

    You are a "life saver". Thank you very much.

  • HT201317 Dear Sir/Madam i want to tell you that I am very disappointed because I just read that in photo stream my photos are stored only for (30) thirty days.I didn't know that and i didn't have the time to save them on a device.I was robbed of mobile al

    Dear Sir/Madam
    I want to tell you that I am very disappointed because I just read that in photo stream my photos are stored only for (30) thirty days.I didn't know that and I didn't have the time to save them on a device.
    I was robbed of mobile before (3) three days and I lost 2.000 photos!
    Is there any possibility to retrieve them?
    If it was possible that would be great as I would save them immediately to my computer instead of losing them again.
    Thank you for understanding
    Kind Regards
    Giaourtsakis Kleanthis

    If you were trying to get this apple, you would do it here:  https://getsupport.apple.com/

  • Can anyone point me in the right direction for the link to download Acrobat 9 Standard?  I found the link to download 9 Pro but not standard.  Old computer crashed and new computer does not have a CDR/DVD rom drive.

    Can anyone point me in the right direction for the link to download Acrobat 9 Standard.  I found the link to download 9 Pro but not standard.  Old computer crashed and new computer does not have a CDR/DVD rom drive.

    Hi,
    Standard or Pro would be licensed through your serial number, the download link and downloaded file would be the same for both of them.
    Pro or Standard would be determined after you put in your serial number.
    Download Acrobat products | 9, 8
    Thank You
    Arjun

  • Why is Firefox opening a separate browser window for each link instead of a new tab in the current browser window?

    Suddenly firefox has started opening a new, separate browser window for every link and thing I open. It used to just open a new tab in the current browser. I must have closed down 15 browsers when trying to get back to a previous web page - the back button doesn't work when each click leads to a new window opening! I went into options and my settings have not changed, they still say "open new tab" for links. This just started happening out of the blue today. What's up?

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

Maybe you are looking for