on 11-16-2006 10:08 AM
friends,
i hve a smartform that prints the tag qty for goods movement. let's say the tag qty. is 100: .if i am giving 1, it will print one gr slip with 100 in the qty. column....if i give it as 2, then it will print two tags with qty. 50 in one tag and 50 in another...how to trigger page break in the sf depending on the input given, keeping in mind that all the other details printed in the first page should coming in the next page also, only the qty. changing? like
i.e., tag qty: 50 (page 1/2)
2nd page tag qty: 50 (page 2/1).... thanks all
Hi Satish,
Just trying to simulate your problem and producing the solution, it may prove helpful to you.
1. In the global definition, go to the 'Types' tab and declare the following type
TYPES: BEGIN OF qty_tab,
qt_pr(4) TYPE n,
END OF qty_tab.
2. In the 'global data' tab create the following variables.
Var name|typ ass|associate type|default value
QTY| TYPE| I|
ITAB| TYPE| TABLE OF QTY_TAB|
WA_ITAB| TYPE| QTY_TAB|
INP| TYPE| I| 3
CNTR| TYPE| I| 1
3. In the main window first create a code node
Input parameters:
ITAB
WA_ITAB
QTY
INP
Output parameters:
QTY
ITAB
Code:
qty = 100.
qty = qty / inp.
do inp times.
move qty to wa_itab.
append wa_itab to itab.
clear wa_itab.
enddo.
4. Then create a node of type loop and in the data tab, under the loop pane,
loop at 'itab' into 'wa_itab'
5. Under loop, create a node of type program lines
Input parameter
cntr
Output parameter
cntr
Code
cntr = cntr + 1
6.Create a text node under the loop node, and insert the field &wa_itab-qt_pr&
7. Insert a command node
In the 'conditions' tab of the command node, write a condition
cntr <= INP
In the 'General Attributes' tab of the command node, enable the check box for 'Go to new Page' and enter page number 1.
Note, the page must contain a main window.
Revert back for more inputs.
Regards,
Pulkit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
correction:
tag qty: 50 (page 1/2)
2nd page tag qty: 50 (page 2/2)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.