‎2006 Nov 22 9:58 AM
hello Experts,
I am working in screen programs.In my screens i am using table controls.if i click the save button the content of the table control should modify my Ztable.for that i am using the following command.
MODIFY ZTABLE FROM TABLE ITAB.
But it gives me the following error.
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 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 give me the solution for my problem.
Thanks in advance,
regards,
Ashok.
‎2006 Nov 22 10:02 AM
Hi Ashok,
when u use modify statement
both the ITAB and ZTABLE structure should be same
‎2006 Nov 22 10:09 AM
Hi
MAke sure that the itab is the same strucuture as the Ztable
<b>DATA: itab type standard table of ztable.
MODIFY ztable from itab.</b>
‎2006 Nov 22 10:14 AM
Hi
May be the structure of itab and ztable are not same, make sure the structure is same.
Regards
Haritha.
‎2006 Nov 22 10:27 AM
hello experts,
both of my itab and ztable are has same structure.I have checked it.
regards,
Ashok.
‎2006 Nov 22 10:37 AM
Hi Ashok,
Maku sure that ur internal table is not having duplicate entries.
Thanks
Sekhar.
‎2006 Nov 22 10:42 AM
hi ,
my itab does not have any duplicates.
It is very urgent can any one give me the solution.
regards,
Ashok.
‎2006 Nov 22 10:42 AM
Ashok,
you can try with the index option.
MODIFY ZTABLE FROM TABLE ITAB.
try it again.
Regards
vijay
‎2006 Nov 22 11:11 AM
hi,
Use the following code.
REPORT REPORT YLSR_TEST_SDN1.
*tables: ZTAB1.
*(Ztable which is containing 3 fields,
( MANDT , MATNR , and DESC1)
data : it_itab type standard table of ZTAB1.
data:st_itab type ztab1.
st_itab-mandt = sy-mandt.
st_itab-matnr = '123'.
st_itab-desc1 = 'Desc1'.
append st_itab to it_itab.
st_itab-mandt = sy-mandt.
st_itab-matnr = '124'.
st_itab-desc1 = 'Desc1'.
append st_itab to it_itab.
Update custom table with
MODIFY ZTAB1 FROM TABLE it_itab.
commit work.
thanks
Sekhar