on 09-14-2010 5:41 AM
Hi,
I am creating one SAPSCRIPT by copying standard sapscript for printing checks.
I have one problem here. The customer wants that the same information(invoice no, amoun etc) is printed out in one page.
Can I use two MAIN windows in one page with same information?
Please see the below.
-
MAIN WINDOW----
Invoice No Description Date Invoice Amt Discount Net Amount
Invoice #1 Test Description 1 08/10/20010 1,000.00 20.00 980.00
Invoice #2 Test Description 2 09/10/20010 1,500.00 0.00 1,500.00
Invoice #3 Test Description 3 09/15/20010 3,000.00 0.00 3,000.00
Invoice #4 Test Description 4 09/20/20010 500.00 0.00 500.00
Invoice #5 Test Description 5 09/30/20010 600.00 0.00 600.00
Invoice #6 Test Description 6 10/1/20010 900.00 0.00 900.00
-
*Other Information will be here. |
-
MAIN WINDOW----
Invoice No Description Date Invoice Amt Discount Net Amount
Invoice #1 Test Description 1 08/10/20010 1,000.00 20.00 980.00
Invoice #2 Test Description 2 09/10/20010 1,500.00 0.00 1,500.00
Invoice #3 Test Description 3 09/15/20010 3,000.00 0.00 3,000.00
Invoice #4 Test Description 4 09/20/20010 500.00 0.00 500.00
Invoice #5 Test Description 5 09/30/20010 600.00 0.00 600.00
Invoice #6 Test Description 6 10/1/20010 900.00 0.00 900.00
-
If it is possible, please someone help me.
Thank you.
Hi,
for this you have to create one main window and use the text elements like
/E: DATA1
/E: OTHERDATA
/E: DATA2
In Print program
you have write logic like this
open form.
loop at itab.
write_form using
element DATA1
endloop.
write form using element
OTHERDATA
loop at itab.
write_form using
element DATA2
endloop.
close_form.
Regards,
Jagadeesh T.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I solved this with the other way with the
customer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kim
You can do one more thing make a copy of your standard print pgm and then get the config done for the output type with the script you have made and a new print program which you can customize.
after that you can make a write form and use a different element and under which you can use the fields which you want seperately.
Hope that you have understood and this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
Yes, you can use 2 main windows in one page. Your issue will be solved easily by using 2 mian windows. SAPScript can use Main Winsdows up to 99.
Cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Really? I tried to create one more MAIN window and of course I can create one more.
but, it doesn't display same data because new MAIN window has new consecutive number.
I think new MAIN window will have the rest if the data in the first MAIN window is over.
If it is possible, Could you briefly explain about more?
Thank you.
Um... but, I created two MAIN windows but, the data is only displayed in 2nd MAIN Window.
or If I change position number, the data is only displayed in the first MAIN Window.
Not both of them....
What did I do wrong?
Thank you.
Edited by: Gyu Seob Kim on Sep 15, 2010 2:26 AM
Edited by: Gyu Seob Kim on Sep 15, 2010 2:44 AM
HI there,
you have to change your printing program to control it in 2 main windows and you have to know how many lines in each main window and then control to print them into both. You need a small loop for second main window in big loop.
loop it_tab1
call write main window. This time it will only goes 1st main window
--> fill in it_tab2 with fixed number of main window
if fixed number reached, then
loop itab2.
call write main window. "This time it will go to the 2nd mainwindow
endloop
endif.
endloop
Hope this is clear enough.
Cheers.
Hi,
I didn't get you, Could you explain me? I need clarity on the following thing,
1. As of now how other information is printing? Is it printing like a static text / dynamic text / will it expand or shrink / will it be displayed at first page itself or will do page over run?
2. Will other information is displaying in main window itself or separate window?
3. If possible could you give me the standard SAPScript name (in case if you feel it is difficult to explain)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Mr.Rafiq
I am answering for your questions.
1. As of now how other information is printing? Is it printing like a static text / dynamic text / will it expand or shrink / will it be displayed at first page itself or will do page over run?
--> The size of other information is fixed with dynamic text and only displayed in the first page.
2. Will other information is displaying in main window itself or separate window?
--> Other information is displayed in the separate window.
3. If possible could you give me the standard SAPScript name (in case if you feel it is difficult to explain)?
*--> I would like to send you sample format but I can't find your email address._*_
Is there any way to send you a file?
Hi,
Only one Main window will be there in Script Page. For your requirement where you want to print the same data as in Main window then there are 2 ways.
1) You have to create another secondary window and then change the print program at the place where the Main window is called in FM WRITE_FORM where in passing the text elements of the main windows in the secondary window using the FM WRITE_FORM so that the same data can be accessed.
2) Create the secondary window and then using the document/invoice number you can fetch the required data using the subroutine in the script.
Regards,
Shakeel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.