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

Z table updation

Former Member
0 Likes
1,253

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.

10 REPLIES 10
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,163

Did you try debugging it..What is happening  in the background after you update...? was the sy-subrc set to 4..?

Read only

former_member201275
Active Contributor
0 Likes
1,163

Your question is a bit vague, if you could provide more detail it would help

Read only

Former Member
0 Likes
1,163

Hi Samuel,

   Can you write the code which you have written for updating and dispalying..

Regards

Kusuma

Read only

former_member209120
Active Contributor
0 Likes
1,163

Hi Samuel Dennis,

Can you explain your problem in detail with screens....

Read only

Pragnesh_7se7
Participant
0 Likes
1,163

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.

Read only

Former Member
0 Likes
1,163

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!

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,163

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

Read only

Former Member
0 Likes
1,163

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.

Read only

Former Member
0 Likes
1,163

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

Read only

Former Member
0 Likes
1,163

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.