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

Table Control challenge

Former Member
0 Likes
719

Hello Friends,

I am facing a very challenging problem, and here it goes:

I have created a control table using wizard. When table displad it is empty, and user can enter the data in the table, so after entring the data, user can select the row, and press ok button. Now my task is to read this data which user has entred, I have tried almost every tip to do so, but could not find out and then here the reason goes:

Actually in PAI ( the code generated by the wizard ), it tries to modify the internal table which actually should contains the data, but modify returns sy-subrc eq 4, because modify only works when there is data ( but as I said, my table is initially empty, and user has to enter some data )...

Any idea what I can do here, I hope I was clear enough, if not, pls let me know and I will try to explain in other way

Regards,

Message was edited by:

Shah H

7 REPLIES 7
Read only

Former Member
0 Likes
690

Hi Shah ,

What you can try is in the PBO add a blank line to the internal table that is being displayed in the table control.

I think this will help .

In case of any further queries , please do revert back.

Regards

Arun

Read only

0 Likes
690

Hi Arun,

Good idea, so u mean simply append in pbo ?

structure should be empty, but simple append would work out ?

Regards

Read only

0 Likes
690

Hi Shah ,

I remember having a similar issue some time back , and seem to have tried this out . So just give it a try and see what happens........

Yes there is an addition with APPEND called INITIAL LINE TO , please check the help for more details.

But do remember that if you are updating table from your table control , the before updating delete this initial line other wise a balnk line will be inserted in your database table also.

Regards

Arun

Read only

0 Likes
690

Hi Arun,

Thanks man for the tip, I will try it out some time later, and get back to you with result, pls do check this post on tuesday ( as monday is holiday here ) around same time

So nice of you, and till then.....

Take care, and bye

Read only

0 Likes
690

Hi,

One another tip I want to know :

Actually I forgot to place the char for selecting the row, so now I have to extend my dict. table for this field, and then assign to w/sel this char.

My question is: do I have to regenrate the whole control table ? or only entention in the table would be enough ?

Regards,

Read only

0 Likes
690

you need not insert a new field in the dictionary table.

just add one field CHK(1) type C in the internal table that is being passed to the table control.

now give a name to the w/SelColumn in the table control properties. say it is ITEM_SEL

now in the PAI of the table control loop.

just chk this

if ITEM_SEL = 'X'.

itab-chk = 'X'.

modify itab.

endif.

this will select the row that is being checked in the table control

Regards

Gopi

Read only

Former Member
0 Likes
690

I have same problem which u have declared.,

i need some what code for that,

my id is : BIRJUSTER@GMAIL>COM