on 12-31-2012 7:39 AM
Hi All
I have some unusual requirement.
Depending on specific customer fied value i have to to display 2 or 3 copies in print preview.
My invoice data will never flow out of 1 page since we have used corresponding split for it that helps data will be limited to 1 page.
So the invoice form currently is of one page.
Now if some specific customer fied is X , there should be 2 pages in print preview with same data but with difference of some specifc harcoded text.
If this specific customer field is blank, there should be 3 pages in print preview with exactly same data but with difference only some specifc harcoded text.
It will be like : '###### page 1 '
'yyyyyyy page 2'
'zzzzzz page 3'
and other data in all these pages will be same.
Please help how can i achieve this requirement.
Thanks.
Hi Ujj,
Do follow below process code,
call function 'SSF_OPEN'
exporting
user_settings = 'X'.
loop at itab into wa. "if you are passing single record, then no need of loop directly pass WA and check the condition(i.e. Customer flag).
1st perview
perform call_smartform.
if cust_flag = 'X'.
2nd perview
*your hardcoding and passing to smartform layout
perform call_smartform. "Call smartform function module in the subroutine
else.
2nd perview
*your 2nd print harding coding and passing to smartform layout
3rd perview
*your 3rd harding coding and passing to smartform layout
endif.
endloop.
**Call below Function module for closing your smartforms
call function 'SSF_CLOSE'
* IMPORTING
* JOB_OUTPUT_INFO =
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
others = 4.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
hope it will work for ur requirement.
Thanks,
Regards,
Praveen Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ujj,
Pass below parameters before calling smartform function module as show below.
wa_control_parameters-no_open = c_x.
wa_control_parameters-no_close = c_x.
wa_control_parameters-preview = c_x.
wa_control_parameters-device = 'PRINTER'.
CALL FUNCTION g_fmname " Smartform name
EXPORTING
control_parameters = wa_control_parameters
output_options = wa_output_options
user_settings = 'X'
wa_final = wa_final
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Hope it will solve your problem.
Regards,
Praveen Reddy
Thanks a lot the issue is solved now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can define smartform with 2 and 3 pages in program you can validate your condtion and call the smartform.
hope it helps,
Vinoth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
inside the smartforms inside pages put these conditons. it will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There can be different solutions.
solution 1. You can call smartforms two / three times and send different harcoded text in different call.
solution 2. You can send data to smart form so that It can be display in two or three pages depending on the data sent.
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.