2013 Oct 24 7:48 AM
Dear all,
I have an issue in updating a ztable. I used to update the table programmatically, as i have developed an alv grid program and in the output of the report there are manual fields for the user to enter the values and save the data. Earlier this method was working fine. when the user saves the data the ztable also gets updated and the saved data will also reflect in the output as well. Now i have an issue that when the user enters one sale order and saves the data it works fine but from the next sale order it does not save the values in the output nor in the ztable. What could be the reason.
Please help.
Regards,
Sam.
2013 Oct 24 7:51 AM
Did you try debugging it..What is happening in the background after you update...? was the sy-subrc set to 4..?
2013 Oct 24 7:53 AM
Your question is a bit vague, if you could provide more detail it would help
2013 Oct 24 7:53 AM
Hi Samuel,
Can you write the code which you have written for updating and dispalying..
Regards
Kusuma
2013 Oct 24 7:54 AM
Hi Samuel Dennis,
Can you explain your problem in detail with screens....
2013 Oct 24 7:56 AM
Hi
check key fields in your table, whether it conflicts with new entry and use modify instead of insert query,
debug and reply what happen for further help.
2013 Oct 24 7:59 AM
Hey,
Try to debug first at the point where you have written code to update your ztable.
It seems that the old data (in variables or internal table )is not cleared after use.
Try to debug the program flow and analyze the data for table updation and screen refresh.
Thanks!
2013 Oct 24 7:59 AM
The reason comes from your code, but you did not give us sufficient information, could you try to debug your code, to be able to elaborate a little more on your problem, put break-points in part of code where you read/identify changed data ?
(Asking Good Questions in the SCN Discussion Spaces will help you get Good Answers )
Regards,
Raymond
2013 Oct 24 8:02 AM
Hi Samuel,
You are able to save it for the first time and second time onwards you are having an issue. I would suggest you to debug your program from second entry creation onwards. I doubt that you have used INSERT statement, which will update the first Sales Order data and when you update the grid with second value, program tries to insert both the entries which includes first entry also, which will not be allowed. Well, this is just an assumption, it could be something else as well, so your debugging will get some more clarity for you as well as us in finding the root cause. May be share your code so tha we can see what exactly is happening after the SAVE excution.
Regards,
DN.
2013 Oct 24 9:06 AM
Hi ,
I think your internal table through which you are inserting values is not clearing and it has previous entries within it. could you plz check it ? if it is so use clear keyword .
WBR/Shakti
2013 Oct 25 7:07 AM
Dear all,
Thank to each one of who replied for my post. The issue has been solved. There was a clear statement used after the update statement. once i commenred the clear statement, the data got saved.
Thanks all.
Regards,
Sam.