Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

clearing combobox in UDO header

Hi all,

I'd like to post this strange behaviour happening inside a user defined form for UDO processing.

i have the following code to clear each combobox in the UDO header:

cmbBPCode.get_ValidValues().Add("0", " ");

cmbBPCode.Select(" ", SAPbouiCOM.BoSearchKey.psk_ByDescription);

cmbBPCode.get_ValidValues().Remove(" ", SAPbouiCOM.BoSearchKey.psk_ByDescription);

cmbStatus.get_ValidValues().Add("0", " ");

cmbStatus.Select(" ", SAPbouiCOM.BoSearchKey.psk_ByDescription);

cmbStatus.get_ValidValues().Remove(" ", SAPbouiCOM.BoSearchKey.psk_ByDescription);

SAPbouiCOM.Form oForm = SBO_Application.get_Forms().get_ActiveForm();

SAPbouiCOM.Item oItem = oForm.get_Items().Item("txtCode");

oItem.set_DisplayDesc(true);

oItem = oForm.get_Items().Item("cmbStat");

oItem.set_DisplayDesc(true);

oForm.Refresh();

oForm.Update();

I need to do that beacuse after adding data into UDO tables, the combobox still holds the previous value.

In other words i got all the form fields cleared except for the combobox in the UDO header.

The above code solved the problem but shows the 0 value rather than the blank description in the combobox!

Is it the only way to do that?

Can anyone help me?

BR

Andrea

Former Member
Not what you were looking for? View more on this topic or Ask a question