Application Development 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: 

MODIFY dbtab FROM wa - Not Working

former_member305388
Active Contributor
0 Kudos

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.

9 REPLIES 9

Former Member
0 Kudos

Hi,

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

If not, pls try by doing that.

Regards

HM

0 Kudos

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.

0 Kudos

@ 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...?

0 Kudos

Hi Srinivas,

You wrote "gs_proj is of type proj only".

But gs_proj has to be like structure of table ZRPROJ .

0 Kudos

@ Cannao

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

0 Kudos

Hi,

why dont you paste the data declaration part also here.

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

0 Kudos

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.

former_member195402
Active Contributor
0 Kudos

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

former_member305388
Active Contributor
0 Kudos

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.