hi,
I have written abap report program through write statement. printing of the report is done vendor wise. suppose for vendor1 there are 3 pages, so in the header it should display page 1/3, page 2/3 and page 3/3, for next vendor suppose vendor2 there are 5 pages, so in the header it should display page 1/5,page 2/5,page 3/5,page 4/5,page 5/5. currently i have written code but it doesnt display pages vendor wise, if we take above example of vendor1 and vendor2, my code display as page 1/8, 2/8, 3/8 likewise... my code is as given below.
l_page_count = v_totpage.
DO v_totpage TIMES.
READ LINE 6 OF PAGE sy-index.
REPLACE '---' INTO sy-lisel with l_page_count.
MODIFY LINE 6 OF PAGE sy-index.
ENDDO.
WRITE :/1 sy-vline, 10 'Company Code:' , 24 p_bukrs, 84 'PAGE' , sy-pagno ,'Of ', '---', 231 sy-vline.
v_totpage = sy-pagno.
LOOP AT it_final.
Displaying each Vendor on new page.
ON CHANGE OF it_final-lifnr.
NEW-PAGE.
ENDON.
endloop.
kindly advise what change i should do in above program.