Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem in sql statemant

Former Member
0 Likes
806

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.

8 REPLIES 8
Read only

Former Member
0 Likes
781

Hi Ashok,

when u use modify statement

both the ITAB and ZTABLE structure should be same

Read only

Former Member
0 Likes
781

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>

Read only

Former Member
0 Likes
781

Hi

May be the structure of itab and ztable are not same, make sure the structure is same.

Regards

Haritha.

Read only

0 Likes
781

hello experts,

both of my itab and ztable are has same structure.I have checked it.

regards,

Ashok.

Read only

0 Likes
781

Hi Ashok,

Maku sure that ur internal table is not having duplicate entries.

Thanks

Sekhar.

Read only

0 Likes
781

hi ,

my itab does not have any duplicates.

It is very urgent can any one give me the solution.

regards,

Ashok.

Read only

0 Likes
781

Ashok,

you can try with the index option.

MODIFY ZTABLE FROM TABLE ITAB.

try it again.

Regards

vijay

Read only

0 Likes
781

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