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

Smartforms Loop within MAIN not showing data

prince_isaac
Active Participant
0 Likes
378

hi guys

I have a smartform whose design is as below.

Page_First next page Page_First.

Header Window: Here i read main table lt_main to retrieve common fields for entire subset eg date and user.  Also create another internal table(lt_sub_main) replicating lt_main, sort records by date and delete adjacent duplicates.

Main Window: Loop at lt_sub_main.

Table main: on condition(date) Looping at lt_main where date = lw_sub_main-date.

Problem is that only two iterations are being done  for table lt_sub_main even though i have hundreds of unique dates.  Only the records for the first two dates is printed, similarly if i delete other dates in debugg mode only two dates(which ever first two) records is printed.

Whilst debugging the function module for the smartform the loop at lt_sub_main occurs only twice then loop is exited.

Is there any additional coding required to prevent this and print my entire data set??

regards

Prince Isaac

1 ACCEPTED SOLUTION
Read only

prince_isaac
Active Participant
0 Likes
340

Hi guys

Managed to solve my issue, on first page i had an event to read the first line of the global data table and when i replicated this by placing the subsequent page as itself it would not print subsequent items.  I had to restrict the event occurring on the subsequent page and this resulted in the rest of my data set printing as desired.  Many thanks for the awesome tips and suggestions.

regards

Prince Isaac

1 REPLY 1
Read only

prince_isaac
Active Participant
0 Likes
341

Hi guys

Managed to solve my issue, on first page i had an event to read the first line of the global data table and when i replicated this by placing the subsequent page as itself it would not print subsequent items.  I had to restrict the event occurring on the subsequent page and this resulted in the rest of my data set printing as desired.  Many thanks for the awesome tips and suggestions.

regards

Prince Isaac