06-15-2011 7:50 AM
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.
06-15-2011 8:00 AM
Hi,
Have you done a database adjust in SE14 after deleting the secondary indexes ??
If not, pls try by doing that.
Regards
HM
06-15-2011 8:21 AM
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.
06-15-2011 8:51 AM
@ 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...?
06-15-2011 8:57 AM
Hi Srinivas,
You wrote "gs_proj is of type proj only".
But gs_proj has to be like structure of table ZRPROJ .
06-15-2011 9:04 AM
@ Cannao
Both are same right? I declared gs_proj as zrproj structure only.
06-15-2011 9:13 AM
Hi,
why dont you paste the data declaration part also here.
The only reason for modify to not work is that structures dont match.
06-15-2011 9:18 AM
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.
06-15-2011 8:15 AM
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
06-15-2011 9:17 AM
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.