Application Development 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: 

SAPscript layout -Repeating Main window in same page

0 Kudos

Hi,

I have a requirement in sapscript layout to duplicate content within a page in two sections, of which the content can span across multiple pages.

Can anyone give an idea how this can be achieved.

This particular layout has 3 sections:

1st window (Top window): invoice Details (multiple items)

2nd window (Middle window): Check Details single item

3rd window (Bottom window): invoice Details (multiple items) {same content of the 1st window}

The invoice details can span across multiple pages.

Main window alone works perfect with the requirement.

I have attempted with a copy of a Main window for the 3rd window, and as it's specified it can only continue from the 1st main Window and i couldn't find a way to control it's value passing from the calling program.

I have also tried using a dynamic window for the 3rd window, but haven't worked to get the desired values shown across multiple pages. When it cross to a new page it repeats its last value across all pages.

Please help me with this. Thanks in Advance.

Regards,

Viraj.

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

May be you can try by using the combination of the FM READ_FORM_LINES and WRITE_FORM_LINES.

There is a command called NEW-WINDOW which will call your next main window. You can also use that.

Regards,

Naimesh Patel

8 REPLIES 8

naimesh_patel
Active Contributor
0 Kudos

For this, you need to some workarounds.

When you have more than one main window in your page, and if the first main window gets overflow, it will start writing the data in the second main window.

To achieve the functionality in your SAPScript, you have to fill your table in such a way that if the window gets overflowed, it will start writing the same data in the second window.

For example: Your both main window are with identical height and can occupy 5 items.

So, you have duplicate the 5 items in your internal table. You have to put those duplicated records from the index 6 to 10. You need to repeat this for all the items in the internal table.

This way, when the first main window gets overflowed, it will right the same data (index 6 to 10) in the second main window and so on.

Regards,

Naimesh Patel

0 Kudos

Thanks Naimesh for your speedy reponse.

I have attempted this already but my difficulty in doing this is, I'm customizing the requirement on a standard layout.

As you said, the repetition required window sizes are equal in size.

However, The current Main window has few more elements such as summary, carried forward details incorporated of which also needs to repeated in each 1st(top) and 3rd(bottom) windows.

As you suggested replicating an internal table was an option i was trying out. But i found it difficult to get the elements such as Summary lines and conditioning spaces was becoming even more difficult to trace.

Would you happen to have any idea to may be simplify this further?

Also would like to hear thoughts on the feasibility on using a Dynamic window to replicate the content option.

Thanks & regards,

Viraj.

naimesh_patel
Active Contributor
0 Kudos

May be you can try by using the combination of the FM READ_FORM_LINES and WRITE_FORM_LINES.

There is a command called NEW-WINDOW which will call your next main window. You can also use that.

Regards,

Naimesh Patel

0 Kudos

Hi,

This seems to be a like a long back post.

But I  am facing kind of just opposite issue.

In my case the main window details are printing twice and client want to rectify that

I have attached the file regarding this..can anyone suggest me with this..

0 Kudos

Hi Debrath,

Your question seems a bit unclear.

Is this related to a cheque layout?or a payment voucher?

0 Kudos

Hi,

Thanks for your response. This is a check layout..Bottom of the form the check is printing fine...But the above details which I have sent the screen shot is printing twice as you see. They run this through F110 t.code...

Thanks.

0 Kudos

The Standard layout only prints the invoice details once.


If your existing layout prints invoice repeated, which means that already a customization is in place which repeats the invoice breakdown.


If the items are being repeated in the main window, it could be that the repetition customization is done on the calling program, then a solution could be to remove/comment that call  in the calling program by searching text element name.


If the items are being repeated from a non-main window, then a solution could be to remove/comment the entire element in the non-main window.



hope this helps


Best Regards,

Viraj.

0 Kudos

Thanks Viraj for you suggestion.

I will try the options that you gave me..Thanks again... .

Regards,

Debrath