Binding a Check Box with a User Defined Field

Hi everyone,
i v created a user defined field (U_CheckPro)in the system table "OITM" with two values: Y for Yes and N for No. In relation to that i v also created a check box on the form "150" and would like to know how can i bind my checkbox with  my user defined field properly.
The user would be than able to enable or disable the check box for each item (article). The user setting schould be than be active and valid in sbo-business logic, each time an item is selected. (for example in case of sales order ID 133, "OINV").
Any helfpul hints? Samples would be welcome as well.
Thanks and regards
Alban

> First of all you should remove the valid values
> because checkboxes does not work with valid values...
> Just give a default value.
Hi Rasmus,
thank you very much for your helpful hint. I guess my problem is solved by that - nevertheless here is my complete code sequence once again in case of possible errors.
I would appreciate any additional suggestion for improvement of the same.
Thanks and regards
Alban
>>>
Private Sub AddItem()
        ' Test UserSource
        oForm.DataSources.UserDataSources.Add("U_CheckPro", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
        oItem = oForm.Items.Item("122")
        ' Adding a Static Text item
        oNewItem = oForm.Items.Add("StaticTxt2", SAPbouiCOM.BoFormItemTypes.it_STATIC)
        oNewItem.Left = oItem.Left + 20
        oNewItem.Width = 100
        oNewItem.Top = oItem.Top + 12
        oNewItem.Height = 25
        oNewItem.FromPane = oItem.FromPane
        oNewItem.ToPane = oItem.ToPane
        oNewItem.LinkTo = "CheckBox1"
        oStaticText = oNewItem.Specific
        oStaticText.Caption = "Test_Caption"
        ' Adding a Check Box item
        oNewItem = oForm.Items.Add("CheckBox1", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
        oNewItem.Left = oItem.Left
        oNewItem.Width = 20
        oNewItem.Top = oItem.Top + 15
        oNewItem.Height = 19
        oNewItem.FromPane = oItem.FromPane
        oNewItem.ToPane = oItem.ToPane
        oNewItem.DisplayDesc = False
        oCheckBox = oNewItem.Specific
        'binding check box to source
        oCheckBox.DataBind.SetBound(True, "OITM", "U_CheckPro")
    End Sub
>>>

Similar Messages

  • Problem with creating User Defined Fields

    Hello,
    I have a big problem on one customers db. Everytime when user logs in SBO, he got immediatley after login message, that db structure was modified and user must click OK to continue (close all form - in this case is still no form opened).
    I tried to uninstall all addons to be sure that its not addon related but when is only clean SBO there, the message still pops up. It seems that somewhere in db is stored that this message must pops up.
    When I copied this db localy from custromer, the message still occurs.
    Is here someone who met this prolem and solved it?
    Thanks
    Petr

    Hi Petr,
    Just to remind that if you send a message to SAP based on Suda's answer belows:
    Petr,
    This is very unusual, Please check SAP Notes and also send a message to support. This should not be happening.
    Madhan: Just FYI - Petr is one of the Senior Implementation and SDK consultants who has spent a long time on the product and I am 100% sure that he knows the basics you are pointing to very well.
    Suda
    you must really make sure that you have performed support level 1 and level 2. If not, the SAP support will be happy to bill the message about 80 euro.
    Rgds,

  • Missing user-defined fields (project definition) in project inform. system

    Dear PS friends,
    I have extended the CI_PROJ structure with some user-defined fields.
    I have started report RCNCT001 (to analyze these new fields in the project information system). The include RCNPROJR was generated and contains the new fields (table XXL_DATA). Include RCNSOM00 was generated too. This is described in note 43493.
    But Iu2019m still missing the new user-defined fields in the dynamic selection of reports (e.g. CN40).
    What else I have to do? We use SAP_APPL : SAPKH60009
    Thanks in advance for any suggestions!

    have you used user defined field or custom field via exit CNEX......
    User defined fields are activated by configuration using field key
    If you added custom fields then check out OSS note 188663 on how to create a CUS view for dynamic selection.

  • User-defined field - get error message F5394, in FB50 and FB50L

    Hi All,
    I am having trouble with a User-defined field.
    The field is shown in FB50 and FB50L. And the field is optional for all Field status variants i OBC4.
    Still I get error message F5394 "An entry field is not permitted for account 19310"
    Is there anything I have missed?
    Thanks for your help
    Best Regards
    Carin

    Hello,
    Can you also check the field status in OB41.
    Regards,
    Ravi

  • User Defined Fields & Tables Problem

    After the upgrade to B1 2007 and converting our database to 2005 compatibility as per the upgrade directions, we’re having some weird issues with our user defined fields and tables. 
    •     Our user defined fields that used to be alpha-numeric when set up in B1 are now in the database as nvarchar(MAX), even after updating the fields in the Manage User Defined Fields screen.  B1 is obviously not setting the right field information as per its interface.
    •     We’re can no longer add records to user defined tables through the B1 interface, though we can add them fine through SQL Server or an ODBC interface.  The error we are getting is
    [Microsoft][SQL Native Client][SQL Server]Conversion failed when converting the nvarchar value '-3 @PASSWORDS' to data type int. (CINF)
    .  I don’t understand where this problem is coming from because there isn’t even a data field that is an integer, so I don’t know what it’s trying to convert.

    Derek,
    I would suggest you post this question to SAP Support by creating a message.  Also search for any notes on this from https://websmp201.sap-ag.de/notes
    Suda

  • User-Defined Fields Window

    Hi All,
    I have one issue with the User-Defined Fields window of the ACTIVITY form.
    I had added some user defined fields (UDF) to the Activities so that the User-Defined Fields are displaying in a separate window just near to the Activity window with Type (-651). All the UDFs are bound to the table, "OCLG".
    I want to initialize the values in the User defined fields controls with a text when the form is loading.
    I had tried to do this using
    oForm.Datasources.DBDatasources.Item("OCLG").SetValue("U_CUST",0,"MyValue");When I executed this statement, i am getting HResult error.
    Then I tried this by using UserDataSources.
    The same error repeats.
    But the code with .Specific.String = NewVal is working fine.
    Can you please explain the scenarios that we are able to do it using .Specifc.String. Is this a true method for doing this?
    if not
    please tell me How can we do this using Datasources (DBDatasources/ UserDataSources),?
    Please Help.
    Thank you in Advance
    Anoop

    Anoop,
    when you have created UDF in master item data, the textbox you can see on left side of form (separate form) is bounded already to this field. You cannot rebound it (its system form).
    When you want to change the value, you must use specific.string or specific.value for that textbox (as you wrote), but the calcualted value will be stored into master table (change of udf will set formmode to update mode). If you dont need to update formmode, set the formmode by code to normal mode.
    hope it helps
    Petr

  • User Defined Field Print Layout Designer print problem

    I am having a problem with a user defined field in the Business Partner - Addresses table. The user defined field is a "directions" text field that is intended to print on packing slips generated from the sales order. When I use the PLD to add the UDF in the header or in the table, all data lines in the body of the report repeat.
    Please advise if others are seeing this and what work around or SAP plans exist to resolve.
    Glen Kinney
    Corrpac
    [email protected]

    Hi Glen,
    I am facing the same problem.
    I need to add UDFs in Business Partners - Addresses at row level. The field will be used for some Taxation Nos. like CST, LST, VAT. I have tried to add. the fields are added and data saved too.
    But when I am going to PLD of Invoice and tried to get, the Business Partners - Addresses Table not showing in the list.
    Shell I have your help to resolve this.
    Thanks a lot.
    With Warm Regards,
    Chintesh Soni
    India

  • Display of document line items with user defined fields

    Hi all,
    I have created two user defined fields in CI_COBL structure and they are available on OBC4 screen. I maintained  optinal for entry in the screen layout. I posted one document with user defined fields and saved.
    Now the document is updated in BSEG table. I then display the document, and it display the doucment
    But when i double click on the one of the line items system gives an error that there is some problem in customising and entries missing in Table COBM.
    I checked OXK3 and see that in field information for user fields, it says entries maintained in table COBM.
    But still i couldnt display my line items in detail.
    Any solutions
    Thanks in advance
    Ram

    Yes your are looking at the correct sap note.
    Things look pretty straight forward in the notes documentation.
    1)Extend the VBKRED structure with the fields you want.
    2)Populate thse values in the user exit in program DBKMVF02 in FORM routine USER_EXIT_FUELLEN_XVBKRED.
    For extending a standard structure you need to create a zstructuree in se11 first and then append it to the standard structure.
    In your case you need to  extend VBKRED_EX1 structure rather than VBKRED.
    Regards,
    ravi

  • User defined field with Linked Table property

    Hi All,
    I know this has been posted several times but I cannot get this to work.  I am trying to add a user defined field and link it to a table. 
    I am getting the error "The field 'Related Table' should consist of 8 alphanumeric characters with no valid or default values " 
    Everything I check says that the code I am using is correct.  Is it possible the problem is that I am trying to connect to an SAP table instead of a user defined table.  Is it possible to link a user defined field to an SAP table?
    My code below:
                    oUserFieldsMD.TableName = "OITM"
                    oUserFieldsMD.Name = "SHP"
                    oUserFieldsMD.Description = "Must ship via"
                    oUserFieldsMD.LinkedTable = "OSHP"
                    oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
                    oUserFieldsMD.SubType = SAPbobsCOM.BoFldSubTypes.st_None
                    oUserFieldsMD.EditSize = 8
                    oUserFieldsMD.Size = 8
                    oUserFieldsMD.Mandatory = SAPbobsCOM.BoYesNoEnum.tNO
    Thanks
    Karen

    Hello  Karen,
    you cannot link a userfield to a system table. it has to be link to a user table.
    oUserFieldsMD.LinkedTable = "OSHP"
    when you have error, just try to do it using the same value in the application. If you cannot do it, it means you cannot do it neither with the DI
    Sebastien

  • How do can I have the form fill in a check box if the user has entered text in a textbox?

    I have a form that is submitting an xml data file that is picked up by MS Word and used to populate a document. However, there's a 'Miscellaneous' field where the user can type in addtional information that would not drop easily into the Word document (exceptions, items not on the drop down lists, etc.). I'd like to test to see if that Miscellaneous field has infomation in it and if it does, to set a invisible checkbox to "1" so that I can insert a text message in the Word document that there's additional information in the .pdf form that will have to be addressed manually in the Word document.
    I've tried
    if(Misc.rawValue !== "")
    otherinfo.rawValue = 1;
    but while it doesn't generate a Javascript error, it doesn't set the value either, and I haven't found any function that checks for whether a field is empty. I'm sure there's got to be a way to do this, but I'm stumped. Any help greatly appreciated!
    Bill

    It appears you are using LiveCycle Designer, so you will have to use the syntax of FormCalc or LiveCycle Designer JavaScript.
    For FormCalc:
    if(HasValue(Misc)) then
    otherinfo = 1
    else
    otherinfo = 0
    endif
    For JavaScript
    if(HasValue(Misc.rawValue))
    otherinfo.rawValue = 1;
    else
    otherinfo.rawValue = 0;
    I added code to clear the check box if the user clears the field.

  • How to create a check box with an X

    Hi,
    How do you create a check box with an X as apposed to a tick?
    Thanks

    Go to the check box's properties and in the Options tab choose "Cross" as the check box style.

  • BUG in DB XML? (when dealing with modules, user-defined functions)

    Hi,
    this post can be related to Different results for the semantically the same queries but here examples are even simpler.
    I have the module with one user-defined function:
    module namespace tnt = "http://tntbase.mathweb.org/ns";
    declare function tnt:filter-path($docs as document-node()*, $path as xs:string) as document-node()*{
      $docs[dbxml:metadata('tnt:path') = $path]
    };Then I have a query:
    import module namespace tnt = 'http://tntbase.mathweb.org/ns'  at 'file:/path/to/module/user-func.xq';
    (: this variable is IMPORTANT in the query:)
    declare variable $len := 3;
    (: here goes the same function as in the module, but with different name :)
    declare function tnt:filter-path2($docs as document-node()*, $path as xs:string) as document-node()*{
      $docs[dbxml:metadata('tnt:path') = $path]
    (:the query itself :)
    tnt:filter-path(collection("xml_content.dbxml"), substring("a:/doc.xml", $len)) If I execute the query I get *0* results, if I use function tnt:filter-path2 (instead of module's tnt:filter-path) then I get the expected *1* result.
    Also I experimented a bit with a query and got the following observations (independent from each other):
    1) If I substitute $len by value *3* or *3.0*, then I get right results in both cases, i.e. if the query itself looks:
    tnt:filter-path(collection("xml_content.dbxml"), substring("a:/doc.xml", 3)) 2) If I change the module's function so that it uses value comparison instead of general comparison, then I get the right results in both cases as well:
    module namespace tnt = "http://tntbase.mathweb.org/ns";
    declare function tnt:filter-path($docs as document-node()*, $path as xs:string) as document-node()*{
      $docs[dbxml:metadata('tnt:path') eq $path]
    };Please, help me out! I'm pretty sure it's a problem of DB XML and I'm struggling with it for a long time in this or that shape.
    Thanks a lot in advance,
    Vyacheslav

    I upgraded from 2.5.13 to 2.5.16 and the bug disappeared. The reason why I didn't do it before was that I hadn't seen any relevant for me fixes in the release notes of 2.5.16 comparing to 2.4.13 (Actually I already have had two patches for two relevant issues in the 2.5.13 version)
    Sorry for the false alarm.
    Vyacheslav

  • Problem Occurs when CFL is added with User defined field

    form-672-BOM
    item-3-datagrid
    U_EmpNo - user defined field column
    if i will give following codes under form load event will CFL bound with U_EmpNo
    or else plz suggest me with write codes
    oForm = SBO_Application.Forms.Item("672")
                oItem = oForm.Items.Item("3")
                oClmn = oItem.Specific
                oClmns = oClmn.Item("U_EmpNo")
                oClmns.DataSources.UserDataSources.Add("U_EmpNo", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
                MessageBox.Show("Did")
                AddChooseFromList()
                oClmns.DataBind.SetBound(True, "", "U_EmpNo")
                oClmns.ChooseFromListUID = "CFL1"
                oClmns.ChooseFromListAlias = "CardCode"

    hi

  • User Defined Field with Link Type

    Hi,
    I am trying to create a user defined field to allow users to attach word documents to Item Master Data.
    I have successfully created a User Defined Field under master data with Type: Data, Structure: Link.
    It appears in the Item Master Data as I would expect. My questions relates to how to use this field. The first time I click on the field, a file browser window appears where I can select a file. Once I select the file I want I click ok and the path to this file appears in the field. The next time that I click on the field the file will open in its respective application.
    My question is: How when the field already contains a path to a file do I change this path so it points to a different file.
    Any help I can get on this would be greatly appreciated.
    Thanks
    Brian

    Hi,
    If you hold down Ctrl on your keyboard and then double click in the link it will allow you to browse to a different file.
    Regards,
    Adrian

  • Bind Additional User Defined Fields at Fixed Assets

    Hi, i already created additional user defined fields at fixed assets table, but i don't know how to bind the fields into edit text. i try to do like below :
    otext.DataBind.SetBound(True, "@BA_OAMD", FieldName)
    And also when i add a few new edittext at the fixed assets form, the screen will keep blinking during added that object, can i did something to freeze the form ? I already try to freeze the form but doesn't work

    Hi Benny,
    1. you have to catch the changing of record and then make refresh of your datasource.
    Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
            If pVal.MenuUID = "1288" Or pVal.MenuUID = "1289" Or pVal.MenuUID = "1290" Or pVal.MenuUID = "1291" Then
    -- refresh of datasource
    end if
    2. if you need to dont see update after changing value, set to the textbox .AffectsFormMode  = false
    If helps you reward points.
    Petr

Maybe you are looking for

  • Brand new MacBook Pro doesn't get past grey screen (with spinning gear)

    Hello, I'm a new Apple customer - I bought a new 15" MacBook Pro during the Black Friday sale last week. Since purchase, I've installed the software I needed (Office, CS4) and have used it to browse the web and write emails. Today when I tried to use

  • Displaying characters on the Web

    Hi All, I have this script that brings data from a DB. <?php $conn = oci_connect('my_user', 'my_pwd', 'my_db'); $stid = oci_parse($conn, 'select arabic_name from emp where id = 1'); oci_execute($stid); echo "<table>\n"; while (($row = oci_fetch_array

  • Interactive pdf without any page transition, only hyperlinks

    Hi, I wanted to export an interactive pdf but I can't lock the page transition. Is that possible to have a document which you only can navigate with hyperlinks? Kind regards

  • How do i get my Ipad to read exFat cards?

    How do i get my´Ipad to read exFat cards?

  • Title editing and FX application.

    Hi. I'm not new to editing but new to editing with Premiere Pro. I'd like to key frame and control the titles that I create for video. For example I would like to keyframe the kerning so the title's kerning can animate or I'd like to keyframe the opa