on 01-20-2011 9:11 AM
Hi Experts,
I need to develop a smartform that will be generating multiple number of letters of 6 pages for different vendors.
Each letter will be having a company logo only in the first page.
I've developed 2 pages: First Page and Next Page.
Each page is having following windows:
1. Logo (secondary)
2. Main
3. Footer (secondary)
If I check the condition 'Only on first page' in the Logo window, then the logo is getting printed on the first page of the first letter, rest of the pages are not having any logo.
And if I uncheck that, the logo is getting printed on every pages of every letter.
Please suggest me how to go about that.
Best regards,
Anirban.
Hi anirban,
If i understtod it correctly you need to print letter of 6 pages for one vendor with logo on first page.
You have done everything perfect .
I've developed 2 pages: First Page and Next Page.
Each page is having following windows:
1. Logo (secondary)
2. Main
3. Footer (secondary)
If I check the condition 'Only on first page' in the Logo window,
just call smartform for individual vendor through print program
Lets say you have 10 vendors in itab.
loop at itab.
call smartform
endloop.
You can set output parameter so that you can get all output in one spool request.
hope this will help.
Thanks.
Dhiraj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
some modifications i have made...
DATA: v_output TYPE ssfcompop,
it_r TYPE TABLE OF zcustomer_co.
v_output-tdnewid = 'X'.
addition by dhiraj*
*v_output-TDDEST = output device*
*v_output-TDNOPREV = 'X'.*
IF it_resi IS NOT INITIAL.
To get the fucntion module name generated for the smartform
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_resimonthform
IMPORTING
fm_name = v_fmname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc = 0.
Call the above generated function module
LOOP AT it_resi INTO wa_resi.
refresh: it_r.
APPEND wa_resi TO it_r.
CALL FUNCTION v_fmname
EXPORTING
output_options = v_output
i_month = p_perio
i_year = p_gjahr
TABLES
it_cust = it_r
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDLOOP.
ENDIF.
dhiraj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anirban
refee to structure OUTPUT_OPTIONS (SSFCOMPOP) in interface of your smartform
OUTPUT_OPTIONS-TDNEWID = ' '.
this will make one spool for all print.
You can print this spool using T code SP01.
hope yhis will help.
Thanks,
Dhiraj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dhiraj,
Thanks again.
Please see the code and rectify me where wrong.
DATA: v_output TYPE ssfcompop,
it_r TYPE TABLE OF zcustomer_co.
v_output-tdnewid = 'X'.
IF it_resi IS NOT INITIAL.
* To get the fucntion module name generated for the smartform
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_resimonthform
IMPORTING
fm_name = v_fmname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc = 0.
* Call the above generated function module
LOOP AT it_resi INTO wa_resi.
refresh: it_r.
APPEND wa_resi TO it_r.
CALL FUNCTION v_fmname
EXPORTING
output_options = v_output
i_month = p_perio
i_year = p_gjahr
TABLES
it_cust = it_r
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDLOOP.
ENDIF.
No spool request has been generated.
I've checked with SP01.
Please suggest.
Thanks,
Anirban.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.