Updating a custom table

I am trying to update a custom table in BW with the following statement.
UPDATE customtable FROM TABLE ITAB1.
itab1 has entries but the customtable is not getting updated do i need to use any commit statement for that.

Hi,
Yes..Give COMMIT WORK statement after the update statement.
Example
UPDATE customtable FROM TABLE ITAB1.
IF SY-SUBRC = 0.
  COMMIT WORK.
ENDIF.
Thanks,
Naren

Similar Messages

  • BTE for Parking a document and updating a custom table

    Hi
    I want to update a custom table whenever a new parking document got posted through FBV4. I want to use a BTE for this please advice....
    Moderator message: please do some research before asking.
    Edited by: Thomas Zloch on Mar 10, 2011 9:15 AM

    Hi Gaurav,
    First time the correct data i have entered..and pressed "Save" button it is going and updating .After that i given same priority to multiple absence types..it errored out.. till now everything is fine.. Again i changed to correct value.. and pressed "Save" button. It is error out with an error like :
    JBO-25001: Name LOCATOR_SELECT3 of object type View Row Set Iterator already exists
    Code :
    int rowCount = vo.getFetchedRowCount();
    RowSetIterator rIter1 = vo.createRowSetIterator("LOCATOR_SELECT3");
    rIter1.setRangeStart(0);
    rIter1.setRangeSize(rowCount);
    int g=0;
    rIter1.reset();
    for ( int i=0;i<rowCount;i++)
    XxchrResultSetVORowImpl row = (XxchrResultSetVORowImpl)rIter1.getRowAtRangeIndex(i);
    String priority = ((String)row.getAbsencePriority());
    System.out.println("First Priority" + priority);
    for ( int j=0;j<rowCount;j++)
    if(i==j)
    g++;
    //leave this row
    else
    XxchrResultSetVORowImpl rows = (XxchrResultSetVORowImpl)rIter1.getRowAtRangeIndex(j);
    String priority2 = ((String)rows.getAbsencePriority());
    //String priority2 = ((String)row[j].getAttribute("AbsencePriority"));
    System.out.println("Second Priority" + priority2);
    if(priority.equals(priority2))
    //that means priority is repeated
    throw new OAException("error",OAException.ERROR);
    rIter1.closeRowSetIterator();
    Serializable[] param = {Businessgroupname,Retroactivedays};
    am.invokeMethod("Apply");
    Thanks
    Preeti

  • Create transaction for update a custom table

    Hi,
    I have a custom table Z****. What are all the steps to create a transaction for updating my custom table? I don't want to use SM30 anymore.
    Thank you.

    Create a Table maintainence through the maintainence generator.
    Open table in SE11, goto utilities => table maintainence generator.
    Once the generator is created,
    In the same screen of generator - Goto Environment => Transaction Code
    Select Transaction Code with Parameter.
    In the default values - Enter the Transaction as SM30 . Select skip first screen.
    In default values at the bottom
    Add
    screen field = VIEWNAME and value = Ztable name.
    screen field =UPDATE  and value = 'X'.
    Edited by: Pranu Pranu on May 19, 2010 2:36 PM

  • I want to update the Custom table using the data available in ITAB.

    Hi,
    I want to updaste the Custom Table which is created by me (Ztable) using the data available in itab.(which i got from defferent standard tables)
    I want to update the custom table using the itab data How is it possible?
    Is any possible by using Modify ?
    DPK.

    example here
    modifying datbase table useing internal table
    advises 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
    example
    *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 .

  • How can I update a customized table from a text document?

    Hi,
    I am one sample file. The file is an text document. From this .txt file how can I update a customized table in SAP.
    How can I Update the fields in the Customized table.
    Thanks & Regards,
    NManohar.

    use the Function module GUI_UPLOAD or WS_UPLOAD and give the path and the file name from where the data has to be uploaded. in table parameter give the iternal table
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      =
      FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      =
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    and finally use insert command to update the database table with the data

  • "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB" while updating the custom table

    hi friends...
    i am posting fico document using bapi BAPI_ACC_GL_POSTING_POST.
    after that i am updating the document number to my custom table.
    but in some cases while updating the document in my custom table i am getting the fallowing dump..
    in ST22
    How to correct the error:
    Database error text........: "[1205] Transaction (Process ID 66) was deadlocked
    on lock resources with another process and has been chosen as the deadlock
    victim. Rerun the transaction."
    Internal call code.........: "[RSQL/UPDT/ZIF004_PKT ]"
    Please check the entries in the system log (Transaction SM21).
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
    "ZFI_01_MONTHLY_RESULT_FRM_PKT" or "ZFI_01_MONTHLY_RESULT_FRM_PKT"
    "UPLOAD_SAP"
    Source Code Extract
    LOOP AT i_zif004_pkt_sum .
    UPDATE zif004_pkt SET xblnr = i_zif004_pkt_sum-xblnr ---> i am getting DUMP here
                              gjahr = i_zif004_pkt_sum-gjahr
                              sap_flag_posting = i_zif004_pkt_sum-sap_flag_posting
                          WHERE compcode = i_zif004_pkt_sum-compcode
                         AND ccode = i_zif004_pkt_sum-ccode
                          AND wbselement = i_zif004_pkt_sum-wbselement
                          AND kostl = i_zif004_pkt_sum-kostl
                          AND code = i_zif004_pkt_sum-code
                          AND month1 = l_ltx
                          AND year1 = p_year.
        IF sy-subrc = 0.
          WRITE :/ 'Document ', i_zif004_pkt_sum-xblnr, 'is posted for ', i_zif004_pkt_sum-code.
        ENDIF.
      ENDLOOP.
    kindly give some inputs..
    regards
    Selva

    Hi,
    You will face this issue if your oracle data base is lack of work processes. try to check the work processes and increase them if possible with the helps basis guys.
    check the below thread.
    DI job failed ORA-12537: TNS:connection closed.
    Regards,
    Venkatesh

  • OAF Update of Custom Table causing ORA-600 with database block corruption?

    Using OA Framework 12.1.3, running under EBusiness Suite 12.1.3
    Created Custom Web page operating against Custom Tables
    ISSUE
    On about 2% of new records, when OAF is UPDATING a record in a certain table, it  is failing with
    java.sql.SQLException: ORA-00607: Internal error occurred while making a change to a data block
    ORA-00600: internal error code, arguments: [kddummy_blkchk], [815], [26412], [6110], [], [], [], []
    ORA-06512: at line 1
    Before the DBA turned on 10.2.0.4.0 DB_BLOCK_CHECKING parameter, this actually
    resulted in corrupted data blocks in the database and corrupted indexes that
    eventually crashed the database and we had to do a full recovery with 2 days downtime.
    Now that we have turned on DB_BLOCK_CHECKING, it simply errors out and puts things
    in the alert log, but the records still fail to update as the writes are blocked.
    Then oddly, a few days later.. the records become editable.  And others fail.
    This is ONLY happening on the one particular table being updated by OAF.  Other custom pages
    posting to other custom tables are having no problems.   We've CTAS'd the table back and
    forth and recreated the indexes, and that did not help.
    Support says to post to the Forum  ( So I am! ) or hire Oracle consulting.. which doesn't make
    much sense given the error.  The Recovery Team that helped us in a separate SR ( we had
    to do db_repairs not just recovery ) felt it was an important problem the OAF team needed to
    strongly review.
    Anyone else encounter this already and know of a solution?
    TIA
    Karl

    After MANY hours of trial and error and research, we've identified ONE use case that seems to apply to 90% of the issue we have encountered.
    YMMV.
    The BC4J generated SQL which is generating the ORA-600 is
    BEGIN UPDATE XXRETURNHEADER ReturnHeaderEO SET INTERNAL_TEXT=?,LAST_MOD_USERNAME=?,OBJECT_VERSION_NUMBER=?,LAST_UPDATE_DATE=?,LAST_UPDATED_BY=?,LAST_UPDATE_LOGIN=? WHERE RMA_NUMBER=? AND ORGANIZATION_ID=? RETURNING TROUBLESHOOT_DATE, FAA_TAG_DATE, FAILURE_ANALYSIS_DATE, LAST_MOD_DATE, FAA_REVISED_DATE, TTE_TECH_SEND_DATE, TTE_REP_RESPONSE_DATE, TTE_REP_APPROVED, TTE_RMA_RANDOM_KEY, OBJECT_VERSION_NUMBER, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN INTO ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?; END;".
    We determined that if TTE_RMA_RANDOM_KEY was not a null value, we would get an ORA-600 error whenever we did an APPLY from the OAF Page to update the record.
    If we set that table attribute to NULL for the record using SQL.. then used the  OAF Page to APPLY.. it worked fine and the record saved without error.
    We then modified the EO to NOT   "Refresh After Update"  ( thus removing it from the RETURNING clause generated )... and even if the TTE_RMA_RANDOM_KEY
    had a value... the OAF Page APPLY worked and the record saved without error.
    I cannot identify anything from the User programming side that is wrong ( and neither could Oracle ), and it REALLY should be in the RETURNING clause list of
    attributes.. but this is the only workaround I've found that doesn't crash the Page and irritate the user to no end.
    I have reported my findings via the SR back to Oracle to do with it what they may... but it looks strongly ,to me, to be an error in the BC4J/JDBC/Database
    coordination and passing data between those black boxes.

  • Update the custom table by using Custom Function module.

    Hi Experts,
            My requirement is ,
    1) To create the Custom Z table with fields
               vbak-vbeln
               likp-vbeln
               vbuk-vbeln
      After creating this Z table.
    2) I have to create one custom function module.
        Based on this function module i have to update that Z table.
    3) Before these steps i have to write down an ALV report based on the tables vbak and vbeln, in that table i have to print vbak-vbeln. and also in report i generated check box and one custom button in application toolbar. after the report will displayed , when ever i click the button in application tollbar , this function module will executed and the table will be updated.
        But I developed the ALV report with custom button and check box successfully.
      My doubt is how to write the function module and based on that function module how to update the table.
          Please suggest me on this requirement.
        Thanks in Advance.
    Thanks and Regards
    Srihari.

    HI ,
         Can any one help me out on my above requiremnet..
    Thanks and Regards
    Srihari.

  • Hi all, i need to create a one method in assistance class for updating the custom table.

    Req as follows : 
    1. i need to create one method in a assistance calss  for updating custom table .
    2. now i  have to pass the multiple entries to that table then inside the method based need to update the Ztable. based on this entries
    3. My internal table is having 2 fields ( Customernumber (key field) , Shiftloc ).(Multiple entries ex : 500)
       based on customernumber need to update the new shiftloc in my custom table.
    Can any one give some inputs please. i have doubt can we pass mupltiple entries (internal) as a importing parameter to the method?
    Cheers,
    Venu

    Hi rama,
    thank you for your promt reply.
    i have one more query. Here i need to update the only Shipt to adress for particular customer number.
    i have written the code as below. Please clarify this code will work for my requirement.
       method UPDATE_SHIPTO.
      data : Lt_contract type ty_update_shipto_t.
      data : ls_contract like line of  Lt_contract .
      REFRESH : Lt_contract.
      lt_contract[] = LT_DATA[].
      loop at lt_contract into ls_contract.
    *    update  Zcustom  SET ship_to_adress  = ls_contract-new_bp
                                 WHERE  cust_no = ls_contract-custnum
        CLEAR : ls_contract.
      ENDLOOP.
    COMMIT WORK.
    endmethod.

  • Updating a custom table on PO save

    When we create an order with component having item catg N a PR created in backgroud. When I save the order I want the PR to be updated in the custom table for further action.
    Is any exit possible for this. The custom tabl to be updated only whn the PO is saved.

    Hi Aditya,
    There are also BADIs through which you can achieve it very easily.
    SAP Help:
    BAdI: Order Change
    With this business add-in all changes (creation, change, set deletion flag) to PM/CS/PP/PS/PI orders can be processed further and if necessary prohibited.
    Standard settings
    Business add-ins are not active in the Standard System. The business add-in can be used several times.
    Recommendation
    If you use different order types and want to handle these in different ways, note that this BADI is used by all of the above-mentioned order types. To differentiate between the order types, evaluate the "AUTYP" field for the corresponding order header.
    These are the possible entries in the "AUTYP" field:
    10: Production order (PP order)
    20: Network (PS order)
    30: Service and plant maintenance order (CS/PM order)
    40: Process order (PI order)
    Activities
    To activate the business add-in, you must create an active implementation. Note that business add-ins can be used several times and therefore all active implementations are called and run through.
    Further notes
    Note that no system messages may be sent in the methods. The only exception is the AT_SAVE method. Within this method, a system message may be issued, but only if you trigger the exception ERROR_WITH_MESSAGE at the same time.
    Also, note that within the methods, the "commit work" instruction may not be executed because this would inevitably lead to incorrect data in the database.
    Regards
    Mahesh

  • Updating another custom table from create screen

    Hi,
    In create screen i have some fields which has to be updated in another custom table. I created package and procedure in it and i am passing the parameters into it.But somehow it is is updating 4 filed and remaining two are not updated.
    How to check that what are the values passed in the package,so that i can find out the reason behind it.
    Kindly reply asap..

    Put some debug statement and check the root cause.
    http://oracleanil.blogspot.com/2009/04/favourite.html
    And if you are running page locally then use
    System.out.println("Test");Thanks
    --Anil
    http://oracleanil.blogspot.com

  • Is there BAPI to insert/del/update/select customer table

    I need to maintain customer table using RFC, but after try, I found that there are some problem.
          Something can execute at ECC system but it will fail at RFC interface, So I would like to know if there is a way to maintain it.

    Hi,
    Check these BAPI's
    BAPI_CUSTOMER_CREATE Create Customer Master Online
    BAPI_CUSTOMER_CREATEFROMDATA1
    Regards,
    Jyothi CH.

  • Update a Custom Table

    Hi,
    Now I created a module pool program in which I usde following code to insert values in to custom table, but now I get a ABAP DUMP at the time of executing the Insert statement
    I used the following code
    *Declear an Internal Table is having the same structure of Custom Table
    DATA : ty_znew_customer TYPE STANDARD TABLE OF znew_customer WITH HEADER LINE.
    *Move the Values to internal Table ty_znew_customer
    *Lock Table
      CALL FUNCTION 'ENQUEUE_E_TABLE'
        EXPORTING
          mode_rstable   = 'X'
          tabname        = 'ZNEW_CUSTOMER'
          x_tabname      = ' '
          x_varkey       = ' '
          _scope         = '2'
          _wait          = ' '
          _collect       = ' '
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 2
          OTHERS         = 3.
    *Insert Records In to Custom Table
      BREAK-POINT.
      INSERT znew_customer FROM TABLE ty_znew_customer.
      COMMIT WORK.
      BREAK-POINT.
    while executing that insert statement Sy-subrc is set to 4 and I get an Error
    *un Lock Table
      CALL FUNCTION 'DEQUEUE_E_TABLEE'
       EXPORTING
         mode_rstable       = 'X'
         tabname            = 'ZNEW_CUSTOMER'
      VARKEY             = 'CUSTOMER'
         x_tabname          = ' '
         x_varkey           = ' '
         _scope             = '3'
         _synchron          = ' '
         _collect           = ' '
    Please help me to solve this
    Regards
    Nausal

    Hi,
    When you use the SYNTAX ...INSERT FROM TABLE.... it will dump if for any entry in the internal table an entry already
    exists in the databse....
    So check for existing entries before inserting.

  • Updating a customizing table throw interface

    hello Exprtes,
    We are facing the next scenario,
    We have a Legacy system that contains a several master data tables (like Countries, Cities etc),
    We want to synchronize those tables with our ECC system using automatic interface throw XI,
    New entries will be added to the legacy system and than they will transfer to the ECC,
    Our problem is that those tables in the ECC are define as customize tables (like T005), so we cannot add records to them with an interface,
    Is there any way that we can do it with an interface instead of standard customizing process?
    Is there anyone else who faced this problem? How did they solve it?
    thanks in advance,
    Liad,

    Hi,
    You cannot and you should not enter the details in customising tables through interfaces. This can be done in cases where the customising table can be  somthing similar to a  masterdata table (T023 for material groups, for example)
    However for highly sensitive data like countries , cities etc. I would advise you to stick to teh settings provided by SAP (SAP has provided settings for almost all possible countries) or change teh entries given by SAP.
    XI routed updation of tables like T005 is not at all advisable, I doubt even SAP will support that kind of work at later point of time.
    Hope this helps you

  • BADI/User Exit for custom table update from Delivery

    Hi
    Our requirement is to update a custom table with the delivery number and other related details when the picking status is changed to "C". Kindly suggest BADI/User exit for this requirement .
    Thanks in Advance for your immediate help .

    Hi Joseph,
    See SAP Note 415716 - User exits in delivery processing. It says when you have the document number available, what is permitted, what not, ....
    I hope this helps you
    Regards
    Eduardo

Maybe you are looking for