Update database table from a work area

hi!
I have a workarea that is like the corresponding database table. There are a lot of fields so I dont want to update each field with an UPDATE but instead I want to do som sort of:
UPDATE dbase_table
FROM work_area
WHERE dbase_table-primary_key = work_area-primary_key
I could only find a statement called UPDATE dbase_table FROM  work_area but I dont understand how without specifying a WHERE clause it knows which rows to update.
regards
Baran

UPDATE  dbtab      FROM wa. or
UPDATE (dbtabname) FROM wa.
Extras:
1. ... CLIENT SPECIFIED
2. ... CONNECTION con
Effect
Changes one single line in a database table, using a primary key to identify the line and taking the values to be changed from the specified work area, wa. The data is read out of wa from left to right, matching the line structure of the database table dbtab. The structure of wa remains unchanged. This means that wa must be at least as wide (see DATA) as the line structure of dbtab, and have the same alignment. Otherwise, a runtime error occurs.
If either the database table, dbtab, or the work area, wa, contain Strings, wa must be compatible with the line structure of dbtab.
Example
Changing the telephone number of the customer with customer number '12400177' in the current client:
DATA   wa TYPE scustom.
SELECT SINGLE * FROM scustom INTO wa
  WHERE id = '12400177'.
wa-telephone = '06201/44889'.
UPDATE scustom FROM wa.
When the command has been executed, the system field SY-DBCNT contains the number of updated lines (0 or 1).
Examples
Update discount for the customer with the customer number '00017777' to 3 percent (in the current client):
DATA: wa TYPE scustom.
SELECT SINGLE * FROM scustom INTO wa
  WHERE id = '00017777'.
wa-discount = '003'.
UPDATE scustom FROM wa.
The Return Code is set as follows:
SY-SUBRC = 0:
The specified line has been updated.
SY-SUBRC = 4:
The system could not update any line in the table, since there is no line with the specified primary key.
BR< JAcek

Similar Messages

  • How to update database table from Internal Table

    hi experts,
        Can anyone please assist me in inserting records to a database table from an Internal Table
    whose structures are identical.
    Thanks in Advance,
    Sudhaa............

    Hi Sudha,
    Here are some example of update and insert:
    UPDATE SFLIGHT SET PLANETYPE = 'A310'
    PRICE = PRICE - '100.00'
    WHERE CARRID = 'LH' AND CONNID = '0402'.
    This example overwrites the contents of the PLANETYPE column with A310 and decreases the value of the PRICE column by 100 for each entry in SFLIGHT where CARRID contains u2018LHu2019 and CONNID contains u2018402u2019.
    TABLES SPFLI.
    DATA WA TYPE SPFLI.
    MOVE 'AA' TO WA-CARRID.
    MOVE '0064' TO WA-CONNID.
    MOVE 'WASHINGTON' TO WA-CITYFROM.
    UPDATE SPFLI FROM WA.
    MOVE 'LH' TO SPFLI-CARRID.
    MOVE '0017' TO SPFLI-CONNID.
    MOVE 'BERLIN' TO SPFLI-CITYFROM.
    UPDATE SPFLI.
    CARRID and CONNID are the primary key fields of table SPFLI. All fields of those lines where the primary key fields are "AA" and "0064", or "LH" and "0017", are replaced by the values in the corresponding fields of the work area WA or the table work area SPFLI.
    DATA: ITAB TYPE HASHED TABLE OF SPFLI
    WITH UNIQUE KEY CARRID CONNID,
    WA LIKE LINE OF ITAB.
    WA-CARRID = 'UA'. WA-CONNID = '0011'. WA-CITYFROM = ...
    INSERT WA INTO TABLE ITAB.
    WA-CARRID = 'LH'. WA-CONNID = '1245'. WA-CITYFROM = ...
    INSERT WA INTO TABLE ITAB.
    WA-CARRID = 'AA'. WA-CONNID = '4574'. WA-CITYFROM = ...
    INSERT WA INTO TABLE ITAB.
    UPDATE SPFLI FROM TABLE ITAB.
    This example fills a hashed table ITAB and then overwrites the lines in SPFLI that have the same primary key (CARRID and CONNID) as a line in the internal table.
    Insert statement :
    TABLES SPFLI.
    DATA WA TYPE SPFLI.
    WA-CARRID = 'LH'.
    WA-CITYFROM = 'WASHINGTON'.
    INSERT INTO SPFLI VALUES WA.
    WA-CARRID = 'UA'.
    WA-CITYFROM = 'LONDON'.
    INSERT SPFLI FROM WA.
    SPFLI-CARRID = 'LH'.
    SPFLI-CITYFROM = 'BERLIN'.
    INSERT SPFLI.
    If the database table does not already contain a line with the same primary key as specified in the work area, the operation is completed successfully and SY-SUBRC is set to 0. Otherwise, the line is not inserted, and SY-SUBRC is set to 4.
    Regards,
    Premraj kaushik

  • Updating database table from internal table

    I am updating the database table from internal table for this is have used the following syntax
    Update kna1 from table itab.
    And it is giving error message as the work are itab is not long enough.
    Please help me.

    Hi,
       Refer this code
    *&      Form  SUB_READ_UPDATE_BSEG
          text
    FORM sub_read_update_bseg.
      IF NOT it_final[] IS INITIAL.
        LOOP AT it_final INTO wa_final.
          UPDATE bseg SET zuonr = wa_final-ccnum
                      WHERE bukrs EQ wa_final-bukrs
                      AND   belnr EQ wa_final-vbeln
                      AND   rfzei EQ wa_final-rfzei
                      AND   saknr NE ' '.
        ENDLOOP.
    *--Message data updated successfully
        MESSAGE i888 WITH text-002.
        LEAVE LIST-PROCESSING.
      ELSE.
    *--Message No data found
        MESSAGE i888 WITH text-003.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " SUB_READ_UPDATE_BSEG
    Regards,
    PRashant

  • Updating database table from an internal table

    Hi All,
    I am updating a database table from an internal table.
    I am changing the non-key fields in that table.
    when I check sy-subrc = 4.
    Record already exists, because I am changing non-key fields of the
    database table.
    Is there any addition like to accept the duplicate keys with update.
    Alternatively, I have used Modify, It is adding new record,
    Again, I have search the old record and use Delete on the database table.
    Thanks & Regards,
    Kalyan Chandramouli
    SAP ABAP Consultant

    Hi,
    You are right, the field which I am trying to change is a part of primary key.
    Because, sy-subrc = 4. says,
    No line with specified primary key exits in the database table.
    I have a Z-tabel, with Kunnr Vkorg Matnr Bzirk Bztxt Split_percentage
    In this table primary key consists of KunnrVkorgMatnr+Bzirk.
    I am able to change the Split_percentage using UPDATE.
    Now, my client want to change Bzirk, Bztxt also in the table.
    How can I Go.
    Thanks & Regards,
    Kalyan Chandramouli
    SAP ABAP Consultant

  • Updating database table from co11n transaction ?

    I got a requirement to add two new addional fields  and want to save it in the standard table for reporting purpose. I follwed the steps like :
    1. I created new fields in the table AFRU using appending struture. and activated it using se14.
    2. I created a project and entered the enhancment (CONFPP07)  and i created the screen-exit. then i declared thse two fields in the include : ZXCOFTOP. once i activated the screen exit it appeared in the CO11N TCODE but when i enter some values in this fields , its getting stored  in the variable but i dont know how to store this value in the table AFRU .
    3. for updating i used the exit CONFPP05 and my would be like AFRUD_TAB-ZZSHIF = CAPTAIN.
    but the problem is its not getting updated in the database table AFRU.
    should i have to use module ...endmodule in ( SAPLCORU_S - 900 screen , exit : CONFPP07 ) and write code... , like the we follow
    for ztransaction or how should i solve this issue ?

    So, according to your code, it means that :
    1) your screen field is WA_AFRUD-ZZSHIF
    2) WA_AFRUD is declared as global (in ZXCOFTOP)
    Is that true?
    In PAI: EXIT_SAPLCORU_S_101, you should only do:
    move wa_afrud-zzshif to es_afrud-zzshif.
    In Exit : EXIT_SAPLCORF_105, you have to replace 'A'
    LOOP AT AFRUD_TAB.
    AFRUD_TAB-ZZSHIF = *wa_afrud-zzshif.* "'A'
    MODIFY AFRUD_TAB.
    ENDLOOP.
    Note that LOOP AT  is problable not the good coding (I think that this exit has to remain empty), it was just a test to check it works
    Did you think to activate your project in CMOD? (you have to activate both project, and the exits)
    Are you sure your exit is called. Did you debug it?
    See also Note 12831 (program SAPRSMODCHECK) to check there is no problem between project/exits
    Edited by: Sandra Rossi on Oct 17, 2008 6:59 PM

  • Updating database table from co11n ?

    I have added two fields in transaction co11n.....now i want to store these data in the database table .i have used the exit CONFPP07.....where and how should i write the code...can everyone give me some tips to do this ?

    Hi,
    You have to write the code in the below func module exits:
    EXIT_SAPLCORU_S_100 : Transfer Data from SAPLCORU_S to Customer-Defined Screen
    Use just move-corresponding <Func Module Paramters> To <Include strucutre of your table wherre customer fields are appended>
    EXIT_SAPLCORU_S_101 : Return Data from Customer-Defined Screen to SAPLCORU_S
    Use just move-corresponding ES_AFRUD To screen fields
    Regards
    Shiva

  • Need help in updating database table from screen fields

    Hi,
    Can anyone tell me how to update the database table with the entries given in the fields of a screen ?...a procedure-wise explanation would be very helpful.
    Thank you.
    Moderator message: sorry, no beginner forums here, please search for available information or attend training.
    locked by: Thomas Zloch on Aug 12, 2010 3:16 PM

    Hi,
    Can anyone tell me how to update the database table with the entries given in the fields of a screen ?...a procedure-wise explanation would be very helpful.
    Thank you.
    Moderator message: sorry, no beginner forums here, please search for available information or attend training.
    locked by: Thomas Zloch on Aug 12, 2010 3:16 PM

  • How to delete the records from database table without using work area

    Hi all,
    The purpose of the down program is to delete the entire contents from all the tables. The deletion of the table should be in sorted manner. Is there any other way to write the code more efficiently,
    TABLES: ZFFMCTL_AP, ZFFMHDR_AP, ZFFM_CHANGE_LOG, ZFFMDTL_AR, ZFFMHDR_AR, ZFFMDTL_JV, ZFFMHDR_JV, ZFFMDTL_SKF,ZFFMHDR_SKF,ZFINVOICE_DETAIL, ZFFMMASTER, ZFFMLOGREAD_CLUS, ZFFMCTL.
    DELETE ZFFMCTL_AP.
    IF SY-SUBRC = 0.
    DELETE ZFFMMHDR_AP.
    IF SY-SUBRC = 0.
    DELETE ZFFM_CHANGE_LOG.
    IF SY-SUBRC = 0.
    DELETE ZFFMDTL_AR.
    IF SY-SUBRC = 0.
    DELETE ZFFMHDR_AR.
    IF SY-SUBRC = 0.
    DELETE ZFFMDTL_JV.
    IF SY-SUBRC = 0.
    DELETE ZFFMHDR_JV.
    IF SY-SUBRC = 0.
    DELETE ZFFMDTL_SKF.
    IF SY-SUBRC = 0.
    DELETE ZFFMHDR_SKF.
    IF SY-SUBRC = 0.
    DELETE ZFINVOICE_DETAIL.
    IF SY-SUBRC = 0.
    DELETE ZFFMMASTER.
    IF SY-SUBRC = 0.
    DELETE ZFFMLOGREAD_CLUS.
    IF SY-SUBRC = 0.
    DELETE ZFFMCTL.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    Waiting for response,
    Thanks in advance
    John

    Write this way....
    TABLES: ZFFMCTL_AP, ZFFMHDR_AP, ZFFM_CHANGE_LOG, ZFFMDTL_AR, ZFFMHDR_AR, ZFFMDTL_JV, ZFFMHDR_JV, ZFFMDTL_SKF,ZFFMHDR_SKF,ZFINVOICE_DETAIL, ZFFMMASTER, ZFFMLOGREAD_CLUS, ZFFMCTL.
    DELETE ZFFMCTL_AP.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMMHDR_AP.
    CHECK SY_SUBRC = 0.
    DELETE ZFFM_CHANGE_LOG.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMDTL_AR.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMHDR_AR.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMDTL_JV.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMHDR_JV.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMDTL_SKF.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMHDR_SKF.
    CHECK SY_SUBRC = 0.
    DELETE ZFINVOICE_DETAIL.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMMASTER.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMLOGREAD_CLUS.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMCTL.

  • Updating database table from Freely Defined Screens in co11n transaction ?

    Hi All,
    I got a requirement to add a new addional field and want to save it in the standard table for reporting purpose. I followed the steps like :
    1 ) In SMOD, i entered the enhancement (CONFPP07). where I get to find the freely defined screens i.e. 900, 910 and 920.
    2 ) I chose 900, and designed it in screen painter with a text field & input-outout field.
    3 ) In the include program, I defined the input-output field as :
         data: g_fco_kostl like afrud-kostl.
    Now, though I defined it in the include program ( ZXCOFTOP ). I need the data from that input-output field to get saved in AFRU table. Can anyone help me out in this ???
    Pls advice....

    So, according to your code, it means that :
    1) your screen field is WA_AFRUD-ZZSHIF
    2) WA_AFRUD is declared as global (in ZXCOFTOP)
    Is that true?
    In PAI: EXIT_SAPLCORU_S_101, you should only do:
    move wa_afrud-zzshif to es_afrud-zzshif.
    In Exit : EXIT_SAPLCORF_105, you have to replace 'A'
    LOOP AT AFRUD_TAB.
    AFRUD_TAB-ZZSHIF = *wa_afrud-zzshif.* "'A'
    MODIFY AFRUD_TAB.
    ENDLOOP.
    Note that LOOP AT  is problable not the good coding (I think that this exit has to remain empty), it was just a test to check it works
    Did you think to activate your project in CMOD? (you have to activate both project, and the exits)
    Are you sure your exit is called. Did you debug it?
    See also Note 12831 (program SAPRSMODCHECK) to check there is no problem between project/exits
    Edited by: Sandra Rossi on Oct 17, 2008 6:59 PM

  • Modify dynamic internal table from dynamic work area using index...

    ASSIGN w_text TO <fs>.
        ASSIGN w_temp TO <fs1>.
        lint_tab_iw49[] = <tab>.
        lint_tab_iw49_t[] = <tab>.
        DELETE ADJACENT DUPLICATES FROM lint_tab_iw49 COMPARING aufnr.
        LOOP AT lint_tab_iw49 INTO lws_tab_iw49.
          READ TABLE lint_object_tab1 INTO lws_object_tab1
                        WITH KEY aufnr = lws_tab_iw49-aufnr.
          IF sy-subrc EQ 0.
    Collect operations in rows of an internal table.
            w_idx = 1.
            WHILE w_idx < 51.
              w_nn = w_idx.
              CONCATENATE 'lws_object_tab1-ZZOPERN' w_nn INTO w_xx.
              ASSIGN (w_xx) TO <fs>.
              CONCATENATE w_text <fs> INTO w_text SEPARATED BY ','.
              w_idx = w_idx + 1.
            ENDWHILE.
    Split operations into an internal table to get operations in rows.
            SPLIT w_text AT ',' INTO TABLE lint_vornr.
            DELETE lint_vornr WHERE vornr = ' '.
            DESCRIBE TABLE lint_vornr LINES w_lines.
    Collect costs in rows of an internal table
            CLEAR: w_idx, w_nn, w_xx, w_text.
            w_idx = 1.
            WHILE w_idx < 51.
              w_nn = w_idx.
              CONCATENATE 'lws_object_tab1-ZZCOST' w_nn INTO w_xx.
              ASSIGN (w_xx) TO <fs>.
              <fs1> = <fs>.
              CONCATENATE w_text <fs1> INTO w_text SEPARATED BY ','.
              w_idx = w_idx + 1.
            ENDWHILE.
    Split costs into an internal table to get costs in rows.
            SPLIT w_text AT ',' INTO TABLE lint_escost.
            DELETE lint_escost WHERE cost = ' '.
            DESCRIBE TABLE lint_escost LINES w_lines_cost.
           Append lines of lint_escost from 1 to w_lines to lint_escost1.
    Collect currencies in rows of an internal table
            CLEAR: w_idx, w_nn, w_xx, w_text.
            w_idx = 1.
            WHILE w_idx < 51.
              w_nn = w_idx.
              CONCATENATE 'lws_object_tab1-ZZCURR' w_nn INTO w_xx.
              ASSIGN (w_xx) TO <fs>.
              <fs1> = <fs>.
              CONCATENATE w_text <fs1> INTO w_text SEPARATED BY ','.
              w_idx = w_idx + 1.
            ENDWHILE.
    Split costs into an internal table to get costs in rows.
            SPLIT w_text AT ',' INTO TABLE lint_curr.
            DELETE lint_curr WHERE curr = ' '.
            DESCRIBE TABLE lint_curr LINES w_lines_curr.
           Append lines of lint_curr from 1 to w_lines to lint_curr1.
          ENDIF.
          PERFORM update_object_tab_for_iw49n.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " modify_object_tab
    *&      Form  update_object_tab_for_IW49N
          text
    -->  p1        text
    <--  p2        text
    FORM update_object_tab_for_iw49n .
      DATA: lws_temp TYPE string VALUE 'where aufnr = lws_tab_iw49-aufnr',
            lw_index TYPE sy-index.
      READ TABLE <tab> TRANSPORTING NO FIELDS WITH KEY ('AUFNR') =
      lws_tab_iw49-aufnr.
      IF sy-subrc EQ 0.
        lw_index = sy-tabix.
        LOOP AT <tab> INTO <wa1> FROM lw_index.
          IF <wa1>-aufnr NE lws_tab_iw49-aufnr.
            EXIT.
          ELSE.
            CLEAR lw_index.
           lw_index = sy-tabix.
            lw_index = 1.
            WHILE lw_index LE w_lines.
              READ TABLE lint_escost INTO lws_escost INDEX lw_index.
              IF sy-subrc EQ 0.
             lw_index = lw_index + 1.
                <wa1>-zzcost1 = lws_escost-cost.
              ENDIF.
              READ TABLE lint_curr1 INTO lws_curr INDEX lw_index.
              IF sy-subrc EQ 0.
                <wa1>-zzcurr1 = lws_curr-curr.
              ENDIF.
              MODIFY <tab> FROM <wa1> "TRANSPORTING ('ZZCOST1') ('ZZCURR1')
                        INDEX sy-tabix.
              IF sy-subrc EQ 0.
              ENDIF.
              lw_index = lw_index + 1.
            ENDWHILE.
          ENDIF.
        ENDLOOP.
      ENDIF. 
    ENDFORM.                    " update_object
    Hi,
    With referene to the code snippet above I want to modify <tab> from <wa1> on specific indices or with specific where condition.
    Is it achievable... How?
    Many thanks in advance.
    Thanks & Regards,
    Shreya

    You might have to split the code in to two parts to keep the formatting intact.

  • Is it possible to update internal table from database table

    Hello All:
              I know how to update database table from internal table in one shot (batch) but is the reverse possible? Can I update some fields in an internal table from a database table in one shot (without looping) because my internal table is huge? Could you please provide me any ideas how to acheive something like this? Thanks in advance and answers will be rewarded.
    thanks.
    Mithun

    Hello my friend,
    You can do it MAYBE , i think you can reverse the update doing a ROLLBACK, but only after you update....not after the program finishes..
    To update some fields at once use:
    UPDATE DBTABLE FROM TABLE IT_TABLE
    Hope this helps!!
    Gabriel

  • Update database table

    I have 1 million records in application server and I want to update database table from that.
    Is UPDATE statement the best technique to do it.
    Just wanted to know if there is any other better tehcniques.
    Also i want to write the errors to job log. How can we do that?
    Regards,
    DNP

    If they are all new records or all changes, it would be best to use INSERT or UPDATE. You will also want to do mass inserts/changes using an internal table. Since you have so many records, you will probably have to do this in chunks in order to avoid dumping on the rollback area.
    Rob

  • Modify database table from internal table

    Hi All,
    I need to update database table from internal table which is having around 30000 records.
    I am using MODIFY tabname FROM TABLE int_tabname...
    Using this statement, I can modify the databse records very well. But user has some additional requirement.
    He wants that the table should be modified from the internal table and after modification we should have the erroneous records to be displayed if any.
    e.g. if 1500 records out of 30000 are erroneous then only 28500 records should be updated and 1500 records should be displayed as erroneous records so that the user can correct them and use them again for executing the program.
    Is there any FM which imports the database table name and internal table, modifies the database and exports an internal tanle with erroneous records?
    Any help will be appriciated,
    Regards,
    Neha

    Hi
    modifying datbase table useing internal table
    <b>advises</b> before updating this datbase table plz lock that table to avoid incosistency
    write the logic for modifying
    Modify the database table as per new dunning procedure
      MODIFY fkkvkp FROM TABLE lt_fkkvkp   .
    and finally unlock the table
    <b>example</b>
    *To lock table for further operations
      constants: lc_tabname TYPE  rstable-tabname  VALUE 'FKKVKP'  . "FKKVKP
      CALL FUNCTION 'ENQUEUE_E_TABLE'
        EXPORTING
          tabname        = lc_tabname
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 2
          OTHERS         = 3.
      IF sy-subrc EQ 0.
      To fetch all the contract accounts for customers of the segment
      Households/SME.
        PERFORM fetch_contract_accounts using lc_tabname .
      ENDIF.                    " IF sy-subrc EQ 0.
    *wrote the logic
    Modify the database table as per new dunning procedure from internal table
      MODIFY fkkvkp FROM TABLE lt_fkkvkp   .
    *unlock the tbale
      CALL FUNCTION 'DEQUEUE_E_TABLE'
       EXPORTING
         TABNAME   =  uc_tabname .
    <b>Reward if usefull</b>

  • How to update database table !!!

    hi all,
    Please advice how to update database table with certain cndition needs to be checked.
    Please consider below scenario.
    have used enqueu and dequeue function to lock entries  and also i have used BAPI so considering that return parameter . i want to update table
    /tdk/st0027.
    1. I want to update database table
    2. there are certain condition needs to be checked like ,
       loop at it_final into wa_final.
    th_return-type = 'S'.
               if th_final-vbeln = /tdk/st0027-vbeln and
                  th_final-posnr = /tdk/st0027-posnr and
                  th_final-etenr = /tdk/st0027-sdslno.
    above condition which i need to check .and need to append below system fields need to be appended in table.
              th_final-prstsind = '20'.
              th_final-chgdate  = g_date.
              th_final-chgtime  = g_uzeit.
              th_final-chgprog  = g_cprog.
              th_final-chguser  = g_uname.
              append th_final to td_final.
              update /tdk/st0027 FROM th_final.
              endif.
    endloop.
    but i am getting error saying that  "The type od database table and work area (TH_FINAL)  are not unicode convertible"?
    I am not able to understandwhat would be the solution for this ?
    Thanks and regards,
    Prasad K. NAralkar

    The error occurs in the UPDATE statement included in the code. In this statement it is seen that there is a mismatch of structure defined for the DDIC table /tdk/st0027 and that of your work area th_final.
    try to create a structure w.r.t the DDIC table.
    Eg: DATA: wa_temp TYPE /tdk/st0027.
    MOVE-CORRESPONDING th_final TO wa_temp.
    Then try to UPDATE using the temporary work area i.e wa_temp which has structure similar to that of the database table.

  • Enqueue and Dequeue before updating Database table

    Hi all,
    We are updating database tables using INSERT, MODIFY and UPDATE statements. Since many people will be running the application at the same time we need to lock the table before updating database table. So we need to use ENQUEUE and DEQUEUE functionality for this purpose.
    Can any plz explain what are the steps we should follow now?
    Thanks in advance.

    Hi,
    Any Database access should carefully handled as multiple applications may be accessing the database at the same time. To read a record from the database you don't need to implement a lock, but to write you need not only locks but also ideally should use the Update Function Modules to comply SAP "All or Nothing" Principle. This will prevent data inconsistency of the database and the data will be proper state. You need to use the COMMIT WORK and ROLLBACK WORK in you code to handle the consistency part of the database.
    The best design approach would be seperate the Database Layer completely from the business layers. This will make your code robust and easy to maintain.
    As, for the Locking Concepts, you will get multiple resources from SDN as how to create Locks and implement the Locking modules in your code. But more than that what matters is why and how to implement the SAP Locking concepts to make your application run better.
    Have a look at the following link
    http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    Hope this helps.
    Thanks,
    Samantak.

Maybe you are looking for

  • How can I downgrade to a previous firmware?

    I don't like the dock bar on 1.1.3, it's ugly! I want to revert back to 1.1.2 which had the nicer dock bar.

  • Report - Grouping of Vendors

    Hi Gurus, I have a doubt on Grouping can anyone please help me regarding this. The issue is i displayed the vendors and many materials they are supplying like Vendor, No.of Material 100, 5 200, 11 1000, 25 and so on.................... Now i want to

  • Lightroom 4 removing Vibrance and saturation from my ARW files

    I have a Sony Alpha SLT A55V  when I import them to Lightroom 4.2 the color and vibrance changes.  See examples below. The first image is after importing to lightroom, and making no edits, the second is after  importing in PMB Sonys software that cam

  • Save logic .aiff as quicktime file

    Hey, I posted this question in the iweb board and got some interesting ideas but was curious if anyone here had any other thoughts. I'm adding short .aiff's to an iweb site for people to right click and save. -I'm making the .aiff using logic express

  • USMT Copies Data but does not restore data.

    Can someone help me to shed some lite on a problem we are having?  I am running an OSD task in SCCM2012R2.  The Task Has the USMT option selected and enabled.  When I run the OSD task on workstation I can see it run, I can even go to the directory an