Skip to Content
0
Sep 08, 2010 at 04:26 PM

A question about CFL on an UDF

53 Views

Hi,

I have UDF field on system form and I want put CFL on this UDF. From the SDK sample, I need to do below steps:

1. Adding a User Data Source

oForm.DataSources.UserDataSources.Add( "EditDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254 );

2. Create a CFL object

3. Create a textbox and link this textbox to the datasource "EditDS"

oEditText.DataBind.SetBound(true, "", "EditDS");

4. Assign the CFL ID/ CFL alias to this textbox

5. In Item event, get the value from CFL and assign the value to datasource on the form.

But my question is because this is a UDF, so i also need to link this textbox to this UDF by below code:

oEditText.DataBind.SetBound(true, "system_table_name", "my_udf_name");

I have to call SetBound time times in my AddOn, now I found when I choose a row in the CFL window and the AddOn tries to assign the value to the datasource, it doesn't show up on the textbox.

Any suggestion?

Thanks!

Lan