How to create a sequence in ABAP?

Hi guys,
we have a requirement to create some data in a FM and every document must have a unique sequential number. How to achieve this?
Numbering should be in a format 0009561544 (so 10 chars) and should start from 0001000000.
One option would be to create a table with one value and read and increase it's value each time it is called.
Is there any other option how to achieve it?
Thank you,
Olian

Hi Rob,
thank you for the answer.
Can you please tell me more details about it? When I create a number range object, how can I retrieve a current value and increase it from a FM?
Thanks,
Olian

Similar Messages

  • How to create a SEQUENCE in MSSQL2005

    Hi
    I am also having a similar problem which opened the thread
    Actually i am using a Repositery which is created in MSSQL2005.
    Now i want to create a SEQUENCE similar to Oracle and populate My surrogate Key Column.
    Can u tell me how to create a SEQUENCE in MSSQL2005?
    Does anyone is having the sql syntax?
    Thanks
    Gourisankar

    Hi Gourisankar,
    There is no sequence concept in MS SQL Server rather it has IDENTITY.
    In MS SQL Server if you declare a column type as a Identity it will be auto increment when a new record inserts.
    So in you underlying table create a column as ID and type as "Identity" and in your mapping leave that field un mapped.
    Have a look and google more on "identity in ms sql server" ;)
    http://www.sqlteam.com/article/autonumbering-identity-columns
    http://www.craigsmullins.com/ssu_0599.htm
    Thanks,
    G

  • How to create function module in abap for VirtualProvider in bi

    how to create function module in abap for VirtualProvider in bi ???????????????
    can any one help me with simple example ?????????????????
    Moderator message : Duplicate post locked. Read forum rules before posting.
    Edited by: Vinod Kumar on Jun 15, 2011 4:40 PM

    Hi ,
    Thanks for replies about my question??.
    If i am using the exit in my char relation ship how can i debugg that exit???
    if i am using BPS0 how to do it???If i am using BPS_WB how to do it??
    Case1.Variable (type Exit) I known how to do debugg this one in BPS0 but i'm not sure in BPS_WB??
    Case2:Char Relation Ship(Type Exit) how to do in BPS0 and BPS_WB??.
    Thanks.

  • "How to create new client in ABAP sneek Preview "

    HI ,
             Can anybody tell me how to create new client in ABAP sneek preview , i had  create  a new client 100 and tried to enter with Cilent 100. User : SAP* , and Password : pass. But i'm unable to log into the sap system.

    Hello,
    perhaps this will help you --> <a href="http://www.sap-img.com/bc049.htm">instructions</a>
    And this quote from another thread:
    <i>in SAPNW2004sSneakPreviewABAP this procedure only works if the system <b>profile parameter login/no_automatic_user_sapstar is set to 0</b> (and the system restarted after that), otherwise you will have a new client without any user thus useless ;-).</i>
    Regards,
    Norman

  • How to Create Test Sequence Document in HTML using command line

    How to Create Test Sequence Document  in HTML using command line
    I have lot of sequences and I want to create Test Sequence Documentation in HTML format using Command Line automatically, is there a way to automate this task using .bat file or using   C#  .Net

    If you aren't able to figure out how to call a C++ DLL in .net then there may be another option.  Unfortunately I don't know how to do this off the top of my head and I don't have an example.
    The other option would be to change docgen.seq a little bit to the dialog doesn't display and you just hardcode the options.  Then you can use a command line to call testexec.exe: http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/startup_opt/
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • HOW TO CREATE AUTHORISATION OBJECT IN ABAP PLEASE HELP

    HOW TO CREATE AUTHORISATION OBJECT IN ABAP PLEASE HELP

    You can Use Transaction code: RSSM
    Check the following link
    http://www.sap-img.com/bc042.htm
    In SU20 you will have to create a CLass.
    After saving this double click this and you will taken to another screen where you can create Auth Object.
    You can create authorization fields in SU21 or use existing ones.
    You can also do above thru tcode SE80 Edit -> Other Object. In one the tabs you will see Auth. Objects .

  • How to Create a Sequence Number from BI Publisher Layout editor?

    How to Create a Sequence Number (1,2,3,4,......,etc) from BI Publisher Layout editor

    Thank you for your replay, but <?position()?> we can used it in template builder only not from BI layout editor
    I found a solution in this case we can used the following query.
    SELECT
    ROW_NUMBER() OVER(order by item_status) as Row,

  • How to create a sequence DDL in a procedure

    Hello,
    i have a simple question but i dont find a solution here.
    How to create a sequence DDL in a procedure ?
    Thank 's

    Use Native Dynamic Sql. Look at the EXECUTE IMMEDIATE command.
    declare
    begin
       execute immediate 'create sequence xx_seq ';
    end;
    /Of course you need explicit permission to create a sequence. NOT through a ROLE.

  • HOW TO creat  BAR CHART using ABAP Programming

    DEAR ALL,
    I want some help as to how to creat GRAPHICAL display using ABAP programing (BAR CHART) any sample codes Example will be very helpful.
    Regards,
    VJ

    On earlier versions, you can do something like this.
    [code]
    REPORT ZRICH_0005 .
    DATA: BEGIN OF ITAB_DATA OCCURS 0,
               DATANAME(15),
               QUANTITY1 TYPE I,
               QUANTITY2 TYPE I,
               QUANTITY3 TYPE I,
          END OF ITAB_DATA.
    Data: BEGIN OF ITAB_OPTIONS OCCURS 0,
               OPTION(20),
          END OF ITAB_OPTIONS.
    ITAB_DATA-DATANAME = 'Maple'.
    ITAB_DATA-QUANTITY1 = 5500.
    ITAB_DATA-QUANTITY2 = 6200.
    ITAB_DATA-QUANTITY3 = 5900.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Oak'.
    ITAB_DATA-QUANTITY1 = 3500.
    ITAB_DATA-QUANTITY2 = 5200.
    ITAB_DATA-QUANTITY3 = 4400.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Cherry'.
    ITAB_DATA-QUANTITY1 = 1800.
    ITAB_DATA-QUANTITY2 = 2200.
    ITAB_DATA-QUANTITY3 = 1900.
    APPEND ITAB_DATA.
    CALL FUNCTION 'GRAPH_MATRIX_3D'
         EXPORTING
              COL1        = 'Jan'
              COL2        = 'Feb'
              COL3        = 'Mar'
              TITL        = 'Lumber Usage in $'
         TABLES
              DATA        = ITAB_DATA
              OPTS        = ITAB_OPTIONS
         EXCEPTIONS
              OTHERS      = 1.
    [/code]
    Regards,
    Rich Heilman

  • How to create a sequence for an particular item in my apex form

    Hi friends,
    I created an database application, of a form with a report, and it is working fine...
    But in my form, i have a requirement....The below are the existing fields in my form
    issue no
    created by
    start date
    status
    priority
    due date
    Among these fields in my form i need to create a 'Sequence' for my field "issue no",
    So that whenever i opened the form the 'issue number' must generate automatically like 1 for the first time, 2 for the second time and so on..
    For that i created a sequence
    CREATE SEQUENCE "ORDERS_SEQ"
    MINVALUE 1
    MAXVALUE 999999999999999999999999999
    INCREMENT BY 1
    START WITH 1000
    NOCACHE
    NOCYCLE;
    But for validation where i need to write the sequence query for the particular item 'issue no'....i dont have any idea of where to write the validation query for the sequence..
    please tell where i need to write in step wise manner..please help me friends...
    As the below is my validated sequence query for item 'issue no'
    'select seq.issue_id.nextval into issue_no'
    This is my above validation query whether the query that i mentioned is right..if not let me know the validation query..
    And also i need where to apply this validation query in steps..
    Thanks in advance
    Regards,
    Harry...

    Harry,
    Rik is on the right track. Here is a sample insert trigger: Would need to substitute you sequence ORDERS_SEQ with my sequence las_log_seq, how you define or use timestamps is up to you.
    DROP TRIGGER LASDEV.BINS1_LAS_LOG_TBL;
    CREATE OR REPLACE TRIGGER LASDEV."BINS1_LAS_LOG_TBL"
       BEFORE INSERT
       ON las_log_tbl
       FOR EACH ROW
    BEGIN
       -- Description: Insert log_seq, creation_dt, creation_id,
       --              lst_updt_dt and lst_updt_id.
       -- Maintenance:
       -- Date        Actor          Action
       -- ====        =====          ======
       -- 07-Sep-2010 J. Wells       Create.
       :new.creation_id := nvl( v( 'app_user' ), user );
       :new.creation_dt := SYSDATE;
       :new.lst_updt_dt := :new.creation_dt;
       :new.lst_updt_id := :new.creation_id;
        SELECT las_log_seq.NEXTVAL
          INTO :new.las_log_seq
          FROM DUAL;
    END bins1_las_log_tbl;
    /Heff

  • How to create a sequence based on name, country, city, year, month, number

    Hello,
    I am using Application Express 4.2.1.00.08
    I am new to apex and i need some help in creating a sequence.
    I am creating an application where i profile people and i need to create an auto sequence that when the person is added to the database he will have his own sequence based on his name, country, city, year he was added, month he was added and his number.
    This is a bit tricky because each person will have a different name, country city etc.
    How can this be done ?

    Hello,
    I have to create a sequence so that when for example an employee is added using a form his ID will be saved based on his name, country, city, year he was created, month he was created and his number.
    However, each employee is diff, so when you add another employee to the form his ID will be different, different name, country, city etc..
    This has to be automatically generated.. is this possible?

  • How to create a job thru ABAP program for calling a program with variant???

    Hello experts,
    can u give me step wise procedure to create jobs for  a program with a variant name thru ABAP???
    Also, can a transaction can be scheduled as a job to run in background with a variant name???
    Edited by: SAP USER on Jul 22, 2008 6:08 AM

    Hi,
    To create a job through ABAP program you can do the following.
    Go to Menu bar.
    In there, go to   SYTSTEM> SERVICES> JOBS--> DEFINE JOB.
    Then give the JOB NAME and CLASS in the screen that comes up.
    This is how we schedule a program.
    Now, to create a variant for a program -
    First activate your program in SE38. Then execute it .
    Now, click on SAVE button. It will open up  the variant creation screen. Give the details there like variant name and value for the fields. Save and come back.
    Hope this helps.
    Regards,
    Hari Kiran

  • How to create a sequence in Answers?

    Hi everyone,
    I want to know if it's possible to create a sequence in Answers and how.
    I have a Pivot table that I want to assign row numbers, but when I use RCOUNT(1) in a Dummy column I end up with 1 in all rows.
    This is the format of my pivot table.
    -------------------------------------Measure---
    ---------------------------------Y-1-------Y----
    Order(DUMMY)---Code---Desc-- 2009 ----- 2010
    1 435 idn 1 2
    1 53 dvf 3 1
    1 123 asd 8 4
    I've tried to do RCOUNT(1 by Y) but then I end up having the double of rows.
    Can it be done???
    Thanks in Advanced

    Try doing this:
    1) Create a dummy column and call it DUMMY with this in the fx:
    CASE WHEN 1=0 THEN tablename.columname ELSE 'whatever' END
    2) You can hide this column.
    3) Then in your "sequence" column, click on the fx and type:
    RCOUNT(1 by DUMMY)
    where "DUMMY" is the column created in step 1.

  • How to create a tcode for abap query

    how to create a transaction code for abap query,
    i used a single table , my requirment is as i enter the tcode i should get the selectioin screen of my query.

    Hi
    Follow this
    . Make a transaction with parameters transaction from se93 .
    2. Put START_REPORT in the transaction
    3. Check the skip intial screen checkbox
    4. in the table control in the end of screen put these values
    D_SREPOVARI-REPORTTYPE = AQ
    D_SREPOVARI-REPORT = <USER GROUP in WHICH THE QUERY IS CREATED> G
    (G stands for GLOBAL AREA:)(Entered after a space)(G should come after 9
    chanracters(8 char for user group,one space and then G)
    D_SREPOVARI-EXTDREPORT = <QUERY NAME>
    refer this:
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/how-to-assign-a-tcode-to-a-sap-query-579623
    Regards
    Shiva

  • How to Create an XML using Abap Objects

    Hi there,
    who has an example how to create an XML Document from an internal table using abap objects
    e.g. Class CL_XML_DOCUMENT_BASE ?
    any feedback is welcome.
    thanks
    Johann

    Hi Johann,
    You don't need a class to do the job if you are on a 6.10 or higher system. Use command CALL TRANSFORMATION to create an XML from an internal table.
    Regards,
    John.

Maybe you are looking for

  • Fnd.mk file usage ....

    Hi, What is the use of fnd.mk file. Thanks & Regards, Srikanth

  • Migration from SQL Server 2008 to Oracle 11g

    Hi there, I have a quick question, Anyone who have experienced to migration procedures,function from SQL Server 2008 to 11g R2. Is it possible? I migrated tables and views through Oracle heterogenious servinces but I am not sure about the fucntions a

  • Subscription link error

    Hi all! I try to edit subscription in the km folder and get such error: Runtime Error An exception occurred while processing the request. Additional information: null Exception ID = 50395209-9499-2910-d38a-942d658e0cb9 Have you any ideas how to solve

  • Utils import config command failed on CUCM8.6.1

    I've created cucm861sub.flp file and uploaded it to the datastore on ESXi 4.1, then mapped to the floppy, i.e. I followed procedure on cisco wiki to the last letter. Still, after applying command I'm receiving following error: "Cannot locate configur

  • Some of the pivot table header column not center-aligned

    I've dragged a pivot table model from Data Controls. The generated pivot table on page does not display some of the header columns center-aligned. I tried to set a css style in HeaderFormat listener for the columns, but it did not work. I checked the