on 09-11-2008 7:55 AM
Hi,
i created one text box(Edit Text) in PO screen. i want to bind this field with ref2 in OPOR table. while binding its showing error
Datasource Not user Datasource. how to resolve this problem..
i used follwing code for binding.
Private oDBDataSource As SAPbouiCOM.DBDataSource
oDBDataSource = oOrderForm.DataSources.DBDataSources.Add("OPOR")
oItem = oOrderForm.Items.Item("Idtxt") // My Edit Text
oedit = oItem.Specific
'oedit.DataBind.SetBound(True, "OPOR", "Ref2") ''Error here
Regards,
Ganesh K
Dear Ganesh Karunakaran,
You could define User-Defined Values on the text box field to link with ref2 in B1 application but not need SDK code.
Best Regards
Jane Jing
SAP Business One Forums team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ganesh,
u replace ur code as follows and try:
Private oDBDataSource As SAPbouiCOM.DBDataSource
oDBDataSource = oOrderForm.DataSources.DBDataSources.Item("OPOR")
oItem = oOrderForm.Items.Item("Idtxt") // My Edit Text
oedit = oItem.Specific
oedit.DataBind.SetBound(True, "OPOR", "Ref2") ''Error here
Kind Regards
Mohana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Sorry for the mistake.U cant bind to DBDatasources.Instead of using DB Datasource use userdatasources.
Private URef2 As SAPbouiCOM.UserDataSource
URef2=oOrderForm.DataSources.UserDataSources.Add("URef2", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 50)
oItem = oOrderForm.Items.Item("Idtxt") // My Edit Text
oedit = oItem.Specific
oedit.DataBind.SetBound(True, "", "URef2") ''Error here
Kind Regards
Mohana
HI Vasu Natari,
i will explain my requirement.i created one text box(Edit Text) in PO screen (For Add-on Purpose) am getting some value in that text box
before adding PO. so am using binding for that text box for future reference. so i planned to save the values in "ref2" filed of OPOR table.(we are not using ref2 field in PO. thats why we planned use that). so i used the specified code above..
Regards,
Ganesh k
Hi vasu Natari,
i think you misunderstanded my scenario. as i told i can able to bind my textbox with UDF(in Marketing Documents) easily without any problem. but i must bind my textbox with "ref2" field of OPOR table.
(i created Edit text field next to Currency selection option of PO)
Thanks in Adavnce,
Ganesh K
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.