cancel
Showing results for 
Search instead for 
Did you mean: 

About "MAIN" Window in SAPSCRIPT

gyuseob_kim
Explorer
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

gyuseob_kim
Explorer
0 Kudos

Sorry but I didn't tell you that I am printing out the checks(SAPSCRIPT) by using 'F110' Function.

Which means that I am not developing the printing program.

Thank you.

Answers (5)

Answers (5)

gyuseob_kim
Explorer
0 Kudos

I solved this with the other way with the

customer.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

gyuseob_kim
Explorer
0 Kudos

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.

Former Member
0 Kudos

Hi there,

You have put the samething in both main windows. In your case, put those items 1-6 in main windows1 and main windows2. That's how to print 2 checks in one page or labels in one page.

Hope this helps.

gyuseob_kim
Explorer
0 Kudos

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

Former Member
0 Kudos

Hi,

As per my knowledge it is not possible, anyway I will try my best, could you write your standard SAP Script program name. If it is a standard program then I can see. If you find solution by ur self then please let me know.

Thanks!

gyuseob_kim
Explorer
0 Kudos

Hi,

Thank you.

Standard Printing progrsm is RFFOUS_C.

Standard SAPSCRIPT that I copied is F110_PRENUM_CHCK but, this standard SAPSCRIPT has only one MAIN Window.

so, It doesn't help me.

I will let you know if I find the solution anyway.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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)?

gyuseob_kim
Explorer
0 Kudos

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?

former_member188005
Contributor
0 Kudos

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.

gyuseob_kim
Explorer
0 Kudos

I didn't tell you that I am printing the checks by using 'F110'(Automatic payment).

Can I use your logic in this case?

Thank you.