cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Manual Series in SeriesCombo

Former Member
0 Kudos

Hi All,

I have Created a Table With Documents and DocumentLines Object.I have Registered it in the UDO.Then I Specify the Manage series.Then i created a combobox in my .srf form and bind it to the default Series field.

Then i have added the ValidValues to the combo as follows :

oSeriesCombo.ValidValues.LoadSeries(oForm.BusinessObject.Type, SAPbouiCOM.BoSeriesMode.sf_Add)

By doing this i got only the default series.My requirement is, I want the Manual series along with the default series as like in SAP Documents form.Please help to solve my problem.

Thanx in advance

Mohana

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mohana,

What i did was added a new UDF in the UDO header table as U_Series and binded my combo box to that field and added the values "Primary" and "Manual". I get the value Primary frm the series(NNM1) defined table.

Hope it helps,

Vasu Natari.

Former Member
0 Kudos

Hi ,

I have Searched for this in SDK tutorial.They specified as like this :

'// create a combo box for the series oItem=oForm.Items.Add("SeriesName",SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)

'// fill the combo box with relevant series

oComboBox.ValidValues.LoadSeries("SERIES", sf_Add) '// new method

oComboBox.DataBind.SetBound(True, "@MATH", "Series")

'// edit text the hold the numbering of the series

oItem = oForm.Items.Add("SrValue", SAPbouiCOM.BoFormItemTypes.it_EDIT)

oEditText.DataBind.SetBound(True, "@MATH", "DocNum")

'// get the next series number in add mode

lNum = oForm.BusinessObject.GetNextSeriesNumber(CLng(str))

oEditText = oForm.Items.Item("SrValue").Specific()

oEditText.String = lNum

I have created like the above.But iam not getting the manual in the combo.How sould i achieve this...I want to bind to the default series field.Although, i have registered in UDO.If i add manually "Manual" series to the combo, while adding the document number is repeating.i.e If i add a manual entry for docno = 1,then next time if the docnum for the default series is 1, then i have incremented the docnum value by 1.but it is not accepting the incremented value.so, the docnum is repeating.please help me to solve my problem.

Thanx in advance

Mohana

Former Member
0 Kudos

Hi,

I have not seen this sample but what i do is that for my combo i add all the series defined in the company i get that data from the NNM1 table, and after all the defined series are filled in the combo i just add Manual at the end. And in the add mode when the user selects Manual he will be able to enter the required doc no, later when he again selects the required series i get the next no from the database only for that series. Thats how i do it. The following is the code that i use.

'Adding Series to Combo Box
oComboBox = oForm.Items.Item("cmbSeries").Specific
strSQL = "SELECT SeriesName FROM NNM1 WHERE ObjectCode = 'EMR_UDO_01'"
objRecSet.DoQuery(strSQL)
For i As Integer = 0 To objRecSet.RecordCount - 1
      oComboBox.ValidValues.Add(objRecSet.Fields.Item(0).Value, objRecSet.Fields.Item(0).Value)
      oComboBox.Select(objRecSet.Fields.Item(0).Value, SAPbouiCOM.BoSearchKey.psk_ByDescription)
      objRecSet.MoveNext()
Next
oComboBox.ValidValues.Add("Manual", "Manual")

Hope it helps,

Vasu Natari.

Former Member
0 Kudos

Hi,

If i chose manual from the combo,i have set the handwritten property to 'Yes'.If i add a document under manual series it is adding.When the document number from the default series reaches the manual number it is not incrementing by 1.so iam getting the document with the same document number but one in primary and the other in manual.How should i solve this issue by incrementing the document number and store the document in the incremented document numb like in SAP documents form.

Thanx in advance

Mohana