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

Sub total problem in SAP Script

former_member420959
Participant
0 Likes
2,332

Hello All,

I am using sap script for check print. I have two windows Main and right below it window for page total as below

I wrote a perform in main window to calculate page totals. In the perform i am getting 22 lines as total is getting calculated perfectly. But in the print I am able to see only 21 lines so there is a mismatch between line items total in one page and the page total value.

I expanded the window a bit but then, In perform i am getting 23 entiries in a page but only 22 in print. there is a mismatch again.

Please sugest.

Ujwal

7 REPLIES 7
Read only

former_member201275
Active Contributor
0 Likes
2,268

So... you are not calculating page totals, you are counting the number of lines on the page. Is that correct?

Can you provide a screenshot of your main window where this calculation logic is, and then also a screenshot/s for the Totals window.

Read only

0 Likes
2,268

Hi Glen,

I am trying to calculate page totals look into below screen shots of two windows and two performs code

I am summing up variable in main window and filling that page total in page total window and clearing the sum variable.

Read only

0 Likes
2,268

First you say you are trying to create page totals, then you say you get 22 lines? Then you go on to say you expand the window a bit to get 23 entries, but only 22 in print! How is that Pages!?


Then in your subroutines you are using WRBTR which is currency, and in the other using a function to convert a currency and then passing this value to a field to use as a page count! What are you doing?

Read only

0 Likes
2,268

See Glen you are not getting the requirement correctly.

I need to sum the amount column in a page and display it in the page total window.

So why iam saying it in lines is, for my main window height that i specified i am getting page break for every 22 lines. but I am able to see only 21 lines(item data 21 lines) in print.

In the print I am getting sum for amount for 22 line items but the no of line items displayed is only 21 line items.

Please see the print below.

Read only

0 Likes
2,268

Can you paste the logic also for your page break, plus the main page settings.

Read only

former_member420959
Participant
0 Likes
2,268

Any Body to help?

Read only

Former Member
0 Likes
2,268

Hi,

check post

I also count lines like described in above post. Simply define a "counter"-variable and add 1 for each line you print.

this counting is very static but works good.

regards

Stefan Seeburger