cancel
Showing results for 
Search instead for 
Did you mean: 

DI API Problem in Patch 30-SAP 2007 A

Former Member
0 Kudos

Hi,

I have created one UDF in the marketing documents(Type combo box and i set the default value to "-","-") and i am try to assign the new value to the UDF through DI API . I am getting the following error,

" 3 is not a valid values for property "U_BPProj". The valid values are "-","-"

Here 3 is my value.

my Coding

oSalesQuotation.Lines.UserFields.Fields.Item("U_BPProj").Value = strBPProject

oSalesQuotation.update

I am using 2007A patch Level 30.

Thanks and regards

Senthil.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi senthilkumar,

I must to add the value 3 in the ValidValue of the combobox before update.

oCombobox.ValidValues.Add("3", "3");

and then you can update your form.

Hope i help you

Michael

Former Member
0 Kudos

Hi Michael,

Find the below scenario.

1. I have crated one UDF in Marketing document Lines (U_BPProj) and assign one valid value ('-','-') at the time

of creation.

2. I am opening the Sales Order, During the Form Load i have filled the U_BPProj combo box column with 10 number of values.

No issues on this, I can able to select the new values from the UDF and i have update the Sales Order manually , then the values are stored in the RDR1 table.

The problem is ; I have tried to update U_BPProj UDF with new values for existing Sales order lines using DIAPI, I have faced the mentioned error message.

Could you please give me your suggestions.

Actually This was working fine in Patch Level 15 but not in Patch 35 and 37.

Regards

Senthil.

Former Member
0 Kudos

Senthil,

as I wrote you already, when the value isnt inside valid values for user fieůd, you will be not able to store them. Maybe in lower patch it worked, but it was bug.

Before adding the new value you must exceed the valid values list for user field as

oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)

oUserFieldsMD.TableName = "table"

oUserFieldsMD.Name = "name"

oUserFieldsMD.ValidValues.Add(values)

oUserFieldsMD.Add()

Answers (0)