08-13-2015 9:28 AM
Hi all,
I'm trying to print data in smartform. In my table there are some repeated values. So I want to avoid those repeated values. But if it's in new page I wanna repeat it. Avoid repeated values using a program line before print the table data. Here is the code..
IF p_no_prv <> wa_itab-index_no OR p_new_page <> sfsy-page.
p_no_prv = wa_itab-index_no.
p_new_page = sfsy-page.
p_no = wa_itab-index_no.
p_code = wa_itab-code.
p_size = wa_itab-tsize.
ELSE.
CLEAR: p_no, p_code, p_size.
ENDIF.
I try to identify the new page using 'sfsy-page'. But the problem is it's repeating in 2nd line of the new page insted of 1st line.
Please help me.
See the output below..
Thanks.
08-13-2015 12:05 PM
If you are using template within loop, ensure that code you have written in program lines must be before template in sequence.
02-22-2016 10:48 AM