‎2010 Jun 19 3:15 PM
Hi,
My requirment is - suppose i have given 1 to 3 invoice in my selection screen , so in smartform layout, In first page 1-invoice will be print, in second page 2-invoice will be print and the 3 page 3-invoice will be print. so i want the page no for all page should be
1 instead of SFSY-page.If suppose any invoice line item print in next page then page no will be 2,3.etc.
but for every new invoice page number should be 1.
please help me on this.
‎2010 Jun 19 3:43 PM
Hi,
I suppose you need to distinguish in some way when new invoice has started. Thus, I would recommend using two extra variables: one to store current page of every invoice, one to store how many pages have already been printed for all previous invoices.
The algorithm will look something like that:
1. if new invoice: all_prev_pages = sysf-page. else: skip step.
2. current_invoice_page = sysf-page - all_prev_pages + 1.
3. print current_invoice_page.
Regards,
MC
‎2010 Jun 19 6:41 PM
Where your displaying ur page no u need to add a logic and change the page no
suppose ur invoice no is in wa-vbeln
den take a global variable eg temp_vbeln
if temp_vbeln NE wa-vbeln.
page_no = 1.
else.
page_no = page_no + 1.
endif.
temp_vbeln = wa-vbeln.
thus ur page_no will turn to 1 wen a new invoice no comes and add 1 to it if it remains d same
‎2010 Jun 21 6:37 AM
Hi ,
Simply have one variable , increment it until u have a same Invoice , when new invoice occurs , initialize that same variable to 1 .
Regards.
Uma Dave