How to get serial no automatically in table maintainance generator

Hello Experts,
I am building table maintainance generator in that i want the serial number shold be displayed or generated for new entry automatically.
please mind this, i am going to put more that one entry at single time and my serial number field is primary key in table .
Thanks,
Gaurav

In table maintenance we can add an event during new entries creation, in that add code to read the table for the last entry and increment one to it. Hence whenever a new entry is created serial number value is generated.

Similar Messages

  • How to get customer name automatically in table maintainance generator

    Hi all,
    I am having a table maintainance generator in which ship to party is the primary key, i need to add another column customer name
    fetched from KNA1, i tried using the event
    5.new entries creation, creating a new perform
    but the code which i am writing gives an error "Statement in accessible".
    Kindly help.

    Hi Manohar,
    Thanks for your help, Its working now.
    Issue resolved.

  • How to get the data from Pooled Table T157E.

    Hi Experts,
    How to get the data from Pooled Table T157E.
    Any help.
    Thanks in Advance,
    Ur's Harsha.

    create some internal table similar to T157E and pass all data as per SPRAS.
    After that use internal table in your program as per the requirement.
    Regds,
    Anil

  • How to get Manager id automatically when Employee Id is given.

    How to get Manager id automatically when Employee Id is given.
    1) I created a simple BO with two elements namely
        1.Employee Id
        2.Manager id
    How to get employee's first name and last name?
    And how will i get manager id  automatic when i click employee id in element field.
    Anbu.

    Have you tried to use "APPS.FND_CONCURRENT" API?
    http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=FND_CONCURRENT&c_owner=APPS&c_type=PACKAGE
    http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=FND_CONCURRENT&c_owner=APPS&c_type=PACKAGE%20BODY
    Thanks,
    Hussein

  • How to get the size of the table

    Hi All,
    How to get the size of the table in Oracle 10g?
    Is there any script which needs to be run?
    Regards,
    Apoorv

    Hi All,
    Sorry but somehow the table user_segments is not populated in my case. But we have another table SYS.ALL_TABLES whose structure is given below. Would I be able to calculate the table size based on the columns given below:
    ColumnName     Data Type
    OWNER     VARCHAR2 (30 Byte)
    TABLE_NAME     VARCHAR2 (30 Byte)
    TABLESPACE_NAME     VARCHAR2 (30 Byte)
    CLUSTER_NAME     VARCHAR2 (30 Byte)
    IOT_NAME     VARCHAR2 (30 Byte)
    STATUS     VARCHAR2 (8 Byte)
    PCT_FREE     NUMBER
    PCT_USED     NUMBER
    INI_TRANS     NUMBER
    MAX_TRANS     NUMBER
    INITIAL_EXTENT     NUMBER
    NEXT_EXTENT     NUMBER
    MIN_EXTENTS     NUMBER
    MAX_EXTENTS     NUMBER
    PCT_INCREASE     NUMBER
    FREELISTS     NUMBER
    FREELIST_GROUPS     NUMBER
    LOGGING     VARCHAR2 (3 Byte)
    BACKED_UP     VARCHAR2 (1 Byte)
    NUM_ROWS     NUMBER
    BLOCKS     NUMBER
    EMPTY_BLOCKS     NUMBER
    AVG_SPACE     NUMBER
    CHAIN_CNT     NUMBER
    AVG_ROW_LEN     NUMBER
    AVG_SPACE_FREELIST_BLOCKS     NUMBER
    NUM_FREELIST_BLOCKS     NUMBER
    DEGREE     VARCHAR2 (10 Byte)
    INSTANCES     VARCHAR2 (10 Byte)
    CACHE     VARCHAR2 (5 Byte)
    TABLE_LOCK     VARCHAR2 (8 Byte)
    SAMPLE_SIZE     NUMBER
    LAST_ANALYZED     DATE
    PARTITIONED     VARCHAR2 (3 Byte)
    IOT_TYPE     VARCHAR2 (12 Byte)
    TEMPORARY     VARCHAR2 (1 Byte)
    SECONDARY     VARCHAR2 (1 Byte)
    NESTED     VARCHAR2 (3 Byte)
    BUFFER_POOL     VARCHAR2 (7 Byte)
    ROW_MOVEMENT     VARCHAR2 (8 Byte)
    GLOBAL_STATS     VARCHAR2 (3 Byte)
    USER_STATS     VARCHAR2 (3 Byte)
    DURATION     VARCHAR2 (15 Byte)
    SKIP_CORRUPT     VARCHAR2 (8 Byte)
    MONITORING     VARCHAR2 (3 Byte)
    CLUSTER_OWNER     VARCHAR2 (30 Byte)
    DEPENDENCIES     VARCHAR2 (8 Byte)
    COMPRESSION     VARCHAR2 (8 Byte)
    DROPPED     VARCHAR2 (3 Byte)

  • How to get serial number education version

    how to get serial number would they send to us by email ? since i did not create an account when i submited my application

    Find a serial number
    http://helpx.adobe.com/x-productkb/global/find-serial-number.html

  • Need to know how to get serial number to ipod that i only have receipt on

    Need to know how to get serial number to ipod that i only have a receipt on

    How to find the serial number of your Apple hardware product

  • Regarding populating data automatically in Table Maintance Generator

    hi all,
               I Created one Z Table for three fields Sales District( BZIRK) and Sales District Description (BZTXT) and Person Incharge. I Created Table Maintanance Generator for these three fields.
    in my ZTable after giving Sales District Code(BZIRK)  when i enter Sales District Description(BZTXT) should come automatically. 
    How can i achieve this . Plz send detailed process.
    Please suggest.
    Thanx & Regards
    Remi

    in table maintainance generator screen ..
    .goto menu environment--->modification-->source code..
    u will get the popup with lot of programs inthat select the main program sapl(.....).
    in that u will have following includes  view related include-files
         view related include-files   (never change, please)        *
      INCLUDE LZSDFF00                                . " subprograms
      INCLUDE LZSDFI00                                . " PAI modules
    do ur coding here...

  • Table Maintainance Generated but getting error when running SM30

    Hi Experts,
    I am modifying existing ZTable with around 31 fields and Maintainance was not allowed before also no Table maintainance was there. Now i have changed the attributes to allow maintainance and tried creating Table Maintainance generator.
    The TMG get created sucessfully but get error message when running SM30 for the Ztable with Run time error saying Coversion Error .
    Error Analysis says :
    Program SAPLZNMSLG attempted to display the fields of screen 0005 and error occured during the coversion of this data.
    Can any one let me know what happened? Expecting replies at the earliest.
    Thanks
    Smita

    Hi,
    In Text I/O Template Tab each field name will be there with Column- Name, Type  and Text Or I/O Field
    Go to Text OR I/O Field (Fields Wherever u have negative value).
    Name                     Type         Text Or I/O Field
    vbak-menge         I/O                _.___.___.___,____V
    Just add existing blank field ending with V.
    Regards,
    Nandha

  • How to delete a table maintainance generator from a table ?

    Hi all ,
    I' ve created a table maintainance generator for  a table now i ve added some key field to it hence i want to recreate a table maintainance generator for that
    but while creating it again a message is showing" function group cannot be editable "
    and the previous screen is appearing
    already i ve tried to delete but same message is coming ...(from menu bar)
    pls solve the issue...
    Regards
    Sachhi

    solved......
    Edited by: Sachhidananda Tripathy on Mar 2, 2009 8:40 AM

  • How to add the buttons on the Table maintains genrator

    Hello Experts,
    I have a table maintains generator, I have to add the sort ascending and sort descending button on the screen. and when user select any one column of that generator and then click on sort ascending or sort descending button, then it has to sort accordingly.
    Can anyone please guide me in this issue.
    Thanks
    Chetan.

    Hi,
    Go to the function group that is generated for your table maintanence and edit it and add buttons to the screen layout and handle then in PAI of that screen.
    based on selection sort and display the data.
    hope this solves your question.
    regards,
    Jayaram.M

  • Disable delete button in Table Maintainance Generator

    Hello all,
      How to disable delete button in Table maintainance generator???

    Hi Maya,
    It is very interesting question. If you debug your table maintenance screen, the program of table maintenance screen will not have statically defined pf status. So you cannot exclude delete functionalities using the below statement.
    SET PF-STATUS <the GUI status> EXCLUDING 'DELE'.
    For viewing pf status SAP has programmed in dynamic manner using this FM VIEW_SET_PF_STATUS.
    Before calling above FM you need to exclude delete function. Follow the following step for achieving this
    Go to sm30. Put your table name and press on maintain push button. It will display table entries in maintenance screen.
    Go to system->status
    Click on program name.
    Go to your flow logic of you table maintenance screen number.
    It will have following code in flow logic
    PROCESS BEFORE OUTPUT.
    MODULE LISTE_INITIALISIEREN.
    LOOP AT EXTRACT WITH CONTROL
      TCTRL_ZMAINTAIN CURSOR NEXTLINE.
       MODULE LISTE_SHOW_LISTE.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE LISTE_EXIT_COMMAND AT EXIT-COMMAND.
    MODULE LISTE_BEFORE_LOOP.
    LOOP AT EXTRACT.
       MODULE LISTE_INIT_WORKAREA.
       CHAIN.
        FIELD ZMAINTAIN-MATNR .
        FIELD ZMAINTAIN-KUNNR .
        FIELD ZMAINTAIN-LIFNR .
        MODULE SET_UPDATE_FLAG ON CHAIN-REQUEST.
       ENDCHAIN.
       FIELD VIM_MARKED MODULE LISTE_MARK_CHECKBOX.
       CHAIN.
        FIELD ZMAINTAIN-MATNR .
        MODULE LISTE_UPDATE_LISTE.
       ENDCHAIN.
    ENDLOOP.
    MODULE LISTE_AFTER_LOOP.
    Add new module in PBO for excluding delete function. ex  module set_pf.
    PROCESS BEFORE OUTPUT.
    ****here I added my own code for excluding delete function
    ****begin of addion
    module set_pf.
    ****end of addition
    MODULE LISTE_INITIALISIEREN.
    LOOP AT EXTRACT WITH CONTROL
      TCTRL_ZMAINTAIN CURSOR NEXTLINE.
       MODULE LISTE_SHOW_LISTE.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE LISTE_EXIT_COMMAND AT EXIT-COMMAND.
    MODULE LISTE_BEFORE_LOOP.
    LOOP AT EXTRACT.
       MODULE LISTE_INIT_WORKAREA.
       CHAIN.
        FIELD ZMAINTAIN-MATNR .
        FIELD ZMAINTAIN-KUNNR .
        FIELD ZMAINTAIN-LIFNR .
        MODULE SET_UPDATE_FLAG ON CHAIN-REQUEST.
       ENDCHAIN.
       FIELD VIM_MARKED MODULE LISTE_MARK_CHECKBOX.
       CHAIN.
        FIELD ZMAINTAIN-MATNR .
        MODULE LISTE_UPDATE_LISTE.
       ENDCHAIN.
    ENDLOOP.
    MODULE LISTE_AFTER_LOOP.
    *****inclule one line of code for excluding delete fucion
    module set_pf output.
          MOVE 'DELE' TO excl_cua_funct-function. COLLECT excl_cua_funct.
    endmodule.
    Basically sap fetching status dynamically from program SAPLSVIM using FM VIEW_SET_PF_STATUS. Status name is EULG.
    Please donu2019t hardcode anything by using set pf status statment, you just add one line of code the PBO by creating new module.
    Let me know if you need any help .
    Cheers.
    Regards,
    Peranandam

  • Table Maintainance Generator

    Dear Experts,
    I hv created a ztable containing following fields.
    MANDT                     MANDT                  Primary Key
    ZVEHICLE                      ZSDVEHICLE         Primary Key
    ZDCODE                     ZDCODE                 Primary Key
    ZOUT_DATE                    ZDATUM                 Primary Key
    ZOUT_TIME                    ZOUT_TIMS            Primary Key
    ZOUT_READING          ZMTR_READ
    ZIN_DATE                   ZDATUM_IN
    ZIN_TIME                   ZIN_TIMS
    ZIN_READING            ZMTR_READ
    ZSTATUS                  ZSTAT                        ( IN , OUT values possible)
    ZREMARKS                  ZCHAR50
    Now i m trying to create a Table Maintainance Generator And the Problem is following two fields are not visible in TMC.
    ZIN_DATE                   ZDATUM_IN
    ZIN_TIME                   ZIN_TIMS
    But if i add another field with other data type ( other than time and date), that field is visible.
    And if i  include above two field in primary key, then only it is visible.
    Is ther any restriction with time and date format field with TMC.
    Any idea.
    thansks in advance.
    Jaspal

    Hi Jaspal,
    There are two maintenance types available while creating a table maintenance generator.
    1. One step
    2. Two step
    If the TMG is built in one-step, then all the fields (both key and non-key fields) will be displayed in a single screen. So, all your fields will get displayed.
    Whereas if the TMG is built in two-step, the key fields will be displayed in a single screen and further details will be displayed in another screen. In this table, you have set the fields 'ZOUT_DATE' and 'ZOUT_TIME' as primary key. so it will be displayed in one screen and the non-key fields will be displayed in the second screen. So, if the fields 'ZIN_DATE' and 'ZIN_TIME' were to be dispalyed in the first screen, make it as a primary key.
    Thanks and Regards,
    Priya

  • Problem in table maintainance generator

    Hi,
    I have  a requirement in table maintainance generator i.e. when I clcik on se11,enter the table name and then click on new entries ,my table control that I see on the screen will have some entries that were entered earlier.
    But in my case the entire table control has to be blank when I click on new entries and it should be in output mode only.So please can someone tell me how I can clear the entries .Which event should I use for this?
    Another requirement is that for my table maintaianance generator,I have been asked to remove on field from the table control and place it above the table control as a text field.Now this text field is a key field.When I enter some value in this text field and click on enter,it should give me the values corresponding to this key field.Please can someone help me out with this?Which event should I use for this?
    Regards,
    Sushanth H.S.

    Hi Sushant,
    Considering there are considerable modifications to your table maintenance I would suggest you create a small module pool transaction for your requirement with a table control and code the flow logic (PBO/PAI) yourself.
    For the DB update, you can use the SQL commands. Since it would be an alternative to the table maintenance for a single table, I think the database update part wouldnt be complex to handle at all.
    You would need a table control same as the one in the maintenance however a wizard will make that job very easy for you.
    Finally, assign a transaction to your module pool and you are good to go.
    This is in my opinion not a complex development and also would be easier than trying to modify a SAP generated table maintenance, because adding a text field on top etc. would be drastic changes which cannot be accomplished by events alone.
    Cheers.

  • In table maintainance generator

    hi
    in table maintainance generator, how to validate the data entered in the table. If it is only with the events, how?

    hi,
    you can validate the data in tables, after generating a table maintanance generator.
    Environment->Modification->Events.
    After providing the subroutine name you can go to editor( click on icon provided just besides the form routine) and write the logic for validation.
    for example, if changes are to be made to the data of particular controlling area, a check has to be made if the user is authorised to make changes. Below is a sample code that would give you an idea.
    Sample code:
    *&      Form  auth_check_save
          Checks that the user has the correct authorisations to Change
          details of Controlling Area. If not error message is to be
          displayed on the screen.
    form auth_check_save.
    Data Declaration
    Types
      types:  begin of ty_valtab,
               kokrs(4) type c,
               actvt(2) type c,
             end of ty_valtab,
             begin of ty_fieldtab,
               fieldname(10) type c,
             end of ty_fieldtab.
    Internal Tables
      data:  lt_valtab    type standard table of ty_valtab,
             lt_fieldtab  type standard table of ty_fieldtab,
    Structures
             ls_valtab    type ty_valtab,
             ls_fieldtab  type ty_fieldtab,
             ls_costele   type ztf_costele,
    Variables
             l_status     type zss_rfc_status,
             l_st(1)      type c.
    Constants
      constants : c_0(1)        type c value '0',
                  c_01(2)       type c value '01',
                  c_02(2)       type c value '02',
                  c_06(2)       type c value '06',
                  c_authobj(10) type c value 'Z_KOKRS',
                  c_error(5)    type c value 'ERROR',
                  c_partial(7)  type c value 'PARTIAL',
                  c_kokrs(5)    type c value 'KOKRS',
                  c_actvt(5)    type c value 'ACTVT'.
      clear l_status.
      ls_fieldtab-fieldname = c_kokrs.
      append ls_fieldtab to lt_fieldtab.
      clear ls_fieldtab.
      ls_fieldtab-fieldname = c_actvt.
      append ls_fieldtab to lt_fieldtab.
      clear ls_fieldtab.
      loop at total.
        if <action> eq neuer_eintrag.
          move total to ls_costele.
          ls_valtab-kokrs = ls_costele-kokrs.
          ls_valtab-actvt = c_01.
          append ls_valtab to lt_valtab.
          clear  ls_valtab.
        elseif <action> eq aendern.
          move total to ls_costele.
          ls_valtab-kokrs = ls_costele-kokrs.
          ls_valtab-actvt = c_02.
          append ls_valtab to lt_valtab.
          clear  ls_valtab.
        elseif <action> eq geloescht.
          move total to ls_costele.
          ls_valtab-kokrs = ls_costele-kokrs.
          ls_valtab-actvt = c_06.
          append ls_valtab to lt_valtab.
          clear  ls_valtab.
        endif.
      endloop.
    Authorization Check
      call function 'ZAUTH_CHECK'
        exporting
      PIM_REPID               =
        pim_auth_obj            = c_authobj
      PIM_FIELD_TABNAME       =
      PIM_CHECKALL            =
       importing
         pex_status              = l_status
       tables
         pex_val_tab             = lt_valtab
         pim_field_tab           = lt_fieldtab
       exceptions
         no_input                = 1
         others                  = 2.
      if  l_status = c_error.        "Authorization Check
      message under class: zmessclass
        message e000(zmessclass) with text-e02.  "You have no authorization
                                                "for table maintenance
      elseif l_status = c_partial.
        loop at total.
          if <action> ne space.
            move total to ls_costele.
            read table lt_valtab with key kokrs = ls_costele-kokrs
                                 transporting no fields.
            if sy-subrc <> c_0.
              delete table total.
              delete table extract.
            endif.
          endif.
        endloop.
        message e400(zmessclass).    "All the entries could not be saved
                                    "because of  restricted authorization
      endif.                        "End of Authorization Check
    endform.                    "auth_check_save
    The above code should be written in event  01  : Before saving the data in the database
    Regards,
    Farheen

Maybe you are looking for

  • Time frame to fix firefox 4

    Have been a big fan of FF for a number of years and have tried to use the new FFv4 for over a week. While not a fan of the new look I could live with the change if it was actually faster and stable. On my mac I have problems opening firefox and a num

  • Why is yahoomail not opening in my MacBook Pro?

    why is yahoomail not opening in my MacBook Pro?

  • Removing Shockwave Updater icon from taskbar

    How do I get rid of the Shockwave Updater icon in the System Tray? I tried right/left/middle & double clicking on it and nothing happens!?!

  • Will Cisco ISE appliances answer SNMP queries ?

    Hello, It is clear that ISE is able to send SNMP traps to a remote SNMP manager machine. It seems to be embeded on Cisco Application Deployment Engine (ADE) OS and explained on this documentation: http://www.cisco.com/en/US/partner/docs/security/ise/

  • Error connecting to portal database using alias

    i am using Connector framework api to connect to portal database. in <b>visual administrator -> JDBC connector</b>. I click on <b>runtime</b> tab Under <b>Resources</b> i find <b>Data Sources</b> and <b>Drivers</b>. Under Data sources I see SAPSR3DB.