Z database table needs to have field creation/update/deletion tracked

Hi,
I have a Z database table.
I have a program that gets data from an excel file and uploads the content to the Z database table.
I need to track the creation/update/deletion of the records in the Z database table.
The Z database table can also have records changed/updated/deleted manually thru table maintenance. These changes also need to be tracked.
How do I do this?
~ Eric

Hi
For a my z-table (called ZFAGTD01), I created the object for change documents, this is the log after generating it:
Change documents: Display information about generated sources                                                                               
Change doc. object Z_PROAGE_PRV                                                                               
Generation on      23.07.2004 11:51:28                                 
            of     SVIL01                                                                               
Include programs and function modules                                  
Data declaration, TOP...................... FZAGPCDT                   
Consisting of............................. FZAGPCDF                   
and....................................... FZAGPCDV                   
Update function module..................... Z_PROAGE_PRV_WRITE_DOCUMENT
Call update function module................ FZAGPCDC                                                                               
Dictionary structures                                                  
VZFAGTD01
Just as you see, the system has created the fm and some includes containing all data it needs to call the fm.
So u need only to use those includes, just only u need to consider before calling the fm u need to fill:
- The change flag: usually called UPD_<Z table>;
- Fill the header Y<ZTABLE> of z-table with old data;
- Fill the header X<ZTABLE> of z-table with new data;
- Fill the variables   TCODE, UTIME,  UDATE,  USERNAME,
- Fill the variable OBJECTID with the key of Z-table
For example my object is used in my program in this way:
FORM INSERT_CHANGE_DOCUMENT.
  CHECK FL_CHANGE_DOC = 'X'.
  CHECK SY-SUBRC = 0.
  CONCATENATE XZFAGTD01-MANDT XZFAGTD01-BUKRS XZFAGTD01-GJAHR
                                          XZFAGTD01-BELNR INTO OBJECTID.
  TCODE = SY-TCODE.
  UTIME = SY-UZEIT.
  UDATE = SY-DATUM.
  USERNAME = SY-UNAME.
* Load old data: header
  IF ZFAGTD0K IS INITIAL.
    CLEAR YZFAGTD0K.
  ELSE.
    SELECT SINGLE * INTO YZFAGTD0K
                    FROM ZFAGTD0K WHERE BUKRS   = XZFAGTD01-BUKRS
                                    AND GJAHR   = XZFAGTD01-GJAHR
                                    AND BELNR   = XZFAGTD01-BELNR.
  ENDIF.
* Load old data: items
  SELECT * INTO TABLE YZFAGTD01 FROM ZFAGTD01
                            FOR ALL ENTRIES IN XZFAGTD01
                                   WHERE BUKRS   = XZFAGTD01-BUKRS
                                      AND GJAHR   = XZFAGTD01-GJAHR
                                      AND BELNR   = XZFAGTD01-BELNR
                                      AND POSNR_P = XZFAGTD01-POSNR_P.
  SORT: XZFAGTD01 BY POSNR_P,
        YZFAGTD01 BY POSNR_P.
* Check if heade was changed
  IF YZFAGTD0K <> ZFAGTD0K.
    UPD_ZFAGTD0K = 'U'.
  ELSE.
    CLEAR UPD_ZFAGTD0K.
  ENDIF.
  UPD_ZFAGTD01 = 'U'.
  PERFORM CD_CALL_Z_PROAGE_PRV.
  REFRESH XZFAGTD01.
ENDFORM.                    " INSERT_CHANGE_DOCUMENT
Max

Similar Messages

  • User Exit for New Field Creation & Updation at Sales Order Level

    Hi All,
    I want to create one new field in Additional Data B Tab of Sales Order.
    Also when the sales order is created with reference to a Contract, that Contract number to be updated in that field.
    Which user exit need to be used for this field Creation & Updation at the time of order creation? Is it MV45AFZZ?
    Pls suggest.
    Rgds,
    Senni.B

    Hi
    Additional header data is on screen SAPMV45A 0309, additional item data on screen SAPMV45A 0459. These screens contain the Include screens SAPMV45A 8309 or SAPMV45A 8459 as user exits.
    Regards
    Madhu

  • Labview database problem: Create a database table from user defined fields

    I am trying to create a new table in an access database opened by an ODBC connection from information entered a table stored in the database, but every time I try to create the table, the Labview Database connectivity toolkit VI for creating a table throws a cryptic error
    "Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition. in NI_Database_API.lvlib:Conn Execute.vi->NI_Database_API.lvlibB Tools Create Table.vi->DatabaseCreateHeaders.vi"
    I think this is becuase I am trying to re-create the database  column variable type, but I am not sure what I am doing wrong.  Everything seems to be fine as the data types go, and everything works as long as I use a constant to create the database columns.  I even tried putting all of the information into the format labview defined, changed that to a variant, and redefined it as the labview database column type. 
    I have attached a simplified VI and a picture of what I am trying to
    do, but I would appreciate any help I can get.  Hopefully I won't have
    pulled out all of my hair by the time some one replies!
    Solved!
    Go to Solution.
    Attachments:
    DatabaseUserDefinedTable.vi ‏14 KB
    UserDefinedColumns.JPG ‏48 KB

    Hi everyone. I am new to the database tool kit using labview. I am using labview 9.0f2 on Windows Xp. I am required to create a database (task is to create a table and to insert values into the table using Microsoft access 2007). I am trying to learn using the Create Database table.vi found with the software. I understand that need to create an access file and also had a mdl file which is name after it.(I had created them). Looking at the example given, I would like to add a few more variables, to be exact 6 more variables(therefore i would have 6 colum in my access file rite?). From the "connection information" the help information shows that it contain an 1D array of DB tools colum. ctl and also a cluster of 4 elements. the link to the access file, LabVIEW.udl shows that it restrict the colum in the access file.eg it has only stringcol,intcol,doublecol. I need to add more colum but cant add just like tt.
    qn1: How to i add insert more varibles into the database so that it will apprears in access.
    qn2: I cant drag and insert the "connection information" just to have more input. how do i do it?
    qn3: where can i edit the info so that i can add more cluster into the access? when i drag out the input turn greyish.

  • No primary key in database table.Need help with ODS keys.

    Hi ,
    I am pulling data from a database table where there in no primary key . So when I designed my ODS and loaded the data , the records got overwritten...(If there are 5000 records only 4000 got transfered) . So Now the only option I can think of is putting all the database fields as key fields in my ODS but then I am restricted to only 16 fields for ODS and I have more than 24 fields in my database table.What should I do now.Any help will be appreciated.
    Thanks a lot!!!

    Hi,
    are you trying to pull data from structures.....putting all the fields in the key fields is the ODS keys is not a solution.
    what is your reporting requirement....try to maintain the keys for which you want to see the data
    e.g. if in report you want to see the data for sales order then put the keys as sales order for ODS...so that the data is correct at the sales order level.
    ie. the try to maintain the ODS at the level ...which can be used.
    This is the just a guide....you can decide with your requirement.
    Thanks

  • How to find the database table for this screen field

    hi in XD02
    There is a scrren field customer
    name1 (firt line under name)
    and email id fields
    i wnat to know where the data stores goes w hen user eners in this screen i mean in which table and how to find it
    for kunnr name1 i suppose it goes to kna1 but how to find it?
    and f or email id whre it gots which table
    regards
    Arora

    Hi,
    when you press F1 it will give the necessary information
    but some times it may give the structure names also
    those structures are being used by the back end module pool
    programm
    so every time we can get the exact information about the
    data type or length
    but not sure that every time we get the exact database table name
    and field name
    according to me, if i dont know where some field are getting stored in
    database ( if the field name and table is structure )
    then i will ask my functional consultant ...
    thanks & regards,
    Venkatesh

  • UrGENT-DUMP while querying database table into itab(Assigned field Symbol)

    Hi,
    __I am getting a dump whose description is as follows__-
    "" In an SQL array select, the internal table used to hold the
    selected records must be at least as wide as the database table
    from which the records are being read.
    In this particular case, the database table is 820 bytes wide,
    but the internal table is only 814 bytes wide.""
    The following code had been written:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_tabl TYPE dd02l-tabname.                                      "Table Name
    SELECTION-SCREEN END OF BLOCK b1.
    FIELD-SYMBOLS: <fs_itab> TYPE STANDARD TABLE,
                   <fs_wa> TYPE ANY,
                   <fs_itab1> TYPE STANDARD TABLE,
                   <fs_wa1> TYPE ANY.
    FORM generate_internal_tab .
      DATA: o_itab TYPE REF TO data,
            o_wa TYPE REF TO data,
            o_itab1 TYPE REF TO data,
            o_wa1 TYPE REF TO data.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = p_tabl
        CHANGING
          ct_fieldcat            = it_fcat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    *Create Dynamic Table for it_fcat
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = it_fcat
        IMPORTING
          ep_table                  = o_itab
        EXCEPTIONS
          generate_subpool_dir_full = 1
          OTHERS                    = 2.
      IF sy-subrc EQ 0 OR o_itab IS NOT INITIAL.
        ASSIGN o_itab->* TO <fs_itab>.
        CREATE DATA o_wa LIKE LINE OF <fs_itab>.
        ASSIGN o_wa->* TO <fs_wa>.
      ENDIF.
    *Download the file to Application server
        SELECT *
          FROM (p_tabl)
          INTO TABLE <fs_itab>.
    So i am geting a dump in placing contents of table(p_tabl) into <fs_itab>.Should the type declarations be changed???
    Please give me an solution to resolve this dump.
    Thanks and regards-
    Sumita

    You are trying to put more fields in the internal table than what is declared presently for itab. Check if one of the fields is selected but not being passed on to a internal table field.

  • Login against database table,need help

    hi all:
    i need to develop a login page that authenticate users against a database table
    i made a login page with no bindings a submit button which submit the form to a struts data action ,i defined a custom method at the vo implementation expose it to the client interface and drag and drop this method into the struts action this is the method code
    public boolean findProjectOwnersByOwnerid (String Ownerid)
    setWhereClauseParam(0,Ownerid);
    executeQuery();
    boolean found = (first() != null );
    setWhereClause(null);
    setWhereClauseParams(null);
    setMaxFetchSize(0);
    return found;
    in the struts data action i override the data forword action this is the code:
    protected void findForward(DataActionContext actionContext) throws Exception
    // TODO: Override this oracle.adf.controller.struts.actions.DataAction method
    super.findForward(actionContext);
    String target="failed";
    JUCtrlActionBinding method = actionContext.getCustomMethod();
    String result = (String)method.getResult();
    System.out.println(result);
    if (result.equalsIgnoreCase("true"))
    target = "failed";
    if (result.equalsIgnoreCase("false"))
    target = "success";
    actionContext.setActionForward(target);
    now when i run this page i get this error java.lang.NullPointerException
    can anyone help please

    Hi,
    the nice thing with NullPointer exceptions is that it also tells you the source and line number where this occurs. It would be useful to follow up on this to see where the problem originates
    Frank

  • What's the best MS SQL tool(s) for managing (creation, updating, deletion, pausing, starting, etc) a bunch of replicated databases?

    I'm looking for recommendations on how best to program (scripts, procedures, anything else) managing a set of databases across multiple datacenters. The tasks I would like to be able to do database by database is...
    copy a specified database from one server to another ("import") without the user access rights
    add replication to the "imported" database objects based on an extended property
    update the replicating "imported" database, including changes to the data values, and changes in schema, without bringing down the database (rolling updates across the various datacenters is permitted)
    adding/modifying a standard set of maintenance plans for each Database
    removing replication from a selected database
    I'm familiar with the standard SQL product but have no exposure to the other SQL components like SSIS. I have to date several SQL batch scripts that do parts of the above but it seems there must be a better way. Assume that there is one Enterprise Edition
    SQL instance at each datacenter. Replication is transactional Peer 2 Peer. We are also considering if we want to add DB mirroring but have decided not to do so at this time.
    BTW I'm one of those people that can't get the "copy database" menu option in SSMS to work. I'm not a DBA but it looks like I'm going to need how to act like one.
    Developer Frog Haven Enterprises

    I would recommend you to get involve DBA for any such tasks. The task which are listed it's not going to be simple thing. If you don't have prior experience in High availability configuration, it's really difficulty to manage even if you've any third party.
    But you can rely on backup and restore for any third party tools.
    To manage database ,configure  and maintain HA you need to have SQL Server HA knowledge.
    My testing so far seems to show that it's quite easy to break the replication with changes
    to the databases. Using SSMS "canned" wizards and procedures to delete and recreate replication leaves many vestiges behind cluttering up the database instance.
     You can create a script to cleanup the replication and re-create it from the scratch
    http://www.mssqltips.com/sqlservertip/1808/sql-server-replication-scripts-to-get-replication-configuration-information/
    http://support.microsoft.com/default.aspx?scid=kb;en-us;324401
    --Prashanth

  • Please help me I am not seeing Database table column names in field explorer view

    Hi,
    I am developing a crystal report using eclipse and sql server. After creating connection, when i drag and drop tables, The table name and its columns should apper in field explorer view. Then we drag the columns onto crystal report. Unfortunately I am just  seeing only table names but not column names in field explorer view. Could anyone help me?
    After downloading eclipse I have plugged in the crystal report using the following instructions
    1. Click on the Help menu, and then Software Updates > Find and Install... to open the Install/Update wizard.
    2. Select Search for new features to install and click Next.
    3. Click the New Remote Site button. This will launch the New Update Site wizard
    4. Type the Business Objects Updsate Site for the Name field and the following for the URL: http://www.businessobjects.com/products/dev_zone/eclipse/
    5. Click OK to complete the wizard.
    6. Enable the newly created Business Objects Update Site checkbox as well as the Callisto Discovery Site (which should appear by default with Eclipse 3.2) and click Finish.
    Expand the Business Objects Update Site node and enable the Crystal Reports for Eclipse 1.0.0v555 checkbox.
    8. Expand the Callisto Discovery Site and click the button "Select Required". This will automatically select the required Eclipse features necessary to successfully install Crystal Reports for Eclipse.
    Thank You
    Rajavardhan Sarkapally

    Now we have a lot of views which select data from the tables, but I need to get the "Table Column Name" that is linked in the view.
    If you are using SQL Server 2012/2014, then you can use
    sys.dm_exec_describe_first_result_set (Transact-SQL) to gte the informations.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Proxy to file interface , need to have field name aslo in the file

    Hi , i ahve done a interface from Proxy to file , in which , i have to give a label name of all the fields in the top of the file which acts as header in my fields , is there ant option in the XI to give header or label
    please help me in this
    thanking you
    sridhar

    Hi Sridhar,
    This link might be helpful:[http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm]
    Regards
    Bhanu
    Intelligroup.

  • Walk thru all database table records until match is found then delete

    I have a database connected form. It has a scipt that checks to see if that forms data has already been submitted by searching thru the records for the formID number. I want the records to be deleted if found and then add new records incase the form data has been changed. I can make this work once by using the script below. Is there a short way to make it continue searching and deleting all the records that start with that form ID number instead having to copy this script 12 times (maximum number of records allowed).
    var oFile = Subform1.FileName.formattedValue;
    var bFound = false;
    while(!oDB.isEOF()){
    if(xfa.record.DataConnection2.FileName.value == oFile){
    bFound = true;
    break;
    oDB.next();
    if(bFound){ 
    oDB.delete();
    oDB.update();

    types : begin of ty_jtab,
           f1(10) type c,
           end of ty_jtab.
    data : jtab type standard table of ty_jtab with header line,
           itab type standard table of ty_jtab with header line.
    data : wa_jtab type  ty_jtab,
           wa_itab type  ty_jtab.
    *populate itab for say db
    itab-f1 = '1000'. append itab.
    itab-f1 = '2000'. append itab.
    itab-f1 = '3000'. append itab.
    *populate jtab
    jtab-f1 = '1000'. append jtab.
    jtab-f1 = '4000'. append jtab.
    jtab-f1 = '8000'. append jtab.
    jtab-f1 = '9000'. append jtab.
    sort itab by f1.
    sort jtab by f1.
    clear: itab, wa_itab.
    loop at itab into wa_itab.
      read table jtab into wa_jtab with key f1 = wa_itab-f1
                                             binary search.
      if sy-subrc ne 0.
        delete itab from wa_itab.
        if sy-subrc ne 0.
          write :/ 'fail', wa_itab-f1.
        endif.
      endif.
    endloop.
    *o/p is two times fail which shows the assumption.
    br,
    vijay

  • [4.0] Bug - can't save changes in table after clearing date field with shift+delete

    Steps to reproduce:
    1) Open any table containing columns of DATE type, go to "Data" tab
    2) Find any non-null cell in said column
    3) Select said cell, press shift+delete. Cell's value becomes (null) and row is marked for update.
    4) Press Commit button or F11
    After that, this line appears in "Messages" window:
    One error saving changes to table "SCHEMA"."TABLE_NAME":
    If you clear column by typing space and deleting it, cell's value becomes (null) as well, but commit works. Update statement from worksheet also work, so it's not a table issue.

    please any answer
    شركة نظافة بالرياض شركة تنظيف شقق بالرياضشركة تنظيف موكيت بالرياضشركة تنظيف مجالس بالرياضشركة تنظيف منازل بالرياض شركة تسليك مجارى بالرياضشركة نقل اثاث بالرياضشركة مكافحة حشرات بالرياضشركة تنظيف بيوت بالرياضشركة تنظيف خزانات بالرياضشركة عزل اسطح بالرياضشركة تنظيف بالخرجشركة رش مبيدات عزل اسطحتنظيف شقق بالرياضتنظيف موكيت بالرياضشركة تنظيف مجالس بالرياضشركة تنظيف بيوت بالرياضشركة تنظيف واجهات زجاج بالرياض شركة تنظيف بيارات بالرياضشركة تنظيف بالخرجشركة تنظيف منازل بالرياضشركة نقل اثاث بالرياضشركة تنظيف خزانات بالرياضشركة مكافحة حشرات بالرياضشركة نقل اثاث بالرياضشركة مكافحة حشرات بالرياضشركة تخزين اثاث بالرياضنقل اثاثشركة تنظيفشركة تنظيف شركة تنظيف شقق بالرياض شركة تنظيف موكيت بالرياض شركة نقل اثاث بالرياضشركة تنظيف بيوت بالرياضشركة تنظيف واجهات حجر بالرياضشركة كشف تسربات المياه بالرياضشركة تخزين اثاث بالرياضنقل اثاثشركة تنظيف فلل بالرياضشركة تخزين عفش بالرياضشركة نقل عفش بالرياضشركة تنظيف موكيت بالرياضشركة تنظيف مجالس بالرياضشركة تنظيف شقق بالرياضشركة تنظيف بيوت بالرياضشركة تنظيف بيارات بالرياضشركة رش مبيدات بالرياضشركة مكافحة حشرات بالرياضشركة عزل خزانات بالرياضعزل الاسطحشركة تنظيف خزانات بالرياضشركة تنظيف واجهات زجاج بالرياض شركة نقل اثاث بالرياضشركة ترميمات عامة بالرياضشركة تنظيف منازل بالرياضشركة تسليك مجارى بالرياض شركة تنظيف واجهات حجر بالرياضشركة كشف تسربات المياه بالرياضشركة تخزين عفش بالرياضنقل اثاثشركة تنظيف فلل بالرياضشركة تخزين عفش بالرياضشركة نقل عفش بالرياضشركة تنظيف موكيت بالرياضشركة تنظيف مجالس بالرياضشركة تنظيف شقق بالرياضشركة تنظيف بيوت بالرياضشركة تنظيف منازل بالرياضشركة تنظيف بيارات بالرياضشركة رش مبيدات بالرياضشركة مكافحة حشرات بالرياضشركة عزل خزانات بالرياضعزل الاسطحشركة تسليك مجارى بالرياضشركة تنظيف خزانات بالرياضشركة تنظيف واجهات زجاج بالرياضترميمات عامة شركة تنظيف واجهات حجرية بالرياضشركة كشف تسربات المياه بالرياضشركة تخزين اثاث بالرياضشركة نقل اثاث بالرياضشركة تنظيف فلل بالرياضشركة تخزين عفش بالرياضشركة نقل عفش بالرياضشركة تنظيف موكيت بالرياضشركة تنظيف مجالس بالرياضشركة تنظيف شقق بالرياضشركة تنظيف بيوت بالرياضشركة تنظيف بيارات بالرياضشركة رش مبيدات بالرياضشركة مكافحة حشرات بالرياضشركة عزل خزانات بالرياضشركة عزل اسطح بالرياضشركة تنظيف خزانات بالرياضشركة تنظيف واجهات زجاج بالرياض شركة كشف تسربات المياه بالخرجشركة تخزين اثاث بالخرجشركة نقل اثاث بالخرجشركة تخزين عفش بالخرجشركة نقل عفش بالخرجشركة تنظيف موكيت بالخرجشركة تنظيف مجالس بالخرجشركة تنظيف شقق بالخرجشركة تنظيف بيوت بالخرجشركة تنظيف منازل بالخرجشركة تنظيف بيارات بالخرجشركة مكافحة حشرات بالخرجشركة ترميمات عامة بالرياضشركة عزل خزانات بالرياضشركة عزل اسطح بالخرجشركة تنظيف خزانات بالخرجشركة تسليك مجاري بالخرجشركة رش مبيدات بالخرجشركة تنظيف بالخرج شركة كشف تسربات المياه بالخرجشركة تخزين اثاث بالخرجشركة نقل اثاث بالخرجشركة تخزين عفش بالخرجشركة نقل عفش بالخرجشركة تنظيف موكيت بالخرجشركة تنظيف مجالس بالخرجشركة تنظيف شقق بالخرجشركة تنظيف بيوت بالخرجشركة تنظيف منازل بالخرجشركة تنظيف بيارات بالخرجشركة مكافحة حشرات بالخرجشركة عزل خزانات بالخرجشركة عزل اسطح بالخرجشركة تنظيف خزانات بالخرجشركة تسليك مجاري بالخرجشركة رش مبيدات بالخرجشركة تنظيف فلل بالخرج شركة كشف تسربات المياه بالخرجشركة تخزين اثاث بالخرجشركة نقل اثاث بالخرجشركة تخزين عفش بالخرجشركة نقل عفش بالخرجشركة تنظيف موكيت بالخرجشركة تنظيف مجالس بالخرجشركة تنظيف شقق بالخرجشركة تنظيف بيوت بالخرجشركة تنظيف منازل بالخرجشركة تنظيف بيارات بالخرجشركة مكافحة حشرات بالخرجشركة عزل خزانات بالرياضشركة عزل اسطح بالخرجشركة تنظيف خزانات بالخرجشركة تسليك مجاري بالخرجشركة رش مبيدات بالخرجشركة تنظيف فلل بالخرجشركة ترميمات عامة بالرياضشركة ترميمات عامة بالخرجشركة تنظيف واجهات حجرية بالخرج

  • Need to perform multi-row update/delete

    Gday,
    I have a request to have one update button for a multi-row form. Also needed will be a checkbox as part of the row.
    The check boxes only purpose is to signify the record should be deleted. Thus I am assuming I cannot use default
    apex functionality and must manually build the multi-row form. I guess I would loop through and check to see if a
    record is checked delete otherwise loop through and update all columns for that record? I am assuming I should
    use the examples in http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html
    is that all still valid for apex 3.2.1?
    Cheers

    Hello:
    You could also do the following
    Generate the tabular form page using the wizard
    Delete or not display the 'Delete' button
    Delete or not execute the 'ApplyMRD' process
    Create a new page process with a sequence higher than the standard MRU processes. Make this process conditional on the 'Submit' button. Use code similar to the one below for this page processfor i in 1..apex_application.g_f01.count loop   --- f01 is the selector checbox, f02 is the hidden column with the table's PK
      delete from emp where empno=apex_application.g_f02(apex_application.g_f01(i));
    end loop;Now, when you click 'Submit' records with their selector checkbox checked will be deleted by the newly added page process. The rest of the functionality of the tabular form remains the same.
    varad

  • Hi friends, I have a doubt in inserting a field to database table and inserting the same values in two different tables

    I have a mpp screen for a cd library management system (we are practicing on it).
    We have a main screen where a user should enter the enteries and while clicking a add button it should be inserted in a table, Here the problem rises the table name are ztransaction and zstatus.The fields in mpp are cdid,customerid,transaction id,date of issue and duedate.Now after entering all the values on clicking add button it should be inserted to database table ztransaction and the field cdid alone should be inserted both in ztransaction and zstatus.
    Thank you

    Hi Raghuram R G,
    Check for Primary key and foreign key in the Database table??? Because of this it was not inserting...check and confirm??
    Regds,
    Vijay SR

  • Overwrite database record - Table has only 1 field and record

    Hi,
    How do you overwrite a record in a database table?
    The database table that we have only has one field and this field is used to count the print number of a specific label. This table will only have 1 record.
    The field is also used as part of an id.
    So during each program run, I will select the current number in the field, add to it in my program, then will need to overwrite the current value in the database table with the new value.
    Please suggest if something different should be done.
    Thanks,
    John

    You will need to do a delete and then insert instead of delete and update. Update wont work in this case.
    "Lock DB table
    DELETE FROM <DB TABLE> CLIENT SPECIFIED WHERE MANDT = SY-MANDT.
    INSERT <DB TABLE> FROM <HEADER>.
    "Unlock DB table.
    regards,
    Advait

Maybe you are looking for

  • JMS messages stuck in queue in weblogic v923 cluster

    Hi all, Enviornment details: In our pre-production weblogic v923 cluster enviornment with Oracle 10g database, there are 10 server boxes with 2 managed nodes running on each server box in linux enviornment. There are 3 JMS queues and 1 error queue pe

  • How do I parse this string?

    I have a string of html , which looks like this: <head></head><body><p>Stringof<strong><em>tags</em></strong>inhtml</p> I have to go ahead a search for the tags and put them into a tree. for instance. <head> would be the root, then I would go to <p>

  • Get hurt by using the new macbook

    does anyone agree that the edge of the macbook is quite sharp???? every time i use the keyboard and do my typing, my wrists are very easy to get hurt by the sharp edge of the macbook, even though that hurt is not that serious, just feeling a bit pain

  • When I export a photo from lightroom, the image is very pixelated.

    When I export a photo from lightroom, the image is very pixelated. This pixelization occurs irrespective of whether I make adjustments in Lightroom.  It seems that just placeing the photo into he develope modual  without doing anything to it taints t

  • No "back to school" promotion on new iPods :(

    I just called Apple, and am sorry to discover the "Back to School" promotion for educators and students has effectively ended 4 days early, as none of the new iPods are eligible for the promotion. Incidently, I'm sorrier to discover how rude the phon