How to change UDF value in system form if its invisible or inactive?

Hi all,
I need to compute some document total values and save them on UDFs defined on Sales Order Header document, when the user adds a new order line.
However I must not allow the user to change them (or see them). Also, there are other UDFs on the Sales Order Header that the user must be allowed to change...
Is there any way to control this? If I set a UDF as not 'Active', I cannot change its value with programming.
I'm using the following command to change a UDF value on the Sales Order form:
                    Form form = B1Connections.theAppl.Forms.GetForm("-139", pVal.FormTypeCount);
                    EditText et = (EditText)form2.Items.Item("U_TotalTax1").Specific;
                    et.Value = "10";     // this raises an exception "Form item is not editable"
Is there any other way to change this UDF contents (maybe with datasources? etc)
Thanks all,
Manuel Dias

Hi You can Enable/Disable the item after your transaction. follows the code
oForm.Items.Item("U_TotalTax1").Enabled = True
oEdit.value=10
oForm.Items.Item("U_TotalTax1").Enabled = False
Try this
Manmath

Similar Messages

  • How to change UDF value in created A/R Invoice or A/P Good Receipt PO?

    I have created my UDFs  in Marketing Document Rows.
    After I've added some documents such as A/R Invoice or Good Receipt PO , I want to change my UDFs value for sometime. But  B1 don't let me do that. I know and understand the reason why we can't change this rows data. But I want to change my UDFs  only , so it don't effect any other things.
          How can I do this? or Can SDK help me?
    thx

    You can change with such statement :
    ObjInv.Lines.UserFields.Fields.Item("U_FieldName").Value = "123"
    Edited by: Riny Liu on Mar 17, 2008 5:39 PM

  • Change UDF field on system form to enabled = false

    When doing this, it works fine (on the item master form).  The udfs that I don't want to be editable are disabled (grayed out).  But as soon as anything is typed into ANY field on any pane in the main form or into any of my editable UDFs, the disabled fields immediately become enabled again!  (If I listen for key-down on a field & redisable my UDFS it works, and further entry into any field does not affect the enabled status!  This is obviously no solution, though.  There might be over a hundred fields on this form and it's impratical to listen for key down on all of them!)
    I'm doing this as a proof of concept, and if we get it right, we're likely to sell this customer SAP B1, so I'd really like to get this right!
    So, searching the forum, I see something about SetAutoManagedAttribute & I try setting the editable attribute to false for these fields.  That line of code crashes:
    item2.SetAutoManagedAttribute(BoAutoManagedAttr.ama_Editable, SAPbouiCOM.BoAutoFormMode.afm_Ok, BoModeVisualBehavior.mvb_False)
    with a message: "Exception from HRESULT: 0xFFFFE4A2."
    (NO text with ANY of these HRESULT messages - where can i find info on them?)
    I thought maybe the problem was that I can't use the SET feature for UDFS so I've tried it on the itemcode field itself and this bombs out too!
            <B1Listener(BoEventTypes.et_MENU_CLICK, False)> _
            Public Overridable Sub OnAfterMenuClick(ByVal pVal As MenuEvent)
                Dim form As Form
                form = B1Connections.theAppl.Forms.ActiveForm
                Dim it As Item = form.Items.Item("5")
                Dim pl As Integer = form.PaneLevel
                If pl <> 1 Then
                    form.Freeze(True)
                    form.PaneLevel = 1
                    form.Freeze(False)
                    Try
                        it.SetAutoManagedAttribute(BoAutoManagedAttr.ama_Editable, SAPbouiCOM.BoAutoFormMode.afm_Ok, BoModeVisualBehavior.mvb_True)
                    Catch ex As Exception
                    End Try
                End If
                If form.PaneLevel <> pl Then
                    form.Freeze(True)
                    form.PaneLevel = pl
                    form.Freeze(False)
                End If
    (I saw another post on the forum about not being able to change the visible attribute unless the current pane contained the field being changed, so that's why I'm trying to switch it & switch it back and I've tried the SET command without the panelevel switch and I always get the same error)
    PS I'm at p16  - THANK YOU!

    Hi John,
    Do the UDFs have to be on the Item Master window itself (ie can they be left on the UDF tab)?
    Would this work as a solution?...
    Use the UDF settings to create 2 different UDF categories and assign the 2 different sets to these categories. Then, when the user selects a particular item, your add-on can check the item group and automatically change the UDF category to reflect the correct item group. Sure, it doesn't set the other fields to inactive but it does hide them from the user. Only issue would be if you have other UDFs that are generic (ie non-group specific) as you can only assign a UDF to a single category.
    Kind Regards,
    Owen

  • How to change printer and or system settings to print in color

    How to change printer and or system settings to print in color

    You can change the brightness with an RGBImageFilter which converts the rgb values to HSV, increases the value, and converts back to rgb.

  • How to change margin value in mode booklet printing Adobe Reader X ?

    How to change margin value in mode booklet printing Adobe Reader X ?

    Is this a form you created in Acrobat or is it a form that you're using with Reader? If the latter, there's nothing you can do if the field has been set up to format the field with a £ for the currency symbol.

  • How to change default value in a table using ALTER TABLE

    Hi,
    How to change default value in a table
    I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
    I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
    Any help will be needful for me
    Thanks and Regards

    user598986 wrote:
    Hi,
    How to change default value in a table
    I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
    I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
    ALTER TABLE  test
    MODIFY (indicator DEFAULT 'I'); 
    Incidentally, INDICATOR is a keyword in Oracle, so you may have problems using it as a column name. If so, you'll have to enclose the column name in double-quotes, and be careful to use capital letters inside the quotes.
    Edited by: Frank Kulash on Aug 26, 2009 11:42 AM

  • How to change characterics values in a ready input query ?

    How to change characterics values in a ready input query  base on a real time infocube?
    when  I use  IP to planning I want to change  characterices values that have exit in query?

    Hi,
    On the properties tab of the characteristics (within input query) you can decide what values need to be populated when the query opens.
    Is your exit written on char relationship?
    regards,
    Lokesh Nandula

  • How to change parameters values

    dear gurus,
    can someone guide how to change below values and apply and what steps should taken and changes do in files
    *     Shared_pool_size = 450M
    *     Db_cache_size = 750M
    *     Pga_aggregate_target = 125M
    *     Sort_area_size = 1M
    *     Open_cursors = 4000
    *     Processes = 300
    regards

    Hi If you have set SGA_TARGET and PGA_TARGET , then you dont have to wory for the individual components.Oracle internally handle it .
    You can get the information for each components using below sql
    sql> select * from V$SGA_DYNAMIC_COMPONENTS;
    If you want to find the optimize size of few of above components , take AWR report(by running script @?/rdbms/admin/awrrpt.sql). At below of report you will see SGA Memory Summary,Shared Pool Advisory,SGA Target Advisory,Java Pool Advisory,PGA Memory Advisory . So accordingly you can reset above mention parameters. This will put lower limit for these parameters
    Edited by: amitbansode on Sep 9, 2009 5:07 AM
    Edited by: amitbansode on Sep 9, 2009 5:08 AM

  • How to change variable values ?

    Dear friends,
    How to change variable values when we are broadcasting the Queires ?
    Do we need to change them everytime ?
    Thanks,
    N

    Hi,
    Please go through it.
    /people/ramkumar.ghattamaneni/blog/2008/02/25/using-variables-while-broadcasting-queries-to-the-portal-in-bi-7
    Regards,
    Ramkumar.

  • How to achieve matrix cell value of systems forms matrix ?

    Hi,
    When user types data in perticular cell of matrix in system Form , i want to achieve that data.
    How can i achieve that data ?
    Do any one have some sample code plz. fwd it.
    Regards,
    Ganesh

    Hi Makarand,
    This should do the trick.
    <b>Code (C#):</b>
    public override void Handle_ItemEvent(string FormUID, ref ItemEvent pVal, out bool BubblesEvent)
      /* Switch by eventtype */
      switch(pVal.EventType)
        case BoEventTypes.et_VALIDATE:
          /* Get a matrix object */
          Matrix oMatrix = (Matrix)SBO_Application.Forms.Item(FormUID).Items.Item("MY_MATRIX_ID").Specific;
          /* Get a EditText object for the matrix cell */
          EditText oEdit = (EditText)oMatrix.Columns.Item("COLUMN_ID").Cells.Item("ROW_NUMBER").Specific;
          /* Get the value from the object */
          string sValue = oEdit.Value;
          /* Do other things you like ;) */
          break;
    Hope it helps,
    Rowdy

  • How to get a values from one form to another form

    Hi All,
    I am using oracle forms 10g.
    I have created two forms. First form named as Hotel reservation req and second form named as Hotel Res Summary.
    I the first form i have one field named Requisition_number and I have one button and when i press the button in the first form the summary form is called and it need to bring all the data regarding that requisition_number in first form.
    I have written a query in when button pressed Like this
    declare
    :Global.V_REQ_NO := :XXMBHOTRESREQ_DB.REQUISITION_NO
    type r_cursor is ref cursor;
    c_XXMBHIS r_cursor;
    V_xxmbht XXMB_DOMHTRS_REQ%rowtype;
    begin
    open c_xxmbhis for select * from XXMB_DOMHTRS_REQ where requisition_number=:Global.V_REQ_NO
    loop
    fetch c_xxmbhis into v_xxmbht;
    exit when c_xxmbhis%notfound;
    --dbms_output.put_line (V_XXMBHT.REQUISITION_NUMBER);
    end loop;
    close c_XXMBHIS;
    end;
    And how to refer this to the calling form.
    But now the form is opening and record is not querying can any one correct me where i went wrong.
    Thanks & Regards
    Srikkanth
    Edited by: Srikkanth.M on Aug 19, 2011 6:43 PM

    I the first form i have one field named Requisition_number and I have one button and when i press the button in the first form the summary form is called and it need to bring all the data regarding that requisition_number in first form.If more than 1/4 of your Forms will need the REQUISITION_NUMBER then using a GLOBAL variable makes scense. However, if it is only your Hotel Reservation and Hotel Res Summary forms that will use the REQUISITION_NUMBER then use a Parameter List instead. Global variables are always of type CHAR so you could encounter conversion errors if you don't explicitly cast the value to the correct data type. Parameter object can be of type CHAR, NUMBER and DATE and offer greater flexibility. If you need an example of how to use a parameter list, open the Forms Help system, go to the Search tab and search on "Creating a Parameter List." This article give a brief overview and a list of all the built-ins associated with Parameter Lists. You will need to create a Parameter object in your Hotel Req Summary form to catch the parameter passed via the Parameter List. Then you will need to write code to do something with the value passed (usually in the When-New-Form-Instance trigger).
    Craig...

  • How to change the values in custom profiles based on security group ??

    Hi,
    i am facing problem for my requirement, can anybody help me for below scenario...
    i have custom check in profiles , there are content types and sub types. sub type nothing but a categories on for particular content type. For example i have News content type , same in the below subtypes drop down list are press release, events, articles etc.
    what i want to do is, when i open custom checkin profile, subtype values need to be changed( some values in subtype should hide) based on security group changes .
    In the Sub type listed values, some values need to hide only when i choose different security groups.. sub types values should display based on the particular security group only. when ever i change the security group, drop down Values in subtypes needs to change.
    hope understand my requirement.
    How to achieve this task. Any help would be greatly appreciated.
    Thanks,
    yt

    Hi,
    Thanks alot. its working fine
    Can we configure DCL Relation two times in one information filed ??? i should not create not more than fields to this requirement.
    Type -> subtype = DCL already existed
    Now, i want to Create DCL to
    Subtype ---> Security group
    As per my requirement, if i change the security group in checkin form, values should be change in the SubType drop down list.
    Created checkin profile there was DCL relation to " Type and "Sub Type" . now i want to map Relation ( DCL ) for subtype to security group.
    i was trying do for DCL for subtype and security group. but there was already existing DCL created for subtype information field (Relation configuration done for content type). even though i was trying to do for DCL in Security group information field. but, i could not find security group information field in configuration manager.
    Now what should i do ?? how to create DCL to subtype and security group ??
    Help would be appreciated.
    yt

  • How to change the value of Valuation class.

    dear friends:
    i want to change the value of Valuation class in the material master .but system  warning info occurs .
    The valuation class cannot be changed
    Message no. M3 368
    Diagnosis
    You wanted to change the valuation class. However, this is not possible because one or more of the following already exist for the material:
    Valuated stocks in the current period or in the previous period
    Open purchase orders or delivery schedule lines
    Production orders for which a goods movement has already taken place
    System Response
    Your change is reset by the system.
    Procedure
    If valuated stocks already exist, you can change the valuation class only as follows:
    a) Post the stocks of the material to an interim account.
    b) Change the valuation class in the material master record.
    c) Post the stocks of the material back to their original account.
    If open purchase orders already exist, you can only change the valuation class if you first flag the corresponding purchase order items for deletion.
    If production orders exist for which a goods movement has already taken place, you can only change the valuation class if you first set the status of the production orders to Deleted.
    Procedure for System Administration
    In Customizing for the Material Master, you can switch the check for open purchase orders and/or for production orders to a warning. You do this in Define Attributes of System Messages by assigning the message type Warning to message MM 326 and/or MM 327 respectively. However, first ensure organizationally that further processing of the open purchase orders or production orders cannot result in inconsistencies.

    To resolve SAP error message M3 368 I would suggest that you refer to SAP note number 1967543. This note outlines the issue and a resolution to it:
    Please have a look at the description of the error M3 368. This error may occur if one or more of the following already exist for the material:
    1. Valuated stocks in the current period or in the previous period
    2. Open purchase orders or delivery schedule lines
    3. Production orders for which a goods movement has already taken place
    Resolution:
    If you have valuated stocks in the current period or in the previous period, you will get message "Stocks already exist.". You have to clear all the stocks both in current period and previous period. Please have a look at SAP Note 30656, it shows an example on how to clear the stocks in
    previous period. You can use transaction MIGO to execute this step.
    If you have open purchase orders or delivery schedule lines, you will get message "Purchase orders already exist.". You can find related purchase orders after you click 'Display Error' button. Please delete them in transaction ME22N.
    If you have production orders for which a goods movement has already taken place, you will get message "Production orders already exist.". Please archive these production orders. You need to set deletion flag for these orders firstly and go to SARA, use archiving object PP_ORDER to archive
    these orders.
    Kind regards,
    James

  • How to Change the Value Field Type of a Value Field

    Hi,
    How can I change the value field type from Currency to Quantity of a value field? I have tried to do it in KEA6. I can change the value field and its description, but not the value field type from currency to qty. If I change this config, is there any other changes that I need to make so there is no side issue of this change?

    Hi Prem,
    Once you created value field as quantity or currency, you can not change this nature of value field. Based on this, system creates lots of data and tables. For this reason system will not allow any changes in quantity or currency.
    Alternative way is to remove the old value field and  create a new value field assign to operating concern and put all your seetings.
    Please let me know if you require any clarifications.
    Thank you,
    Regards,
    Santosh
    Reward points if helpful.

  • How to change the value

    Respected,
              I want to change the value of a order which is predefined,how it is done reply with the procedure .

    HI
    my question is very simple if you make an order{va01} for material A it picks the value x in amount column. From where did this value comes from ,where it is stored,what is the transaction code.
    IF my assumption is correct like your asking about the value / Amount of that particular condition Type
    suppose Material is X and maintained the Condition Record (VK11) with your combination
    at the time of Sale Order if you enter the Material with Qty system will take automatically what you maintained in Condition Record
    rate as a amount whether is Price / Discount & Surcharge/ VAT
    if you want to change that value try to check the Corresponding Condition type (T-Code :V/06) select that Condition type and TICK the Amount /Percentage Field 
    At the time of SO system will pick the Pricing Procedure based on the Sales Area + Doc.pricing procedure for Sales Doc.Type + Customer pricing procedure
    if you want to know the table and field name put the Cursor on amount col mum and press F1 or otherwise check in the VBAK, VBAP
    if i am wrong clarify
    Regards,
    Prasanna
    Edited by: prasanna_sap on Sep 13, 2011 1:00 PM

Maybe you are looking for