on 03-17-2010 9:44 AM
Hi Gurus
I have following request:
The design of the page looks like this.
Page 1.
Loop at header table which contains vendor number
Loop at vendor information where vendord number = header-vendor number
print vendor information.
if vendor changes, go to new page.
what i did was i created on page 1, I had the mode = 'initialize counter',
and i copied page 1 and created a page 2, and had the mode = 'increase counter'.
the problem i now have is, for example, i have 3 diff vendors the page numbering is '1 of 1', '2 of 1' and '3 of 1'. It means that my sfsy-formpages is always 1.
I want for each unique vendor a dependant numbering
so vendor 1 page 1 /2
vendor 1 page 2 /2
vendor 2 page 1 / 1
vendor 3 page 1 / 3
page 2 / 3
page 3 / 3
Does anyone has a solution for obtaining this?
Edited by: Kristof De Bruecker on Mar 17, 2010 10:44 AM
I closed this tread. No solution was provided to reset the formpages myself somewhere.
What I did as solution, is creating a new button on my ALV grid to print out the form, but this will call the smartform each time there is a new vendor. this run fully in background, so formpages are re-setted automaticly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used this snippet in program lines node at entry to determine similar (number of page per EE, for you it will be per vendor)
IF sfsy-jobpages = 1.
FREE MEMORY ID 'ZCZPY_EE'. "clear at entry
ENDIF.
DATA: pernr TYPE persno.
"get current EE form pages
IMPORT e_pernr = pernr
e_page_no = g_form_page
FROM MEMORY ID 'ZCZPY_EE'.
IF pernr = wa_assign-key-peras
OR pernr IS INITIAL. "same EE
ADD 1 TO g_form_page. "increate number of pages per EE
ELSE.
g_form_page = 1. "initialize counter as EE has changed
ENDIF.
EXPORT e_pernr = wa_assign-key-peras
e_page_no = g_form_page
TO MEMORY ID 'ZCZPY_EE'.
G_FORM_PAGE is defined as global data object and will hold number of page per EE
i.e.
EE1 - 1, 2, 3
EE2 - 1,2
EE3 - 1,2,3
...
Regards
Marcin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marcin Pciak
Where do I have to put this program lines??
But your logic program lines will change the page counter?
that works ok at my form... when I call my first page, I have set the initialize counter in the general attributes
my second page has the attribute increase counter...
It's the total of pages that is not correct.
Or it stays at 1 for multiple vendors (formpages) ore when I use the jobpages, I get the total of the pages used, for all different vendors.
Edited by: Kristof De Bruecker on Mar 17, 2010 11:14 AM
Just create program lines NODE as the first node in the page 1. You don't need to copy page1 to page2. Only use 1 page if has to have same layout. Don't use another page to increase any counter.
Then paste the code in this new NODE, so whenever you enter page1 (also page-break will enter the same page), this code will be executed as the first thing. So you will have corect number of page per vendor at page entry.
Hope it is clear enough.
Marcin
Hi
Create a seperate window,and select the type as "Final Window", and print the page numbers in this window.
Place the window at the position where you want to print the page numbers using Form Painter.
Vishwa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.