cancel
Showing results for 
Search instead for 
Did you mean: 

To add Cover page in SAP Script if pages are more than 10.

Former Member
0 Kudos

Hello Experts,

I want to print a Cover page first if and only if number of pages exceeds 10 in SAP Script.

Cover Page should be the first page and then the remaiing pages.

Accepted Solutions (0)

Answers (1)

Answers (1)

satyajit_mohapatra
Active Contributor
0 Kudos

It's not possible to find the no of pages the script will generate, until it's printed. Again, you need the cover letter as the first page.

There could be a solution to your requirement. Call the script and get OTF format without printing it to spool. You will get to know the no of pages in the main script . If it's more than 10, call the secondary script to get the OTF data of cover letter. Merge the OTF of main script to OTF of cover letter and print the OTF data to spool using FM PRINT_OTF.

Check this link for similar code. In your case, the spool of the two sapscripts needs to be merged.