Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Script

madan_ullasa
Contributor
0 Likes
680

hi frnds,

I have 2 main windows in the same layout. they are on the same page placed one below the other. the output of one main window should be reflected in the other. but thats not happening.

any suggestions ? points assured to all the replies.

regards,

Madan..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
638

It does not work that way. When the first MAIN window is filled, it will go to the second MAIN window.

Is this a custom SAPscript or changes to an existing one?

This comes up a lot with check printing.

7 REPLIES 7
Read only

Former Member
0 Likes
638

Hi,

Have you used NEW-WINDOW statement at the end of the main window.

Next Main Window: NEW-WINDOW

Each page can consist of up to 99 main windows. Each main window is assigned a consecutive identifying number (0..98), and the windows are filled in this order. This feature enables SAPscript to print labels and to output multi-column text. When one main window fills up, the next main window on that page is taken, if there is a next one. A page break is inserted after the last main window.

You can use the NEW-WINDOW command to call the next main window explicitly, even if the current main window is not yet full. If you are in the last main window of the page, the command has the same effect as the NEW-PAGE command.

Syntax:

/: NEW-WINDOW

Thanks and Regards,

Bharat Kumar Reddy.V

Message was added by: Bharat Reddy V

Read only

Former Member
0 Likes
639

It does not work that way. When the first MAIN window is filled, it will go to the second MAIN window.

Is this a custom SAPscript or changes to an existing one?

This comes up a lot with check printing.

Read only

0 Likes
638

hi salter,

the requirement is for check printing.

its like, i have to print twice the same line items on two different pages. is there a way to do that ?

regards,

madan.

Read only

0 Likes
638

Madan,

If the requirement is to print the same content in two different pages..why dont you trigger a new-page on printing the first content and re-print the same window again on next page.

Regards

Anurag

Read only

0 Likes
638

The requirement is to print the same information on the same page.

The standard check uses print program RFFOUS_C.

It prints the billing information in the MAIN window.

Text elements are called for each billing document. There can be many lines.

If there are many, it will go to a second page and print "overflow" information.

Madan wants to duplicate the billing document lines in a second window on each page. You can NOT do this with a second MAIN window.

You can control printing in the ABAP program. You would have to make a Z version.

It is NOT recommended to use a custom program for check printing.

This program is updated frequently in different releases and support packages.

There is another way.

You use DEFINE statements for each line that will print in the MAIN window.

You created a CONST window to duplicate the billling line information.

The DEFINE variables are listed in the CONST window.

I have a two example SAPscript layout sets that use this logic.

They use the standard RFFOUS_C print program without any changes.

You can load the layout sets, use transaction FCH7 to reprint an existing check, and enter the new layout set name in the ALTERNATIVE FORM.

If you post your email address, I can send both forms to you.

Read only

Former Member
0 Likes
638

Madan,

The purpose of the main window is to hold concurrent values that is....generally matter that are continued in several pages are printed in main window. In your application, why would you use two main windows in one page...if you would really want the same ouptut in the second main window, just copy the first window and paste it on the same page. You`ll get the same result as the first window. Further, whenever the first main window is filled the content is supplied to the next main window.

Reward if helpful.

Regards

Read only

Former Member
0 Likes
638

Madan,

>>output of one main window should be reflected in the other.

You mean based on values of Window1, the Window2 values should come ?

If so all those manipulations needs to be done in print program. Not on SAP Script. Script is going to be just an output.

You could use the same variables of window1 also in Window2 in order to print or check those values there.

Hope this helps you

~thomas