Skip to Content

How to get document number in user created form?

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



Add comment
10|10000 characters needed characters exceeded

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 31, 2006 at 12:56 PM

    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,


    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 02, 2006 at 06:16 AM

    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.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Adele,

      My UDO is in the series List as u specified.It is working with default 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.