on 08-25-2010 11:36 AM
Hi,
My requirement is as follows,
Whenever the item number changes it has to generate a new page with the header
Whenever an item overflows it should come in a new page without the header details.
So for this I have two pages in my smartform.
Page1 - Header with item details
Page2 - Only item details without the header
I have given Page1's next page as Page2. And I have given a command whenever the item no changes it should go to Page1.
But whats happening now is whenever a new page is generated only Page 2 is coming and not the Page 1.
Any ideas??
For Page 2 try also setting next page as Page 1.
Regards
Marcin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
well this requirement has to be solved in a slightly other way.
all you need is ONE page (FIRST), which has declared FIRST as NEXT_PAGE.
Next thing you need is a condition which recognizes a change in itemnumber and which triggers a page break.
So change of itemnumber will trigger a page break now as well as overflowing the main window.
Now around your header you need to call that condition once again.
if itemnumber has changed, do NOT show header, since this was the reason for page break. If itmenumber has NOT changed, then print the header since iteminformation has just exeeded page.
Hi,
I have the similar requirement in smart forms . I need to print multiple pages whenever the line item chnages in my table control. I used Command to trigger new page based on the condition when the item changes.Bu this is now working . Could you please help in this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sharan,
at the end of loop at item table, create a command field, check go to new page button and give as page1 only,
and write a condition for that command as:
V_REC is greater than V_COUNT
where v_rec = no of records in table
v_count = count of the loop.
ex:
v_count = v_count + 1. ( write this code after loop node in program lines)
In this loop only add header details template.
example:
loop at it_vbak.
code lines for v_count
now create a template for header details.
loop at it_vbap.
now create a template for item details.
endloop.
create command with condition
endloop.
revert, if any concerns.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
u want like this right ...
assume that table data
item item desc qty
10 10item descripotion 23
for material
20 20item descripotion 33
for material
O/P Like This u want
*page1
item item desc qty
10 10item descripotion 23
page2 (dont want want headers only remainning data of the line item)
for material
For this simply u can put your header in the main area of the table (leave header as blank)
Let me know if any concerns........
Regards,
Lokesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just thought of different approach.
I will assume the item details part is in both pages the same window with elements inside.
So just leave one page with header (and the same page as next page). Now every time the item changes set a global flag saying the item has been completely displayed. Now for the window with header set a condition checking our flag. If set show the header and just right after it clear the flag (so it will be avaiable for next item). If flag not set, then the header will be suppressed.
The sequence would therefore be like
- page with header - item1 g_finished = 'X'
- page with header - item2 g_finished = ' '
- page without header- item2 g_finished = 'X'
- page with header - item3 g_finished = 'X'
...
Should do the job
Regards
Marcin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
erm no thats wrong. if you do not print the header the items will be printed right there where the header would have been printed, otherwise you made some really uncommon things in your form.
make sure you dont print your header instead of printing it with emtpy values. SAP doesnt care if you print spaces or not. If you porint 2 pages of space, your printout will be 2 emtpy pages.
Edited by: Florian Kemmer on Aug 25, 2010 2:03 PM
Hi..
This is one such specific reason for which we use two pages in smartform, displaying thew same data but with different Main Window Margins.
I guess you have a re-look into the events you are using for triggering new page. You can try using one in table's data tab, event on sort end. (AT END OF <ITEM>)
The second Page's Next page as First page is correct. Just need to check with event triggering and thus new page triggering.
Regards,
Karthik
Hi..
As you are checking the change of an item number, AT END event is similar to that only, you will check when an item ends.
Commands are to direct what needs to be done, and events (which are used in smartform by using event on sort begin and sort end) take care of when it needs to be done. Generally its better to use events in smartforms especially to trigger new-page etc, which is one such requirement of yours.
Regards,
Karthik
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
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.