cancel
Showing results for 
Search instead for 
Did you mean: 

How to get document number in user created form?

former_member189387
Active Contributor
0 Kudos

Hi All,

I am creating a form.In that i want to maintain Document number for each form(each order)(like in sales order form (Document No. field)).

Please help me to maintain the document number either manually or by system generated.If u have code example please send.

I tried for Manage series and all.But i couldn't get.

Expecting ur reply soon

Thanks

V.Rangarajan

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member189387
Active Contributor
0 Kudos

Hi Adele,

Thanks for ur reply. I have already tried this.I think i am not following the correct steps.

Can u please explain the steps to do that.Like do we need to create UDO like that.

At their example they have given as @math ,how to like this.This

oComboBox.ValidValues.LoadSeries(True, False,0) giving as invalid arguments I tried with

oComboBox.ValidValues.LoadSeries(True, SAPbouiCOM.BoSeriesMode.sf_Add) this also giving problem

Please help me to solve this problem of generation doc number(either manually or primary) in the edit field of userdefined form.

Thanks,

V.Rangarajan

Former Member
0 Kudos

Hi Ranga,

Is your UDO set to manage series now? You said you tried different things. Make sure you have this setting on now.

Hope it helps,

Adele

former_member189387
Active Contributor
0 Kudos

Hi Adele,

Can u explain how to set UDO to manage series?.While i was creating UDO I checked that Manage series.

Please give me the steps

Thanks

V.Rangarajan

Former Member
0 Kudos

Hi Ranga,

It looks like you did the right thing. Go to Administration > System Initialization > Document Numbering and make sure your UDO is in the series list.

Hope it helps,

Adele

former_member189387
Active Contributor
0 Kudos

Hi Adele,

My UDO is in the series List as u specified.It is working with default form.it is displaying in combobox as 32-primary (I just want to display primary as like in sales order form ). I want to get manual numbering also .How to get this?

I check with ordr table if i select primary it's series is 2 .If it is manual it's series is -1.

How can i club it with my own form which i was designed? can u explain this ?

Very very thankful for ur reply.

Thanks,

V.Rangarajan

Former Member
0 Kudos

Hi V.Rangarajan,

I haven't used this code yet, but herewith an extract from the SBO SDK Training material which I think is related to your problem.

// create a combo box for the series oItem=oForm.Items.Add("SeriesName",SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
// fill the combo with relevant series
oComboBox.ValidValues.FillWithSeries(True, False, 0) new method
oComboBox.DataBind.SetBound(True, "@MATH", "Series")
// edit text to 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 don't know if this will solve your problem, but hopefully it will put you on the right track.

Hope it helps,

Adele