On validate trigger in SBO 2004

Hi All,
I am facing problem while validating a column in matrix box. Whenever i try to catch onvalidate event in a column , the SAP stops working.I want to calculate a percentage of a value in another column . Is there any other method to solve this problem?
Thanks in advance
Denis

I used this code first, then I used event KeyDown, its working.
If (pVal.ItemUID = "Matrix1") And (pVal.ColUID = "Percent") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE) And (pVal.Before_Action = False) Then
      f = SBO_Application.Forms.Item("MyForm")
                oItem = f.Items.Item("Total")
                oEdit = oItem.Specific
                TotalPrice = oEdit.String
                oMatrix = f.Items.Item("Matrix1").Specific
                oColumn = oMatrix.Columns.Item("Percent")
                oEdit = oColumn.Cells.Item(pVal.Row).Specific
                Percent = oEdit.Value
                Price1 = (TotalPrice * Percent * 0.01)
                oEdit1 = oMatrix.Columns.Item("Price").Cells.Item(pVal.Row).Specific
                oEdit1.String = Price1

Similar Messages

  • SBO 2004 and ActiveX

    I heard, that SBO 2004 now supports ActiveX at the UI API. Where can I find an ActiveX sample ? We want to use ActiveX forms, instead of only a control, by this way we will want to be able to use .Net components directly via a WinForm as ActiveX form in a SBO UI form.
    I have also read about .Net connectors. Are they available in SBO 2004 ?
    Greetz
    Kristian

    Here is a link in the forums "SAP Business ONE" where they talk about this:
    SBO 2004
    Perhaps posting your message there will give you a better response.
    Message was edited by: Craig Cmehil

  • Problem with when validate trigger

    Hi All,
    I am using oracle forms 10g.
    I have developed a custom form In that i have two block Header block and Detail block.In the header block some fields like Po number, po amount , supplier name, supplier site etc. And in the detail block i have po line details.
    I have written a validation trigger under supplier name and supplier site, IF block.supplier_name is null then
    message('enter supplier name') same under every field.
    Now when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output. But the problem is When validate trigger fires when i press tab in PO Amount fields, Once i press ok it going to details block and querying.
    Can any one explain me what i have done wrong. The validation trigger is firing and giving message.
    Regards
    Srikkanth

    Srikkanth.M wrote:
    Hi All,
    I am using oracle forms 10g.
    I have developed a custom form In that i have two block Header block and Detail block.In the header block some fields like Po number, po amount , supplier name, supplier site etc. And in the detail block i have po line details.
    I have written a validation trigger under supplier name and supplier site, IF block.supplier_name is null then
    message('enter supplier name') same under every field.
    Now when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output. But the problem is When validate trigger fires when i press tab in PO Amount fields, Once i press ok it going to details block and querying.Hey, Srikkanth
    Once you said
    when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output.again you said
    But the problem is When validate trigger fires when i press tab in PO Amount fieldsSo, i'm not getting you..
    Can you clear it any more ? or any other way..

  • Version incompatibility issue with Interop.SAPbobsCOM.dll in SBO 2004

    Hi,
    I have encountered an incompatibility issue in DI API 2004 across different patch level-versions. Originally, I developed an application in SBO 2004 pl4 environment. Now, some of the customers who were installing the application, notified me that the application has a login problem. It turned out that the CompanyClass.connect() method returns an error message "object reference not set to an instance of an object", when the DI API version installed in the production environment is higher (in this case, pl7) than the DI API version which was used in the development environment.
    I figured out that the problem can be fixed by replacing the Interop.SAPbobsCOM.dll file in the application directory by a newer version that reflects the DI API that is installed in the system. However, it seems a rather lousy workaround, if the customer needs to manually replace the dll. Maybe the installer could be customized to "sniff" the correct DI API level, but this too would be a pretty kludgy solution.
    Does anyone know a better solution to this problem ?
    Regards,
    Henry

    normally this is not a problem as long as they don't change the signatures on the DI-API (which they said they wouldn't) but it appears in P5 they changed that signature... we noticed some enums that got added and a few minor changes.

  • WHEN-VALIDATE-TRIGGER trigger looping so many times

    Hi,
    Below is the code written in WHEN-VALIDATE-TRIGGER trigger and after raise FORM-TRIGGER_FAILURE
    the process is not stopping and the trigger message looping without end when
    I tab to the next field or try to save the record. I am not sure why the flow did not stop
    after the raise FORM_TRIGGER_FAILURE exception and the trigger looping again and again.
    Please help me to know what is wrong in the code. This trigger written in ITEM level.
    declare
                     msg_type varchar2(3);
                  msg_text varchar2(2000);
                  continue       boolean;
                begin
                  if :pom1_b22.qty < 0 then
                    message_ppkg.get_msg_from_db('RET','04060',msg_type,msg_text);
                    message(msg_text || '.');
                    bell;
                    raise form_trigger_failure;
                  else
                    continue := TRUE;
                    if :pom1_b22.qty is not null and :pom1_b22a.b22_query = 'FALSE' then
                      if nvl(:pom1_b22.irt_created,'N') = 'Y' then
                        if :pom1_b22.qty <> :pom1_b22.save_qty and
                          :pom1_b22.save_qty is not null then                    
                          if check_order_status then
                            continue := TRUE;
                          else
                            continue := FALSE;
                             message_ppkg.get_msg_from_db('RET','04061',msg_type,msg_text);
                             message(msg_text);   
                            bell;
                            :pom1_b22.qty := :pom1_b22.save_qty;
                            raise form_trigger_failure;
                          end if;
                        end if;
                      end if;                
                      if continue then
                        if :pom1_b22.save_qty is null then
                          if :pom1_b22.qty > :pom1_b22a.total_qty then
                             message_ppkg.get_msg_from_db('RET','04057',msg_type,msg_text);
                             message(msg_text || to_char(:pom1_b22a.total_qty) || '.');   
                            bell;
                            raise form_trigger_failure;
                          end if;
                        else
                          if :pom1_b22.qty <> nvl(:pom1_b22.save_qty,0) then
                            if :pom1_b22.qty > :pom1_b22a.total_qty +
                                               (nvl(:pom1_b22.save_qty,0) -
                                                :pom1_b22.qty) then
                                                    message_ppkg.get_msg_from_db('RET','04056',msg_type,msg_text);
                             message(msg_text || to_char(:pom1_b22a.total_qty +
                                              (nvl(:pom1_b22.save_qty,0) -
                                               :pom1_b22.qty)));                 
                              bell;
                              raise form_trigger_failure;
                            end if;
                          end if;
                        end if;
                      end if;
                    end if;
                  end if;
                end;

    Your Raise form_Trigger_failure Condition is not met hence not stopping the rest trigger body.

  • How can I get license info using SBO 2004

    Hi, everyone
    I know there is a License API available in SBO 2005, but I'd like to detect the user license number etc. in SBO 2004, who  has experience about get license info in SBO 2004, please share your method.
    Thanks in advance!

    Hi Alexey,
    Thanks for your reply; actually I want to get the user buy SAP License Number, in other word I want to get the maximum count of user using SAP in the same time.
    I can see the license directory, do you know which file and entry point that I can get the license number.
    and also if my add-on does not run in the machine that license server running, I think may be there is none license directory in the machine which does not install server tools, if this is true, do I need use other way to get the SAP license info?
    Thanks again Alexey!

  • When validate trigger forms 6i

    Please help me to create when validate item trigger.
    There is one table "job" - id, status
    status is X or null. i want to do in forms. when someone is entering value for id, it should check first the status for that id in job table status field.
    if status is null then it should show msg "this id is already open for another job"
    Edited by: only.ashish99 on Dec 26, 2012 1:44 PM

    Hi,
    So You mean that if the user dosent enter the staus then u need to show a message and if the entered status is there in ur table and then u need to show a message.
    Just write in the when validate trigger
    declare
    v_status number;
    begin
    select count(status) into v_status from table;
    If :Block.field_name is null then
    message('');
    Else
    If v_status=0 then
    ur action
    else
    Message('this job is exist for another');
    End if;
    end if;
    End;
    Try this.
    Regards
    Sri

  • Issue with When Validate Trigger firing multiple times

    Hi guys,
    I have Designed a Form Personalization on a Form which Fires a concurrent Program (built in:execute Procedure) when a Record is Saved.
    Below are the issues I am facing:
    1.Concurrent Program is Firing Multiple Times after Saving the Record.
    2.2 input Values to Concurrent Program are passed as NULL though I have Data but they are in Different Block of Form.
    Note :I have When Validate trigger on 1 Block but i am trying to pass 2 Values on Another Block as input parameters for Concurrent program.But those values are getting as null when program fires.
    Thanks.

    If EBS then post in {forum:id=475}

  • Problem using when-validate-trigger

    Dear Experts,
    After validating a item value, I want to navigate to a specified item besed on that item value. If i use go_item('item1') in when-validate-trigger, error comes, beacuse we cannot use restricted built-in go_item in when-validate-trigger. If i use key-next-item on 'item1' for validating item value then while navigating through mouse it does'nt fire.
    Please let me know which triiger i should use?
    Thanks
    Abhishek Rustagi

    There is no easy way to do this, however you could create a timer in your when-validate-item trigger which expires immediately, and place all of your navigational code in the when-timer-expired trigger - this way you could check the value which has been entered and navigate accordingly.

  • When validate trigger block level

    Hi,
    I Have a form application. On the entrance page If a user forget to enter his name or Password the form prompt the message to aware him about what is missing.
    SO I wrote the folloing code on when validate trigger block level, but it did not work according to my needs, should I replace this trigger with other?
    Sharbat
    BEGIN
         if:Block1.User is null then
         message('Please enter the user name);
         raise form_trigger_failure;
         if:Block1.password is null then
         message('Please enter the password'););
              raise form_trigger_failure;
              end if;
    end if;
    end;

    use
    if:Block1.User is null then
    message('Please enter the user name);
    raise form_trigger_failure;
    end if;
    on key-next-item of user textbox
    and
    if:Block1.password is null then
    message('Please enter the password'););
    raise form_trigger_failure;
    end if;
    on the key-next-item of the password text box

  • If Choose from list function included after SBO 2004 patch 31?

    Hi, there
    I know Choose from list function valid in SBO 2005, but I don't know if it is included in SBO 2004, especially after SBO 2004 patch 31?
    Thanks.

    Hi Indika,
    You are right - the Choose from list is only available from SBO 2005.

  • SBO 2004

    Hi all:
    I have just recieved the version SBO 2004, and in reference of the UI, I want to know when they will be available the tree control and Hierarchical's tables, because I need this structure to  make a project.
    Thanksssssss

    Heard too, that B1 2004 supports ActiveX using B1 UI forms. How to use ActiveX component on a form ? Is it possible to host an ActiveX form on a B1 UI form ?
    The idea is, the component palatte from B1 is not that rich and the UI components (for example Matrix) are not that smart. We want to make an ActiveX form and place the whole ActiveX form on the UI form of B1. By this way, we still using B1 forms with their layout and keeping the MDI child order, instead of using a normal WinForm, which will be hidden from the B1 client, when activating it and loosing the Z-order of the MDI.

  • Unable to validate the text with validate trigger

    Hi I am facing one issue
    I want to validate the password before going to another field, i put the following code on the when validate trigger,what i want if the password is wrong the cursor should go to the password field and clear the contents of that field only.When i put go_item and clear_item its giving error,pls find the following error and my code
    FRM-40737:Illegal restricted procedure Clear_block in when validate Item trigger
    declare
    l_user                     varchar2(6) := null;
    l_pass           varchar2(10);
    n_pass varchar2(10);
    chkbutton number;
    chk number;
    Begin
    select passwd into l_pass
         from Trx_usr
         where username = :USR.DISUSR;
              if      :global.pass = :TRX.PASSWD then
              message('Login Sucesss');
              else
                   chk:=show_alert('ALRLOG');
                   if chk = alert_button1 then
                   go_item('TRX.PASSWD');
                   clear_item;
                   end if;
              end if;
         end;
    rgds
    shrey

    I guess go call that code in the WHEN-VALIDATE-ITEM-trigger of the password-field itself? So you don't need any GO_ITEM. And instead of using CLEAR_ITEM you can just assign NULL; like
    :TRX.PASSWD:=NULL;

  • SBO 2004 Installation

    Hello All,
    Can I install SBO 2004 and 6.5 in one system?
    John

    yes, if you go to the service marketplace and search SAP Notes for #765303 or you can search under the Application Area SBO-BC.
    Craig.

  • Rightclick and context menu functionality in SBO 2004

    hi guys...
    how to capture the right click event and the context menu event. I have seen the right click example in the SBO 2005 examples but how to get that functionality in SBO 2004, there r no SAPbouiCOM.ContextMenuInfo and SBO_Application.RightClickEvent
    thanx in advance..
    regards,
    Vasu..

    Hi,
    I don't think you can achieve this in the 2004 version as it was an entirely new feature in the 2005A SDK.
    Regards,
    Owen

Maybe you are looking for

  • My computer crashed. how do i deathorize it?

    my computer crashed a week ago and i just got my new computer today. but when i tryed to log in on my apple ID it tells me i have used my 5 computers that are athorized andi cannot load my music on until i deathorize another computer. the thing is my

  • Macbook 2GHz 2GB upgraded to Lion 10.7.4 - Now slow, heats up quickly and regularly stops responding

    I have a 2008 Macbook 2GHz 2GB that initially ran on Snow Leopard, and I upgraded it to Lion about 6 months ago. Since the upgrade, it has become slow to start up, open programmes and regularly stops responding - especially when I'm on the Internet -

  • Nikon coolpix P6000 NRW files not recognized

    Hello, On my new Nikon, when I try to download the RAW images, neither iPhoto nor Image Capture will recognize the Nikon's RAW NRW format. If I shoot the images in JPEG, it is fine. If I use Nikon's included software, I can download the RAW images to

  • Exicse Duty in trading

    Hi,           Can anybody help me to map these scenario....... Scenario:- Dealer purchases excisable goods, his item cost includes excise duty as he is not claiming any credits, when he make sale of these items he only collect Vat. Requirements is he

  • Difference between Routing & Rate Routing

    Hi All, can anyone tell me difference between Routing & Rate Routing? can we use routing for REM? if no, then what will be the effect? Thanks, Rinky