The other day, "Blag" raised a question on Twitter around this topic. He was having trouble with a program where there were multiple table controls on a single screen. He asked if there was some kind of limit as to how many you could possibly have on a screen, I answered, "There shouldn't be any limit". And so, I left it at that, figuring that he would figure out his error eventually. Then today, he tweeted again, mentioning that he simply could not get it working. So I spend a few minutes, trying to recreate this issue on my system, and what do you know, I was seeing some real issues also. For example, none of my data was showing in any of the table controls. I was sure that I had coded everything correctly, and I even used the table control wizard to create the table controls, so everything should be fine, right?
Here is the quick and dirty test program. It is very simple, one screen(100) with four table controls in it, each representing an internal table, Itab1, Itab2, Itab3, and Itab4. This program will add a record to each internal table and simply throw the screen.
So when I run this progam, the output is very strange. There is no data in my tables? Why? While debugging, I could see that the data was there, just before throwing the screen.
After going over the program again and again, including the screen flow logic, I realized that I got a message when I created the second table control. It mentioned that when using multiple table controls in one screen, it was important that the screen flow logic was in the order of the table controls on the screen, from left->right, and top->bottom. I didn't think much of it at the time, as I had never seen this message before, and it was an information message. I then checked the screen flow logic and noticed that the table control wizard had written the coding in such a way that it was in reverse order, coding for Itab4 was first, Itab3 was second, and so on.
This had to be the problem, so I changed the order of the coding, so that it reflects the order of the table controls on the screen. From left to right, and from top to bottom. Sure enough, the data showed up in the table controls.
As mentioned before, I don't remember ever seeing this information message about multiple table controls on one screen, but the last time that I had done so, I was working on a 46c system, and maybe that message is not there in that release. This could be the reason why Blag had such an issue, as I believe he is currently working in 46c. I believe that Blag has since abandoned the table controls and went with ALVs instead, but In any case, I hope this blog post clears up the issue, and saves others from the same misery that Blag has gone through lately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 |