Auto populate values in the the database table

Hi All,
I have a requirement where user enter values in one of the ZTransaction. This will update a Ztable. So the new requirement is to add two new columns in the fields, which is completed. Now this two new fields are supposed to auto populate values based upon the key field .
The transaction code is defined with Transaction as SM30 and Default values as
Name of the screen field     value
Update                               X
VIEWNAME                      "table name which the values are updated".
Please let me know how to do this.
Thank you!!

Hi Swetha,
I am unsure of what you are trying to accomplish so I will make a few assumption and perhaps you can find some benefit in it.
I suppose you are trying to add new fields to a custom (Z) database table.
If so then use SE11 to add the two new columns.
After this is complete then rebuild the table maintenance by using the following path: SE11-> Utilities->Table Maintenance Generator.  (Remember to double check the Recording Routine Radio button.)
If the user needs fields automatically populated then check the following link.  It describes how to use table maintenance events.  I suppose you need to use Event 01 and Event 05.
http://help.sap.com/saphelp_nw04/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
Good luck and reward points if helpful,
AK
Moderator message -  Asking for points is against the Forum's RoE
Message was edited by: Suhas Saha

Similar Messages

  • [HTML DB] How to use the existing database table?

    [HTML DB] How to use the existing database table?
    I installed Oracle 10g database in Computer A(Windows 2000), and I already create all the tables with data and the data size is about 300MB.
    In Computer B(Windows 2000), I installed HTML DB 1.6.
    How can I use /get the existing database table (in computer A) for HTML DB?
    Could anyone help me on this? I am newbie and I need some detail instructions. or Where can I find the examples.....
    Thanks

    Well I guess if you wish to retain that architecture, i.e. HTMLDB on one machine and your data on another, you will have to establish database links to access the data. Oracle documentation will describe how to achieve that.

  • Hello! Want to programatically alter the Report.Database.Tables info

    Post Author: RobotSlave
    CA Forum: .NET
    Crystal Reports 2008    CFK0Y-KVURM2M-00UFAFF-N43MCrystal Reports 2008 for Visual StudioMicrosoft Visual Studio 2005Version 8.0.50727.762  (SP.050727-7600)Microsoft .NET FrameworkVersion 2.0.50727
    Installed Edition: Enterprise
    Microsoft Visual C# 2005   77718-007-4000003-41954Microsoft Visual C# 2005
    why? to save time thats why, I have a zillion reports that I have to point at a new database periodically, (and I have some time on my hands here at the ranch) so I decided to automate the process. I made a windows application with Visual Studio that opens the rpt files as objects using the crystaldicisions object object model thingy, pulls out the table logoninfo.connectioninfo stuff and sets it to a new location THEN when I try to set the report.database.tables back to my new modified version it says that the tables property is a readonly thingy. I can open and save, but I cant modify the part I want to... how can I alter the serverName and databaseName properties such that I can save the result?
    thank you!
    much love.

    Post Author: RobotSlave
    CA Forum: .NET
    I was making a new copy of the database.tables and then editing it then trying to set the whole reportdocument.database.tables = to my modified version, it was readonly so it didnt work. when I just iterate through the tables and set the properties on each one, it works just fine.

  • How to populate values in to dropdown in table ui element

    Hi,
    according to my scenario  i have atable with five records ...andi have acolumn name DATE and  it contains 5 dropdowns with some values i.e dates from jan 1 2008-dec 31 2008.user needs to select only those values which are in dropdown. can u tell me the code to populate values in to dropdown in table UI element.
    Thanks
    Raju

    Hi,
    you can go for two drop downs like DropDown by Key or Drop Down by Index as per requirment.
    Create context Node for the table UI, in that one will be for ur drop down. Create element for the Context node and add thses to the conetxt.
    Code example for DropDownBy Key:-
    ISimpleType simpleType =               wdContext     .nodeProjEstiTable().getNodeInfo()
         .getAttribute("projphasname")               .getModifiableSimpleType();
    IModifiableSimpleValueSet svs1 =
    simpleType.getSVServices().getModifiableSimpleValueSet();
    svs1.clear();
    for (int j = 0; j < projphasname.length; j++) {
         svs1.put(projphasname[j][1], projphasname[j][1]);
    for DropDownBy Index you can work in normal way means try to create element for the respective context attribute.
    Hope this may help you...
    Deepak

  • New Z-table to auto-populate description based on the key field entered

    Hi Gurus,
    I have to created a z-table, there are several fields however I am interested in only two
    1) VSTEL and 2) PADEST for shipping point and the printer name. Also there are two other fields I have added to the table that are the descriptions for VSTEL and PADEST. Now the requirement is that when the user enteres a value in table maintenance ( sm30)
    for say VSTEL, then its description should auto populate or propose the right values. Same should happen for the PADEST and its description field.
    Thanks.

    Goto the Table maintenance generator of the Table.
    On this screen.
    Environment -
    > Modification -
    > Events
    Create New entry in the table with T = 05 and Z <any name>
    Save it.
    An editor button appears next to the from name.
    Click on it and create an include.
    Write your code in this include...
    select vstel
           padest
           from table XXXX into table I_XXXX
           where vstel = (Z_VSTEL)User enterd VSTEL in module pool.
    If sy-subrc = 0.
          loop at I_XX into wa_xxx.      
              if wa_xxx-vstel = Z_vstel.
                z_padest(Desc field in Tab maint) = wa_XXX-PADEST.  
              endif.
          endloop.
    endif.
    The same logic can be used to get the desc for VSTEL and PDEST.
    You can change this in many ways based on performance.
    The above code is just to give an idea...
    Regards,
    Kittu

  • How to fetch the customer debit balances form the KNC1 database table

    Hi Experts,
    I am creating a ABAP report which would dispaly the customer credit balances for the currenct fiscal year.
    I am fetching the values form KNC1 database table.....But in this table values are stored year wise.
    But I want to display for the current fiscal year that means if teh user selects the 07/2011 as the month on the sleection screen then the debit balances from 072010 to 062011 should be dispalyed.
    Could anyone please help me out to fetch this the debit balaces form KNC1 database table in the above format.
    Or is there any other way to solve this problem?
    Awating your urgent reply.
    Many Thanks,
    Komal.

    Hi Komal,
    First, you have to compute the initial period and the final period.
    Next, you must read table KNC1 for the years comprised between these two periods.
    Last, you must read the fields of table KNC1. For that, you should compose dynamically the name of the field, and then ASSIGN it to a FIELD-SYMBOL.
    Now, just add up the values!
    Please try the following code:
    FIELD-SYMBOLS: <fs>.
    DATA: t_knc1 TYPE TABLE OF knc1 WITH HEADER LINE.
    DATA: d_debits LIKE knc1-um01s.
    PARAMETERS: p_kunnr LIKE knc1-kunnr,
                p_bukrs LIKE knc1-bukrs,
                p_spmon TYPE spmon.
    DATA: l_fieldname(20) TYPE c.
    DATA: l_date LIKE sy-datum,
          l_date_from LIKE sy-datum,
          l_date_to LIKE sy-datum.
    DATA: l_period(2) TYPE n.
    DATA: l_num_times TYPE i.
    START-OF-SELECTION.
    "Compute the initial and final periods
      CONCATENATE p_spmon '01' INTO l_date.
      CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'
        EXPORTING
          months  = '-1'
          olddate = l_date
        IMPORTING
          newdate = l_date_to.
      CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'
        EXPORTING
          months  = '-12'
          olddate = l_date
        IMPORTING
          newdate = l_date_from.
    "Read table KNC1
      SELECT *
        INTO CORRESPONDING FIELDS OF TABLE t_knc1
        FROM knc1
        WHERE kunnr = p_kunnr
          AND bukrs = p_bukrs
          AND gjahr BETWEEN l_date_from(4) AND l_date_to(4).
    "this will yield at most 2 records, one for present year, and another one for the previous year.
    "but if you select i.e. period '01.2012', initial_date = '01.01.2011' and final_date = '31.12.2011'
    " --> thus only one year --> one record
      CLEAR: d_debits.
      LOOP AT t_knc1.
    " If there's no year change
        IF l_date_from(4) = l_date_to(4).
          DO 16 TIMES.
            l_period = sy-index.
            CONCATENATE 'UM'      "compute dynamically the field name
                        l_period
                        'S'
              INTO l_fieldname.
            ASSIGN COMPONENT l_fieldname OF STRUCTURE t_knc1 TO <fs>.   "assign
            ADD <fs> TO d_debits.                  "and add up
          ENDDO.
        ELSE.
    " If there IS a year change
          IF t_knc1-gjahr = l_date_from+0(4).
            l_num_times = 16 - l_date_from+4(2) + 1.    "you must loop 16 - initial_period + 1 times for the first year
            DO l_num_times TIMES.
              l_period = sy-index + l_date_from+4(2) - 1.
              CONCATENATE 'UM'                "compute dynamically the field name
                          l_period
                          'S'
                INTO l_fieldname.
              ASSIGN COMPONENT l_fieldname OF STRUCTURE t_knc1 TO <fs>.    "assign
              ADD <fs> TO d_debits.              "and add up
            ENDDO.
          ELSE.
            l_num_times = l_date_to+4(2).            "you must loop final_period times for the second year
            DO l_num_times TIMES.
              l_period = sy-index.
              CONCATENATE 'UM'               "compute dynamically the field name
                          l_period
                          'S'
                INTO l_fieldname.
              ASSIGN COMPONENT l_fieldname OF STRUCTURE t_knc1 TO <fs>.     "assign
              ADD <fs> TO d_debits.        "and add up
            ENDDO.
          ENDIF.
        ENDIF.
      ENDLOOP.
    You'll have the result on variable 'd_debits'.
    I hope this helps. Kind regards,
    Alvaro

  • INSERT in the custom database table to create a new entry.

    Hello Experts,
    I'm trying to INSERT the entry in my custom databse table that i have created. But I'm not sure what i'm missing as i'm getting the sy-subrc = 4 after the INSERT statement and my records are not added to the database table.
    I'm using the INSERT as below:-
          APPEND gw_relax TO gt_relax.
          INSERT  INTO zmm_bg_relax VALUES gw_relax.
    Please let me know your helpful responses on this,
    Thanks,
    Naveen

    Check [INSERT dbtab|http://help.sap.com/abapdocu_70/en/ABAPINSERT_SOURCE.htm] [FROM TABLE itab [ACCEPTING DUPLICATE KEYS]|http://help.sap.com/abapdocu_70/en/ABAPINSERT_SOURCE.htm#&ABAP_ALTERNATIVE_2@2@],
    If the addition ACCEPTING DUPLICATE KEYS  is specified, all rows are inserted for which this is possible. The remaining rows are rejected and sy-subrc is set to 4. The system field sy-dbcnt  is set to the number of lines that are inserted.
    So if you get sy-subrc = 4, some of the records of the internal table are already contained in the database table.
    You cannot put 2 or more records in a database table with the same primary key, primary keys are unique keys with the addition of a not-null constraint. If you need multiple records with a same key, you must add another key to the primary key. (use a timestamp or a counter)
    Regards,
    Raymond

  • Tabular form - how to auto populate a column with the user name

    Hi,
    I have a tabular form with 3 columns - (customer name, notes, user). my users are allowed to enter customer details in the notes section... as soon as the user completes notes section and save the form, I want "USER" field to be auto populate with the user name so that I may track activity by the user...
    Please advice how to accomplish it...
    thanks in advance

    Hi,
    After user saves the forms that means commit to the database, so you can simply write a trigger like:
    CREATE OR REPLACE TRIGGER "AUDIT"
    before insert or update on TABLE1
    for each row
    begin
    :new.user_field := nvl(v('APP_USER'),user);
    end;
    Regards,
    Aljaz
    Edited by: Aljaz on 4.3.2012 22:03

  • How the Payload Message and Logs are stored in the B1i Database Table: BZSTDOC

    I would appreciate it if someone could provide any documentation regarding B1i database further maintenance.
    for example:
    I want to know how the payload message and logs are stored in the table BZSTDOC, and how can we retrieve the payload message directly from the column DOCDATA.
    As described in the B1iSNGuide05 3.2 LogGarbageCollection:
    to avoid the overload of the B1i Database, I set the Backup Buffer to 90 days : so this means Message Logs from the last 90 days will always be available, but is there some way we can save those old messages to a disk so that I can retrieve the payload message anytime?
    in addition, let’s assume the worst, the B1iSN server or the B1i database damaged, Can we just simply restore the B1i database from a latest backup DB then it can work automatically after the B1iSN server is up and running again?
    BR/Jim

    Dear SAP,
    Two weeks passed, I still haven't received any feedback from you guys.
    Could you please have a look at my question?
    How is this Question going? Is it Untouched/Solving/Reassigned ?

  • How to synchronize between OID and the Custom Database  Tables ?

    Hi All,
    Our ADF Application is using Oracle SIngle-Sign On (OAS 10.1.4). Meanwhile we also maintain
    users login within Database table to store application menu accessibility data.
    i.e:
    Firstly user Login using Oracle SSO, after logged in, application will query the above mentioned
    database tables to determine which menu he/she has access.
    We have develope a security module to input users login into the database, so I need to synchronize
    the data into OID, so that that particular user can use Oracle SSO.
    How is the mechanism to do that ?
    Thank you very much,
    xtanto

    Hi,
    OID providesa Java and PLSQL API. I agree with Chris that from what you describe, the PLSQL API seems to be the best approach to take as it allows you to use database triggers for the synchronization
    Frank

  • How do I check the delete database table is successful?

    After delete all the records from the database table, how do I check it is successful?  When do I need to 'commit'?  (after delete table or after insert new data?)
    Thanks,
    Helen

    Hi,
      Check sy-subrc = 0..
      DELETE ZTABLE..OR INSERT ZTABLE...
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'DATABASE DELETE FAILED'.
      ELSE.
        COMMIT WORK...
      ENDIF.
    Thanks,
    Naren

  • Send the OHD database table load details as mail in Process chain

    Hi,
    We have a requirement that after the data is loaded into Open Hub destination we need to send an email to a list of users.
    The mail should contain the Open hub destination name, Calday, Request No, No of records and the message that the load has ended successfully.
    I know how to send an email in the process chain but how to send the details like Open hub destination name, Calday, Request No, No of records in the mail.
    Please suggest.

    Well we got a little idea:
    We have narrowed the req down to the following logic:
    select REQUID,No of records transferre, and the OHD name from RSBKREQUEST table
    where rsbkrequest-requid  = open hub table request
    Also the open hub table should be first sorted in descending order by request ID
    Now the main issue is:
    How to implement this logic and get the details from RSBKREQUEST table and send these details in the mail body.
    This we want to do in the message which is attached to the Open hub DTP load step of the PC. The message will go if the Open hub load is successful.
    In the message we are able to enter the receipient email address but how to add the above mentioned details.
    Actually we are trying to avoid the ABAP code step.
    Please suggest.
    Edited by: Debanshu Mukherjee on Dec 10, 2010 7:45 PM
    Edited by: Debanshu Mukherjee on Dec 10, 2010 7:46 PM

  • Updating the standard Database table

    Dear All
    requirement to change the Standard DB table i.e DPR_PROJECT
    regards
    Moderator Message: Put some effort into not only solving your issue but also into framing a proper question. Thread locked
    Edited by: kishan P on Sep 3, 2010 10:29 PM

    HI Jaipai,
    You have to find standard function modules / BAPI / class to update data from that table.
    If you have to change the table's structure, use enhancement to do that.
    Thanks!
    Duy

  • Auto Incrementing a field in a database table

    Hello All,
    I have created a database table for generating a unique ID, based on two key fields; Product and Area.
    For a particular Product and Area,the ID generated should be unique, and it will be the third field of my table.
    Is there any possible way by which i can generate the ID automatically,based on the Product And Area entered? The ID should also be automatically incremented based on the next entry.
    Can anyone help me in resolving this problem?
    Also, if i am deleting a particular Product and Area, will it be possible to remove the ID generated by it?
    Thanks In Advance.
    Shino.

    Hi,
    If you are using a generated maintenance screen and populating the data manually your approach will need to be different.
    It could be possible to use a user exit in the generated screen to populate your ID field, but you will face the risk that the user will be able to presumably over-type the ID or enter their own value.
    Consider your overall requirement and design, it may be that a generated maintenance sceen is not the most suitable way to build this functionality.
    Regards,
    Nick

  • Values not read from database table.

    Hi experts,
    I have an issue reading values from the database table. In my custom table I have a KUNAG field. The Sold-to partyis a 10 character field. I have saved a record with KUNAG = '0000694012'.
    But when i read the values in a program using KUNAG= '0000694012' no records are read. Kindly help
    Regards,
    Girish

    Hi,
         This field has conversion exit.
         Pass the appropriate value after converting.
    Regards,
    Srini.

Maybe you are looking for

  • Web part with managed navigation terms

    So I decided to use managed navigation feature for a site I'm working on, however as a requirement, there's a need to have three different sections of navigation (top, side, bottom) and because of the limitation to use only one term set as managed na

  • Open Universal worklist directly through link in mail

    Hi, I have a requirement where the approver will receive a mail notification of the task assigned to him by a requester. The mail should contain a URL which should directly open the UWL page(containing task) without asking for login/password. If i di

  • Ps elements 10 on mac problems

    hi, i just downloaded the programm yesterday from the app store onto my imac. i want to use it as an extention to my aperture 3. I have the following questions/problems: + starting the programm takes at least 2 minutes, is this normal? I use an Imac

  • Adobe Acrobat disappeared all at once

    For some mystery reasons that the entire workstations (100 computers) in my company that had Adobe Acrobat installed disappeared just overnight. This morning I came in and all the users come to me and ask where is adobe acrobat, so I looked in their

  • Java standalone and EJB

    Hi everyone, I want my java class to call an EJB. I created an EJB and deployed it on my J2EE server. I now want to call that EJB. I created a Context and looked up that EJB...but it doesn't work. The exception occurs when I try to get the Home objec