on 03-13-2009 9:20 AM
Hello community,
I am just getting started with AIF and everything looks great and works except one thing:
I have a table with different fields. One of this fields - a combobox - is bound. This works for my first line. When I am now creating dynamically a new line/instance the binding seems not to be active any more. I am just able to add items to the combobox but don't know how to bind the combobox to the same data from the first line that I bound in the development environment.
So my question is: When I create a new instance. Should the binding be active for this instance like it is for the first line of the record? If not, is it possible to bind the records via JavaScript to the combobox of the new instance or do I have to loop through all my records and add everytime a single item?
Could someone bring some light into my darkness?
Thanks,
Vanessa
Hello Vanessa,
what type of scenario are you working on? ABAP WD = online form? Maybe you can add some details to help us understand your problem.
Regards Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vaneesa..
sorry i m not working in JavaScript. so please try to understand the logic. i know it will help u alot.
Thanx
Best Regards.
Rizwan Khan
Public Sub AddDataSourceToForm()
'//****************************************************************
'// every item must be binded to a Data Source
'// prior of binding the data we must add Data sources to the form
'//****************************************************************
'// Add user data sources to the "International Phone" column in the matrix
oUserDataSource = oForm.DataSources.UserDataSources.Add("IntPhone", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
'// Add DB data sources for the DB bound columns in the matrix
oDBDataSource = oForm.DataSources.DBDataSources.Add("OCRD")
End Sub
Public Sub BindDataToForm()
'// getting the matrix column by the UID
oColumn = oColumns.Item("DSCardCode")
'oColumn.DataBind.SetBound(True, "", "DSCardCode")
oColumn.DataBind.SetBound(True, "OCRD", "CardCode")
oColumn = oColumns.Item("DSCardName")
oColumn.DataBind.SetBound(True, "OCRD", "CardName")
oColumn = oColumns.Item("DSPhone")
oColumn.DataBind.SetBound(True, "OCRD", "Phone1")
'//************************************************
'// to Data Bind an item with a user Data source
'// the table name value should be an empty string
'//************************************************
oColumn = oColumns.Item("DSPhoneInt")
oColumn.DataBind.SetBound(True, "", "IntPhone")
End Sub
Public Sub GetDataFromDataSource()
'// Ready Matrix to populate data
oMatrix.Clear()
oMatrix.AutoResizeColumns()
'// Querying the DB Data source
oDBDataSource.Query()
'// setting the user data source data
oUserDataSource.Value = "Phone with prefix"
oMatrix.LoadFromDataSource()
End Sub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.