Re: Runtime error for updating z table

Hi all,
I have a Z table ZABC with 2 following fields
REC1     type     PERSNO       length    8
+REC2    type       STRING         length   1000     +
In my program I declared an internal table like this
ITAB  TYPE TABLE OF ZABC WITH HEADER LINE.
At the end of the program, when I have the new info, I passed them into ITAB, and loop at it to update the Z table
LOOP AT ITAB.
    INSERT ZABC FROM ITAB.
  ENDLOOP.
Then I got run time error saying
Runtime Errors         DBIF_RSQL_INVALID_RS
Exceptn                CX_SY_OPEN_SQL_DB
An exception occurred. This exception will be dealt with in more detail
below. The exception, assigned to the class 'CX_SY_OPEN_SQL_DB', was not
caught, which
led to a runtime error. The reason for this exception is:
The maximum length of the long field of the specified table is defined
in the ABAP Dictionary. The current length of the long field corresponds
to the value of the preceding field, which consequently
must be numeric.
In this case, the value in this field was greater than the maximum value
defined for the long field in the ABAP Dictionary.
The term "long field" refers to all fields that are created in the ABAP
Dictionary with the data type STRING, RAWSTRING, LCHR, or LRAW.
The problem is at this position
LOOP AT ITAB.
   INSERT ZABC FROM ITAB.
  ENDLOOP.
I know something wrong with the string type but I need to update the whole string structure for the whole record type (rather than updating field by field). need help! thanks!

hi,
the syntax would be as follows:
INSERT ZABC FROM TABLE ITAB ACCEPTING DUPLICATE KEYS.
This will discard the duplicate records & append all the other records from table itab into zabc.
LOOP ....... ENDLOOP statements are not required.
Regards,
Jignesh.

Similar Messages

  • Runtime Error for the Picking List Smartform

    Hi All,
    I am working on the smartform, used for GI Scrapping for 551 Movement type. The requirement is they need DEA number for the Plant. I have written code for getting the DEA number. Iacivated the form and I want to print it using the TCODE MB02.
    I get the runtime error saying UPDATE TERMINATED.I saw Dump Analysis it says CALL_FUNCTION_PARM_MISSING. It says IS_ADRC is the parameter. The ABAP program is the include program /SMB40/M07DRSON. This show the function module lf_fname with out passing the parameter IS_ADRC. How can I change the program. This is Standard program.
    Thanks,

    Then the smart form interface in the transaction SMARTFORMS you have to remove the parameter IS_ADRC. As the calling program will not automatically add the parameters if you add it in the smartforms...
    If you want the values from the table ADRC..you can write subroutines in the INITIALIZATION to get the values...
    Thanks,
    Naren

  • Error in updating to table WRPT

    Hi All,
    I am trying to update lenght, width and height for Material .
    After i save the article and go back "It gives Express Document " which doesnot save the changes ..
    When i checked SM31 it gives error" Error in updating to table WRPT"
    Regards
    Vikrant M Kelkar

    Still not sorted

  • ABAP runtime error for 0CRM_OPPT_H and I while running RSA3

    hello Gurus,
         I'm having problems while running RSA3 transaction for these data sources.
    0CRM_OPPT_H
    0CRM_OPPT_I
    0CRM_SALES_ACT_1
    0CRM_SALES_ACT_I.
    I'm getting ABAP runtime error for these.
    This is the error:
    Runtime Error          CALL_FUNCTION_CONFLICT_TAB_TYP
    Exception              CX_SY_DYN_CALL_ILLEGAL_TYPE
    I tried finding OSS notes for these, but I didn’t succeed.
    I activated the data source from RSA5, and then I tried RSA3. That time I got “Errors occurred during extraction”.
    After that I activated delta at BWA5, then I started getting runtime error.
    Even though I activated at BWA5, I am not able to see the data sources at BWA7.
    Am I missing any thing…please guide me through this….
    Thanks
    RKR

    Thanks for your replay... All the DS and related tables are active..
    But wen I tried to re-generate the DS again... this is the warning I'm getting... Any idea why I'm getting this....
    The even-numbered length of the DEC field SAMPLE_QTY_ALLOW can lead to problems
    <b>Message no. R8569</b>
    <b>Diagnosis</b>
    You want to use the field SAMPLE_QTY_ALLOW in the extract structure for DataSource 0CRM_OPPT_I. This field has a field of type 'DEC' (or 'CURR' or 'QUAN') with an even number of characters.
    This can create problems since the length resulting from calculations in ABAP (for example, in extractors or Customer Exits for extraction) is too large to be inserted in the database later (PSA in BW), causing a short dump.
    <b>Procedure</b>
    This warning is only relevant when the maximum length of this field is exceeded during extraction, for example when the field is expanded in the Customer Exit through a calculation.
    More information and a remedy can be found in SAP Note 641744.
    When I search the OSS note, SAP suggesting to apply 883310 note.
    In my company we are using CRM 4.0 servie pak8. SAP suggsting to install service pak 11, but my client is not interested to upgrade to 11 as CRM people are working on service pak 8.
    By any chance we can use specific note which change the ABAP code to solve this problem... Please give me some suggetions...
    Thanks
    RKR

  • 'Missing select' error for update statement using WITH clause

    Hi,
    I am getting the below error for update statement using WITH clause
    SQL Error: ORA-00928: missing SELECT keyword
      UPDATE A
      set A.col1 = 'val1'
         where
      A.col2 IN (
      WITH D AS
      SELECT col2 FROM
      (SELECT col2, MIN(datecol) col3 FROM DS
      WHERE <conditions>
        GROUP BY PATIENT) D2
      WHERE
      <conditions on A.col4 and D2.col3>

    Hi,
    The format of a query using WITH is:
    WITH  d  AS
        SELECT  ...  -- sub_query
    SELECT  ...   -- main query
    You don't have a main query.  The keyword FROM has to come immediately after the right ')' that ends the last WITH clause sub-query.
    That explains the problem based on what you posted.  I can't tell if the real problem is in the conditions that you didn't post.
    I hope this answers your question.
    If not, post a complete test script that people can run to re-create the problem and test their ideas.  Include a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    In the case of a DML operation (such as UPDATE) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Error in updating OBNK Table ( Bank Statements and Reconciliations,Manual)

    PLease advise ,
    Bank Statements and Reconciliations,Manual Reconciliation
    Client is receiving the following message:
    Error in updating OBNK Table
    Edited by: Philip Eller on May 20, 2008 9:03 AM

    Hi Darpal Thiarha,
    Please kindly refer to note 1132591 and note 1128677 to see if these are relevant to this issue. Upgrading to  2007A PL15 or above may avoid such issues relevant with the error 'Error in updating OBNK Table'.
    Regards,
    Candice Ren
    SAP Business One Forums Team

  • Error in updating condition table 372

    Hello,
    While saving Excise Invoice I am facing error 'Error in updating condition table 372'.Could you please solve this probelm?
    Thanks in Advance

    Dear All,
    I done this--by doing some configuration changes.
    Normally while doing Exports we are tempted to use the same sales area and accordingly we may give the combination of excise grp+series grp+export type in IMG>>>Logistics General>>>India>>>Business transactions>>>Outgoing excise invoices>>>Maintain default excise groups and series groups.
    Once after removing the export type to your sales area combination--system will show this error--and we cannot even post the Excise invoices.(J1IIN)
    I tried in my IDES--that with export type(Ex.Export under Bond)--with this assignment--i am able to post my excise invoices.
    Once after removing this assignment of export type--again i am getting this error.
    Actually i am not even aware why it is happening--almost after two months of struggle--i find this.
    (i feel it is in the same way that we cannot even open/See a sales order by deleting sales group which was created&used previously)
    i am sharing this because somebody may get a little help with my thread.
    Mark this if helpful--there by others can easily find this thread.
    Phanikumar

  • API for updating pay_people_groups table..

    Hi,
    Is there any API for updating pay_people_groups table. I know we can do it using hr_assignment_api.update_emp_asg_criteria but this API updates the assignement with the new pay_group_id. I want to know is there is any API which can only update the pay_people_groups and not the assignment.
    Regards,
    Shabana.

    Hi,
    Technically you want update values for people group. If you remember At the time of definition of people group you created value set and attached people group flex field.
    People group are created on the basis of combination of segments. So you have to update only values not people group.
    I doubt oracle provides API to update key flex field.
    You may get API to update values try out that option.
    Hope this helps.
    Sathish

  • XD02 transaction to change the customer data for updating KNA1 table?

    Hi all,
    How can we use XD02 transaction to change the customer data for updating KNA1 table?
    Give the steps.
    Thanks in advance
    rk

    Hi KR,
    Why don't u use BDC to run XD02.
    With Regards,
    Zafar Ali

  • R5034 Runtime error when updating ITunes  help - deleted all iTunes/Apple programs and reinstalled ITunes

    R5034 Runtime error when updating ITunes  help - deleted all iTunes/Apple programs and reinstalled ITunes
    help please ?

    solved problems and reinstalled  - 4 hours wasted trying to fix iTunes ...
    Apple could do better to inform users when updating and upgrading  .....

  • When will Reader 9's Runtime error for redirected Application Data be fixed??

    Has anyone heard when Adobe will fix Reader 9's Runtime error for redirected Application Data??  It's still happening with 9.1.3 for only users who have their Application Data folder redirected via Group Policy.
    It's been going on for some time, as evidenced by the following link, and my own personal pain fighting this
    http://forums.adobe.com/thread/391738?start=100&tstart=0

    Also posted here: http://forums.adobe.com/thread/391738
    I haven't read through all of the posts, but the general consensus I have is that the issue is in fact related to the redir
    ection of the Application Data folder. The main issue being that the use of a UNC path causes the error described, with some mention to explicit user permissions on the root of the folder path.
    I was just recently made aware of this issue in our environment. Apparently we've held off upgrading to Adobe 9.x because of this issue. After a little research, it was apparent that simply modifying the default Folder Redirection policies is not possible because the use of a mapped drive is not supported.
    I haven't had a chance to test this yet, and may not be able to for some time, so I thought I would share this in case someone else might be able to test. The idea being to simply use a custom ADM file to force the redirection of certain profile folders. Again, I haven't tested this using a mapped drive in the path, but I have successfully used the same settings below to redirect other folders not available by default in Group Policy.
    1) Copy the text between ----- Start of ADM ------ and ----- End of ADM ------ and paste it into a text file.
    2) Rename the .txt to .adm.
    3) Load the ADM template into a GPO.
    4) Right click "USER Custom Settings", select "View", select "Filtering" and uncheck the option "Only show policy settings that can be fully managed".
    5) Configure the "Redirect Application Data" option as enabled, and enter a mapped drive path.
    6) Test.
    I'm interested to hear if this is a viable solution or not.
    ------ Start of ADM -----
    CLASS USER
          CATEGORY "USER Custom Settings"
                CATEGORY "Folder Redirection Settings"
                      POLICY "Redirect My Documents"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      PART "Redirect to" EDITTEXT
                            VALUENAME "Personal"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectHistory
                      POLICY "Redirect Application Data"
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      PART "Redirect to" EDITTEXT
                            VALUENAME "AppData"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectHistory
                      POLICY "Redirect Cookies"
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      PART "Redirect to" EDITTEXT
                            VALUENAME "Cookies"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectCookies
                      POLICY "Redirect Favorites"
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      PART "Redirect to" EDITTEXT
                            VALUENAME "Favorites"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectFavorites
                      POLICY "Redirect History"
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      PART "Redirect to" EDITTEXT
                            VALUENAME "History"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectHistory
                      POLICY "Redirect Recent Documents"
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      PART "Redirect to" EDITTEXT
                            VALUENAME "Recent"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectRecent
                END CATEGORY
          END CATEGORY
    ------ END of ADM -----

  • Error during update of Table VBAP (RC= 4, Key= 5096672)

    Hello experts,
    i am getting error as
    Update was terminated
    System ID....   Q70
    Client.......   999
    User.....   HPROLLSD
    Transaction..   VA02
    Update key...   4EF9258A885201B1E10080000A140014
    Generated....   28.12.2011, 18:08:25
    Completed....   28.12.2011, 18:08:25
    Error Info...   Error during update of Table VBAP (RC= 4, Key= 5096672)
    Please help me on this issue.
    Regards
    Narendra

    Hi,
    Relevant issue,go through the link it could be help you.
    Express document "Update was terminated" received from author
    Ram

  • Runtime error when updating service item with BAPI PO CHANGE

    Hi,
    I get rutime error TABLE_INVALID_INDEX after calls:
    BAPI_PO_CHANGE-> PROCESS_NON_INTEGRATED_COMP-> CHANGE_PO_SRV_ITEM -> MS_CHANGE_SERVICE_PACKAGE_PO -> ROW_IN_PO -> CHECK_ACC_PO -> MS_CHANGE_ACCASS_PO -> ESKL_UPDATE.
    the reason is, that ESKL internal table is empty, so the function retrieves last entry index, there is no entry , so  sy-tabix = 0 , and function updates with index 0, which causes the runtime error. I dont know why it is empty, maybe I should copy this table gt_srvaccess from BAPI_PO_GETDETAIL  to BAPI_PO_CHANGE.
    This error appears only in mode KNTIMOD=2 (Multikontierung), not in KNTIMOD=1(Einfachkontierung), so just when ESKL contains more lines for one PACKAGE_NUMBER.
    I am just updating the value ordered to be equal value delivered to close the PO, or delete the item in case ordered >0 and deliveded = 0.
    Here is my part of code:
    *close existing PO's by changing the value ordered to the value receipted
                move 'X' to w_change_flag.
                w_hdrx-po_number = 'X'.
                if w_total-val_gr_for is not initial.
                  w_itemx-delete_ind = 'X'.
                  append w_itemx to gt_itemx.
                  clear: w_itemx.
                  read table gt_services into w_service2 with key pckg_no = w_item-pckg_no.
                  if sy-subrc eq 0.                                                                               
    read table gt_services into w_service with key pckg_no = w_service2-subpckg_no.
                    if sy-subrc eq 0.                                                                               
    move: w_total-val_gr_for to w_service-quantity,
                            '1'                to w_service-gr_price.
                      modify gt_services index sy-tabix from w_service transporting quantity gr_price.
                    endif.
                  endif.
                else. "nothing delivered yet, set deletion flag
                  w_itemx-po_item = w_item-po_item.
                  w_itemx-delete_ind = 'X'.
                  append w_itemx to gt_itemx.
                  clear: w_itemx.
                  w_item-delete_ind = 'L'.
                  modify gt_item index w_count from w_item transporting delete_ind.
                endif.
        call function 'BAPI_PO_CHANGE'
          exporting
            purchaseorder = w_ekko-ebeln
            poheader      = w_header
            poheaderx     = w_hdrx
            testrun       = w_testrun_flag
            no_messaging  = 'X'
          importing
            expheader     = w_exphdr
          tables
            return        = gt_return1
            poitem        = gt_item
            poitemx       = gt_itemx
            poservices    = gt_services.
    Thanks, please help.
    regards Rob
    Edited by: xsmid4 on Nov 2, 2011 11:49 AM
    Edited by: xsmid4 on Nov 2, 2011 12:08 PM

    Hi,
    Take a look at OSS Note 827731. It might be helpful to you.
    [ Link for Note 827731|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=827731]
    Regards,
    koolspy.

  • Error while updating crmd_orgman table

    i am facing shot dump due to FM CRM_ORGMAN_UPDATE_DU
      records to insert
    IF NOT it_records_to_insert IS INITIAL.
    >>>>    INSERT crmd_orgman FROM TABLE it_records_to_insert.
        IF sy-subrc NE 0.
          MESSAGE a002(crm_order_misc) WITH gc_object_name-orgman.
        ENDIF.
      ENDIF.
      records to update
      IF NOT it_records_to_update IS INITIAL.
        UPDATE crmd_orgman FROM TABLE it_records_to_update.
        IF sy-subrc NE 0.
          MESSAGE a002(crm_order_misc) WITH gc_object_name-orgman.
        ENDIF.
      ENDIF.
    instad of going to UPDATE program is continuing with INSERT command
    due to table is already having record corresponding GUID it is showing error message(sy-subrc = 4)
    Runtime Errors         SAPSQL_ARRAY_INSERT_DUPREC
    Exception              CX_SY_OPEN_SQL_DB
    as i disguss in OSS note they gave me solution to update kernal
    if anyone have idea about this pl help me out.

    Please post ABAP-questions in one of the <a href="https://forums.sdn.sap.com/index.jspa#42">ABAP forums</a>.
    My small addition to the existing hints: define the work area using LIKE LINE OF, the LIKE keyword is a very nice way of ensuring that data types match. You can reference input parameters, other locally defined variables and more.
    DATA: t_ydata TYPE STANDARD TABLE OF ydata,
          l_ydata LIKE LINE OF t_ydata[].

  • Error while updating DBDIFFVIEW table

    Hi,
    When we are doing new entries into the table: DBDIFFVIEW, the error:
    " Fill table key for table DBDIFFINFO only up to position 040 only  " is coming.
    Since updating the table at DB level directly is not advisable, please advise to correct the above error.
    Thanks & Regards,
    DVRK

    Hi All,
    The entries are maintained from DB level.
    Thanks for the help.
    DVRK

Maybe you are looking for

  • Mid 2009 13" MBP PROBLEMS (customer service suggestions)

    i have been trying very patiently but persistently to find out what has been going on with a recent repair and i don't feel like i am getting good answers so i am hoping for some advice related to Apple Customer Service. right now i feel like i am be

  • Where to set up a TYPE-POOL Declaration in a Function Group ?

    Hi, I ve got a Function Group. I set up a Function Module in the Function Group. I must use  TABLES I_T_SELECT TYPE SBIWA_T_SELECT. I get the error: Type pool SBIWA has not been declared Message no. FL031 Diagnosis You used a type from type pool & in

  • How to apply row level security against the database administrator

    I would like an advice in applying row level security against the database administrator. We need to prevent DBA from editing data in some table rows or have any indication that data was corrupted. There is no problem in viewing the data so we consid

  • Information from sales order

    Hello, I have a scenario where i make a sales order on 23.8.08. the delivery date to customer is 01.09.08 and the material availibity date calculated by system  is 28.8.08(01.09.08 less transit time less pick pack time). when the system does the avai

  • Repeat Last Action?

    I'm fairly new to FM9 and am wondering if this feature exists already (and I just don't know about it). Coming from MS Word, it has a great "repeat last action" function hooked up to the F4 key. As I've been selecting text in FM and applying a charac