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

MODIFY dbtab FROM wa - Not Working

Former Member
0 Likes
1,698

Hi Experts!!

CLEAR gs_proj.

MOVE-CORRESPONDING proj TO gs_proj.

gs_proj-aenam = sy-uname.

gs_proj-aedat = sy-datum.

gs_proj-zzdate = date.

MODIFY zrproj FROM gs_proj.

ZRPROJ is copy of PROJ table with an extra primary key as zzdate. Now though I give a unique entry with different zzdate, MODIFY is not working but is giving sy-subrc 4. When I checked, there were secondary indices in ZRPROJ (copied from PROJ) and hence deleted all the secondary indices. But still sy-subrc is 4 only.

Can anybody help me in figuring out what the problem is here?

Your help is highly appreciable.

@ Hareesh

Adjusted...but no luck

@ Klaus

->gs_proj is of type proj only

->DATE isn't empty...being filled in

->yes, working fine

@ Nishant

MANDT is a key field and is being filled in...

Can anybody help me out please...?

9 REPLIES 9
Read only

Former Member
0 Likes
1,420

Hi,

Have you done a database adjust in SE14 after deleting the secondary indexes ??

If not, pls try by doing that.

Regards

HM

Read only

0 Likes
1,420

Tell me if your Z table has MANDT (Client) field as primary key).

If it is then also provide value for client as well.

Let me know if your prob. is resolved or need help.

cheers.

NK.

Read only

0 Likes
1,420

@ Hareesh

Adjusted...but no luck

@ Klaus

->gs_proj is of type proj only

->DATE isn't empty...being filled in

->yes, working fine

@ Nishant

MANDT is a key field and is being filled in...

Can anybody help me out please...?

Read only

0 Likes
1,420

Hi Srinivas,

You wrote "gs_proj is of type proj only".

But gs_proj has to be like structure of table ZRPROJ .

Read only

0 Likes
1,420

@ Cannao

Both are same right? I declared gs_proj as zrproj structure only.

Read only

0 Likes
1,420

Hi,

why dont you paste the data declaration part also here.

The only reason for modify to not work is that structures dont match.

Read only

0 Likes
1,420

If the ZRPROJ is different from PROJ, the gs_proj has to be like ZRPROJ.

Anyway, I understood that you tried this solution and you have still your issue.

Read only

Former Member
0 Likes
1,420

Hi,

are you sure that

-> gs_proj is of type (structure) zrproj?

-> value of field DATE isn't empty?

-> MOVE-CORRESPONDING is working fine for all key fields of table proj?

Regards,

Klaus

Read only

Former Member
0 Likes
1,420

I deleted ZRPROJ and recreated again by copying PROJ and deleting indices again. Now it's workign fien with the code unchanged. The problem was ofcourse with Table (dont know what exactly it is) but not the declaration or any other part of code.

Solved. Thanks everyone for your valuable inputs.