Skip to Content
author's profile photo Former Member
Former Member

Form Item NotEditable

Hi All,

For A/R Invoice form's Item grid added Dimension1 to the grid.I need to set the Dimension1 to a default value .But I am getting the error as "Form Item Not editable" .So Updated the Table CPRF with the query

"UPDATE CPRF SET EDITINFORM = 'Y' WHERE FormId=133 and ItemID=38 and ColId=2004"

After this also i am getting the same error.

My code is :

if (pVal.FormType == 133 )

{

if ( pVal .ItemUID =="38" & pVal .ColUID =="1" & pVal.EventType == SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST & pVal.Before_Action == false)

{

try

{

oForm = SBO_Application.Forms.Item(pVal.FormUID);

SAPbouiCOM.ComboBox ddlBranch = (SAPbouiCOM.ComboBox)oForm.Items .Item ("ddlBranch").Specific ;

SAPbouiCOM.Matrix omatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("38").Specific;

SAPbouiCOM.EditText txtCostCenter = (SAPbouiCOM.EditText)omatrix.Columns.Item("2004").Cells.Item(omatrix.RowCount).Specific;

txtCostCenter.Value = ddlBranch.Selected.Description ;

}

catch (Exception e)

{

SBO_Application.MessageBox(e.Message, 1, "Ok", "", "");

}

}

}

Please give me a solution.

Regards,

Susan

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 09:12 AM

    HI Susan

    The value is a read only property of the EditText object.

    Use string to set up the value.

    Correct code:

    if (pVal.FormType == 133 )
    {
    if ( pVal .ItemUID =="38" & pVal .ColUID =="1" & pVal.EventType == SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST & pVal.Before_Action == false)
    {
    try
    {
    oForm = SBO_Application.Forms.Item(pVal.FormUID);
    SAPbouiCOM.ComboBox ddlBranch = (SAPbouiCOM.ComboBox)oForm.Items .Item ("ddlBranch").Specific ;
    SAPbouiCOM.Matrix omatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("38").Specific;
    SAPbouiCOM.EditText txtCostCenter = (SAPbouiCOM.EditText)omatrix.Columns.Item("2004").Cells.Item(omatrix.RowCount).Specific;
    txtCostCenter.String = ddlBranch.Selected.Description ;
    }
    catch (Exception e)
    {
    SBO_Application.MessageBox(e.Message, 1, "Ok", "", "");
    }
    
    }
    }
    
    
    

    Regards

    J.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.