cancel
Showing results for 
Search instead for 
Did you mean: 

SetValue

Former Member
0 Kudos

How to give SETVALUE in system form.. i had added a control in that form......

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Badri,

U cannot give SETVALUE for system form either u can assign as

PO_Frm.Items.Item("t_vfrom").Specific.Value = "[some value]"

Regards,

Anitha

Former Member
0 Kudos

Hi,

Thanks for quick response....i am not going to give SETVALUE for system form... In that system form i had placed a text box, for that i want to give SETVALUE.....

Former Member
0 Kudos

This is my function



 Public Function LoadControl()
        Try
            Dim objRs As SAPbobsCOM.Recordset = objCom.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            Dim DataSource As SAPbouiCOM.DataSource = objFrm.DataSources.DBDataSources.Item("OPOR")
            objRs.DoQuery("select (max(U_ID)+1) as num from [OPOR]")
            Debug.Print(objRs.Fields.Item(0).Value)
   


SETVALUE


System.Runtime.InteropServices.Marshal.ReleaseComObject(objRs)
            GC.WaitForPendingFinalizers()
            GC.Collect()
            objRs = Nothing
            Return True
        Catch ex As Exception
        End Try
    End Function

Nussi
Active Contributor
0 Kudos

Hi,

Set the EditBox direct.

lets say you want to set the Supplier TextBox in the Purchase Order

Supplier Box has the ItemUID "4"

c# code:

((SAPbouiCOM.EditText)(oForm.Items.Item("4").Specific)).Value = objRs.Fields.Item(0).Value.ToString()

thats the way, Anitha was right, she just was posting the code in VB6.

regards

David

Former Member
0 Kudos

objFrm.Items.Item("txtNo").Specific.----


After SPECIFIC there is no VALUE property....... I am creating number field...

Nussi
Active Contributor
0 Kudos

Hi,

in vb.net it should be similar to the c# code i posted

((SAPbouiCOM.EditText)(oForm.Items.Item("txtNo").Specific)).Value

try it

regards

David

former_member209699
Contributor
0 Kudos

objFrm.Items.Item("txtNo").Specific.----


After SPECIFIC there is no VALUE property

But in VB you r free to write .Value It will give you required output.

regards:

Sandy

Answers (1)

Answers (1)

Nussi
Active Contributor
0 Kudos

Hi Sridhar,

Anitha is right, as long as your added "control" is not a grid/matrix that has a DataTable behind.

so - whats your control ?

regards

David