on 09-01-2009 12:15 PM
Hello Experts
I have a smartform with a single page . I pass internal table from driver program to it to print 2 copies
But the smartform prints copies based on the number of records in the internal table .
For example if the internal table contains 5 records the output is repeated 5 times .
How to correct this ? Expecting an early reply .
Hi Martina
Check with field TDCOPIES in the structure whether it is filled more than once.
Regards,
Sravanthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ru passing the FM SSF_smartform within loop in your print program... if yes remove that and call the FM only once....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It depends upon how you have called the smartforms function module in the driver program.
Are you looping on you internal table and calling the smartforms within the loop?
Can you post your code of your driver program?
Regards,
Ankur Parab
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I am not passing the Fm in a loop .. I am jus passing the copies as 2 in l_wa_output_options
but if thr are 50 records 100 copies are printed . Kindly see the code
SORT it_zfthundi_chq BY chqno vbeln.
} mod2
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZFHUNDI_CHQ'
IMPORTING
fm_name = fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF sy-subrc = 0.
CALL FUNCTION fname
EXPORTING
output_options = l_wa_output_options
w_total = w_total
w_ded = w_ded
TABLES
it_zfthundi_chq1 = it_zfthundi_chq1
it_zfthundi_chq = it_zfthundi_chq
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDIF.
ENDFORM. " P_CHQ_DATA
Hi,
Try like it :
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZFHUNDI_CHQ'
IMPORTING
fm_name = fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF sy-subrc = 0.
l_wa_output_options-TDNEWID = 'X'. "New Spool Number
l_wa_output_options-TDCOPIES : '2'.
CALL FUNCTION fname
EXPORTING
output_options = l_wa_output_options
w_total = w_total
w_ded = w_ded
TABLES
it_zfthundi_chq1 = it_zfthundi_chq1
it_zfthundi_chq = it_zfthundi_chq
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDIF.
Hi,
You will be using the FM SSF_FUNCTION_MODULE_NAME.. You may be calling this FM inside your internal table..
That could be the reason why you form is geting printed as per the number of records in the internal table
Regards
Ansari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check whether you called the SF in a loop of the internal table.
Check you have passed the no of copies field to the smartforms.
Please close the thread, if solved
Regards,
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.