Adding data to system form

hi experts
I want to put DocDate and TaxDate into payments form how to do this.
i tried to add like this
no form load
Form frm = APL_Form.Polaczenie.pApp.Forms.GetFormByTypeAndCount(pVal.FormType,pVal.FormTypeCount);
(frm.Items.Item("10").SPecific as editText ).Value="15/04/08";
but it doesn`t work.
i also tried to add this data by DataSources.
this is in  ORCT.DocDate
Regards
Edited by: Michal Wieczorek on Jul 16, 2008 10:46 AM

Michal,
If pVal.FormType = "170" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD And pVal.Before_Action = False Then
            Try
                oform = sbo_Application.Forms.GetFormByTypeAndCount(170, 1)
                oform.Items.Item("10").Specific.value = "20080719"
                oform.Items.Item("90").Specific.value = "20080719"
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End If
1) date has to be entered in yyyymmdd format.
2) exchange rate has to be updated for the date that you are passing. or else a window for the same will open.
HTH
Binita
Edited by: Binita  Joshi on Jul 16, 2008 12:08 PM

Similar Messages

  • DBDataSources not up to date in system form

    Hi guys,
    I really need you help on a issue.
    I'm trying to read all records in the matrix of the Sales Order (System Form)
    Now i'm using the datasource (DBDataSource) of this form to get the values, because this is faster then getting the values from the matrix.
    I run the following code on the before et_CLICK event on the Update Button. And i get this message:
    Data Source - Bad Data Source Offset at SAPbouiCOM.DBDataSourceClass.GetValue(Objext Index, Int32 RecorNumber)
    This issue seems to occure when i duplicate or add some lines and hit the Update Button. The amount of lines in the datasource is still the same as when i opened the Sales Order. But the number of records in the matrix is larger. So it seems that the datasource has not been updated when i added the lines.
    Does anyone has a solution for this?
    //Cache the document matrix
          SalesOrderCached salesOrderCached = new SalesOrderCached();
          ui.Matrix mtx = (ui.Matrix)form.Items.Item(SBO_FormTypes.Document.ItemMatrix.VALUE).Specific;
          ui.DBDataSource dataSource = form.DataSources.DBDataSources.Item("ORDR");
          ui.DBDataSource dataSourceLines = form.DataSources.DBDataSources.Item("RDR1");
          salesOrderCached.DocNum = dataSource.GetValue("DocNum", 0);
          salesOrderCached.CardCode = dataSource.GetValue("CardCode", 0);
          for (int i = 1; i < mtx.RowCount; i++)
            mtx.GetLineData(i);
            SalesOrderLineCached salesOrderLine = new SalesOrderLineCached();
            salesOrderLine.LineNum = i;
            salesOrderLine.ItemCode = dataSourceLines.GetValue("ItemCode", i -1).Trim();
            salesOrderLine.WarehouseCode = dataSourceLines.GetValue("WhsCode", i -1).Trim();
            salesOrderLine.LineTotal = Convert.ToDouble(dataSourceLines.GetValue("LineTotal", i -1).Trim(), NumberFormatInfo.InvariantInfo);
            salesOrderCached.SalesOrderLinesCached.Add(salesOrderLine);
          return salesOrderCached;

    Unfortunately not.
    the only thing I can think of trying is using the GetCellSpecific method of the matrix object. I have never used it but I see in the helpfile SAP say "This is the recommended way to get the contents of a cell."
    Worth a try but highly unlikely to work would be to use matrix.FlushToDataSouce().... but I would bet it won't work unless it's a user defined item. A similar method would be "GetLineData()"
    So I think it will be either GetCellSpecific to see if it improves performance or some sort of workaround
    EDIT: Actually, maybe try SerializeAsXML. It will be extra development time but bound to be faster.

  • Simple problem with popup message before adding document on system form

    Hi all,
    We have an AddOn that validates price lines on system Sales Order form matrix, so that if prices fall below a certain value, a popup is show to ask to continue or not, when user presses ADD button.
    The problem is that if he chooses yes (to continue), the Sales Order is not added since the button ADD keeps being selected ....
    Here is my code:
            [B1Listener(BoEventTypes.et_CLICK, true)]
            public virtual bool OnBeforeClick(ItemEvent pVal)
                int iResult = B1Connections.theAppl.MessageBox("Price lines fall bellow minimum! Continue?", 1, "NO", "YES", "");
                if (iResult == 1) // NO
                    // Show error
                    B1Connections.theAppl.StatusBar.SetText("OK", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                    return false;
                // YES: Continue to add Sales Order
                return true;
    The problem is somehow related with the popup message being shown: if user says YES to continue, the system form does not continue with the standard process of adding the Sales Order (when I move the cursor above the ADD button is shows it already pressed...).
    Do I have to do anything more to force the process to continue, when the user says YES?
    Regards,
    Manuel Dias

    Thtas known problem. The solution for this is declare global variable as boolean, when user selects Yes, then set this variable to true and emulate click to add button again where before the message box check if its varaible sets to true - in this case dont show message box, only set variable to false.
    The concept of code will be
    dim continue as boolean = false
    in item event
    if continue = false then
        x = messagebox...
      if x = 1 then
        continue = true
         items.item("1").click
    end if
    else
    continue = false
    end if

  • Adding data into default form

    Hi All,
    I'm newbie to SDK. I've created an UDO for a user table of object type master data and Default form is created. now i want to enter data into that by using SDK. How can this be done.
    Thanks in advance
    jaideep
    Edited by: jaideep amuloju on Apr 20, 2009 12:55 PM
    Edited by: jaideep amuloju on Apr 20, 2009 12:56 PM

    It's not clear to me what's you need to do.
    If you want to use UDO, for simple data editing, you doesn't need to use SDK.
    If your needs are more complex, I suggest you to build your own form with screen painter and with SDK write the necessary code for the addon.
    I can send you some example if you need.
    Bye.
    Diego

  • SQL Error when adding data with UDO + Form

    Good morning, friends.
    Initially, I apologize for any mistakes in my English.
    I am developing an addon for a client and now I came across a problem that started happening about 5 days ago:
    I customized a MasterData postcodes in B1, I created a UDO (oCNSTCEP) and bind to a form created by the Screen Painter. It is noteworthy that this program has been operating without any problems in the customer environment for at least 3 months. Finally, for reasons unknown to the system now has to give the following message when I insert a new record:
    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Conversion failed When converting the nvarchar value 'oCNSTCEP' to data type int. (CINF)
    The strange thing is that the record is written into the UDT corresponding to the UDO. But the error message is given, giving the user the impression that the routine was not completed successfully.
    Yesterday you told me what is happening the same error in another form, ie, the way any given recording through UDOs are giving problem.
    I searched for this post in SDN and the maximum that I discovered is that it could be happening because of the variable @ object_type in SBO_Notification be as int instead of being as nvarchar (20). I checked the stored procedure and @object_type is nvarchar(20) type.
    I would like to help for a solution to this problem. Since now, thank you!
    Sincerely,
    Junior

    The error is coming from the stored procedure and is easy to fix,
    Anywhere where you check the @object_type, you need to put the value in single quotes.
    e.g if your stored proc includes both of these:
    IF @object_type = 17
    IF @object_type = 'oCNSTCEP'
    It will fail with the error you mentioned. But if you have:
    IF @object_type = '17'
    IF @object_type = 'oCNSTCEP'
    It will work.

  • **PLEASE HELP**Need Help adding date ranges to form

    I have designed a form with approximately 28 user defined date fields. I want the user to be able put in the first date range and then seautomaticaly fill in the other dates sequencially.
    ie,.... the user puts in 08/01/2007 then the following date field populates with 08/02/2007, then 08/03/2007 and so on....

    The following script can be used for the "exit" action so the basic action to get the start date's number and then it can be used to compute the next days field values by adding the appropriate number of days. A more experienced user could use a control loop t0 modify the field names and number of days to add to the start date's day number for the additional date fields.
    // Script for exit from date select field
    // perform calculation only if an input date has been selected
    if (HasValue(cInputDate)) then
    // format string for the date fields
    var cDateFormat = "MMM D, YYYY"
    // intermediate information start - optional
    xfa.host.messageBox(Concat("The input date formatted value is: ", cInputDate.formattedValue, "
    The input date's numeric value: ", Date2Num($.formattedValue, cDateFormat), "
    The adjusted date number is: ", (Date2Num($.formattedValue, cDateFormat) + 1), "
    The adjusted date is: ", Num2Date(Date2Num($.formattedValue, cDateFormat) + 1) ),
    "Intermediate Detail", 3, 0)
    // intermediate information end - optional
    var StartDateNumber = Date2Num($.formattedValue, cDateFormat)
    // add 1 day to StartDateNumber
    cAdjustDate = Num2Date(StartDateNumber + 1, cDateFormat)
    // add code for additional date fields here adding appropriate number of days for date
    else
    cAdjustDate = "" // no input keep field blank
    // add code for additional date fields here
    endif

  • Access Data for System Form in SAP B1

    Hi,
    I want to access Text data and Matrix data for Purchase order Form. Can u Plz provide solution / Code for this problem.
    Thanks

    Hi Makarand,
    write these code inside ItemEvent,
    oForm = SBO_Application.Forms.Item(FormUID)
    oEditText = oForm.Items.Item("4").Specific 'Unique ID of Vendor Code
    VendorCode = oEditText.Value
    oMatrix = oForm.Items.Item("38").Specific 'Unique ID of Matrix
    For i=1 To oMatrix.RowCount
      oColumn = oMatrix.Columns.Item("1") 'Unique ID of ItemCode in matrix
      oEditText = oColumn.Cells.Item(i).Specific
      ItemCode = oEditText.String
    Next
    You will get item Unique ID from Debug information.
    Hope this will help you
    regards,
    BBN

  • Adding columns in system form

    Hi SBO developers!...
    I want to add columns in "document numbering" form in its load event. Someone could sugest me how to do that? I try to make it but the error is "Matrix - Line Exists" after to execute the sentence "colum.add(id,16)"in my code.
    Thanks a lot.
    It's very importan to me.
    VDM

    > As far as I know you cant make an extra row on the
    > fly if lines exist in a matrix.
    The SBO UI-help says the same.
    > I have not tried this but try adding a userfield to
    > the XYZ table. This way the new column should be
    > there always and you should be able to show and hide
    > it...
    I can confirm that, that's exatly what i'm doing. For a simple field, you get a column with an EditTexts.
    If you specify valid values, you get a column with ComboBoxes.
    Show / Hide works just like showing/hiding other matrix fields. If you want to it programmatically, you may want to have a closer look at table CPRF. I didn't figure out how to do it using the SDK.
    If anyone is interested I could post following functions:
    SetInvisible(fieldName As String, formType As String, itemId As String)
    SetVisible(fieldName As String, formType As String, itemId As String)
    Florian

  • User Defined Fields on System Form

    Dear All,
                   I want to know that how much User Defined Fields can be added on a system form. My problem is that I am developing an add-on for the Item Master Data. And I have used a lot of User Defined Fields on Item Master Data Forms which contains table 'OITM'. Now if I am trying to add any extra User Defined fields in OITM Table, I am not able to do so. I am getting an error as  'Internal Error Occurred'. What can i do regarding this problem.?  Help me. It is something very important.
    Thanks and Regards

    Hi,
    There is theoretically no limit on the number of UDF for a table. there is however a maximum number of characters for a record in SQL Sever.
    As far as I know this is 4000 in SQL Server 2005 and older and 8000 in SQL Server 2008.
    pls check Microsoft for the exact numbers
    Regards
    Ad

  • Is it possible to get System form Matrix Data in DI API?

    HI,
       i would like to use DI API to get the System Form Matrix ( like Sale Order ) . Is it possible?
       i know that using UI API is most easier way. However, UI API cause extermemly slow perfomance.
       no matter i use Form.Freeze or not. Please Advise
    Thanks
    Gordon
    Edited by: Gordon Ho on May 7, 2009 7:03 AM

    Hi,
    U can access the Sales Order rows using the DI only if its added to the system. U can use the DOCUMENT object and Document.Lines and access the row data. Please check the SDK help file for more information.
    From SDK Help
    Document_Lines is a child object of Documents object and represents the line entries of a document in the Marketing Documents and Receipts module and the Inventory and Production module.
    Vasu Natari.

  • Adding data to multiple tables using one form in Access 2010?

    Hi All,
    I have a access database with two tables and I want to create a single form to enter data into that tables.
    How to adding data to multiple tables using one form in Access 2010?
    I don't have to much knowledge of access database?
    Please help me
    Thanks
    Balaji

    You really don't enter identical data into 2 tables.  You enter dat into one single table, and then you have an unique identifier that maps to another table (you have a unique relationship between two tables). 
    Maybe you need to read this.
    http://office.microsoft.com/en-001/access-help/database-design-basics-HA001224247.aspx
    Think about it this way...  What is you update data in 2 tables, and then the data in one of those tables changes, but the data in the other table does NOT change.  WHOOPS!!  Now, you've got a BIG problem.  For instance, you have a customer
    named Bill Gates.  In one Table you update Bill's address to 1835 73rd Ave NE, Medina, WA 98039 and in the other table you accidentally update Bill's address to 183 73rd Ave NE, Medina, WA 98039.  Now you have 2 addresses for Bill.  Why would
    you want that???  Which is right?  No one knows.  If you have one address, you just have to update one address and if there is a mistake, you just have to update one address, but you don't have to waste time trying to figure out which is right
    and which is wong...and then update the one that is wrong.
    Post back with specific questions.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Opening a System-Form with selected Data

    Hi,
    i´m looking for a way to open a System-Form, e.g. Orders with
    selected Data.
    In the moment i do the following:
         application.ActivateMenuItem("2050");  // orders
         SAPbouiCOM.Form belegForm = application.Forms.ActiveForm;
         belegForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
         SAPbouiCOM.EditText edDocNum = (SAPbouiCOM.EditText)belegForm.Items.Item("8").Specific;
         edDocNum.Value = "4711";
         belegForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
    This works, but the screen is blinking, because first the form ist opened and shown with
    empty values and then filled.
    Is there a way to activate the form and do the search-Operation and afterwards show it ?
    I think ist must be possible, because when clicking on the link-Button near CardCode, the Contacts-Form
    is opened in this way.
    regards Matthias

    Hi Ibai,
    i have tested both: freeze and form.visible = false in
    the form_load-Event. It doesn´t work here.
    Also neither the call
       application.ActivateMenuItem("1281");  // find
    nor the call
       oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
    work in the form_load-Event.
    After the form-Load-Event the et_FORM_ACTIVATE-Event is called.
    Here the functions work, but here the screen is already visible.
    regards Matthias

  • Adding a button when a system form is opened

    Hiya, I'm trying to add a button to a system form in vb.net.  For some reason when i run my code the button will add to the form succesfully only when I have that form open in SAP.  If the form isn't open I get the error 'Form - Not found'  Can anyone show how to just add the button when the user opens the form rather than the button appearing from the form being already open. 
    My code is like this:
    Private Sub SBO_Application_ItemEvent(ByVal FormType As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            Select Case pVal.EventType
                Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD
                    If pVal.FormType = 152 And pVal.BeforeAction = False Then
                        If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD And Not pVal.BeforeAction Then
                            CreateMySimpleForm()
                        End If
                    End If
            End Select
        End Sub
    Public Sub CreateMySimpleForm()
            Dim oItem As SAPbouiCOM.Item
            Dim oButton As SAPbouiCOM.Button
            oForm = SBO_Application.Forms.GetForm("152", 0)
            oItem = oForm.Items.Add("51", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 88
            oItem.Width = 95
            oItem.Top = 558
            oItem.Height = 21
            oItem.FromPane = 24
            oItem.Visible = True
            oButton = oItem.Specific
            oButton.Caption = "View Document"
            oForm.Visible = True
            oForm.Update()
        End Sub
    Any help would be appreciated

    ok guys I've solved the problem.....this code adds a button to the Open Items List and its in vb.net
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            If ((pVal.FormType = 152 And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And (pVal.Before_Action = True)) Then
                oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then
                    Try
                        oItem = oForm.Items.Add("ViewDocBtn", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
                        oItem.Left = 88
                        oItem.Width = 95
                        oItem.Top = 295
                        oItem.Height = 21
                        oItem.Visible = True
                        oButton = oItem.Specific
                        oButton.Caption = "View Document"
                        oForm.Visible = True
                        oForm.Update()
                    Catch
                        SBO_Application.MessageBox("button not added")
                    End Try
                End If
            End If
        End Sub

  • Taking the data from interactive forms and load the data into SAP system?

    hi all,
    I want to know how to take the data from interactive forms and load the data into sap system?
    if u have any sample scenario, explain with that.
    thanks in advance
    Raja

    Hello,
    Check the program...
    SAPBC480_DEMO.
    Check the below threads
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/88e7ea34-0501-0010-95b0-ed14cfbeb85a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bfbcd790-0201-0010-679d-e36a3c6b89fa
    Thanks
    Seshu

  • How to create add-on of a system form in sap b1 9.0?

    Hi all,
    I have a problem related to the creation of a system form add-on of sap b1 9.0.
    I can develop some projects in visual basic, but about sap b1 add-on, I know how to package files of to install (.ard and .exe files) and I also know how to register .ard file in sap b1 9.0, So I tried to register all projects found in SDK sample folder that was correct.
    I tried to do an example of project found in SDK Help Center.
    But the problem I have to day related to the creation of system form add-on.
    The steps I tried to do are:
    1. I opened SAP B1 Studio for Microsoft Visual Studio
    2. Right click my project and add the system form (Employee Master Data)
    3 Connection string I used in Command line arguments   0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056
    4. I added one field (CFL of BPCode) to Employee Master Data.  I did n't add any reference because when I add UI API Vission 9.0 to system form or user form of sap b1 it gives errors in Menu.vb. I do know why.
    5. I converted in 32 bit and build my project
    6. I re_opened new visual studio 2010 for creating new project with SAP B1 AddOnInstaller.NET Wizard
    7. From here I did every thing according to the video of Bryan Gomez
    Creating and Registering SAP Add-on - YouTube
    8. I registered my .ard file
    9. But when I start my add-on it gives error (Add-on connection timed out)
    The questions I want to ask,
    1. If you are creating the add-on of system form Is there any other thing needed to do more than the above  I explained?.
    2. Is it necessary to go in SDK code when you are using the system form like that?.
    3. If it is necessary to add reference of UI API  in project, how to handle error occurs when we add that the reference to the project which is using a system form?.
    Please anyone who has an idea he/she can help me.

    Hi pallavi p,
    That's good but as I said above when I add the reference of UI API Version 9.0 in the project which has the system form or user form of sap b1 it exactly gives errors in menu.vb of the project.
    So let me give you the way you can try.
    1. Open new project/ visual basic/ sap business one/ sap business one add-on project. and save it any where
    2. Right click on your project
    3. Add new item
    4. Sap Business One
    5. System form (Employee master data) or user form
    6. Add
    And then if your form is opened
    7. Go to add the reference of UI API Version 9.0
    8. Check errors found in menu.vb (or in OutPut)
    So if it's possible try to solve that problem.
    Please anyone can help me.

Maybe you are looking for

  • [SOLVED] Rxvt-unicode fails to paste PRIMARY selection owned by Vim

    Urxvt almost always work with the X PRIMARY selection. i.e., if I select some text in Firefox or other applications, I will be able to paste it in urxvt. But Vim seems to be an exception. Steps to reproduce:   1. Select some text ("foo") in Vim, eith

  • Differnce between AT NEW AND ON CHANGE OF

    Hi, Differnce between AT NEW AND ON CHANGE OF Iam waiting foryour reply Thanks & Regards Raja Sekhar.T

  • Page Link Working Abnormally, Pleaes HELP!!!!

    After I uploaded my webog, I found that the link to Photography won't work when a particular blog is being browsing. See below: For instance, 1. go to http://web.mac.com/haotong/iWeb/Site/Welcome.html 2. on the main welcom page, select Blog, after en

  • Raw files loosing editing information?

    I edit my raw files in CS5.  Then I saw as JPEG, and upload to be developed.  Once the pictures are uploaded they look like I never edited them at all.  What am I doing wrong.  This does not happen if I edit a JPEG file. Thank you in advance...:).

  • Where can i find a Afrikaans Spell Checker?

    Please help me to find a Afrikaans Spell Checker. I am a public speaker and do preparation on my iPad3 daily. I need a Afrikaans Spell checker that will work with mails, keynote, pages and numbers.