cancel
Showing results for 
Search instead for 
Did you mean: 

problem with BOTTOM command

Former Member
0 Kudos

Hi

I have a sapscript that prints out line items, total tax, and total amount.

The total tax and total amount must only be print out on the bottom of last page of the form. The line items is in MAIN window element 123, and the tatal tax and amount are in MAIN window element 345. I used /:BOTTOM /:ENDBOTTOM command for my element 345. However, it only worked on the form that print out only one page. If there are more than one page, and every page is all filled up with line items, the total tax and total amount will just disappear and doesn't show on the form. If I don't use BOTTOM command, then the total tax and amount will be printed on the top of the MAIN window of last page.

Is there any other solution that i can use to solve this problem?

Thank you.

Lily

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Place Total tax and Total amount in separate footer window whose location is at the bottom of main window. Now write the code inside that window between IF command as given below.

/: IF &NEXTPAGE& EQ 0.

PF Total tax &<total_variable>.

PF Total Amount &total_amount_variable&.

/: ENDIF.

Hope this will help you.

Regards,

Aswini.

Answers (4)

Answers (4)

Former Member
0 Kudos

solved

Former Member
0 Kudos

Hi Lily,

If a corresponding text is output to the BOTTOM area of the main window , it is possible that this will have no space left on the current output page. Then it will be marked internally only for the BOTTOM output of the next page. The actual output is therefore still left.

At the end of the text this BOTTOM output which is still left could be shifted to the next page with an explicit page break using the command NEW-PAGE.

Regards,

Swapna.

Former Member
0 Kudos

Hi,

Check for the &NEXTPAGE& = 0 condition in your bottom endbottom and then print the data

regards

padma

Former Member
0 Kudos

Hi,

write in the if and endif block

/: if &PAGE& eq &SAPSCRIPT-JOBPAGES&

here write the total fields

/: endif.