‎2010 May 01 7:44 AM
Hi,
When i am trying to update a z table by using modify statement, i am getting the following error:
Short text
SQL error in the database when accessing a table.
What happened?
When writing a data record to the database (i.e. when
updating the database), only part of the data field was
written (updated). The rest was truncated.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
in
procedure "FILLTABLE" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The problem has arisen because, within the database interface,
one of the data buffers made available for the INSERT (UPDATE)
is longer than the maximum defined in the database.
On the other hand, it may be that the length in the NAMETAB
does not match the maximum length defined in the database.
(In this case, the length in the NAMETAB is longer.)
Please guide me how this error can be resolved.
Thanks and Regards
‎2010 May 01 9:00 AM
Hi,
Check the length of the fields that u r using in your table and also check whether the values which you are entering thru your program is not larger(in respect to length).
This will solve ur problem.
‎2010 May 01 7:59 AM
HI,
Check this link
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm
if it doesn't solve your problem paste the code.
Regards and Best wishes.
‎2010 May 01 8:22 AM
Hi,
LOOP AT i_outputfile INTO wa_outputfile.
READ TABLE i_tab3 INTO wa_tab3 WITH KEY w_id =
wa_outputfile-ablbelnr.
IF sy-subrc = 0.
i_zdm_upload-mandt = sy-mandt.
i_zdm_upload-ablbelnr = wa_tab3-w_id.
i_zdm_upload-partner = wa_tab3-w_consumer.
i_zdm_upload-zwnummer = wa_tab3-w_reg.
i_zdm_upload-equnr = wa_tab3-w_device.
i_zdm_upload-v_zwstand = wa_tab3-w_reading.
i_zdm_upload-n_zwstand = wa_tab3-w_reading1.
i_zdm_upload-ablhinw = wa_tab3-w_remark.
i_zdm_upload-zmeter = wa_tab3-w_new_dev.
i_zdm_upload-adat = wa_tab3-w_rd_date.
concatenate wa_tab3-w_rd_date4(4) wa_tab3-w_rd_date2(2)
wa_tab3-w_rd_date+0(2) into i_zdm_upload-adat separated by '.'.
i_zdm_upload-adat = v_adat.
condense i_zdm_upload-adat.
i_zdm_upload-atim = wa_tab3-w_rd_time.
i_zdm_upload-portion = wa_tab3-w_portion.
i_zdm_upload-ernam = sy-uname.
i_zdm_upload-erdat = sy-datum.
i_zdm_upload-uzeit = sy-uzeit.
APPEND i_zdm_upload.
CLEAR: wa_tab3, i_zdm_upload.
ENDIF.
ENDLOOP.
CALL FUNCTION 'ENQUEUE_E_TABLEE'
EXPORTING
mode_rstable = 'E'
tabname = 'ZDM_UPLOAD'
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
MODIFY zdm_upload FROM TABLE i_zdm_upload.
Please guide.
Thanks and Regards
‎2010 May 01 8:35 AM
The problem has arisen because, within the database interface,
one of the data buffers made available for the INSERT (UPDATE)
is longer than the maximum defined in the database.
On the other hand, it may be that the length in the NAMETAB
does not match the maximum length defined in the database.
(In this case, the length in the NAMETAB is longerCheck the data decleration part for length assigned. Its mismatching somewhere.
‎2010 May 01 8:33 AM
Hi MP Vashishth
This problem might be the internal table or work area which you are using and the data base table(Z table ) structure is not matching,first check whether they are matching are not and if possible send snap shot of data declaration and modify statement block code.
regards,
ameen
‎2010 May 01 9:00 AM
Hi,
Check the length of the fields that u r using in your table and also check whether the values which you are entering thru your program is not larger(in respect to length).
This will solve ur problem.
‎2010 May 01 9:52 AM
Hi,
Following is the data declaration:
TYPES : BEGIN OF t_tab3,
w_consumer(10) TYPE c,
w_reg TYPE eabl-zwnummer,
w_device TYPE eabl-gernr,
w_reading(17) TYPE c,
w_reading1(14) TYPE c,
w_remark TYPE eabl-ablhinw,
w_new_dev TYPE eabl-gernr,
w_rd_date TYPE zdm_upload-adat,
w_rd_time TYPE eabl-atim,
w_id TYPE eabl-ablbelnr,
w_portion(4) TYPE c,
END OF t_tab3.
DATA : BEGIN OF i_zdm_upload OCCURS 0,
mandt LIKE zdm_upload-mandt,
ablbelnr LIKE zdm_upload-ablbelnr,
partner LIKE zdm_upload-partner,
zwnummer LIKE zdm_upload-zwnummer,
equnr LIKE zdm_upload-equnr,
v_zwstand LIKE zdm_upload-v_zwstand,
n_zwstand LIKE zdm_upload-n_zwstand,
ablhinw LIKE zdm_upload-ablhinw,
zmeter LIKE zdm_upload-zmeter,
adat LIKE zdm_upload-adat,
atim LIKE zdm_upload-atim,
portion LIKE zdm_upload-portion,
ernam LIKE zdm_upload-ernam,
erdat LIKE zdm_upload-erdat,
uzeit LIKE zdm_upload-uzeit,
END OF i_zdm_upload.
Please guide me. Thanks.
Edited by: MP Vashishth on May 1, 2010 10:53 AM
‎2010 May 01 9:57 AM
Instead of creating internal table like that why dont u declare your internal table like this
data: i_zdm_upload type table of zdm_upload with header line.
this will solve u r problem
‎2010 May 01 10:11 AM
Hi,
I tried that way, but still the error is coming.
Please guide.
Thanks and Regards
Edited by: MP Vashishth on May 1, 2010 11:20 AM
‎2010 May 01 12:17 PM
If you tried that way (data: i_zdm_upload type table of zdm_upload with header line.)
what is the error it is giving the same dump? or some other error?
‎2010 May 01 12:21 PM
Hi,
I am still getting the same error.
Please guide.
Thanks and Regards
‎2010 May 01 12:23 PM
send u r screen shot of the Z table to ameenshaik at gmail dot com
‎2010 May 01 12:32 PM
Hi,
The error message is as follows:
Short text
SQL error in the database when accessing a table.
What happened?
When writing a data record to the database (i.e. when
updating the database), only part of the data field was
written (updated). The rest was truncated.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
in
procedure "FILLTABLE" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The problem has arisen because, within the database interface,
one of the data buffers made available for the INSERT (UPDATE)
is longer than the maximum defined in the database.
On the other hand, it may be that the length in the NAMETAB
does not match the maximum length defined in the database.
(In this case, the length in the NAMETAB is longer.)
Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of dump
Edited by: Rob Burbank on May 1, 2010 5:59 PM
‎2010 May 01 12:54 PM
See SAP Say to Do any Data Base Operations there are some pre requesties:
<< Cut and paste without attribution from http://www.thaiabap.com/index.php?option=com_content&view=article&id=2890 removed >>
Edited by: Rob Burbank on May 1, 2010 6:07 PM
‎2010 May 01 3:08 PM
Error has been resolved.
Thanks everyone. It was a great help from all of you. Thank you so much for all your kind help.
Thanks and Regards
MP Vashishth