‎2010 Jan 02 9:05 AM
Hi friends,
I have a table control with records. If I select some of the records and press a push button, I should show the selected records in another tablecontrol in other screen. It is working fine.
But, for example there are 10 records in table control, If I select 5 records and press pushbutton it is showing selected 5 records in other tabcontrol. If I go back and again select more than 5 records , It is showing only five records, rest of the records are ignoring.
Please help me solve this issue.
thanks in advance and regards,
Murali Krishna Tatoju
‎2010 Jan 02 9:08 AM
Hi Murali ,
When you press push button , just refresh the internal table having records for second table control.
And as per you , your population of records from first to second table control is working fine , so issue should be resolved by this.
Hope this helps you.
‎2010 Jan 02 9:52 AM
Hi Harsh,
Thanks for your reply. I have tried in your way. But i didnt got the solution.
Please consider this.
Here, at the first execution if we select 5 records, I think i is allocating the memory for 5 records, then if i select more than 5 records, say for example 7 records, it is showing only 5 records ( previous memory space is carrying forward).
I think we need to free memory of the internal table of the tabcontrol.
for this i have used
FREE itab.
then calling the screen in which my second table control is there.
But got no solution.
Please help me to tackle this issue.
thanks
Murali Krishna
‎2010 Jan 02 9:59 AM
Hi Murali,
After selecting row from first table control, and before appending the selected rows to second internal table refresh second table
" Refresh second_tab.
refresh second_tab.
loop at first_tab where mark = 'X'.
move-corresponding first_tab to second_tab.
append second_tab.
endloop.
now in PBO of second Screen
module status_100.
loop at second_tab with control tc.
endloop.
in program.
module status_100.
Describe table second_tab lines tc2-lines. " This will give you scroll so that you can see 7 rows by scrolling.
endmodule.
By the way similar post is there by Bikas_hydCheerz
Ram
‎2010 Jan 02 10:45 AM
Hi Ramchander,
Thanks alot. Problem solved.
Regards,
Murali Krishna tatoju
‎2010 Jan 02 11:05 AM
Hi Murali ,
Free ITAB will not be required you can just use REFRESH itab.
Understand the flow of executino and your logic also.
First , PBO of your screen is executed here first table control is filled from an internal table.
Now you select some recored and press a button PAI is executed. Now second internal table or table control is filled.
Now, you change selection then what should happen ?
First , all the records from the second internal table should be washed and the again fill this table from first internal table selected records.
So , in PAI you need to refresh the table just when your button is pressed and then you need to fill it with selected records from first table.
Hope you understand it.
‎2010 Jan 02 12:30 PM
HI Harsh,
My problem solved, Thanks for your reply. Can you please suggest me so that
When i selected some records and press push button, it is showing all the selected records. When I click back button, the previous tablecontrol with selected records should be refreshed. But Iam getting the records selected. ( The selection should be washed off).
thanks & regards,
Murali