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

Similar Messages

  • How to create matreial document for ten line items (10 documents) by BAPI

    Hi
    how to create matreial document for ten line items (10 documents) by BAPI_goodsmvt_create
    i created but it gives error as "no ites were transferre
    and i need code also.
    thanks in advance

    Prabhu Peram wrote:>
    > >
    Gareth @ Atos Origin UK wrote:
    > > Prabhu,
    > >
    > > You have been on SDN a long time and have a decent amount of points - why do you feel the need to simply cut and paste standard SAP documentation? _-----> I least bother abt the Points, and i never ask somebody to give points to me , if u have any doubt on it , u can check all my postings ? All it does is fill up the SDN servers with replicated data which the original poster could quite easily access themselves via SE37----> Sorry I have seen ur Posting/Reply,dont assume that i do copy & paste for sake of Points.Njoy SAP.>
    > > Gareth.
    >
    >
    >
    > regards
    > Prabhu
    Prabhu.
    I didn't question you about points at all - I was making the point that you have been on SDN a long time and have a lot of points.  Therefore you should know better than to simply cut and paste standard SAP help.  If you don't copy and paste for sake of points, what do you do it for?  It serves no purpose other than to fill up the servers here on SDN.  The original poster appears to have access to a SAP system and SE37 and wants to know how to call a BAPI - they can easily go to SE37 and read the documentation themselves.  Posting it here just adds noise and makes searching harder, as well as taking up more and more space on SDN servers.
    Gareth.

  • How to create ABAP Query for vendor open items

    HI,
    My client has requested me to create ABAP Query for vendor open items . So that it will be usefull for the users . Could anyone help me with this. I will assign you points.Thanks in advance.

    Hello,
    Use Table BSIK <Open Items of AP > & BSAK <AP Cleared items>......
    For Query you can use SQ01.
    USE BSID & BSAD for AR open/clear items...
    LFA1, LFB1 are vendor master data tables
    This is FYI
    Hope this helps.
    Rgds
    Rajendra

  • How to create Standard text for terms and conditions of po print form

    Hi anybody,
      I want create Terms and condtions inside smartforms PO FORM , how do i create terms and conditons and how use font size? I don't want hard code inside smartforms , I will create seperate texts for terms and condition after i include inside smartform.
    How i will do ? anybody please tell me.
    Thanks
    S.Muthu.

    Hi Subramaniyan,
                             U an create an include text node in your smartform.And terms and conditions is the header level text,so i suppose you have to give the inputs as follows :
    Text Name         &**-EBELN&
    Text Object       EKKO
    Text ID              xxxx
    Language          &**-SPRAS&
    is the data at your end .To simplify more follow the following.
    1> go to your purchase order from me23n
    2> open any purchase order and click on the terms and conditions text.
    3> go to GOTO option of the text.and click on the HEADER.
    4> U will find the attributes of the text which you will have to pass to the Include text in your smartforms.
    The long texts arestored in STXH table.
    Reward Points if useful.
    Cheers,
    Deepthee Kasal

  • How to create user exit for MIGO check  "item OK" Field select/unselect?

    Hi All,
       I want to know User Exit for MIGO Screen. when I click check button it will be show "Item OK " Field select or not.
    MIGO Screen post if Item ok field select both parent id and line id . otherwise it will be show error message?.
    Can Please  every one tell me how to do user exit for MIGO?
    mail id: [email protected]
    thanks,
    S.Muthu,

    Hi,
    check the BADI <b>MB_MIGO_BADI</b> ( method: POST_DOCUMENT).
    COMD enhancment <b>MBCF0005</b>
    Regards

  • How to create temp Sequence  for multi sessions

    Hi,
    I"m using Global Temp table and I need to insert Identity (or Seq-Number) column into it, but I also have multiple sessions for my sp and each case shold have it's own Seq-Number, starting from 0.
    Is there any kind of "temp sequence" in Oracle ? that works in the same fashion like GTT , so multiple sessions each will get fresh zero anytime they will refer it.
    I also found out that ROWNUM will not work in my case.
    Probably I also can create SEQUENCE in my sp with some unique name let say with SID , something like:
    select sys_context('SID') into tmp_SID from dual ;
    CREAT SEQUENCE 'MYSEQ'||tmp_SID start with 0 .....
    Tx
    Trent

    if several sessions will create sequence with same static name could it be collission ? Should I go with dynamic sequence name instead ?You cannot have the same SEQUENCE (i.e. "static name") created from multiple sessions. A SEQUENCE is a Database Object that is not transient, but permanent (until it is dropped).
    Although you could "generate" dynamic sequence names and use them, you should look for a better implementation than running CREATE and DROP statements like that.
    Furthermore, you would have difficulty in doing a bulk insert of multiple rows unless you add a trigger that fires FOR EACH ROW.
    If you need to assign an increasing value to each row, use a ROWNUM to assign to a new column.
    insert /*+ -- optional APPEND -- */ into target_table
    select s2.*, rownum-0  from (select * source_table s where .....  order by ....) s2on the assumption that target_table as n+1 columns where the last column is for the increasing value. (rownum-0 is to set the first row to 0).
    Hemant K Chitale
    http://hemantoracledba.blogspot.com
    Edited by: Hemant K Chitale on Sep 16, 2010 2:13 PM
    correcteed the SQL statement

  • How to create event alert for particular column get updated

    Hi every one.... plz help me
    How to create oracle event alert when particular column is update. plz help me.... Acutually i need email alert when ever list price for an item column in pricing table get updated+... plz. Its urgent.

    Oracle Event alert is based on update of specific table and not on specific column in table.
    However you can create a trgigger on table which is based on updat of column. And in this trigger you can send a mail using plsql.
    HTH

  • How to force business to create Manual Invoice for a particular OM Trx Type

    Hi Guru's,
    How do i force business to create Manual Invoice for a particular OM Trx Type?For some order types,we dont want auto invoice to creae invoice automatically.business wanted to create manually.How do we achieve it.
    Rgds,AP

    Hello,
    I think you should create new source ( type manual ) and transaction type ( I think you can use this you use in autoinvoice) in AR. After that you can create manual invoice.
    Regards,
    Luko

  • How to stop a person from creating an order for a particular region?

    Hi All,
    Suppose there are three regions viz :
    1.Asia
    2.Middle East
    3.Europe
    Now what I want that when a agent /end user is creating an order for a particular person for a specific region, he gets an error message that "Orders cannot be created for this person."
    I mean he can create orders for other people of that region but not for a specific guy.
    Also the End user has the authority to create orders for all the above mentioned three regions.So (I Guess) there are no changes to be done in SU01.
    What is the configuration that needs to be done for this one?
    I hope my query is clear and thanks in advance for your advises.
    Thanks

    I don't think so. There is no role that has VIEW only at user level- neither in CRM nor in R/3.
    Only at shop level, we can set if "Order Change" is allowed or not. But nothing to limit ordering at any level.
    Even in CRM 5.0 up, out of the box, you have only got:
    SAP_CRM_ECO_ISA_WU_B2B_ORDER - Can Create an Order but can not Change
    SAP_CRM_ECO_ISA_WU_B2B_FULL - Can Create an Order as well as Change
    No role for just display only rights. For full set of available [Web Channel authorization roles|http://help.sap.com/saphelp_crm60/helpdata/en/46/7aea16f4ca468ce10000000a114a6b/content.htm], check this link out.
    Easwar Ram
    http://www.parxlns.com

  • How to create a Index for KM documents

    Hi Experts.......
    I have two queries .
    1,How to create a Index for the KM Server documents so that when ever i am in need of particular document,i can be able to retrive the exact document within short time......
    2,What Is TREX? Need of TREX ?
    If any one have documents for the above said queries kindly send it to [email protected]
    Thanks in Advance,
    Jasmine

    Hi Jasmine,
    1.In the EP 6.0 you can create index System Administration -> System Configuration -> Knowledge Management -> Index Administration
    2.TREX is search engine that will proccess the documents that you have specified in the index Data sources when you have created the index.
    The status of TREX you can see in System Administration -> Monitoring -> Knowledge Management -> TREX Monitor or Index Monitor for indexing monitoring.
    If you don't have connected any TREX engine to J2EE, just start the visual administrator and configure the TREX service.
    To install the TREX you can follow the instguides for TREX service.sap.com/instguides SAP Netweaver->Release 04 or 2004s -> Installation -> Cross-NW
    I hope that it helps.
    Bye
    Dan

  • How to create value request for screen field text box tt1

    How to create value request for screen field text box tt1
    i have a text box name tt1,
    i want f4 help for that .
    remember i am asking for screen i.e done from screen layout not selectio-screen.
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla,

    Hi,
    Create one Search Help in the SE11 for the particular Field that u want to display. In the Screen(Transaction SE51),For that Text Box in the Attributes,in Dict Tab ->Search Help Field give that Search Help Name.
    For Eg,
    If u want Purchase Order Numbers in that F4 Help.Create one <b>Search Help</b> by giving Table Name as <b>EKKO</b> & <b>Search Help Parameter</b> as <b>EBELN</b> with Lpos & Rpos as 0 & 1.Save & Activate it.
    Give this Search Help Name in Dict Tab ->Search Help Field of that Screen Attributes.
    Regards,
    Padmam.

  • 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 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 in oracle forms6i

    Oracle forms 6i
    Hai All
    I am working in leave application entry so i need to create a sequence for giving a unique number for each entry
    Pls tell me the steps how to created and how to call the sequence from database
    Thanks in Advance
    Srikkanth.m

    Hi,
    Create sequence <sequence_name>
    Start with <number>
    increment by <number>
    in database
    eg:- create sequence test_seq
    start with 1
    increment by 1;
    in forms
    you can assign value in pre-insert trigger
    Declare
    cursor cur_seq is
    select test_seq.nextval from dual;
    begin
    open cur_seq;
    fetch cur_seq into :item_key ; /* :item_key give name of ur primary key field*/
    close cur_seq;
    end;

  • How to create authorisation object for save button please help in abap

    how to create authorisation object for save button please help in abap

    Hi
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Regards
    ANJI

Maybe you are looking for

  • G/L Account Error

    Hi All Iam facing an error while creating a PO with account assignment category "K". I have assigned cost center to the G/L Account. "Error: G/L Account XXXXXXX cannot be used" Please suggest to proceed further Regards Jagadish

  • How can I get Adobe Reader  for a PC with no Internet access?

    Hi I have a neighbour who doesn't have Internet access. I have downloaded the installer but the installer requires Internet access. Can I install it on my computer and copy the program file or folder to my neighbours computer? Thanks Geoff

  • IPhone 3GS Not Recognized by PC, iTunes or Device Manager

    I'm hoping someone can help me out here, my laptop isn't recognizing my iPhone when I plug it in, it doesn't show in iTunes and it doesn't show in Device Manager either.  I've already restored my computer back almost a week, I've reinstalled iTunes,

  • Logical system value in a BAPI

    i am using a BAPI, its asking for logical system . How do i know that value ?

  • How do I get HVX200 footage into Final Cut 4.5?

    This may be a redundant question, and I am currently in the process of waiting for my upgrade to Final Cut Studio to arrive in the mail, but in the meantime, just received a HVX200 camera in the mail yesterday and was wondering if it is possible to g