cancel
Showing results for 
Search instead for 
Did you mean: 

multiple pages in Smart forms

Former Member
0 Kudos

Hi all,

Actually I want to print multiple pages in Smartforms . I have a option to take New Page and set that Page as Next page . but In my case Pages are dynamic. if any person has solution please send me.... thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

wot kind of smartforms u r developin?? u put the value (which is dynamic) in main window. others u can keep in general window.

u create two page. the 2nd page ll contain ur main window and other thing which do u want to print in 2nd page..

Former Member
0 Kudos

hi jyoti,

Actually I am passing a itab from my program to Smartform. In itab there is two fields EMP Code and EMp Name. And I want to print EMP Code and EMp name in different pages. i used main window for this. but it is showing last record of itab .

Former Member
0 Kudos

hi,

thats easy.

just follow thw steps.

frist create a loop....in that u specify ITAB INTO WA.

AND BELOW u have sorting block

there write EMPCODE and select SORT ON BEGINING checkbox.

now if u observe under the LOOP , u will get a event line.

now right click on that EVENT LINE and select flowlogic and select COMMAND.

now u get COMMAND line below EVENT LINE .

double click on that COMMAND line , and select PAGE BREAK.and set first page.

then now for every EMPCODE a new page will be triggered.

if u have any questions plz ask.

regards

parthu.

Former Member
0 Kudos

hi parthu,

thanks for solution...... it is working.....

Former Member
0 Kudos

Dear Arjun,

Currently am working on similar kind of assignment.

I followed the procedure that you have given.

The problem is that in the Command Line am not able to see the "PAGE BREAK" Option that you had explained.

"now u get COMMAND line below EVENT LINE .

double click on that COMMAND line , and select PAGE BREAK.and set first page."

Currently we are using SAP ECC 6.0.

Kindly let me know how to proceed on this.

Regards

Vinodh

Former Member
0 Kudos

Hi vinod

Currently am working on similar kind of assignment.

I followed the procedure that you have given.

The problem is that in the Command Line am not able to see the "PAGE BREAK" Option that you had explained.

"now u get COMMAND line below EVENT LINE .

double click on that COMMAND line , and select PAGE BREAK.and set first page."

Currently we are using SAP ECC 6.0.

Kindly let me know how to proceed on this.

Former Member
0 Kudos

Hi Vinod,

i followed u untill the command line. i have not seen the option of PAGE BREAK. how to proceed further?

Former Member
0 Kudos

Hi Srinu

just loop the internal table . please see below my code

i_output_email --- My internal table

LOOP AT i_output_email.

CLEAR i_output_email1.

i_output_email1 = i_output_email.

APPEND i_output_email1.

AT END OF xblnr.

  • calling the selfinvoice smartform using functional module

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = gv_form

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

fm_name = fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3

.

IF sy-subrc <> 0.

  • error handling

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

  • Call the smartform

CALL FUNCTION fm_name

EXPORTING

archive_index = toa_dara

archive_parameters = arc_params

control_parameters = gs_control_parameters

output_options = gs_output_options

  • mail_recipient = ls_recipient

  • mail_sender = ls_sender

user_settings = space

is_nast = nast

is_repeat = repeat

IMPORTING

    • it_output = t_output

job_output_info = t_otfdata

TABLES

w_output = i_output_email1

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

  • t_otf[] = t_otfdata-otfdata[].

CLEAR ls_otf1.

LOOP AT t_otfdata-otfdata INTO ls_otf1.

APPEND ls_otf1 TO t_otf.

CLEAR ls_otf1.

ENDLOOP.

REFRESH i_output_email1.

ENDAT.

ENDLOOP.

Former Member
0 Kudos

Hi Arjun,

I have requirement like this.

I need to print different Vendor Details in different pages. As well as I need to sum each vendor acount details and have to print in each page.

And, If I use Sort creteria as " Before Loop", I am getting an Extra page .

Can u please help me in this.

thanks in advacne.

Former Member
0 Kudos

Hi Arjun,

In my case Am printing sales order data in a preprinted paper through LIPI dotmatrix printer.

When i print one sales order, the data is getting printed properly.

But we have written one more program to print multiple sales order, When we select more than one sales order and click print, Then all the data is getting printed on single paer itself.

Please help i this.

Thanks

Satish.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Everyone,

In my case Am printing sales order data in a preprinted paper through LIPI dotmatrix printer.

When i print one sales order, the data is getting printed properly.

But we have written one more program to print multiple sales order, When we select more than one sales order and click print, Then all the data is getting printed on single paer itself.

Please help me in this.

Thanks

Satish

DebbieCloud
Participant
0 Kudos

Hi

Thanks; almost there!  I have an extra blank page before the other pages.  Any idea how I can remove that!  Thanks all!

Regards

Debbie

Former Member
0 Kudos

hi all,

i am not able to use page break after double clickimg on Command which is coming under event block as parthu has told....my requirement is to print out two pages through same internal table but in different format...i hv found the page break option but in output option of header of table.

Former Member
0 Kudos

need not create any more pages . In firsh page only

U can create a different windows and using flags u can change page dynamically.