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: 

How to read the table controle contents?

Former Member
0 Kudos

Hi,

This is suvan. I have some problem. I displayed a table control in a screen. In that some entries are input enabled. I need to get the contents entered in the table control. How can i read them?

Thanks in advance.

Suvan.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Suvan,

As long as the internal table in your program and the table control fields ahve got the same name, you do not have to worry about explicitly fetching the data enterest in the table control. During the PAI event, the values entered on the screen are automatically transported to the internal table in your program.

Regards,

Anand Mandalika.

11 REPLIES 11

Former Member
0 Kudos

Hi Suvan,

As long as the internal table in your program and the table control fields ahve got the same name, you do not have to worry about explicitly fetching the data enterest in the table control. During the PAI event, the values entered on the screen are automatically transported to the internal table in your program.

Regards,

Anand Mandalika.

0 Kudos

Hi Poornand,

Thanks for the help. But my internal table is without header line. So we need to pass them into the work area and then show the same in the table controle. Then the internal table contents will not be altered. We should get the work area at the appropriate line and then change accordingly the internal table. This is my problem.

Regards,

Suvan

0 Kudos

So when you do the LOOP in the PAI (flow logic) each line of the table control will be transferred to the work area, right ? You can at the same time read your internal table also to see if the two of them match. If they don't, then there's a change somewhere.

Regards,

Anand Mandalika.

0 Kudos

But how can we read the table controle. In the demo program, he is using the spfli table and using a structure DEMO_CONN. He is populating the strucutre with the contents of the internal table itab and again reading back from the same structure using index. I can read and modify the spfli contents with the demo program.

But there is no structure for our z-tables.

This is my problem.

Regards,

Suvan.

0 Kudos

Ok Anand,

I have successfully read the table control. I made mistake in screen painter. So went wrong in reading. Thanks for your help.

Regards,

Suvan

0 Kudos

Anand,

One more problem. I need to display two table controls in a screen. And in both table controls i need to make some fields input disabled (only for some rows).If the first table controle contains multiple entries and needs to enter some thing( made required). For that I need to press the Scroll bar. But it triggers PAI event and control goes to the second table control.(Without validating the remaining fields in the first table controle.) And even if i press it(if i use single table control), the contents in the first control will be disappearing. How to reatain them and how to solve this problem.

Regards,

Suvan.

0 Kudos

Hi Sankar,

I'm not able to visualize your scenario completely.

What are you doing to make the fields mandatory ? Instead of making <i>screen-required = 1</i>, you can implement the check for the field manually. In your code you can check if there was some value that was entered for the screen field or not.

Regards,

Anand Mandalika.

0 Kudos

By the way, is there any particular reason you are still dealing Table Controls ? Wht can't you use the ALV?

Regards,

Anand Mandalika.

0 Kudos

The actual scenario is i want to make a field input required and mandatory in the internal table based on some other field value. For that as you guessed, i am using Screen-required = 1. When I Press scroll bar to see the remaining contents in the first table control, the control goes to the second table control instead of scrolling down the first table control. First I need to fill the entire fields that are mandatory in the first table control and then the second table control.

And the reason for using the table control instead of using ALV's is I need to make some research to make some fields input enabled & MANDATORY(especially). Thought of instead of doing research now it is better to work with table control.

I hope you got my problem.

Regards,

Suvan.

0 Kudos

Hi Sankar,

If that is the case, then why don't you hide the second table control till all the values in the first one are entered ?

By the way, it does not take too much time to do it with ALV. There are hundreds of posts in this forum and searching them will give you an answer to your questions.

The reason I'm suggesting this is because ALV will give you the uniform look and feel and is also being considered a more professional way of building the application's GUI.

Regards,

Anand Mandalika.

0 Kudos

Post deleted