Why SAP B1 set all form item property of "Enabled" to true automatically?

When I set some items property of "Enabled" to false in a user define form in the form load event.
But now I click some editable item and type some thing in the edit text bar, I see all of uneditble item suddenly can be edit. It's not convenient, means we need to more coding work about this.

Hi Alan,
you may set the Form Property
oForm.AutoManaged =False
If it's True all item visible/enabled-propertys are dependent to form mode and they're always switching back to their defined state when the mode changes.
If you want to use the oForm.AutoManaged =True then you can define exactly the behavior of the items in each mode:
            Dim modeMaskFind As Integer
            Dim modeMaskOk As Integer
            Dim modeMaskAdd As Integer
            Dim colUid As String
            Dim oCbx As SAPbouiCOM.ComboBox
            oForm.AutoManaged = True
            oForm.SupportedModes = _
                     SAPbouiCOM.BoAutoFormMode.afm_Ok Or _
                     SAPbouiCOM.BoAutoFormMode.afm_Add Or _
                     SAPbouiCOM.BoAutoFormMode.afm_Find
            modeMaskFind = SAPbouiCOM.BoAutoFormMode.afm_Find
            modeMaskOk = SAPbouiCOM.BoAutoFormMode.afm_Ok
            modeMaskAdd = SAPbouiCOM.BoAutoFormMode.afm_Add
           With oForm.Items
                .Item("CBX_YEAR").SetAutoManagedAttribute( _
                       SAPbouiCOM.BoAutoManagedAttr.ama_Editable, modeMaskAdd, _
                       SAPbouiCOM.BoModeVisualBehavior.mvb_True _
                ) ' editable in AddMode
                 .Item("CBX_YEAR").SetAutoManagedAttribute( _
                         SAPbouiCOM.BoAutoManagedAttr.ama_Editable, modeMaskFind, _
                         SAPbouiCOM.BoModeVisualBehavior.mvb_False _
                 ) ' NOT editable in FindMode
                .Item("CBX_YEAR").SetAutoManagedAttribute( _
                       SAPbouiCOM.BoAutoManagedAttr.ama_Editable, modeMaskOk,  
                       SAPbouiCOM.BoModeVisualBehavior.mvb_True _
                 ) ' editable in OKMode
                .Item("CBX_YEAR").AffectsFormMode = True
            End With
Cheers,
Roland

Similar Messages

  • Forms 10g : How to set the Database Item property for an item dynamically ?

    Hello all,
    I have a requirement where I need to set the database item property of an item to TRUE/FALSE
    dynamically at runtime based on certain conditions.
    Earlier, in forms 6i I've used,
    Set_Item_Property (<item_name>, DATABASE_ITEM, PROPERTY_TRUE);
    But in Forms 10g it doesn't recognize this Database_Item property and gives a compilation error.
    Have I overlooked something or has this property become obsolete in Forms 10g ?
    If obsoleted what is the replacement property ?
    Regards,
    Sam

    Some options:
    1. Create a database-view, including the "real" column in databases where it exists and a "dummy"-column in databases where it doesn't exist.
    If that's not possible,
    2. set database="No" for your item and
    -- create a POST-QUERY-trigger which reads the data for that column from the database, if the column exists, and
    -- create a ON-UPDATE-trigger which includes an
    UPDATE_RECORD;
    UPDATE THETABLE SET
      THECOLUMN=thevalue
    WHERE  ROWID=:THEBLOCK.ROWID;3. Base your block on either a select-from-clause, a ref-cursor or a procedure to adjust he query-part,, for saving use a procedure.

  • Set item property to false and true

    when i set item to false and then set item property to true. The item is displayed but its gray out and not enabled. Am i missing something
    Set_Item_Property('PUSH_BUTTON_SAVE',VISIBLE,PROPERTY_FALSE);
    and then
              Set_Item_Property('PUSH_BUTTON_SAVE',VISIBLE,PROPERTY_TRUE);

    Check the Forms online help on Set_Item_Property, near the bottom in the usage notes. Lots of things happen when you set visible to False:
    Setting DISPLAYED to False:
      sets the Enabled and Navigable item properties to False
      sets the Updateable item property to False
      sets the Update_Null item property to False
      sets the Required item property to False
      sets the Queryable item property to False
    So you may need to set more of them back to true in your code when you want to make it re-display.

  • Set Synchronize with Item property at runtime in Forms

    Hi,
    We have a requirement to set the "sychronize with item" property to null for one of the fields of seeded form during run time (this is to avoid modifying the seeded form which has the synchronize property of field A set to field B. We are planning to do this change in CUSTOM.PLL). I couldn't find any property in "APP_ITEM_PROPERTY2.set_property" which can suffice my requirement. I am working on Forms 10g.
    Please let me know if anybody has worked on similar requirement.
    Thanks,
    Shree

    Hello.
    You can perform this by using:
    set_tab_page_property('Tab_page_name', label,'your_desire_label');
    and for item set_item_property.
    More details on these built-ins and also some example can be found in Forms Builder Help.
    Regards,
    Alex
    If someone's answer is helpful or correct please mark it accordingly.

  • Why SAP keEp editable Contract FIELD /ITEM in the workarea sourcing cockpit

    Hi All
    Why SAP kept editable (easy to enter) a contract in the work area of the sourcing cockpit.
    since buyer may enter irrelavant contract w.r.t shopping cart right.
    Any specific reason?
    Unfortuntaely buyers enter any contract which is not relavant to contract details to create a PO...
    PO also successfully created w.r.t contract and PO release values are updated in contract too.
    Hope that for specific reason SAP kept the same as easy enter. why?
    buyers can use  propose source of supply right? why SAP made it editable entry here .Why design kept CONTRACT entry become manual. here . it really confuses me .
    Thanks
    Muthu

    Thanks SAP 1290196  :-No Validation of Material Group in Contract item in Sourcing
    muthu

  • Get All Form Items Procedure

    Dear All,
    i would like to create a procedure to retrieve the form items and save it into a table.
    i.e:
    create procedure retrieve_form_item( form_name in varchar2)
    begin
    code..........................
    for loop
    insert into table t1
    values( block_name.item_name);
    end;
    end procedure;
    and i will send the fmb to the procedure to call the form and then do the processing to get all the informations i need
    thanks all

    Example:
    PROCEDURE data_insert IS
    fm_id formmodule;
    bk_id BLOCK;
    bk_name VARCHAR2(200);
    item_id item;
    item_name VARCHAR2(200);
    item_value varchar2(2000);
    item_type1 varchar2(200);
    lv_retcode VARCHAR2(1);
    lv_errmsg VARCHAR2(2000);
    BEGIN
    fm_id := Find_Form(NAME_IN('System.current_Form'));
    bk_name := Get_Form_Property(fm_id,FIRST_BLOCK);
    WHILE bk_name IS NOT NULL LOOP
    bk_id := Find_Block(bk_name);
    item_name := get_block_property(bk_id,first_item);
    WHILE item_name IS NOT NULL LOOP
    insert into table2 values ......
    item_id := find_item(bk_name || '.' || item_name); -- this important,if you have same name item2, please : blockname.item_name
    item_name := get_item_property(item_id,nextitem);
    END LOOP;
    bk_name := Get_Block_Property(bk_id, NEXTBLOCK);
    END LOOP;
    END data_insert;
    Message was edited by:
    DanielLiang

  • Set all Tab pages property

    Hi All,
    Does anyone know how can I loop through all tab pages in a form (10 tab pages) and set the visible property in run-time.
    Thank!

    There is no direct way to do this. You can be sneaky and iterate through each block and then each item in the form using the get_item_property(...,NEXTITEM), then call get_item_property with the CANVAS_NAME attribute, and build up a map of the canvases that way.
    Or you can just take the low tech solution of using a naming convention such as WINDOW0_TAB1, WINDOW0_TAB2 etc, then use FIND_CANVAS to loop through those until you get a NULL canvas ID (use ID_NULL() for this)

  • Why is siri setting all reminders for july 4th

    Siri is understanding and putting down everything I say.  But when it goes to set the reminder, no matter if I specify the month and day, or say tommorow, it sets it as July 4th. Ive done a shut down, and hard reboot, nothing is working.  Any help?

    I appreciate how patriotic Siri is, but I need it to work.  Anyone have any ideas?

  • Is their a activeX api function to set the database option "database logging enabled" to true or false?

    Hello!
    I want to decide dynamically while running a sequence to log the results to a database or not.
    So I need to set the "database logging enabled" property by a activex function call.
    Does a activex api function exist? I didn't found one, or is their an other way to change the property value?
    Thanks and regards
    M. Brosig

    Hi,
    Ah! I understand.
    You can change the runtime properties from you sequence or inside your step by using the Lookup string of
    "RunState.Caller.Locals.DatabasesOptions.DisableDatabaseLogging"
    Use the TS API  PropertyObject.SetValBoolean("DatabasesOptions.DisableDatabaseLogging", 0, newValue) method with RunState.Caller.Locals as your ActiveX Reference. (where newValue would be True or False.)
    Depending at what level you perform this API method depends how many "RunState.Caller" you have in your lookup string.
    eg.
    My example of
    PropertyObject.SetValBoolean("DatabasesOptions.DisableDatabaseLogging", 0, newValue) with RunState.Caller.Locals as your ActiveX Reference is based on a step in MainSequence which has been called by the Process Model sequence.
    If you have a step in a Sub-Sequence of MainSequence then the lookup string would be
     "RunState.Caller.RunState.Caller.Locals" as the activeX reference.
    Hope this helps
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Setting ToolTips for items which are disabled.

    Folks,
    No offence meant if this is a repeat.
    I have a JPopupMenu with Action as its components.
    1) I have disabled certain menu items to false.
    2) I would like to use a ToolTipText to show a message 'You have no permission'
    when the user hovers over the menu items which are disabled/set to false
    3) I wrote my own ToolTipText,but what is happening is that I am getting the tool tip text
    for all menu items.
    Please can anyone help me in how to get tooltiptext for menu items which are enabled to false?
    Help much appreciated
    // JPopupMenu
    JPopupMenu pm = new JPopupMenu();
    // Add Action
    pm.add(new GraphAction());      
    pm.add(new DescendantsAction());
    pm.add(new DebugAction()).setEnabled(false);
    ToolTipTextForMenuItems.setToolTipForIndividualItem(pm.getComponent()) // Does not display any Tool Tip.
    pm.add(new ResetAction()).setEnabled(false);
    ToolTipTextForMenuItems.setToolTipTextForMenuItem(pm); // Shows ToolTipText for all menu items (disabled and enabled)
    ToolTip Code
    public class ToolTipTextForMenuItems {
    private static final String TOOL_TIP_TEXT = "You have no permission";
         public static void setToolTipTextForMenuItem(JPopupMenu popupMenu){
                 for (int i=0; i<popupMenu.getComponentCount(); i++){
                    Component c = popupMenu.getComponent(i);
                    if (c instanceof JComponent) {
                              ((JComponent)c).setToolTipText(TOOL_TIP_TEXT);
         public static void setToolTipForIndividualItem(Component c){
               if (c instanceof JComponent) {
                         ((JComponent)c).setToolTipText(TOOL_TIP_TEXT);
    }

    Yes,I have looked at the Abstract Action code sent in
    I have not used Action and Abstract Action before,hence if you can/could just
    modify this as per my requirement,then I can enhance on this.
    No offence meant for the above
    Thanks

  • Link to Who-is-who from XML Form item

    How can I make a link from a user name to the user details of the who is who from a XML Form item? I see this functionality automatically in KM collection renderers but in the XML Form Builder I only see the option to link to the e-mail (Display name as E-mail link).
    Thanks in advance.
    Best regards,
    Eric

    Eric,
    adding a link to user details in a XMLForm item is not possible at the moment.
    But this a reasonable request and maybe we can add this feature in one of the next SPs or release.
    Regards, Roland

  • Why the "Synchronize with Item" property don't save?

    I created that table :-
    create table syn (col1 number , col2 number);
    and in forms 6i ..... I determinate col1 as the value for "Synchronize with Item" .
    http://img169.imageshack.us/img169/6258/synar6.png
    and when I test it in runtime , it work correctly and after I saved the data and get out of forms and went to database to ensure the data existing ... I surprised that the data in col2 not existing at all .... wholly empty
    SQL> select*from syn;
    COL1 COL2
    1
    2
    3
    4
    5
    6
    7
    8
    8 rows selected.
    why the item (COL2) don't save the data that inserted into it automatically by "Synchronize with Item" property ????

    i should use copy property not Synchronize ?That's meant for copying values from master to detail, so it would probably not work as you want within the same record. I think you should set the value of the secondary item in pre-insert and pre-update triggers, depending on what you're actually trying to accomplish?

  • How to set the item property to restrict the user to not to copy from above

    Hi Guru's,
    I have a requirement like, There were two items on the form name email Id, Confirm email Id.
    I have to ristrict the user to not to copy from email Id item.. make him/her to enter the value into confirm email id item field manually.
    How to set the item property to restrict the user to not to copy from above item and paste it in this item.
    Please help.
    Thanks!!

    Just an opinion here, but that is about the dumbest requirement I have ever seen.
    I am always annoyed by web sites that ask me to enter my email twice. I ALWAYS copy the email address from the original entry and paste it into the second one.
    People enter their email addresses so often, it takes a real klutz to not get it right. And what makes you think that if they enter it twice, that they won't enter it wrong both times anyway???

  • Setting all items's case to uppercase

    hi all
    can somebody please help me in this problem
    suppose i have 50 items in a form
    and i want all these items to accept text in uppercase
    can i do it with one program or making any procedure??
    is there any way out there
    or i simply hav to change the property of all the 50 items
    regards
    Tinks

    Apply this code in When-New-Item-Instance trigger.
    IF Get_Item_Property( :SYSTEM.Trigger_Item ,Item_Type) = ('TEXT ITEM') THEN
    Set_Item_Property( :SYSTEM.Current_Block ||'.'|| :SYSTEM.Current_Item, Case_Restriction, UpperCase);
    End if;
    Regards

  • Why does my ipod no longer play all the items in a playlist?

    Why does my ipod no longer play all the items in a playlist?  I have to go to each item individually to select it as it no longer goes from one item to the next.

    what kind of connection do you have? do you use the ipod 30 pin cable that connects directly to the head unit? it so, maybe you could get help on the alpine site, or a similar site?it could just be a bad connection. you may just have to go oldschool and use rca cables and plug those in...

Maybe you are looking for

  • Unable to close the posting periods in MM

    Hello while using MMPV  the system says that the date not current calender year. If I check OMSY the  open year is 2002.I need to know that how you close the open periods of previous years.I am supposed to close all the periods one by one but how to

  • Menu not visible on ibook G4?!

    We i burn a disc (using DVDSP) it plays on my machine (powerpc G5) and most other machine with the exception of ibook G4s (does work on G3s). when trying to play on ibook G4 the menu is black (not visible) but i can mouse over where the button should

  • How can I transfer the music in my old Ipod classic to a new Ipod, not only the Itunes purchases?

    How can I transfer the music in my old Ipod classic to a new Ipod (not only the Itunes purchases)?

  • Best Options For Re-Orderable Table

    Hello,I am creating an interface for our HR team to create job postings on our website, and I am running into trouble with one portion of the C#.NET web application.The way this is set up is, we have 6 sections, and they enter bullet points under eac

  • Officejet 7210 all-in-one

    I've had this printer for about 5 years, running on an XP system.  I recently purchased a new computer running on Windows 7.  Windows 7 found drivers to run the printer and it is up and going fine.  However, I've lost the ability to scan with the pri