Automatic generation of BP number

hello
i am looking for a formatted search/query that would automatically generate a BP number based on a sequence. does anyone have such a query? would be grateful for some help with this.
thanks

Hi Prem--
Here is one we have used for the same scenario (in this case, leads and customers start with 1 and vendors start with 6).  You have to make the first entry of each type manually, and then the system will add sequentially from that point.
if $[ocrd.cardtype]='L' or $[ocrd.cardtype]='C'
Begin
select max (cardcode+1)
from ocrd where ocrd.cardcode like '1%%'
end
else
begin select max (cardcode+1)
from ocrd
where ocrd.cardcode like '6%%'
END
---test

Similar Messages

  • Automatic generation of serial number at time of goods receipt.

    hi all,
    reqirement is like that-- my client wants to generate the serial no. of material automatically during goods reciept,
    After generation of serial no. by the system the same material will be send to subcontracting vendor by serial no wise.
    when we take the migo of the same material(return  from vendor) serial no should be generated automatically and with reffernce to this serial number material will be sale.
    pls provide me some input regarding customization and business process.
    thanx all.
    regards
    simran tofique

    Hi,
    Use t.code: OIS2, Create Serial Number Profile Z100( Copying from 0001)& have serialization procedure(MMSL) in it. And assign Serial no. profile Z100 to a material in plant Data/Stor-2 view in general plant parameter segment.
    Now create PO with that material and then during GR for that material, you are able to enter serial number in u201CSerial numbersu201D TAB in Detail data and select check box of Create Serial Nos Automatically & post GR document. Now go back and display material document in MIGO and can see serial numbers in u201CSerial numbersu201D TAB in Detail data.
    Regards,
    Biju K

  • Automatic Generation of Serial Number

    Hi,
    i have to generate the serial number automatically with the following pattern XM-1234567.  can anyone guide me how to proceed with (Need Logic to Generate Serial Numbers)
    Thanks & Regards
    Dinesh SUbrahamanyam

    Hi,
    You need to first create a Numebr range object, to create a Number range object goto SNRO transaction code. so here you will generate a Number range object, then in the Program call the NUMBER_GET_NEXT then evey time if you call this number it will give the next number ...
    You can check the below link.
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa0331493111d182b70000e829fbfe/frameset.htm
    Regards
    Sudheer

  • About Automatic generation of Primary key

    I have created one Z table. Its composite primary keys are vkorg
    and Sales Representive Number. I have to assign Sales Representive number
    through system. How it should be done?
    Message was edited by:
            Nilesh Vakil

    Nilesh , You asked the Same question in ABAP General
    Please Refer the link.
    Re: About Automatic Generation of Primary key
    Regards
    Rusidar S
    Message was edited by:
            Rusidar Subramani

  • How to automatically assign a batch number

    Hello experts,
    Our customer have the "Manage Item by" settings on "Batches" and the "Management Method" settings on "On Release Only".
    He don't want to manually generates the batch numbers in Delivery Entry because he would like to have an automatic assignment of batch number like a progressive number for year.
    How can I achieve it using DI API ?
    I have tried to create a Delivery Document using the BatchNumbers object but I got the following error message "the batch number you selected doesn't exists".
    So I created a Goods Receipt for the batch number above and finally the delivery document has been created successfully.
    The issue came out is about the stock quantity for the itemcode because the Goods Receipt have increased it and as result I have the same stock quantity as before the delivery and of course it's not correct !
    I noticed that SAP B1 after the manually generation of batch number it creates a record on the OIBT table using an existing Good Receipt.
    How can I add a batch number in the OIBT table using DI API  without the need to create a Good Receipt ?
    Can someone help me ?
    It would be very appreciated.
    Many thanks for your time in advance.
    Best regards
    Andrea

    Hi,
    Try this code, May be it will help you
    Dim v_StockEntry As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)
                Dim v_StockExit As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)
                Dim str_ProEntryNo As String = oDBDSHeader.GetValue("DocNum", 0)
                'Dim str_DocDate As String = CDate(frmProductionEntry.Items.Item("t_DocDate").Specific.Value).ToString("yyyyMMdd")
                Dim str_DocDate As String = Date.Now
                Dim intStockRowCount As Integer = 0
                Dim FGCost As Double = 0
                Dim RMCost As Double = 0
                Dim RMQty As Double = CDbl(oDBDSHeader.GetValue("U_TotRW", 0))
                '---  RM Exist
                v_StockExit.Comments = "Stock Exit For Production Entry(RM) Production-Entry No: " & str_ProEntryNo
                v_StockExit.DocDueDate = str_DocDate
                v_StockExit.Reference2 = str_ProEntryNo
                intStockRowCount = 0
                For i As Integer = 1 To oMatrix1.VisualRowCount - 1
                    intStockRowCount += 1
                    If intStockRowCount > 1 Then v_StockExit.Lines.Add()
                    v_StockExit.Lines.ItemCode = oMatrix1.GetCellSpecific("ItemCode", i).Value
                    v_StockExit.Lines.Quantity = oMatrix1.GetCellSpecific("Qty", i).Value
                    v_StockExit.Lines.WarehouseCode = oMatrix1.GetCellSpecific("WarCode", i).Value
                    'v_StockExit.Lines.AccountCode = AccCode
                    Dim qty = oMatrix1.GetCellSpecific("Qty", i).Value
                    qty = IIf(qty.ToString.Trim = "", 0, qty)
                    Dim cost = oMatrix1.GetCellSpecific("Cost", i).Value
                    cost = IIf(cost.ToString.Trim = "", 0, cost)
                    Dim PerQtycost = CDbl(cost) / CDbl(qty)
                    v_StockExit.Lines.Price = PerQtycost 'GetItemPrice(oMatrix1.GetCellSpecific("ItemCode", i).Value)
                    Dim ManBtchNum = getSingleValue("Select ManBtchNum  from OITM Where ItemCode='" & oMatrix1.GetCellSpecific("ItemCode", i).Value & "'")
                    If ManBtchNum.Trim <> "N" Then
                        Dim rs As SAPbobsCOM.Recordset = GFun.DoQuery("select * from OBTQ where ItemCode ='" & _
                                                                      oMatrix1.GetCellSpecific("ItemCode", i).Value & _
                                                                      "' and WhsCode ='" & oMatrix1.GetCellSpecific("WarCode", i).Value & _
                                                                      "' And Quantity > 0 order by SysNumber")
                        Dim count As Double = oMatrix1.GetCellSpecific("Qty", i).Value
                        For k As Integer = 0 To rs.RecordCount - 1
                            If CDbl(rs.Fields.Item("Quantity").Value) >= count Then
                                Dim ss = rs.Fields.Item("SysNumber").Value
                                v_StockExit.Lines.BatchNumbers.BatchNumber = _
                                getSingleValue("select DistNumber from OBTN where ItemCode ='" & _
                                               oMatrix1.GetCellSpecific("ItemCode", i).Value & _
                                               "' and SysNumber ='" & rs.Fields.Item("SysNumber").Value & "'")
                                v_StockExit.Lines.BatchNumbers.Quantity = count
                                v_StockExit.Lines.BatchNumbers.Add()
                                Exit For
                            Else
                                v_StockExit.Lines.BatchNumbers.BatchNumber = _
                                getSingleValue("select DistNumber from OBTN where ItemCode ='" & _
                                               oMatrix1.GetCellSpecific("ItemCode", i).Value & _
                                               "' and SysNumber ='" & rs.Fields.Item("SysNumber").Value & "'")
                                v_StockExit.Lines.BatchNumbers.Quantity = rs.Fields.Item("Quantity").Value
                                v_StockExit.Lines.BatchNumbers.Add()
                                count = count - CDbl(rs.Fields.Item("Quantity").Value)
                            End If
                            rs.MoveNext()
                        Next
                    End If
                Next
                If oMatrix1.VisualRowCount > 1 Then
                    If v_StockExit.Add() <> 0 Then
                        StatusBarWarningMsg("Unable To RM Post Stock Document.......   " & oCompany.GetLastErrorDescription)
                        Return False
                    End If
                End If

  • Automatic creation of serial number

    Hello guys,
       In serial number profile, in serializing procedure for PPAU and PPRL i have maintained 4-automatic(creation of serial number) and this serial number profile i have given in workscheduling view of material master.When i create the production order for this material of qty 20,it gives serial number from 1 to 20.And again  i create the production order for it of qty 20,it gives serial number to it from 20 to 40.
       Now my question is,in automatic creation of serial number from where it takes the number ranges.
      Does it take from equipment category which we assign to serial number profile?If not than from where it takes?
             Thanking you guys.

    Dear Jitendra,
    Automatic Serial Numbers come from Number Range Object which is defined in Tcode SNRO. Number range is also defined in SNRO only under number range object for specific purpose.
    You can check in SNRO----> Overview which gives you Overview of Number Range Objects & Number Ranges defined from them.
    So your serial numbers are coming automatically actually defined there only.
    Pls. go through the above.
    Hope this will clarify your doubt.
    If any doubt , pls. revert and reward if useful.
    Regards,
    Tejas

  • Automatic Generation of GR at Time of Purchase Order

    Hi experts,
    Please help me.............................
    What is the " Automatic Generation GR"
    and How the PO with GR is handled?
    Thanks and regards,
    Edited by: Hero on Jan 15, 2008 10:23 AM

    Hi,
    I 'm MM and I want to know how to creation PO automation GR.
    I don't known SAP provides the option of having a GR generated automatically by the system at the time of PO.
    Please help ................... in this case.
    but I know SAP provides the option of having a PO generated automatically by the system at the time of GR and I success it.
    Thank,

  • Question on automatic generation of PO's through ME59 ??

    hi all,
    while automatic generation of PO's from Pr's through me59n i need to check if the PR has OA ( outline agrement ) or contract assigned to it. if only OA or contract is assigned to PR then PO needs to be generated else PO should not be generated.
    to summerize for PR's which does not have contract assigend to it. it should not generate PO's how do i restrict . please let me know.
    Thanks,
    Shiva..
    Edited by: Alvaro Tejada Galindo on Mar 4, 2008 2:44 PM

    Hi,
    For automatic PO creation check the following steps.
    1) Material Master purchasing view tick automatic PO check box
    2) Vendor Master purchasing view tick automatic PO check box.
    3) Maintain Source list for Vendor & Material.
    4) Maintain Purchase Info Record.
    5) Create a Purchase Requisition.
    6) Use T.Code: ME59N & execute for PR for vendor, you will be able to create automatic PO.
    Note:
    1.Ensure that Purchase Info Record should be there.
    2.If you have more than one vendor then fixes only one vendor in source list.
    3.During PR creation select the check box of Source Determination
    Regards,
    Biju K

  • Automatic Generation of classes with required attribute names

    Hi ,
    I am new to XML technologies ...I am having a problem in deciding whether I
    should use JAXB or Castor for data binding.
    The problem is the attributes I am to use are named differently as that found in
    the DTD.I have creted my own classes using the required attribute names and the
    n mapped them using the Castor mapping with the attributes.
    I was wondering how should I achieve --"automatic generation of classes" with th
    e specified attribute names?
    I understand that JAXB can be used to automatically generate classes ,but this
    uses the same default names as that of the XML file ..is there a way of forcing
    JAXB to generate classes that use my name attributes rather than that of the XM
    L dtd
    If I use Castor ..is there a way to do the same.Generate Classes with the specif
    id attributes

    Hi ,
    I am new to XML technologies ...I am having a problem in deciding whether I
    should use JAXB or Castor for data binding.
    The problem is the attributes I am to use are named differently as that found in
    the DTD.I have creted my own classes using the required attribute names and the
    n mapped them using the Castor mapping with the attributes.
    I was wondering how should I achieve --"automatic generation of classes" with th
    e specified attribute names?
    I understand that JAXB can be used to automatically generate classes ,but this
    uses the same default names as that of the XML file ..is there a way of forcing
    JAXB to generate classes that use my name attributes rather than that of the XM
    L dtd
    If I use Castor ..is there a way to do the same.Generate Classes with the specif
    id attributes

  • Self-Diagnosis: Automatic generation of the Include is inactive

    Hi,
    in transaction DSWP > Solution > Self Diagnosis I get warning "Automatic generation of the Include is inactive".
    Do you have any idea to solve this problem and get it green?
    Best regards,
    Andy

    HI   There
    Please check the below note for this issue:
       1533366 - Self Diagnosis: "Old SDCC transaction is still active"
    Best Regards
    Jai wardhan

  • Disable Automatic Creation of Serial Number at GRN

    Dear Gurus
    All my materials are subjected to serial numbers and the serial number profile is activated in the material master.
    At the time of GRN, the serial numbers to be selected from the already uploaded list.
    But there is a option to craete serial numbers automatically ( a check box to tick at MIGO GRN serial number tab)
    Need to deactivate the same as the users tend to tick this by mistake.
    Please guide me on the process.
    Thanks in Advance.
    NalindaR

    Hi  Nalinda,
    You got solve this question? I have the same problem, and I need disable de automatic creation of serial Number in all transactions, because serials nrs are always external. And I could not do anything with the profile of the serial nr in t-code OIS2.
    You can give me some  information that help in this question.
    Thanks in advance.
    Mary

  • Does SRM/ROS or PPS addon support automatic generation of digital certifica

    Hi Experts,
    Does SRM / ROS or PPS addon support automatic generation of digital certificate for suppliers when they get registered in SRM? if not, is there any Badi or standard enhancement spot for the same?
    Otherwise, how the digital certificates are communicated to suppliers to open the digitally signed documents from buyer side?
    Thanks in advance,
    Ranjan

    Disabled the RTC Alarm power, left the computer off overnight. It did not power on. I'm gonna let it go another night or two then I'll consider this issue solved.
    Anatolik I'll take a pint of Red Rocket Ale
    2 Days now and no uncommanded power on. I'll consider this solved.
    Last edited by Naruni (2014-09-22 16:59:52)

  • To stop automatic generation of excise invoice for

    Dear Experts,
    I am creating Profroma Invoice just after Sales Order in export cycle. While saving the proforma invoice, system automatically generates excise invoice.
    Will you please guide me how to stop the Proforma Invoice from automatic generation of excise invoice?
    With regards,
    Jhelum Roy.

    Check the excise group for the transaction.
    The follow the following path in SPRO:
    IMG - LG- Tax on Goods Movements-India-Basic Settings-Maintain Excise Groups
    There uncheck the box EXCISE INV DURING BILLING
    As, this will create Excise Invoice automatically. So, it instructs the system to automatically create an outgong excise invoice immediately you create a commercial invoice or a pro forma invoice. The system creates the excise invoice in the background.
    Also, If you want to make use of this function, you must also define the default plant, excise group, and series groups in Customizing for Excise Duty, by choosing Business Transactions -> Outgoing Excise Invoices -> Maintain Default Excise Groups and Series Groups.
    If that is uncheck already, create & post inv single step indicator
    As, this is automatic posting for J1IS and it instructs the system to automatically verify and post excise invoices that you create using the Excise Invoices for Other Movements transaction.
    Thanks & Regards
    JP

  • Automatic Generation of Activites in Recruitment

    Hi people,
    I have configured custom infogroups for applicant actions such as Enter Applicant details, Put applicant on hold and so on. All the custom applicant actions are working fine, except for the automatic generation of corresponding activity.
    I am using the standard activities and standard applicant status. The features for automatic creation of activity is also standard only, but the corresponding activity is not getting generated automatically.
    Am I missing some config here. Your help will be appreciated
    Thanks
    kiran.

    thanx

  • Automatic generation of integration models

    For Automatic Generation of integration Model we referred SAP Help and have done the settings as per SAP help.
         T code: CFC9 
         Material Master Change Transfer         2 (BTE Transfer, Immediately)
         T code: BF11
         Maintained
         ND-APO     New Dimension PlugIn APO
         T code: SM30
         Table:     CIFIMODGEN
    Connection pt     Counter     Program     Variant
    MAT_INS        1     RIMODGEN     RSG_BTE
    But system is not generating NEW  Integration Model.
    Reference from SAP Help:
    Make the following settings to change to online transfer:
         Use transaction CFC9 to call the screen Change Target-System-Independent Settings in CIF. Under Change Transfer for Master Data, choose BTE Transfer, Immediately. As of SAP R/3 4.0B, you can make this setting in CIF Customizing in SAP R/3 under Basic Settings for the Data Transfer ® Configure Change Transfer for Master Data.
         Use transaction SM30 to call the screen Maintain Table Views: Initial Screen. Call table CIFIMODGEN. You see the screen Change View "Customizing Automatic Generation of Integration Models". You determine the procedure for adapting the integration model by making entries in this database table.

    Did you run program RIMODGEN in SE38 with appropriate variant to generate new integration models ? The spro settings or CFC9 have nothing to do with generation of new integration models. try to do some forum search on Integration Models and you may get some clue.

Maybe you are looking for

  • How to storing more than 1 data to vector

    hi, I would like to know if I can store the following: select field1, field2, field3 from tableA can I store this above data and return the values to jsp page and later used this in either jsp / java file. in the jsp file I will need to display only

  • Clubbing of PR in single PO via MD04 screen

    Hi All We have multiple PReq's in MD04 screen created based on MRP run, many of them are having material which needs to be procured from same vendor, so I would like to know if it is possible to have all these Pres clubbed in single PO through MD04 s

  • 11g ADF Business Component Browser + ADF BC security

    Hi gang I was hoping somebody could help me out with the ADF BC security features as outlined section 28.4.3 of the Fusion Developer's Guide for JDev 11g. 1) I note once you've defined a Policy Store via the ADF Security wizard, each time you run the

  • Preview erases my text input when saving PDF

    I'm filling out some pdf forms but when I press save all of my input text disappears. Any info on this? Thanks!

  • Sprint navigation

    I recently downloaded sprint navigation but I accidently clicked ok instead of run and now the navigation icon is not on my home page and the application isn't available to redownload. Can anyone help me out? I would really appreciate it. Thanks.