on 05-08-2009 12:51 PM
Hi Friends,
I wanted 5 prints of a particular smartform.A particular text in the header changes for all the five prints.
eg: Original ,duplicate,triplicate,copy and copy.To achieve this my logic is
do 5 times.
if sy-index = 1.
var = 'original'.
endif.
if sy-index = 2.
var = 'duplicate'.
endif.
if sy-index = 3.
var = 'triplicate'.
endif.
if sy-index = 4.
var = 'copy'.
endif.
call smartform(functionmodule name)
exporting
var = var.
end.
I am getting all the 5 prints but the problem is all the 5 prints are not cumming in sequence.Sumtimes duplicate cums first or sumtimes triplicate cums first.
Pls do the needful.
Thks n Regards,
Nicklas.
Hi,
In u r form
First Create one Separate Window for Text of type 'Copies Window'.
In program lines write the below code
IF SFSY-COPYCOUNT = '001'.
v_TEXT = 'Original'.
ENDIF.
IF SFSY-COPYCOUNT = '002'.
v_TEXT = 'Duplicate'.
ENDIF.
IF SFSY-COPYCOUNT = '003'.
v_TEXT = 'Triplicate'.
ENDIF.
IF SFSY-COPYCOUNT = '004'.
v_TEXT = 'Quadruplicate'.
ENDIF.
IF SFSY-COPYCOUNT = '005'.
v_TEXT = 'Extra Copy'.
ENDIF.
Then Print 'V_TEXT' in Text Element.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If that is the case then you may use a local vairable in the print program and increase the count after each call of the smartforms.
Pass the variable to each smartforms and then apply the logic as per your client requirement is concerned.
Hope this works for you.
Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create a copies window in your smartform by selecting the window type as Copies window in that create Program lines node and write this logic
IF SFSY-COPYCOUNT = '001'
TEST = 'Original'.
ELSEIF SFSY-COPYCOUNT = '001'.
TEST = 'Duplicate'.
ELSE.
TEST = 'Tripilicate'.
ENDIF.
After this Programlines node Create one text node In that write the variable TEXT.
Regards,
Jagadeesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this to find the no of times a dcoumetn is printed.
SELECT anzal FROM nast
INTO var_total_copies
WHERE kappl = 'V3'
AND objky = var_invoice_number
AND nacha = 1
AND vstat = 1.
wherein declare var_total_copies to store the number times a document is issued and var_invoice_number is the document number.
Pass the variable var_total_copies to the smartform interface and print accordingly as per the value of the variable.
If var_total_copies is '0'.
display 'Original'.
If var_total_copies is '1'.
display 'Duplicate'.
like that...
Regards,
Ram
Edited by: Ramakrishna Peri on May 11, 2009 11:18 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramakrishna,
The same logic i hve applied but the prints are not coming in sequence.The sfsy-copycount is a gud logic and it solves my printing problem,but i have to call three smartforms to meet the client specification.So if sfsy-cpycount logic gets approved i will close this thread.
Thanks n regards,
Nicklas.
Hi,
You can do in another way.Please fill an internal table 'itab' like as below.
No Text
1 original
2 duplicate
3 triplicate
4 copy
5 copy
loop at itab.
call smartform(functionmodule name)
exporting
var = itab-text.
endloop.
2. You can do by using program lines also,if you want
Thanks,
Suma.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Do you have any other loop above do...endo .?
Thanks,
Shailaja Ainala.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.