cancel
Showing results for 
Search instead for 
Did you mean: 

Sapscript page display setup

Former Member
0 Kudos

Hi Experts,

I'm facing a program in sapscript in the page setup and need advice and guidance from all experts. Presently, my page setup is

First Page


Page            FIRST           
Meaning         First page      
Next page       NEXT            
Page Counter    Initiatize Counter

Next Page


Page            NEXT           
Meaning         Next page      
Next page       NEXT            
Page Counter    Increase Counter

It will print the first page, if more data, it will print continue in next page and subsequence to next page again.

Now, my requirement is I need to print another printout, let's name as Final Page.

This printout will be printed, no matter how many pages there are.

For example the sequence of printout can be

1) FIRST page, FINAL page.

OR

2) FIRST page, NEXT page, FINAL page

OR

3) FIRST page, NEXT page, NEXT page, NEXT page, FINAL page.

Could someone guide me how to I proceed with this?

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Pawan_Kesari
Active Contributor
0 Kudos

Create a element in main window, in the end call that element.

In that element put code to issue new page using page FINAL.

Former Member
0 Kudos

Hi all,

Thanks for all the replies.

Let me explain my requirement again, I'm sorry for the confusing.

All I want to do is to add an extra page (FINAL page) in the end of the printout.

The FINAL page layout is totally different with FIRST page and NEXT page

My form works perfectly, if the page setup like: -

1) FIRST page.

OR

2) FIRST page, NEXT page

OR

3) FIRST page, NEXT page, NEXT page, NEXT page.

After I added another page (Final page) in sapscript, nothing is shown.

1) FIRST page, FINAL page.

OR

2) FIRST page, NEXT page, FINAL page

OR

3) FIRST page, NEXT page, NEXT page, NEXT page, FINAL page.

FYI, I found the LOOP and ENDLOOP. Therefore, I added the code after the LOOP..ENDLOOP.


      CALL FUNCTION 'WRITE_FORM'
           EXPORTING
                ELEMENT = 'SI'
           EXCEPTIONS
                OTHERS  = 01.

But the sy-subrc returns '1'.

Should I control it in the ABAP program or in SAPscript?

Can someone explain me how should I proceed with this?

Former Member
0 Kudos

Hello all,

Finally I found a solution myself. I used START_FORM and END_FORM method.

Thanks to all.

former_member575017
Participant
0 Kudos

Hi myahsam wong,

Could you explain me hw u got this output bcz I also having the same problem as i have two different forms to execute in same print program.....

Thanks

Basu

Former Member
0 Kudos

Hi Basu,

The concept of combine 2 different form layout into one print program is : -

OPEN_FORM

START_FORM (first form layout)

CLOSE_FORM

START_FORM (second form layout)

CLOSE_FORM

END_FORM

former_member575017
Participant
0 Kudos

Hi myahsam wong,

Thats right but wat would be the parameters like Which form name I need to pass in OPEN_FORM as I have two forms say FORM1 and FORM2

OPEN_FORM(which form name I need to pass in parameter FORM)

START_FORM (here will pass FORM1)

write_form

END_FORM

START_FORM (here will pass FORM2)

write_form

END_FORM

CLOSE_FORM

Thanks

Basu

Former Member
0 Kudos

Hi,

You can define the first form layout in either OPEN_FORM or START_FORM, then subsequently, second layout form name in the next START_FORM.

former_member575017
Participant
0 Kudos

Hi myahsam wong,

Thanks alot and its working fine.

Thanks

Basu

Former Member
0 Kudos

Hi wong,

You should use the command NEW-PAGE for forcefull page break.